/* --- فونت و تنظیمات پایه --- */
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn.woff2') format('woff2');
    font-weight: normal;
}

:root {
    /* رنگ‌بندی اصلی */
    --bg-body: #050505;        /* مشکی مطلق برای عمق */
    --glass-bg: rgba(20, 20, 30, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    /* رنگ‌های نئونی */
    --neon-cyan: #00f2ff;
    --neon-pink: #ff0055;
    --neon-purple: #bc13fe;
    
    /* اورراید کردن رنگ‌های بوت‌استرپ برای خوانایی */
    --bs-body-color: #ffffff;
    --bs-secondary-color: #cbd5e1; /* نقره‌ای یخی - بسیار خوانا روی تیره */
    --bs-border-color: rgba(255, 255, 255, 0.1);
}

body {
    background-color: var(--bg-body);
    /* پترن شبکه ای محو */
    background-image: 
        linear-gradient(rgba(0, 242, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 242, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    font-family: 'Vazirmatn', sans-serif !important;
    min-height: 100vh;
}

/* --- پنل‌های شیشه‌ای (Glassmorphism) --- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5); /* سایه عمیق */
}

/* --- تایپوگرافی خفن --- */
.glow-text {
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}
.text-cyan {
    color: var(--neon-cyan) !important;
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.4);
}
.text-muted {
    color: var(--bs-secondary-color) !important; /* اعمال رنگ نقره‌ای */
}

/* --- دکمه فوق خفن (Super Neon Button) --- */
.btn-super-neon {
    position: relative;
    background: linear-gradient(90deg, var(--neon-cyan), #0066ff);
    color: #000;
    font-weight: 800;
    border: none;
    padding: 8px 25px;
    border-radius: 50px;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.4);
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 1;
}

.btn-super-neon::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, #0066ff, var(--neon-cyan));
    z-index: -1;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.btn-super-neon:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.8); /* درخشش بیشتر هنگام هاور */
    color: #000;
}

.btn-super-neon:hover::before {
    opacity: 1;
}

/* دکمه‌های ثانویه (شیشه‌ای) */
.btn-neon {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: #fff;
    transition: 0.3s;
}
.btn-neon:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
}

/* --- جدول‌ها --- */
.table {
    --bs-table-bg: transparent;
    --bs-table-color: #e2e8f0;
    border-color: var(--glass-border);
    vertical-align: middle;
}
.table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: var(--neon-cyan); /* هدر جدول آبی نئونی */
    border-bottom: 1px solid rgba(0, 242, 255, 0.3);
    padding: 1.2rem;
}
.table tbody td {
    padding: 1rem;
    font-size: 0.95rem;
}
.table-hover tbody tr:hover {
    background-color: rgba(0, 242, 255, 0.05);
    box-shadow: inset 2px 0 0 var(--neon-cyan); /* خط رنگی سمت راست هنگام هاور */
}

/* --- فیلد جستجو و اینپوت‌ها --- */
.form-control {
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    border-radius: 8px;
}
.form-control:focus {
    border-color: var(--neon-cyan) !important;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.2) !important;
}

/* --- بج‌ها (Badges) --- */
.badge {
    font-weight: 500;
    letter-spacing: 0.5px;
}
.badge-glass {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    backdrop-filter: blur(4px);
}

/* --- مودال --- */
.modal-content {
    background-color: #0f1218;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}
.modal-header { border-bottom-color: rgba(255, 255, 255, 0.05); }
.modal-footer { border-top-color: rgba(255, 255, 255, 0.05); }
.btn-close { filter: invert(1); }

/* --- انیمیشن تپش قلب --- */
@keyframes heartbeat {
    0% { transform: scale(1); }
    15% { transform: scale(1.3); }
    30% { transform: scale(1); }
    45% { transform: scale(1.15); }
    60% { transform: scale(1); }
}
.heart-beat {
    display: inline-block;
    animation: heartbeat 1.5s infinite;
    filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.6));
}

/* --- استایل فوتر فیوچریستیک --- */
.footer-tech {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    backdrop-filter: blur(5px);
}

/* --- استایل اختصاصی دیت‌پیکر نئونی --- */
/* --- اصلاح حیاتی برای نمایش تقویم روی تمام لایه‌ها --- */
#bd-root {
    font-family: 'Vazirmatn', sans-serif !important;
    z-index: 99999 !important; /* اولویت نمایش خیلی بالا */
    position: absolute !important;
}

.bd-main {
    background-color: rgba(10, 15, 30, 0.98) !important;
    border: 1px solid var(--neon-cyan) !important;
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.3) !important;
    border-radius: 12px !important;
}

.bd-table td button.bd-selected {
    background-color: var(--neon-cyan) !important;
    color: #000 !important;
    box-shadow: 0 0 10px var(--neon-cyan) !important;
}

/* --- استایل دکمه پاور خفن --- */
.btn-power-glow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 0, 85, 0.3);
    background: rgba(255, 0, 85, 0.1);
    color: #ff0055;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 0, 85, 0.1);
}

.btn-power-glow:hover {
    background: rgba(255, 0, 85, 0.2);
    box-shadow: 0 0 20px rgba(255, 0, 85, 0.6);
    color: #fff;
    transform: scale(1.1);
    border-color: #ff0055;
}

/* هدر تقویم (ماه و سال) */
.bd-title {
    background: transparent !important;
    color: var(--neon-cyan) !important;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.bd-prev, .bd-next {
    background: transparent !important;
    color: var(--neon-cyan) !important;
    border: 1px solid rgba(0, 242, 255, 0.2) !important;
    border-radius: 50% !important;
    transition: 0.3s;
}
.bd-prev:hover, .bd-next:hover {
    background: var(--neon-cyan) !important;
    color: #000 !important;
    box-shadow: 0 0 10px var(--neon-cyan);
}

/* جدول روزها */
.bd-table {
    width: 100% !important;
}
.bd-table thead tr {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.bd-table th {
    color: var(--text-muted) !important;
    font-weight: normal !important;
}

/* دکمه‌های روز */
.bd-table td button {
    background: transparent !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    transition: 0.2s;
}
.bd-table td button:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--neon-cyan) !important;
    transform: scale(1.1);
}

/* روز انتخاب شده */
.bd-table td button.bd-selected {
    background: var(--neon-cyan) !important;
    color: #000 !important;
    box-shadow: 0 0 10px var(--neon-cyan) !important;
    font-weight: bold !important;
}

/* روز امروز */
.bd-table td button.bd-today {
    border: 1px solid var(--neon-purple) !important;
    color: var(--neon-purple) !important;
}

/* دکمه پایین (برو به امروز) */
.bd-goto-today {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-muted) !important;
    border-radius: 8px !important;
    margin-top: 5px;
}
.bd-goto-today:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

/* --- استایل نوار تاریخ فیوچریستیک --- */
.cyber-input-group {
    background: rgba(13, 17, 23, 0.9);
    border: 1px solid rgba(0, 242, 255, 0.3);
    border-radius: 50px; /* کپسولی */
    padding: 5px 15px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}
.cyber-input-group:hover, .cyber-input-group:focus-within {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.2);
}

.cyber-date-input {
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    text-align: center;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 500;
    width: 90px;
    box-shadow: none !important;
}
.cyber-date-input::placeholder { color: rgba(255, 255, 255, 0.3); }

.cyber-separator {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
}

.btn-analyze {
    background: linear-gradient(135deg, var(--neon-cyan), #2563eb);
    color: #000;
    border: none;
    border-radius: 50px;
    padding: 6px 20px;
    font-weight: bold;
    font-size: 0.85rem;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.4);
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}
.btn-analyze:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(0, 242, 255, 0.8);
    color: #fff;
}

/* --- استایل لیست لجند نمودارها --- */
.chart-legend-container {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 15px;
    padding-right: 5px; /* برای اسکرول بار */
}
/* اسکرول بار باریک برای لیست */
.chart-legend-container::-webkit-scrollbar { width: 4px; }
.chart-legend-container::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }

.legend-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid transparent;
    transition: 0.2s;
    font-size: 0.85rem;
}
.legend-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}
.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-left: 8px;
    box-shadow: 0 0 5px currentColor;
}
.legend-count {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
    color: var(--neon-cyan);
}
