/* ==========================================
   RESET VƏ BAZA TƏNZİMLƏMƏLƏRİ
   ========================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #0f172a;
    color: #fff;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* ==========================================
   ƏSAS STRUKTUR (DASHBOARD LAYOUT)
   ========================================== */
.dashboard-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
}

/* ÜST NAVİQASİYA PANELİ (NAVBAR) */
.top-navbar {
    height: 70px;
    background: #1e293b;
    border-bottom: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    flex-shrink: 0; /* Navbar sıxılmasın */
}

.nav-logo {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
}

.nav-logo span {
    color: #3b82f6;
}

.nav-user-zone {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-status-tag {
    background: #064e3b;
    border: 1px solid #10b981;
    color: #10b981;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.user-status-tag.locked {
    background: #7f1d1d;
    border-color: #ef4444;
    color: #ef4444;
}

.user-info {
    font-size: 14px;
    color: #e2e8f0;
}

.logout-link-btn {
    background: #334155;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: bold;
    border: 1px solid #475569;
    transition: all 0.2s;
}

.logout-link-btn:hover {
    background: #ef4444;
    border-color: #f43f5e;
}

/* PANELLƏRİN YAN-YANA DÜZÜLMƏSİ */
.dashboard-body {
    display: flex;
    flex: 1;
    height: calc(100vh - 70px);
    width: 100%;
}

/* ==========================================
   SOL MENYU PANELİ (SIDEBAR)
   ========================================== */
.left-sidebar {
    width: 260px;
    background: #1e293b;
    border-right: 1px solid #334155;
    padding: 25px 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0; /* Sidebar sıxılmasın */
}

.sidebar-title {
    font-size: 11px;
    font-weight: bold;
    color: #64748b;
    letter-spacing: 1px;
    padding-left: 10px;
    margin-top: 15px;
    margin-bottom: 5px;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.menu-item {
    color: #94a3b8;
    text-decoration: none;
    padding: 12px 15px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    display: block; /* Alt-alta tam sığması üçün */
}

.menu-item:hover {
    color: white;
    background: #334155;
}

.menu-item.active {
    color: white;
    background: #2563eb;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.sidebar-divider {
    height: 1px;
    background: #334155;
    margin: 10px 0;
}

/* ==========================================
   SAĞ ƏSAS KONTENT PANELİ (MAIN CONTENT)
   ========================================== */
.main-content {
    flex: 1;
    background: #0f172a;
    padding: 40px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.content-header-title {
    text-align: center;
    margin-bottom: 30px;
    width: 100%;
}

.content-header-title h2 {
    font-size: 26px;
    color: #f8fafc;
    margin-bottom: 8px;
}

.content-header-title p {
    color: #94a3b8;
    font-size: 15px;
}

/* ==========================================
   DİNAMİK BAL ARI PƏTƏYİ GRİD SİSTEMİ
   ========================================== */
.subject-container-box {
    max-width: 1000px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 20px;
}

/* Pətəklərin yerləşəcəyi ümumi konteyner (Mərkəzdə kilidlənmək üçün ölçülər böyüdü) */
.hexagon-grid {
    position: relative;
    width: 530px; /* 3 böyük pətək yan-yana sığacaq ölçü (160 * 3 + 50) */
    height: 420px;
    margin: 60px auto 0 auto;
    padding-bottom: 80px;
}

/* Ölçüləri 1.5 dəfə böyüdülmüş əsas altıbucaqlı gövdəsi */
.hex {
    width: 150px;  /* 100px -> 150px */
    height: 82.5px; /* 55px -> 82.5px */
    background: #1e293b;
    position: absolute;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

/* Altıbucaqlının üst üçbucağı (Riyazi ölçülər yeniləndi) */
.hex::before {
    content: "";
    position: absolute;
    top: -37.5px; /* -25px -> -37.5px */
    left: 0;
    width: 0;
    height: 0;
    border-left: 75px solid transparent;  /* 50px -> 75px */
    border-right: 75px solid transparent; /* 50px -> 75px */
    border-bottom: 37.5px solid #1e293b;  /* 25px -> 37.5px */
    transition: border-bottom-color 0.2s ease;
}

/* Altıbucaqlının alt üçbucağı (Riyazi ölçülər yeniləndi) */
.hex::after {
    content: "";
    position: absolute;
    bottom: -37.5px; /* -25px -> -37.5px */
    left: 0;
    width: 0;
    height: 0;
    border-left: 75px solid transparent;  /* 50px -> 75px */
    border-right: 75px solid transparent; /* 50px -> 75px */
    border-top: 37.5px solid #1e293b;     /* 25px -> 37.5px */
    transition: border-top-color 0.2s ease;
}

/* ==========================================
   YENİ BÖYÜDÜLMÜŞ POZİSİYA KOORDİNATLARI (3+1)
   ========================================== */

/* 1. SIRA (ÜST) */
.hex:nth-child(1) { top: 40px; left: 0px; }     /* Riyaziyyat */
.hex:nth-child(2) { top: 40px; left: 165px; }   /* Fizika (110 * 1.5) */
.hex:nth-child(3) { top: 40px; left: 330px; }   /* Azərbaycan dili (220 * 1.5) */

/* 2. SIRA (ALT - Tam kəsişmə nöqtəsinə kilidlənmə) */
.hex:nth-child(4) { top: 175px; left: 82.5px; } /* İngilis dili (Tam mərkəzdə) */

/* Gələcəkdə 5 və 6-cı fənlər əlavə olunarsa avtomatik bura oturacaqlar: */
.hex:nth-child(5) { top: 175px; left: 247.5px; } 
.hex:nth-child(6) { top: 175px; left: 412.5px; }

/* ==========================================
   HOVER EFFEKTLƏRİ VƏ DAXİLİ ELEMENTLƏR
   ========================================== */
.hex:hover {
    transform: scale(1.05);
    z-index: 10;
    filter: drop-shadow(0 12px 24px rgba(59, 130, 246, 0.4));
}

.hex:hover::before {
    border-bottom-color: #1d4ed8 !important;
}

.hex:hover::after {
    border-top-color: #1d4ed8 !important;
}

.hex:hover {
    background: #1d4ed8 !important;
}

/* İkon və mətnlərin ölçüləri (Böyük pətəyə uyğun artırıldı) */
.hex-icon {
    font-size: 32px; /* 20px -> 32px (Daha aydın və görünən) */
    z-index: 5;
    position: relative;
    margin-top: -2px;
    pointer-events: none;
}

.hex-txt {
    font-size: 14px; /* 11px -> 14px (Oxunaqlıq artırıldı) */
    font-weight: bold;
    color: #f8fafc;
    text-align: center;
    z-index: 5;
    position: relative;
    margin-top: 6px;
    white-space: nowrap;
    pointer-events: none;
}

/* Daxili təbəqələrin təsirsizləşdirilməsi */
.hex-in, .hex-bg {
    clip-path: none !important;
    transform: none !important;
    width: 100%;
    height: 100%;
    display: contents; 
}

/* ==========================================
   VİDEO KART DIZAYNI VƏ MODALLAR
   ========================================== */
.video-container-card {
    width: 100%;
    max-width: 900px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    overflow: visible; /* [KÖKLÜ HƏLL] Zaman lenti və brauzer pleyer elementlərinin kəsilməməsi üçün visible edirik */
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.card-header-bar {
    background: #111827;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #334155;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.close-lesson-btn {
    background: #7f1d1d;
    color: #f87171;
    border: 1px solid #b91c1c;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 12px;
    transition: background 0.2s;
}
.close-lesson-btn:hover { background: #b91c1c; color: white; }

.video-wrapper-dashboard { 
    position: relative; 
    width: 100%; 
    aspect-ratio: 16/9; 
    background: #000;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    overflow: hidden; /* Video kənarlara daşmasın */
}

#mainMathVideo { 
    width: 100%; 
    height: 100%; 
    object-fit: contain; /* [DÜZƏLİŞ] Videonun nisbəti pozulmasın və idarəetmə paneli tam otursun */
    display: block;
}
/* REJİM SEÇİMÜST LAYI */
.welcome-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.85);
    display: flex; justify-content: center; align-items: center;
    z-index: 999;
    backdrop-filter: blur(8px);
}

.login-wrapper-screen {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #0f172a;
    display: flex; justify-content: center; align-items: center;
    z-index: 999;
}

.welcome-box {
    background: #1e293b;
    border: 1px solid #334155;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    width: 90%;
}

.login-form input { width: 100%; padding: 14px; margin: 10px 0; border-radius: 10px; border: 1px solid #475569; background: #0f172a; color: white; }
.welcome-buttons { display: flex; gap: 15px; margin-top: 15px; }
.btn-welcome { flex: 1; padding: 15px; border-radius: 10px; border: 1px solid #475569; background: #334155; color: white; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.btn-welcome strong { font-size: 16px; } .btn-welcome span { font-size: 12px; color: #94a3b8; }
.btn-welcome.strict:hover { background: #1e3a8a; } .btn-welcome.relaxed:hover { background: #064e3b; }

/* INTERAKTIV QUIZ OVERLAY */
.quiz-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    width: 90%;
    max-width: 550px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 20px;
    display: none;
    opacity: 0;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    /* [DÜZƏLİŞ] Pleyer elementlərini və tam ekran elementlərini üstələmək üçün z-index artırıldı */
    z-index: 2147483647; 
    transition: opacity 0.3s, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.quiz-overlay.modal-active { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.modal-video-container { width: 100%; aspect-ratio: 16/9; background: #000; border-radius: 12px; overflow: hidden; margin-bottom: 15px; }
#popupQuestionVideo { width: 100%; height: 100%; object-fit: cover; }
.timer-container { width: 100%; background: #334155; height: 6px; border-radius: 3px; margin-bottom: 20px; overflow: hidden; }
.timer-bar { height: 100%; background: #3b82f6; width: 100%; transition: width 1s linear; }
.options-container { display: flex; gap: 12px; margin-bottom: 15px; width: 100%; }
.btn-action { color: white; border: none; padding: 12px 25px; font-size: 16px; border-radius: 8px; cursor: pointer; font-weight: bold; flex: 1; }
.btn-action.yes { background: #10b981; } .btn-action.no { background: #ef4444; }
.mic-section { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.mic-btn { background: #475569; width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer; display: flex; justify-content: center; align-items: center; font-size: 18px; color: white; }
.mic-btn.listening { background: #f43f5e; animation: pulse 1.5s infinite; }
.mic-status { font-size: 12px; color: #94a3b8; }

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}
/* ==========================================
   QONAQ REJİMİ ÜÇÜN EKRAN GENİŞLƏNDİRİLMƏSİ
   ========================================== */
.guest-mode .dashboard-body {
    height: 100vh !important; /* Navbar olmadığı üçün tam ekran boyu edirik */
}

.guest-mode .main-content {
    padding: 0;
    justify-content: center; /* Pətəkləri şaquli və üfiqi olaraq tam mərkəzləyir */
    min-height: 100vh;
}