/* --- متغیرهای رنگ و فونت --- */
:root {
    --primary-gold: #ffd700;
    --dark-bg: #1a1a1a;
    --light-text: #f0f0f0;
    --popup-bg: #2c2c2c;
    --green-accent: #4CAF50;
    --blue-accent: #3498db; /* رنگ جدید برای دکمه قبلی */
    --font-main: 'Vazirmatn', sans-serif;
}

/* --- استایل‌های عمومی --- */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: var(--font-main);
    background-color: var(--dark-bg);
    color: var(--light-text);
    overflow: hidden;
}

.hidden {
    display: none !important;
}

/* --- صفحه خوش‌آمدگویی (بدون تغییر) --- */
#start-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 3000;
    transition: opacity 0.8s ease-out;
}
.start-content {
    padding: 30px 40px;
    border-radius: 15px;
    max-width: 90%;
    width: 500px;
}
.start-content h1 {
    color: var(--primary-gold);
    font-size: 3em;
    margin-bottom: 15px;
    text-shadow: 0 0 10px var(--primary-gold);
}
#start-btn {
    padding: 12px 30px;
    font-size: 1.2em;
    font-family: var(--font-main);
    cursor: pointer;
    border: 2px solid var(--primary-gold);
    background-color: var(--primary-gold);
    color: var(--dark-bg);
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: bold;
}
#start-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--primary-gold);
}

/* --- کانتینر اصلی و نقشه (بدون تغییر) --- */
#app-container {
    width: 100%;
    height: 100%;
}
#map {
    width: 100%;
    height: 100%;
    background-color: #f0f0f0;
    z-index: 1;
}

/* --- آیکون پالسی روی نقشه --- */
/* ▼▼▼ اصلاح: این کلاس حالا به circleMarker اضافه می‌شود و فقط برای انیمیشن است ▼▼▼ */
.pulsing-icon {
    animation: pulse 1.5s infinite ease-in-out;
    cursor: pointer;
}
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 10px 15px rgba(255, 215, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    }
}

/* ▼▼▼ جدید: استایل برای برچسب کنار مارکر فعال ▼▼▼ */
.active-marker-tooltip {
    background-color: rgba(0, 0, 0, 0.75);
    color: var(--primary-gold);
    border: 1px solid var(--primary-gold);
    border-radius: 5px;
    padding: 5px 10px;
    font-weight: bold;
    white-space: nowrap;
    /* حذف استایل‌های پیش‌فرض Leaflet برای ظاهر تمیزتر */
    box-shadow: none;
}
/* حذف فلش کنار tooltip */
.leaflet-tooltip-left.active-marker-tooltip::before,
.leaflet-tooltip-right.active-marker-tooltip::before {
    border: none !important;
}


/* --- نوار پیشرفت (بدون تغییر) --- */
#progress-bar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    padding: 5px 15px;
    border-radius: 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.progress-icon {
    width: 25px;
    height: 25px;
    background-image: url('assets/images/star_off.svg');
    background-size: cover;
    transition: transform 0.3s;
}
.progress-icon.completed {
    background-image: url('assets/images/star_on.svg');
    transform: scale(1.2);
}

/* --- پاپ‌آپ اختصاصی --- */
#story-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    transition: opacity 0.4s;
}
.popup-content {
    background: var(--popup-bg);
    padding: 20px;
    border-radius: 15px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 15px;
    border: 1px solid #444;
    transition: transform 0.4s ease-in-out, opacity 0.4s;
}
.popup-content.changing {
    opacity: 0;
    transform: scale(0.95);
}
#popup-title {
    color: var(--primary-gold);
    font-size: 1.8em;
    margin: 0;
}
.slideshow-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
    background-color: #111;
    border-radius: 8px;
    overflow: hidden;
}
#popup-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.7s ease-in-out;
}
#popup-image.active {
    opacity: 1;
}
#popup-audio {
    width: 100%;
}

/* ▼▼▼ اصلاح: استایل جدید برای دکمه‌ها جهت قرارگیری کنار هم ▼▼▼ */
.popup-buttons {
    display: flex;
    justify-content: space-between; /* دکمه‌ها را به طرفین می‌چسباند */
    gap: 10px;
}
.popup-buttons button {
    flex-grow: 1; /* هر دو دکمه فضای یکسانی اشغال کنند */
    padding: 10px 20px;
    font-size: 1.1em;
    font-family: var(--font-main);
    cursor: pointer;
    border: none;
    border-radius: 8px;
    transition: transform 0.2s;
    font-weight: 500;
    color: white;
}
.popup-buttons button:hover {
    transform: scale(1.03);
}
#next-btn {
    background-color: var(--green-accent);
}
#prev-btn {
    background-color: var(--blue-accent);
}