/* =========================================
   تِم مدرن و رنگارنگ - جنگ مناطق
========================================= */
:root {
    --bg-main: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --primary-color: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --secondary-color: #ec4899;
    --accent-color: #10b981;
    --gold: #f59e0b;
    --danger: #ef4444;
    --border-radius: 16px;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Vazirmatn', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* =========================================
   هدر مدرن
========================================= */
/* هدر بهینه برای موبایل */
.modern-header {
    padding: 10px; /* کاهش فضای داخلی */
    border-radius: 0 0 15px 15px;
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 5px;
}

.header-currencies {
    display: flex;
    gap: 5px; /* فاصله کمتر بین اسپری و کوین */
}

.mini-currency-pill {
    padding: 4px 8px; /* بسیار فشرده‌تر */
    font-size: 0.75rem; /* فونت کوچک‌تر */
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 4px;
}

.mini-currency-pill i {
    font-size: 0.7rem; /* آیکون کوچک‌تر */
}

/* کوچک کردن دکمه منوی گنگ */
.aproject-link-btn {
    padding: 4px 10px;
    font-size: 0.75rem;
    background: #fff;
    color: var(--primary-color);
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
}


.back-btn {
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    background: rgba(255,255,255,0.2);
    padding: 10px 14px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
    transition: 0.3s;
}

.back-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* =========================================
   کارت‌های وضعیت (Currency Bar)
========================================= */
.currency-bar.modern-card {
    display: flex;
    justify-content: space-around;
    background: var(--card-bg);
    margin: 0 15px 20px;
    padding: 15px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.02);
}

.currency-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-box {
    width: 45px; height: 45px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
}

.spray-color .icon-box { background: #e0e7ff; color: #4f46e5; }
.coin-color .icon-box { background: #fef3c7; color: #d97706; }

.currency-info { display: flex; flex-direction: column; }
.currency-info .label { font-size: 0.8rem; color: var(--text-muted); }
.currency-info .value { font-size: 1.2rem; font-weight: 900; }

/* =========================================
   تب‌ها و پیام وضعیت
========================================= */
.group-nav-tabs {
    display: flex; gap: 10px; margin-bottom: 20px;
    background: #e2e8f0; padding: 5px; border-radius: 12px;
}

.tab-btn {
    flex: 1; padding: 10px; border: none; border-radius: 8px;
    background: transparent; color: var(--text-muted);
    font-weight: bold; cursor: pointer; transition: 0.3s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}

.tab-btn.active {
    background: white; color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.info-card {
    background: #e0f2fe; color: #0369a1;
    padding: 12px; border-radius: 12px;
    display: flex; gap: 10px; align-items: center;
    margin-bottom: 10px !important; margin-top: 0 !important;
    border: 1px solid #bae6fd;
}
.info-card i { font-size: 1.5rem; }
.info-card p { margin: 0; font-size: 0.85rem; line-height: 1.5; }

/* =========================================
   نگهدارنده نقشه
========================================= */
.map-wrapper {
    width: 100%;
    height: 60vh; 
    overflow: hidden; 
    border-radius: var(--border-radius);
    background: #e2e8f0;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.05);
    position: relative;
    cursor: grab;
    touch-action: none; 
}

.map-wrapper:active {
    cursor: grabbing;
}

#city-map {
    display: grid;
    grid-template-columns: repeat(20, 60px); 
    gap: 6px;
    padding: 20px;
    width: max-content; 
    transform-origin: 0 0; 
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* =========================================
   بلوک‌های نقشه (مناطق)
========================================= */
.district-block {
    background: #ffffff;
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    width: 60px; height: 60px;
    position: relative;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    transition: transform 0.2s, border-color 0.2s;
    user-select: none;
    content-visibility: auto;
    contain-intrinsic-size: 60px 60px; /* اندازه پایه بلوک برای پیش‌گیری از پرش صفحه */
}
}

.district-block:hover {
    transform: scale(1.1); z-index: 10;
    border-color: var(--primary-color);
    box-shadow: 0 10px 15px -3px var(--primary-glow);
}

.district-block.owned {
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.district-block.is-center {
    border-width: 3px; border-color: var(--secondary-color);
    background: #fdf2f8;
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.4);
    transform: scale(1.1); z-index: 5;
}

.district-bg-image {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover; opacity: 0.2; z-index: 0;
}
.district-block.owned .district-bg-image { opacity: 0.6; }

.district-content { position: relative; z-index: 2; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.district-id { font-weight: 900; font-size: 1.1rem; color: var(--text-main); text-shadow: 0 2px 4px rgba(255,255,255,0.8); }

.district-health-bar {
    position: absolute; bottom: 4px; width: 80%; height: 6px;
    background: #e2e8f0; border-radius: 4px; overflow: hidden;
}

/* تغییر مهم برای CSS-Only Health Bar */
.district-health-fill { 
    height: 100%; 
    border-radius: 4px; 
    transition: width 0.3s, background-color 0.3s; 
    /* فرمول: درصد سلامتی * 1.2. عدد 0 میشه قرمز، عدد 120 میشه سبز */
    background-color: hsl(calc(var(--health, 100) * 1.2), 80%, 45%);
}

/* =========================================
   لیست‌ها (برترین‌ها و لاگ‌ها)
========================================= */
.modern-list { display: flex; flex-direction: column; gap: 12px; }

.public-group-item, .log-item {
    background: var(--card-bg); padding: 15px; border-radius: 12px;
    display: flex; align-items: center; justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #f1f5f9; transition: 0.3s;
}

.public-group-item:hover, .log-item:hover {
    transform: translateY(-2px); box-shadow: 0 8px 15px rgba(0,0,0,0.08);
}

.public-group-info { display: flex; align-items: center; gap: 12px; }
.public-group-info img { width: 50px; height: 50px; border-radius: 12px; object-fit: cover; border: 2px solid #e2e8f0; }
.public-group-info b { font-size: 1.1rem; }

/* =========================================
   مودال مدرن (Glassmorphism)
========================================= */
.modal {
    position: fixed; inset: 0; background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 9999;
}

.modal.hidden { display: none; }

.glass-panel {
    background: #ffffff; width: 90%; max-width: 400px;
    border-radius: 24px; padding: 25px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    animation: slideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-header h4 { margin: 0; font-size: 1.3rem; color: var(--text-main); font-weight: 900; }

.close-modal-btn {
    background: #f1f5f9; border: none; width: 35px; height: 35px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text-muted); transition: 0.3s;
}
.close-modal-btn:hover { background: #fee2e2; color: var(--danger); transform: rotate(90deg); }

.modern-health { background: #f1f5f9; height: 12px; border-radius: 6px; overflow: hidden; margin-bottom: 10px; }

/* تغییر مهم دوم برای CSS-Only Health Bar درون مودال حمله */
.health-fill { 
    height: 100%; 
    border-radius: 6px;
    transition: width 0.3s ease, background-color 0.3s ease; 
    background-color: hsl(calc(var(--health, 100) * 1.2), 80%, 45%);
}

.health-text { text-align: center; font-weight: 900; color: var(--text-main); font-size: 1.2rem; margin: 0 0 10px; }

.owner-badge {
    background: #fef3c7; color: #d97706; padding: 8px 15px; border-radius: 8px;
    text-align: center; font-size: 0.9rem; font-weight: bold; margin-bottom: 20px;
}

.modern-input {
    width: 100%; padding: 15px; border: 2px solid #e2e8f0; border-radius: 12px;
    font-size: 1.1rem; text-align: center; outline: none; transition: 0.3s;
    background: #f8fafc; font-weight: bold; box-sizing: border-box;
}
.modern-input:focus { border-color: var(--primary-color); background: #ffffff; box-shadow: 0 0 0 4px var(--primary-glow); }

.btn-attack {
    width: 100%; padding: 15px; background: linear-gradient(135deg, var(--secondary-color), #be185d);
    color: white; border: none; border-radius: 12px; font-size: 1.2rem; font-weight: 900;
    cursor: pointer; transition: 0.3s; display: flex; justify-content: center; align-items: center; gap: 10px;
    margin-top: 20px; box-shadow: 0 10px 20px rgba(236, 72, 153, 0.3);
}
.btn-attack:hover { transform: translateY(-2px); box-shadow: 0 15px 25px rgba(236, 72, 153, 0.4); }

/* =========================================
   تغییرات هدر
========================================= */
.header-new-layout { flex-direction: column; gap: 15px; align-items: stretch; }
.header-top-row { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 2px 0;}
.header-currencies { display: flex; gap: 8px; align-items: center; }

.mini-currency-pill {
    display: flex; align-items: center; gap: 6px; padding: 4px 10px; 
    border-radius: 20px; font-size: 0.85rem; font-weight: bold; color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.25); 
    transition: transform 0.2s;
}

.mini-currency-pill:hover { transform: scale(1.05); }
.spray-badge { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.rapcoin-badge { background: linear-gradient(135deg, #eab308, #ca8a04); }
.mini-currency-pill i { font-size: 0.9rem; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.15)); }
.mini-currency-pill .value { font-family: 'Vazirmatn', sans-serif; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); }

.header-tabs {
    width: 100%; margin-bottom: 0; background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px); box-sizing: border-box;
}

.header-tabs .tab-btn { color: rgba(255, 255, 255, 0.9); }
.header-tabs .tab-btn:hover { background: rgba(255, 255, 255, 0.1); }
.header-tabs .tab-btn.active { background: white; color: var(--primary-color); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); }

/* =========================================
   اسلایدر
========================================= */
.guide-slider-container { width: 100%; overflow: hidden; position: relative; border-radius: 14px; margin-bottom: 12px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); }
.guide-slider-wrapper { display: flex; width: 100%; transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1); will-change: transform; }
.guide-slide { min-width: 100%; flex: 0 0 100%; display: flex; gap: 12px; align-items: center; padding: 14px 14px 25px 14px; color: #ffffff; box-sizing: border-box; white-space: normal; overflow-wrap: break-word; }
.guide-slide i { font-size: 1.5rem; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15)); }
.guide-slide p { margin: 0; font-size: 0.82rem; line-height: 1.6; text-shadow: 0 1px 2px rgba(0,0,0,0.15); }
.slide-blue { background: linear-gradient(135deg, #0284c7, #0369a1); }
.slide-purple { background: linear-gradient(135deg, #7c3aed, #6d28d9); }
.slide-orange { background: linear-gradient(135deg, #ea580c, #c2410c); }
/* استایل اختصاصی برای اسلاید بیمارستان */
.slide-hospital { 
    background: linear-gradient(135deg, #10b981, #047857); /* سبز تیره و متفاوت برای درمانی بودن */
}
.slider-dots { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 10; }
.slider-dots .dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.4); cursor: pointer; transition: all 0.3s ease; }
.slider-dots .dot.active { background: #ffffff; width: 16px; border-radius: 4px; }

/* دکمه ریست مپ */
.map-control-btn {
    position: absolute; bottom: 20px; left: 20px; z-index: 100;
    background: var(--card-bg); border: 2px solid #cbd5e1; color: var(--text-main);
    width: 45px; height: 45px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; cursor: pointer; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); transition: all 0.2s ease-out;
}
.map-control-btn:hover { border-color: var(--primary-color); color: var(--primary-color); transform: scale(1.1); box-shadow: 0 6px 16px var(--primary-glow); }
.map-control-btn:active { transform: scale(0.95); }
/* استایل دکمه دفاع */
.btn-attack.btn-defend {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}
.btn-attack.btn-defend:hover {
    box-shadow: 0 15px 25px rgba(16, 185, 129, 0.4);
}
/* کدهای قبلی اسلایدر... */
.slide-blue { background: linear-gradient(135deg, #0284c7, #0369a1); }
.slide-purple { background: linear-gradient(135deg, #7c3aed, #6d28d9); }
.slide-orange { background: linear-gradient(135deg, #ea580c, #c2410c); }

/* استایل اسلایدهای جدید */
.slide-green { background: linear-gradient(135deg, #10b981, #059669); }
.slide-red { background: linear-gradient(135deg, #ef4444, #b91c1c); }
/* استایل‌های مربوط به اسلایدر راهنمای مناطق جدید */
.slide-purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }

/* برای اطمینان از اینکه آیکون سالن شهر به درستی در مرکز قرار می گیرد */
.district-block.is-center i.fa-landmark {
    filter: drop-shadow(0 2px 4px rgba(236, 72, 153, 0.5));
    animation: pulseCenter 2s infinite;
}

@keyframes pulseCenter {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
/* =========================================
   رفع مشکل مخفی شدن و ارتفاع تب‌های لیست
========================================= */
.tab-content {
    display: none;
    width: 100%;
}

.tab-content.active {
    display: block;
    min-height: 60vh;
    animation: fadeInTab 0.3s ease-out;
}

.groups-list-container.modern-list {
    max-height: 65vh;
    overflow-y: auto;
    padding: 5px;
    padding-bottom: 20px;
    /* ظاهر زیبای اسکرول‌بار */
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #e2e8f0;
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* =========================================
   سیستم گرافیکی شیلد و حباب محافظتی مناطق
========================================= */

/* ایجاد افکت انیمیشن نبض برای حباب شیلد */
@keyframes shieldPulse {
    0% {
        box-shadow: 0 0 8px 2px rgba(14, 165, 233, 0.5), inset 0 0 6px rgba(14, 165, 233, 0.3);
        border-color: #38bdf8;
    }
    50% {
        box-shadow: 0 0 18px 5px rgba(14, 165, 233, 0.8), inset 0 0 12px rgba(14, 165, 233, 0.6);
        border-color: #0ea5e9;
    }
    100% {
        box-shadow: 0 0 8px 2px rgba(14, 165, 233, 0.5), inset 0 0 6px rgba(14, 165, 233, 0.3);
        border-color: #38bdf8;
    }
}

/* اعمال کلاس حباب به منطقه روی نقشه */
.district-block.has-shield {
    animation: shieldPulse 2.5s infinite ease-in-out;
    background: radial-gradient(circle, rgba(224,242,254,1) 0%, rgba(255,255,255,1) 70%) !important;
}

/* اندیکاتور عددی شیلد در گوشه بلوک مپ */
.map-shield-indicator {
    position: absolute;
    bottom: 14px;
    right: 4px;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #ffffff;
    font-size: 8px;
    font-weight: bold;
    padding: 1px 4px;
    border-radius: 4px;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* استایل بج نمایش شیلد در مودال حمله */
.shield-badge {
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
    color: #0369a1;
    padding: 8px 15px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 900;
    margin-bottom: 10px;
    border: 1px solid #7dd3fc;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* دکمه اکشن شارژ سپر داخل مودال */
.btn-attack.btn-shield-action {
    background: linear-gradient(135deg, #0ea5e9, #0369a1);
    box-shadow: 0 10px 20px rgba(14, 165, 233, 0.3);
}

.btn-attack.btn-shield-action:hover {
    box-shadow: 0 15px 25px rgba(14, 165, 233, 0.4);
}
/* =========================================
   اصلاحات رسپانسیو و رفع مشکلات مودال اکشن
========================================= */

/* استایل ثابت و صحیح نوار سلامتی */
.modern-health { 
    position: relative; 
    height: 28px !important; 
    background-color: #e2e8f0; 
    border-radius: 6px; 
    overflow: hidden; 
    margin-bottom: 15px; 
}

/* جلوگیری از بیرون زدن متن جان و تداخل با توضیحات */
.health-text { 
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    margin: 0 !important; 
    font-size: 14px; 
    color: #1e293b; 
    text-shadow: 0 0 5px #ffffff, 0 0 5px #ffffff, 0 0 5px #ffffff; 
    z-index: 2; 
    pointer-events: none; /* برای کلیک نشدن اشتباه روی متن */
    font-weight: 900;
}

/* رفع مشکل پایین رفتن دکمه‌ها هنگام باز شدن کیبورد در موبایل */
#action-modal-panel {
    max-height: 85vh; /* محدودیت ارتفاع برای بیرون نرفتن از صفحه */
    display: flex;
    flex-direction: column;
    padding: 20px;
}

/* ایجاد قابلیت اسکرول داخلی فقط برای محتوای مودال */
.action-modal-body {
    overflow-y: auto;
    flex: 1;
    padding-bottom: 15px; 
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

/* بهینه‌سازی سایز اینپوت و دکمه برای کیبورد موبایل */
.modern-input {
    padding: 12px;
}
.btn-attack {
    margin-top: 10px;
    padding: 12px;
}
/* =========================================
   پس‌زمینه‌های اختصاصی برای مودال هر منطقه
========================================= */

#action-modal-panel {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 0.3s ease-in-out;
}

/* لایه شیشه‌ای و نیمه‌شفاف برای خوانا ماندن متن‌ها روی عکس 
  این لایه باعث میشه عکس بک‌گراند کمی تار و روشن بشه تا متن‌های تیره به خوبی دیده بشن
*/
#action-modal-panel.has-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.85); /* مقدار 0.85 میزان شفافیت لایه روی عکس است */
    backdrop-filter: blur(4px); /* کمی تار کردن عکس پس‌زمینه */
    border-radius: inherit;
    z-index: 0;
}

/* بالا آوردن تمام محتوای مودال از زیر لایه شفاف */
#action-modal-panel > * {
    position: relative;
    z-index: 1;
}
/* =========================================
   افکت مناطق بحرانی (Hot Zones)
========================================= */
@keyframes pulse-danger {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); border-color: #ef4444; }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); border-color: #f87171; }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); border-color: #ef4444; }
}

./* استایل پیشرفته هاله نوری نئون برای مناطق در حال جنگ */
./* =========================================
   افکت مناطق بحرانی (Hot Zones) - آژیر خطر واضح و جیغ
========================================= */

/* =========================================
   افکت مناطق بحرانی (Hot Zones) - نسخه نهایی و تضمینی
========================================= */

.district-block.critical-danger {
    border: 3px solid #ff0000 !important;
    z-index: 10 !important;
    /* انیمیشن پالس ابعاد و سایه بیرون */
    animation: danger-bump 0.7s infinite alternate ease-in-out !important;
}

/* لایه قرمز رنگ که میاد روی عکس گنگ تا قرمزی کاملاً تو چشم باشه */
.district-block.critical-danger::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1; /* بالاتر از عکس پس‌زمینه قرار میگیره */
    pointer-events: none;
    /* انیمیشن تپش رنگ داخلی */
    animation: danger-color-pulse 0.7s infinite alternate ease-in-out !important;
}

/* متن‌ها و جان منطقه باید حتما بیان روی این لایه قرمز تا خوانا بمونن */
.district-block.critical-danger .district-content {
    z-index: 5 !important;
}

/* -----------------------------------
   کی‌فریم‌های انیمیشن‌ها
------------------------------------ */

@keyframes danger-bump {
    0% {
        transform: scale(1);
        box-shadow: 0 0 5px rgba(255, 0, 0, 0.4);
    }
    100% {
        transform: scale(1.1); /* بزرگ شدن محسوس منطقه */
        box-shadow: 0 0 30px rgba(255, 0, 0, 1), 0 0 50px rgba(255, 0, 0, 0.6);
    }
}

@keyframes danger-color-pulse {
    0% { 
        background-color: rgba(255, 0, 0, 0.2); 
    }
    100% { 
        background-color: rgba(255, 0, 0, 0.85); /* قرمز غلیظ و جیغ در نقطه اوج */
    }
}
/* =========================================
   نوار اخبار متحرک (News Ticker)
========================================= */
/* =========================================
   نوار اخبار متحرک (بدون فاصله و یکپارچه)
========================================= */
.news-ticker-container {
    display: flex;
    background: #1e293b;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    position: relative;
    border: 1px solid #334155;
}

.news-ticker-label {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: white;
    padding: 10px 15px;
    font-weight: 900;
    font-size: 0.9rem;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
}

.news-ticker-label i {
    animation: pulseCenter 2s infinite;
}

.news-ticker-wrapper {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    white-space: nowrap;
    /* این ترفند باعث می‌شود محاسبات انیمیشن بی‌نقص کار کند */
    direction: ltr; 
}

.news-ticker-content {
    display: inline-flex;
    width: max-content;
    direction: rtl; /* متن‌ها همچنان راست‌چین و فارسی می‌مانند */
    /* تغییر زمان انیمیشن به 30 ثانیه برای حرکت نرم‌تر (قابل تنظیم) */
    animation: seamless-ticker 30s linear infinite;
}

.news-ticker-content:hover {
    animation-play-state: paused;
}

.ticker-item {
    font-size: 0.85rem;
    color: #e2e8f0;
}

.ticker-item b { color: #38bdf8; }
.ticker-item .district-name { color: #facc15; font-weight: bold; }

/* حرکت نرم از چپ به راست مثل شبکه خبر */
@keyframes seamless-ticker {
    0% { transform: translateX(-50%); } 
    100% { transform: translateX(0%); }
}
/* استایل تب‌های مدرن و فشرده */
/* =========================================
   اصلاح و فیکس کردن تب‌های برترین‌ها و نبردها
===/* =========================================
   اصلاح نهایی تب‌های برترین‌ها و نبردها
========================================= */
.header-tabs {
    display: flex;
    gap: 6px; /* کاهش جزئی فاصله برای فیت شدن */
    margin: 10px 15px; /* حاشیه استاندارد از چپ و راست */
    background: rgba(255, 255, 255, 0.95);
    padding: 3px; /* پدینگ بسیار ظریف برای کاهش ارتفاع کل باکس */
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    box-sizing: border-box; /* جلوگیری قطعی از بیرون زدن کادر */
    width: calc(100% - 30px); /* تنظیم دقیق عرض هماهنگ با مارجین */
}

.header-tabs .tab-btn {
    flex: 1;
    padding: 6px 10px; /* کاهش پدینگ برای کم شدن محسوس ارتفاع دکمه */
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--text-muted);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    
    /* فیکس کردن آیکون و متن در یک ردیف */
    display: flex;
    flex-direction: row; /* تراز افقی */
    align-items: center;
    justify-content: center;
    gap: 4px; /* فاصله کم بین آیکون و متن */
    white-space: nowrap; /* جلوگیری از شکستن متن به خط بعد */
    
    font-size: 0.8rem; /* سایز متن بهینه برای موبایل */
    box-sizing: border-box;
}

.header-tabs .tab-btn i {
    font-size: 0.85rem; /* کوچک‌تر شدن آیکون همگام با متن */
    display: inline-block;
    line-height: 1;
}

.header-tabs .tab-btn:hover {
    background: #f1f5f9;
    color: var(--primary-color);
}

.header-tabs .tab-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.25);
}
/* =========================================
   افکت مناطق دارای شیلد (Shielded Zones) - هاله نئونی ملایم
========================================= */

.district-block.has-shield {
    border: 3px solid #00d2ff !important; /* مرز آبی فیروزه‌ای نئونی */
    z-index: 8 !important; /* بالاتر از مناطق عادی، پایین‌تر از مناطق بحرانی قرمز */
    
    /* انیمیشن پالس آرام و ملایم هاله بیرونی */
    animation: shield-bounce-gentle 1.5s infinite alternate ease-in-out !important;
}

/* لایه کریستالی آبی که میاد روی عکس گنگ */
.district-block.has-shield::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1; /* بالاتر از عکس پس‌زمینه */
    pointer-events: none;
    
    /* انیمیشن پالس ملایم رنگ داخلی شیلد */
    animation: shield-color-gentle 1.5s infinite alternate ease-in-out !important;
}

/* حفظ خوانایی متن‌ها و لایه اصلی اطلاعات */
.district-block.has-shield .district-content {
    z-index: 5 !important;
}

/* -----------------------------------
   کی‌فریم‌های انیمیشن شیلد (آرام و هولوگرافیک)
------------------------------------ */

@keyframes shield-bounce-gentle {
    0% {
        transform: scale(1);
        box-shadow: 0 0 5px rgba(0, 210, 255, 0.3);
    }
    100% {
        transform: scale(1.03); /* بزرگ‌نمایی بسیار ریز و نرم */
        box-shadow: 0 0 18px rgba(0, 210, 255, 0.7), inset 0 0 10px rgba(0, 210, 255, 0.4);
    }
}

@keyframes shield-color-gentle {
    0% { 
        background-color: rgba(0, 210, 255, 0.05); /* بسیار شفاف و محو */
    }
    100% { 
        background-color: rgba(0, 210, 255, 0.3); /* هاله کریستالی ملایم در اوج تپش */
    }
}
/* =========================================
   میز فرماندهی تاریک (Dark Radar Grid)
========================================= */

/* ۱. پس‌زمینه کانتینر نقشه: سرمه‌ای تاریک با شبکه شطرنجی راداری */
.map-wrapper {
    background-color: #0b1120 !important; /* رنگ سرمه‌ای بسیار تاریک مایل به سیاه */
    background-image: url('https://uploadkon.ir/uploads/fcbd14_261000088302.png');
        linear-gradient(rgba(56, 189, 248, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.07) 1px, transparent 1px) !important;
    background-size: cover;
    background-position: center center;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.9) !important; /* سایه عمیق داخلی */
}

/* ۲. تغییر ظاهر بلوک‌های مناطق به حالت سایبرپانکی-نظامی */
.district-block {
    background-color: #1e293b !important; /* رنگ پایه بلوک‌ها تاریک */
    border-color: #334155 !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5) !important; /* سایه تاریک‌تر */
}

/* ۳. خوانا شدن اعداد (شناسه مناطق) روی پس‌زمینه تیره */
.district-id {
    color: #f8fafc !important; /* سفید یخی */
    /* سایه تاریک و غلیظ برای جدا شدن متن از عکس زیرین */
    text-shadow: 
        0 2px 4px rgba(0,0,0,0.9), 
        0 0 8px rgba(0,0,0,0.8),
        0 0 2px rgba(0,0,0,1) !important; 
}

/* ۴. متمایز کردن مناطقی که فتح شده‌اند (Owned) در فضای تاریک */
.district-block.owned {
    border-color: #facc15 !important; /* حاشیه طلایی نئونی */
    box-shadow: 0 0 12px rgba(250, 204, 21, 0.4) !important;
}

/* ۵. افکت هولوگرام سایبرپانکی برای آواتار گنگ‌ها */
/* عکس گنگ‌ها به جای یک عکس معمولی، شبیه یک تصویر دیجیتالی-نظامی می‌شود */
/* ۵. نمایش رنگی و واضح آواتار گنگ‌ها */
.district-block.owned .district-bg-image {
    opacity: 0.6 !important; /* کمی شفافیت را بیشتر کردیم تا عکس‌ها بهتر دیده شوند */
    filter: none !important; /* حذف فیلتر سیاه و سفید */
    mix-blend-mode: normal !important; /* بازگرداندن رنگ اصلی و طبیعی عکس‌ها */
}

/* ۶. سالن اصلی شهر (مرکز) روی مپ تاریک باید بدرخشد */
.district-block.is-center {
    background-color: #2b1524 !important; /* بنفش-زرشکی تاریک */
    border-color: #ec4899 !important;
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.5) !important;
}
/* =========================================
   مودال اطلاع‌رسانی سفارشی (Custom Alert)
========================================= */
.custom-alert {
    position: fixed; 
    inset: 0; 
    background: rgba(11, 17, 32, 0.85); /* پس‌زمینه تاریک منطبق بر تم رادار */
    backdrop-filter: blur(8px); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    z-index: 10000; /* بالاتر از همه چیز */
    opacity: 0; 
    pointer-events: none; 
    transition: opacity 0.3s ease;
}

.custom-alert.show {
    opacity: 1; 
    pointer-events: auto;
}

.custom-alert-content {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 1px solid #334155;
    text-align: center;
    transform: scale(0.8) translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 30px 20px;
    width: 85%;
    max-width: 350px;
}

.custom-alert.show .custom-alert-content {
    transform: scale(1) translateY(0);
}

/* درخشش اختصاصی بر اساس نوع پیام */
.custom-alert-content.success { 
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5), 0 0 30px rgba(16, 185, 129, 0.25); 
    border-color: rgba(16, 185, 129, 0.4); 
}
.custom-alert-content.error { 
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5), 0 0 30px rgba(239, 68, 68, 0.25); 
    border-color: rgba(239, 68, 68, 0.4); 
}
.custom-alert-content.info { 
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5), 0 0 30px rgba(14, 165, 233, 0.25); 
    border-color: rgba(14, 165, 233, 0.4); 
}

.custom-alert-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    /* افکت تپش ملایم برای آیکون */
    animation: alert-icon-pulse 2s infinite ease-in-out;
}

.custom-alert-content.success .custom-alert-icon { color: #10b981; filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.6)); }
.custom-alert-content.error .custom-alert-icon { color: #ef4444; filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.6)); }
.custom-alert-content.info .custom-alert-icon { color: #38bdf8; filter: drop-shadow(0 0 10px rgba(14, 165, 233, 0.6)); }

.custom-alert-content h4 {
    color: #f8fafc;
    font-size: 1.5rem;
    margin: 0 0 10px;
    font-weight: 900;
}

.custom-alert-text {
    color: #cbd5e1;
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 25px;
    white-space: pre-line; /* برای اینکه \n در جاوا اسکریپت تبدیل به خط جدید شود */
}

/* دکمه اختصاصی بستن */
#close-custom-alert {
    background: linear-gradient(135deg, var(--primary-color), #4f46e5);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
    margin-top: 0;
    padding: 12px;
}

@keyframes alert-icon-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
/* استایل دکمه پلاس کنار بج‌ها */
.btn-plus-icon {
    background: #10b981;
    color: #ffffff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-right: 8px;
    box-shadow: 0 0 5px rgba(16, 185, 129, 0.5);
    transition: transform 0.2s;
}
.rapcoin-plus {
    background: #f59e0b;
    box-shadow: 0 0 5px rgba(245, 158, 11, 0.5);
}
.mini-currency-pill:hover .btn-plus-icon {
    transform: scale(1.1);
}

/* استایل لیست‌های راهنما در مودال */
.guide-option {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.2s ease;
    cursor: pointer;
}
.guide-option:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}
.guide-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-left: 15px;
    flex-shrink: 0;
}
.guide-text {
    display: flex;
    flex-direction: column;
}
.guide-text strong {
    font-size: 0.95rem;
    color: #f8fafc;
    margin-bottom: 3px;
}
.guide-text span {
    font-size: 0.75rem;
    color: #94a3b8;
}
/* تنظیمات عمومی باکس هاله نوری مناطق ویژه */
.special-zone-glow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.6rem; /* بزرگتر کردن سایز آیکون */
    animation: pulseNeonGlow 2s infinite ease-in-out;
    margin-bottom: 5px;
}

/* 💗 هاله نوری مرکز شهر (صورتی) */
.center-glow i { color: #F1C40F; }
.center-glow {
    filter: drop-shadow(0 0 8px #ec4899) drop-shadow(0 0 15px #ec4899);
}

/* ❤️ هاله نوری کارخانه (قرمز) */
.factory-glow i { color: #ef4444; }
.factory-glow {
    filter: drop-shadow(0 0 8px #ef4444) drop-shadow(0 0 15px #ef4444);
}

/* 💙 هاله نوری تجاری (آبی) */
.commercial-glow i { color: #3b82f6; }
.commercial-glow {
    filter: drop-shadow(0 0 8px #3b82f6) drop-shadow(0 0 15px #3b82f6);
}

/* 💜 هاله نوری اداری (بنفش) */
.admin-glow i { color: #8b5cf6; }
.admin-glow {
    filter: drop-shadow(0 0 8px #8b5cf6) drop-shadow(0 0 15px #8b5cf6);
}

/* ✨ انیمیشن تپش نرم برای هاله نوری */
@keyframes pulseNeonGlow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.9;
        filter: saturate(1.2) contrast(1.1);
    }
    50% {
        transform: scale(1.12);
        opacity: 1;
        /* در اوج تپش، درخشش بیشتر می‌شود */
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.2); 
    }
}
/* 💚 هاله نوری بیمارستان (سبز نئونی) */
/* افکت تپش برای آیکون بیمارستان جهت دیده شدن بهتر */
.hospital-glow {
    animation: pulse-red 1s infinite;
}

@keyframes pulse-red {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* رنگ پس‌زمینه مخصوص بلاک بیمارستان برای تضاد با سبز */
.district-block:has(.hospital-glow) {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border: 2px solid #01C4FF !important;
}
.help-slider-wrapper {
    display: flex;
    flex-direction: row; /* اسلایدها کنار هم در یک خط */
    transition: transform 0.4s ease-in-out;
    width: 100%;
}
.help-slide {
    flex: 0 0 100%; /* هر اسلاید دقیقاً تمام عرض کادر را بگیرد */
    width: 100%;
}
.modal-header h4#attack-district-name {
    color: #ffffff !important;
    display: block !important;
    text-align: right; /* یا center بسته به سلیقه خودتون */
    width: 100%;
}
/* افکت نئونی منطقه معدنی روی نقشه */
.mineral-glow i { 
    color: #06b6d4; 
}
.mineral-glow {
    filter: drop-shadow(0 0 8px #06b6d4) drop-shadow(0 0 15px #0891b2);
}

/* دکمه مدرن استخراج همگانی منابع */
.btn-extract {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 16px rgba(6, 182, 212, 0.25);
}

.btn-extract:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(6, 182, 212, 0.4);
    filter: brightness(1.1);
}

.btn-extract:disabled {
    background: #64748b;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.7;
}
/* 💎 هاله نوری معدن (فیروزه‌ای) */
.mineral-glow i { color: #F7DD11; }
.mineral-glow {
    filter: drop-shadow(0 0 8px #14b8a6) drop-shadow(0 0 15px #14b8a6);
}

/* استایل دکمه استخراج */
.btn-extract {
    background: linear-gradient(135deg, #0d9488, #0f766e);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 900;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 20px rgba(20, 184, 166, 0.3);
}

.btn-extract:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(20, 184, 166, 0.4);
}

/* رنگ بک‌گراند اسلاید راهنمای معدن */
.slide-teal {
    background: linear-gradient(135deg, #14b8a6, #0f766e);
}
/* افکت نئونی کارخانه تولیدی روی نقشه */
.production-glow i { 
    color: #f97316; 
}
.production-glow {
    filter: drop-shadow(0 0 8px #f97316) drop-shadow(0 0 15px #ea580c);
}

/* دکمه مدرن استخراج همگانی اسپری */
.btn-production {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 16px rgba(249, 115, 22, 0.25);
}

.btn-production:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(249, 115, 22, 0.4);
    filter: brightness(1.1);
}

.btn-production:disabled {
    background: #64748b;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.7;
}
/* =========================================
   ۱. بهینه‌سازی مودال عملیات برای القای حس اسکرول در موبایل
========================================= */

/* ایجاد محدودیت و جایگاه برای سایه راهنمای اسکرول */
#action-modal-panel {
    position: relative;
    overflow: hidden; /* جلوگیری از بیرون زدن سایه */
}

/* سایه محو در پایین مودال برای نشان دادن ادامه محتوا */

/* سفارشی‌سازی و پررنگ کردن اسکرول‌بار اختصاصی مودال برای موبایل */
.action-modal-body::-webkit-scrollbar {
    width: 6px;
}
.action-modal-body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}
.action-modal-body::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

/* =========================================
   ۲. جذاب‌سازی و برجسته کردن دکمه‌های استخراج منابع
========================================= */

/* دکمه استخراج رپ‌کوین (معدن) - تم طلایی/نارنجی */
.btn-extract {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: white !important;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 1rem;
    font-weight: 900;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 16px rgba(245, 158, 11, 0.3) !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
    animation: pulse-gold 2s infinite alternate; /* انیمیشن تپش */
}

.btn-extract:hover, .btn-extract:active {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(245, 158, 11, 0.5) !important;
}

/* دکمه استخراج اسپری (تولیدی) - تم فیروزه‌ای/سبز */
.btn-production {
    background: linear-gradient(135deg, #06b6d4, #0891b2) !important;
    color: white !important;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 1rem;
    font-weight: 900;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 16px rgba(6, 182, 212, 0.3) !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
    animation: pulse-cyan 2s infinite alternate; /* انیمیشن تپش */
}

.btn-production:hover, .btn-production:active {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(6, 182, 212, 0.5) !important;
}

/* =========================================
   ۳. انیمیشن‌های جلب توجه (Pulse Effect)
========================================= */

@keyframes pulse-gold {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5); }
    100% { box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); }
}

@keyframes pulse-cyan {
    0% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.5); }
    100% { box-shadow: 0 0 0 10px rgba(6, 182, 212, 0); }
}
/* =========================================
   تغییرات آیکون منطقه بعد از فتح شدن
========================================= */

/* انیمیشن نرم برای تغییر حالت */
.district-id {
    transition: all 0.3s ease-in-out;
}

/* انتقال آیکون به گوشه و کوچک کردن آن هنگام فتح منطقه */
.district-block.owned .district-id {
    position: absolute;
    top: 4px;
    right: 4px;
    transform: scale(0.65); /* کوچک شدن آیکون به ۶۵٪ سایز اصلی */
    transform-origin: top right;
    z-index: 20 !important; /* قرار گرفتن بالاتر از لوگوی گنگ و سایر لایه‌ها */
    margin: 0 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9); /* افزایش خوانایی آیکون روی لوگوهای روشن */
}

/* بهینه‌سازی لوگوی گنگ پس از فتح */
.district-block.owned .district-bg-image {
    opacity: 0.7; /* شفافیت مناسب برای نمایان شدن کامل لوگو */
    z-index: 1; /* قرارگیری در لایه زیرین آیکون منطقه */
    border-radius: 8px; /* حفظ گردی گوشه‌ها برای زیبایی بیشتر */
}

/* اگر آیکون دارای هاله نوری (Glow) است، سایه آن را کمی کنترل می‌کنیم تا مزاحم لوگو نشود */
.district-block.owned .special-zone-glow {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}
/* --- استایل‌های اختصاصی موتور SVG --- */

.svg-district-cell {
    stroke: rgba(255, 255, 255, 0.15);
    stroke-width: 1.5;
    transition: filter 0.2s, stroke-width 0.2s, stroke 0.2s;
    cursor: pointer;
}

.svg-district-cell:hover {
    stroke: #ffffff;
    stroke-width: 3.5;
    filter: brightness(1.3);
}

.svg-district-cell.owned-path {
    stroke: var(--gold);
    stroke-width: 2.5;
}

/* افکت Hot Zone برای مناطقی که جانشان کم است (۲ بعدی و با کنتراست بالا) */
.svg-district-cell.critical-path {
    stroke: #ff0000;
    stroke-width: 3;
    animation: svg-danger-pulse 0.8s infinite alternate ease-in-out;
}
/* افکت درخشش مناطق ویژه روی نقشه */
.special-zone-glow {
    display: inline-block;
    animation: pulseCenter 2s infinite;
}

.factory-glow i { color: #4B3621; filter: drop-shadow(0 0 4px #ef4444); }
.commercial-glow i { color: #3b82f6; filter: drop-shadow(0 0 4px #3b82f6); }
.admin-glow i { color: #8b5cf6; filter: drop-shadow(0 0 4px #8b5cf6); }
.hospital-glow i { color: #10b981; filter: drop-shadow(0 0 4px #10b981); }
.mineral-glow i { color: #ffff00; filter: drop-shadow(0 0 4px #14b8a6); }
/* رنگ نارنجی برای تولیدی اسپری */
.spray-glow i { color: #f97316; filter: drop-shadow(0 0 4px #f97316); }


/* تنظیمات عمومی باکس هاله نوری مناطق ویژه */
.special-zone-glow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px; /* عرض باکس کوچکتر شد */
    height: 24px; /* ارتفاع باکس کوچکتر شد */
    border-radius: 50%;
    font-size: 0.8rem; /* سایز خود آیکون خیلی کوچکتر شد */
    animation: pulseNeonGlow 2s infinite ease-in-out;
    margin-bottom: 2px; /* فاصله از نوار جان کمتر شد */
}
/* =========================================
   نوار ناوبری پایین صفحه گیمینگ با ارتفاع کمتر
========================================= */
body {
    padding-bottom: 75px !important; /* ایجاد فضای خالی مناسب در پایین صفحه */
}

.bottom-gaming-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 56px; /* ارتفاع سایدبار کم شد (از ۶۵ به ۵۶) */
    background: linear-gradient(0deg, #050510 0%, #111827 100%);
    border-top: 1px solid #334155;
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom); /* سازگاری با گوشی‌های آیفون جدید */
}

.bottom-gaming-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #94a3b8; /* رنگ متن پیش‌فرض متد */
    font-size: 0.7rem; /* فونت کمی فشرده‌تر برای ارتفاع کمتر */
    font-weight: 700;
    gap: 3px;
    transition: all 0.2s ease;
    flex: 1;
    height: 100%;
    -webkit-tap-highlight-color: transparent;
}

.bottom-gaming-nav .nav-item i {
    font-size: 1.15rem;
    transition: transform 0.2s ease;
}

/* افکت حالت فعال و هاور نئونی */
.bottom-gaming-nav .nav-item:hover, 
.bottom-gaming-nav .nav-item.active {
    color: #8b5cf6; /* بنفش نئونی هماهنگ با تم اصلی */
}

.bottom-gaming-nav .nav-item.active i {
    transform: translateY(-2px);
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.6);
}

/* =========================================
   استایل دکمه وسط (پنل گنگ) فشرده شده
========================================= */
.bottom-gaming-nav .nav-item.center-btn {
    position: relative;
    top: -14px; /* تنظیم موقعیت دکمه با توجه به کاهش ارتفاع */
    overflow: visible;
}

.bottom-gaming-nav .center-btn-inner {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    width: 54px; /* اندازه دکمه وسط کمی فشرده شد */
    height: 54px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.5);
    border: 4px solid #0f172a; /* رنگ حاشیه هماهنگ با بکگراند اصلی */
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bottom-gaming-nav .center-btn-inner i {
    font-size: 1.35rem;
    color: #ffffff !important;
}

.bottom-gaming-nav .nav-item.center-btn:hover .center-btn-inner {
    transform: scale(1.08) translateY(-3px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.7);
}
#city-map-svg path, 
#city-map-svg polygon {
    vector-effect: non-scaling-stroke;
}
/* --- استایل‌های کنترلگر گیمینگ مودال --- */
.game-action-controller {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 15px;
}

.action-preview-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1e293b;
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 15px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
}

.preview-item { display: flex; flex-direction: column; align-items: center; }
.preview-label { font-size: 0.75rem; color: #94a3b8; margin-bottom: 4px; }
.preview-val { font-size: 1.5rem; font-weight: 900; color: #f8fafc; font-family: monospace; }
.preview-item.highlight .preview-val { color: #ef4444; text-shadow: 0 0 10px rgba(239, 68, 68, 0.5); }

.preview-icon i { font-size: 1.2rem; color: #64748b; }

/* اسلایدر گیمینگ */
.game-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 12px;
    border-radius: 6px;
    background: #cbd5e1;
    outline: none;
    margin-bottom: 15px;
}
.game-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 0 10px var(--primary-glow);
    border: 3px solid #fff;
    transition: transform 0.1s;
}
.game-slider::-webkit-slider-thumb:active { transform: scale(1.2); }

/* دکمه‌های سریع */
.quick-action-buttons {
    display: flex;
    gap: 8px;
}
.btn-quick {
    flex: 1;
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    color: #475569;
    font-weight: 900;
    padding: 8px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}
.btn-quick:hover, .btn-quick:active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}
.btn-quick.btn-max { background: #1e293b; color: #facc15; border-color: #1e293b; }
.btn-quick.btn-max:hover { background: #facc15; color: #1e293b; }

/* تغییر رنگ پیش‌نمایش در حالت دفاع و شیلد */
.mode-defend .preview-item.highlight .preview-val { color: #10b981; text-shadow: 0 0 10px rgba(16, 185, 129, 0.5); }
.mode-shield .preview-item.highlight .preview-val { color: #0ea5e9; text-shadow: 0 0 10px rgba(14, 165, 233, 0.5); }
/* =========================================
   طراحی HUD گیمینگ برای مودال حمله در موبایل
========================================= */
@media (max-width: 768px) {
    /* ۱. بدنه اصلی مودال: ثابت و بدون تغییر سایز */
    #action-modal-panel {
        padding: 12px;
        height: 92vh; /* استفاده از حداکثر ارتفاع معقول صفحه */
        max-height: 700px;
        width: 95%;
        display: flex;
        flex-direction: column;
    }

    /* ۲. کانتینر محتوا: استفاده از Flexbox برای مدیریت فضا */
    .action-modal-body {
        display: flex;
        flex-direction: column;
        gap: 8px; /* فاصله یکپارچه بین تمام بخش‌ها */
        height: 100%;
        overflow: hidden !important; /* جلوگیری از اسکرول کل مودال */
        padding-bottom: 0;
    }

    /* ۳. فشرده‌سازی اطلاعات بالای صفحه */
    .modal-header { margin-bottom: 0; }
    .modern-health { height: 18px !important; margin: 0 !important; }
    .health-text { font-size: 0.85rem !important; }
    .shield-badge, .owner-badge { margin: 0 !important; padding: 6px; font-size: 0.8rem; }
    .group-nav-tabs { margin: 0 !important; padding: 4px; }
    .group-nav-tabs .tab-btn { padding: 6px; font-size: 0.85rem; }

    /* ۴. باکس مزایا (جادوی اصلی): تبدیل به یک مانیتور رادار/ترمینال */
    #modal-buff-info {
        flex: 1 1 auto; /* پر کردن تمام فضای خالی وسط مودال */
        overflow-y: auto; /* قابلیت اسکرول داخلی فقط برای همین باکس */
        background: rgba(15, 23, 42, 0.6) !important; /* پس‌زمینه تاریک شیشه‌ای */
        border: 1px solid rgba(56, 189, 248, 0.4) !important;
        box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.5);
        border-radius: 8px;
        margin: 0 !important;
        padding: 10px !important;
        font-size: 0.75rem !important;
        /* زیباسازی اسکرول‌بار داخلی مانیتور */
        scrollbar-width: thin;
        scrollbar-color: #38bdf8 transparent;
    }

    /* ۵. کنترلر اکشن (اسلایدر و اعداد): تبدیل به یک پنل فرمان ثابت */
    .game-action-controller {
        flex: 0 0 auto; /* ارتفاع ثابت، هرگز فشرده نشود */
        background: #1e293b;
        border: 1px solid #475569;
        padding: 8px;
        margin: 0;
        border-radius: 12px;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    
    /* مخفی کردن متن راهنمای اضافی برای باز شدن فضا *//* بازگرداندن اطلاعات حیاتی اسپری در قالب یک پنل هشدار فشرده */
    #input-action-label {
        display: block !important;
        background: rgba(15, 23, 42, 0.8) !important;
        border: 1px dashed rgba(56, 189, 248, 0.5);
        border-radius: 6px;
        padding: 4px 6px !important;
        margin: 0 0 4px 0 !important;
        font-size: 0.7rem !important;
        text-align: center;
        line-height: 1.4;
        color: #e2e8f0 !important;
        flex: 0 0 auto;
    }
    
    /* کوچک‌تر کردن متن‌های رنگی داخل لیبل که توسط جاوااسکریپت ساخته می‌شوند */
    #input-action-label span {
        font-size: 0.65rem !important;
        display: block;
        margin-top: 2px;
    }}
    
    .action-preview-box { margin: 0; padding: 6px; background: #0f172a; box-shadow: none; border-radius: 8px; }
    .preview-item .preview-label { font-size: 0.7rem; }
    .preview-item .preview-val { font-size: 1.1rem; }
    .game-slider { margin: 0; }
    .quick-action-buttons { margin-top: 0; }
    .btn-quick { padding: 8px 4px; font-size: 0.8rem; }

    /* ۶. دکمه تایید نهایی */
    .btn-attack {
        flex: 0 0 auto;
        margin-top: 0 !important;
        padding: 12px !important;
        font-size: 1.1rem !important;
    }
    
    /* دکمه‌های استخراج در صورت وجود */
    .btn-extract, .btn-production, .btn-extract-center { 
        padding: 8px; font-size: 0.85rem; margin-bottom: 0!important; flex: 0 0 auto; 
    }
}