/**
 * Kıble Pusulası CSS - Basit ve Çalışan Versiyon
 */

:root {
    --gold: #D4AF37;
    --gold-light: #F4E4B7;
    --gold-dark: #B8941F;
    --green: #2ECC71;
    --green-dark: #27AE60;
    --blue: #3498DB;
    --red: #E74C3C;
    --dark: #1a1a2e;
    --darker: #0f0f1e;
    --navy: #16213e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--navy) 0%, var(--darker) 100%);
    min-height: 100vh;
    color: white;
    position: relative;
}

/* Yıldızlar */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Pattern Overlay */
.pattern-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(212, 175, 55, 0.03) 10px,
        rgba(212, 175, 55, 0.03) 20px
    );
    pointer-events: none;
    z-index: 1;
}

/* Container */
.container {
    position: relative;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 15px;
    z-index: 10;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

.header h1 {
    font-size: 48px;
    font-weight: bold;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    font-family: 'Times New Roman', serif;
}

.header .subtitle {
    font-size: 20px;
    color: var(--gold-light);
    margin-bottom: 15px;
    font-weight: 300;
}

.header .verse {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    direction: rtl;
    font-family: 'Traditional Arabic', 'Arabic Typesetting', serif;
    line-height: 1.8;
    padding: 0 10px;
}

/* Konum Kartı */
.location-info-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.current-location-display {
    display: flex;
    align-items: center;
    gap: 12px;
}

.location-icon {
    font-size: 24px;
    animation: locationPulse 2s ease-in-out infinite;
}

@keyframes locationPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.location-text {
    flex: 1;
    min-width: 0;
}

.location-label {
    font-size: 12px;
    color: var(--gold-light);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.location-name {
    font-size: 16px;
    font-weight: 600;
    color: white;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==========================================
   PUSULA - BASİT YAKLAŞIM
   ========================================== */
.compass-container {
    width: 300px;
    height: 300px;
    margin: 0 auto 30px;
    position: relative;
}

/* Dış çember */
.compass-outer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(212, 175, 55, 0.05) 100%);
    border: 3px solid var(--gold);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3), inset 0 0 20px rgba(212, 175, 55, 0.1);
}

/* Orta çember */
.compass-middle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 270px;
    height: 270px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(212, 175, 55, 0.5);
}

/* Derece işaretleri container */
.degree-markers {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 270px;
    height: 270px;
    border-radius: 50%;
}

/* Derece işareti - BASİT */
.degree-marker {
    position: absolute;
    width: 2px;
    height: 10px;
    background: rgba(212, 175, 55, 0.5);
    top: 5px;
    left: 50%;
    margin-left: -1px;
    transform-origin: 50% 130px;
}

.degree-marker.major {
    height: 15px;
    width: 2px;
    background: var(--gold);
}

.degree-label {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    color: var(--gold);
    font-weight: bold;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
}

/* Ana yönler */
.cardinal-directions {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.direction {
    position: absolute;
    font-size: 20px;
    font-weight: bold;
    color: var(--gold);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.direction.north {
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.direction.east {
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
}

.direction.south {
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.direction.west {
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
}

/* Dönen iç halka */
.compass-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.1s ease-out;
}

/* Kıble oku */
.qibla-indicator {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-bottom: 80px solid var(--green);
    filter: drop-shadow(0 0 10px var(--green));
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { 
        filter: drop-shadow(0 0 10px var(--green));
        opacity: 1;
    }
    50% { 
        filter: drop-shadow(0 0 20px var(--green));
        opacity: 0.8;
    }
}

/* Kabe sembolü */
.kaaba-symbol {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.kaaba-symbol::before {
    content: '🕋';
}

/* Bilgi kartları */
.info-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.info-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    padding: 20px 15px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.3);
}

.info-card.full-width {
    grid-column: 1 / -1;
}

.info-label {
    font-size: 12px;
    color: var(--gold-light);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.info-value {
    font-size: 24px;
    font-weight: bold;
    color: white;
    font-family: 'Courier New', monospace;
}

.info-value.small {
    font-size: 16px;
}

/* Buton */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-primary.active {
    background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4);
}

.btn-icon {
    font-size: 20px;
}

.btn-primary.active .btn-icon {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.btn-primary:disabled .btn-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Durum mesajları */
.status-message {
    padding: 15px 20px;
    border-radius: 12px;
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    font-weight: 500;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-message.success {
    background: rgba(46, 204, 113, 0.2);
    border: 2px solid var(--green);
    color: var(--green);
}

.status-message.error {
    background: rgba(231, 76, 60, 0.2);
    border: 2px solid var(--red);
    color: var(--red);
}

.status-message.warning {
    background: rgba(241, 196, 15, 0.2);
    border: 2px solid #F1C40F;
    color: #F1C40F;
}

/* Talimat kartı */
.instructions-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 15px;
    padding: 25px 20px;
    margin-top: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.instructions-card h3 {
    color: var(--gold);
    margin-bottom: 15px;
    font-size: 18px;
}

.instructions-card ol {
    padding-left: 20px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
}

.instructions-card li {
    margin-bottom: 8px;
}

.instructions-card .note {
    background: rgba(241, 196, 15, 0.1);
    border-left: 4px solid #F1C40F;
    padding: 12px 15px;
    margin-top: 15px;
    border-radius: 5px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
}

/* ==========================================
   MOBİL RESPONSIVE
   ========================================== */
@media (max-width: 480px) {
    .compass-container {
        width: 260px;
        height: 260px;
    }
    
    .compass-middle {
        width: 234px;
        height: 234px;
    }
    
    .degree-markers {
        width: 234px;
        height: 234px;
    }
    
    .degree-marker {
        height: 8px;
        transform-origin: 50% 112px;
    }
    
    .degree-marker.major {
        height: 12px;
    }
    
    .degree-label {
        font-size: 8px;
        top: -16px;
    }
    
    .direction {
        font-size: 16px;
    }
    
    .qibla-indicator {
        border-left: 12px solid transparent;
        border-right: 12px solid transparent;
        border-bottom: 60px solid var(--green);
    }
    
    .kaaba-symbol {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .header h1 {
        font-size: 36px;
    }
    
    .info-value {
        font-size: 20px;
    }
}

@media (max-width: 360px) {
    .compass-container {
        width: 240px;
        height: 240px;
    }
    
    .compass-middle {
        width: 216px;
        height: 216px;
    }
    
    .degree-markers {
        width: 216px;
        height: 216px;
    }
    
    .degree-marker {
        height: 7px;
        transform-origin: 50% 103px;
    }
    
    .degree-marker.major {
        height: 10px;
    }
    
    .direction {
        font-size: 14px;
    }
}