/* Modern Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden; /* Harita dışına taşmayı engelle */
    font-family: 'Inter', sans-serif;
    /* Derin bir uzay/boşluk hissi */
    background: radial-gradient(circle at center, #0f172a, #020617);
    color: #e2e8f0;
    
    /* Mobil Native Hissi İçin Gerekli Seçim Korumaları */
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: none;
}

/* Harita Taşıyıcı Alanı (Pencere) */
#map-container {
    width: 100vw;
    height: 100vh;
    cursor: grab;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1; /* Fog canvas'in altında kalacak */
    touch-action: none;
}

#map-container:active {
    cursor: grabbing;
}

/* Sürüklenebilir İç Harita */
#map {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
    will-change: transform;
}

/* Sis Katmanı (Canvas) */
#fogCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none; /* Tıklamaların ve sürüklemelerin alttaki haritaya geçmesine izin verir */
    z-index: 2; /* Marker'ların üstünde, modal'ın altında */
}

/* Harita Üzerindeki İşaretçi (Nokta) */
.map-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 3; /* Sis katmanının altında ama etkileşime açık */
    transition: all 0.5s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.marker-icon {
    font-size: 2.5rem;
    position: relative;
    z-index: 2;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.9);
    animation: float 3s ease-in-out infinite;
}

.marker-pulse {
    position: absolute;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(255,215,0,0.8) 0%, rgba(255,215,0,0) 70%);
    border-radius: 50%;
    z-index: 1;
    animation: pulse 2s infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes pulse {
    0% { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* --- YENİ EKLENEN: Zemindeki Yön Okları --- */
.direction-arrow-container {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    z-index: 1; /* Marker'ların altında, zeminde */
    pointer-events: none; /* Etkileşime girmesine gerek yok */
    opacity: 0;
    animation: fadeInArrow 2s forwards;
    /* Gövde merkezinden dönebilmesi için */
    transform-origin: left center;
    transform: translate(-50%, -50%) rotate(var(--angle, 0deg));
}

.arrow-graphics {
    display: flex;
    align-items: center;
    animation: pulseArrow 2s infinite;
}

.arrow-line {
    width: 150px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,215,0,0) 0%, rgba(255,215,0,0.8) 100%);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.arrow-head {
    width: 0; 
    height: 0; 
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 20px solid rgba(255,215,0,0.9);
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
    margin-left: -2px; /* Çizgiyle birleşsin */
}

.arrow-text {
    position: absolute;
    left: 180px; /* Okun ucundan biraz uzakta */
    width: max-content;
    max-width: 300px;
    color: #fbbf24;
    font-size: 0.9rem;
    font-weight: 300;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
    background: rgba(15, 23, 42, 0.6);
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255,215,0,0.2);
    /* Yazının okunabilir kalması için dönüşünü tersine çevireceğiz JS tarafında */
}

@keyframes fadeInArrow {
    0% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--angle, 0deg)) scale(0.5); }
    100% { opacity: 1; transform: translate(-50%, -50%) rotate(var(--angle, 0deg)) scale(1); }
}

@keyframes pulseArrow {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(15px); }
}

/* Modal (Popup) Tasarımı */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 20px;
    padding: 2.5rem;
    width: 90%;
    max-width: 500px;
    max-height: 85vh; /* Ekrana sığmasını garanti eder */
    overflow-y: auto; /* İçerik taşarsa kendi içinde kayar */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 215, 0, 0.1);
    position: relative;
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.hidden .modal-content {
    transform: translateY(50px);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    padding-bottom: 1rem;
}

.modal-header h1 {
    font-family: 'Cinzel', serif;
    font-size: 3.5rem;
    color: #fbbf24;
    text-shadow: 0 0 15px rgba(251, 191, 36, 0.4);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.modal-header h2 {
    font-size: 1.5rem;
    color: #f1f5f9;
    font-weight: 300;
    letter-spacing: 2px;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-row {
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.8rem 1rem;
    border-radius: 10px;
    border-left: 3px solid #fbbf24;
}

.info-row .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    margin-bottom: 0.3rem;
}

.info-row span:not(.label) {
    font-size: 1rem;
    color: #f8fafc;
    line-height: 1.4;
}

/* --- Zikirmatik Stilleri --- */
.zikir-row {
    background: rgba(0, 0, 0, 0.4);
    border-left: 3px solid #10b981;
    text-align: center;
    padding: 1.5rem;
}

.zikirmatik-container {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.zikir-action-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
}

.zikir-display {
    font-size: 2.5rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: #fbbf24;
    text-shadow: 0 0 15px rgba(251, 191, 36, 0.5);
    transition: transform 0.1s ease;
    white-space: nowrap;
}

.zikir-display #name-count {
    font-size: 1.5rem;
    color: #94a3b8;
}

.zikir-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: white;
    font-size: 1.2rem;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 20px -5px rgba(16, 185, 129, 0.5);
    transition: transform 0.1s, box-shadow 0.1s, background 0.3s;
    font-weight: 600;
    white-space: nowrap;
}

.zikir-btn:active {
    transform: scale(0.95);
}

.zikir-btn:disabled {
    background: #475569;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.zikir-success {
    color: #10b981;
    font-weight: 600;
    font-size: 1.2rem;
    animation: fadeIn 0.5s ease;
}

.d-none {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Ok Metni Büyütme (Sadece Web / Geniş Ekranlar İçin) */
@media (min-width: 768px) {
    .arrow-text {
        font-size: 1.2rem;
        padding: 15px 25px;
        left: 200px;
    }
}

/* Intro Screen Styles */
.intro-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    max-width: 800px;
    padding: 3rem 2rem;
}

.intro-arabic {
    font-family: 'Cinzel', serif;
    font-size: 2.8rem;
    color: #fbbf24;
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.6);
    line-height: 1.5;
    text-align: center;
    direction: rtl;
}

.intro-turkish {
    font-size: 1.3rem;
    color: #f1f5f9;
    font-weight: 300;
    font-style: italic;
    line-height: 1.6;
    text-align: center;
}

.intro-timer {
    font-size: 3rem;
    color: #10b981;
    font-weight: bold;
    margin-top: 1rem;
    font-family: 'Inter', sans-serif;
    text-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
    animation: pulseTimer 1s infinite;
}

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

@media (max-width: 768px) {
    .intro-arabic { font-size: 1.8rem; }
    .intro-turkish { font-size: 1rem; }
    .intro-timer { font-size: 2.5rem; }
}

/* Footer Links (Privacy/Support) */
.footer-links {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10;
    display: flex;
    gap: 15px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #fbbf24;
}

@media (max-width: 768px) {
    .footer-links {
        bottom: 10px;
        right: 10px;
        flex-direction: column;
        gap: 5px;
        align-items: flex-end;
    }
}
