/* =======================================================
   1. GLOBAL DƏYİŞƏNLƏR & RESET
   ======================================================= */
:root {
    /* Rəng Palitrası */
    --primary-color: #002D62; /* Tünd Göy (Brend Rəngi) */
    --secondary-color: #1E293B; /* Tünd Boz */
    --accent-color: #FF6600;  /* Narıncı (Vurğu Rəngi) */
    
    /* Fon Rəngləri */
    --bg-color: #F0F2F5;      /* Ümumi Arxa Fon */
    --card-bg: #FFFFFF;       /* Kart Fonu */
    --sidebar-bg: #0f172a;    /* Menyu Fonu */
    
    /* Mətn Rəngləri */
    --text-dark: #1E293B;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    /* Ölçülər */
    --sidebar-width: 280px;
    --header-height: 70px;    /* Mobildə başlıq hündürlüyü */
    
    /* Kölgələr */
    --shadow-soft: 0 4px 20px rgba(0,0,0,0.05);
    --shadow-medium: 0 8px 25px rgba(0,0,0,0.08);
    --shadow-hover: 0 10px 30px rgba(0,0,0,0.12);
}

body {
    background-color: var(--bg-color);
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    margin: 0; padding: 0;
    overflow-x: hidden; /* Üfüqi sürüşməni əngəlləyir */
}

/* Linklər və Ümumi Elementlər */
a { text-decoration: none; transition: 0.3s ease; }
ul { list-style: none; padding: 0; margin: 0; }

.text-orange { color: var(--accent-color) !important; }
.bg-orange { background-color: var(--accent-color) !important; }
.text-primary-custom { color: var(--primary-color) !important; }

/* =======================================================
   2. SIDEBAR (SOL MENYU - ADMIN & USER)
   ======================================================= */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed; 
    top: 0; 
    left: 0;
    background: var(--sidebar-bg);
    color: white;
    padding-top: 30px;
    z-index: 1050;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Daha yumşaq keçid */
    overflow-y: auto;
    box-shadow: 4px 0 15px rgba(0,0,0,0.1);
}

.brand-logo {
    font-size: 26px; 
    font-weight: 800; 
    text-align: center;
    color: white; 
    text-decoration: none; 
    display: block; 
    margin-bottom: 40px;
    letter-spacing: 1px;
}

/* Menyu Linkləri */
.nav-link {
    color: var(--text-light); 
    padding: 14px 25px; 
    font-weight: 500; 
    font-size: 16px;
    display: flex; 
    align-items: center; 
    border-right: 4px solid transparent;
    transition: all 0.3s ease;
}

.nav-link i { 
    width: 30px; 
    font-size: 18px; 
    margin-right: 10px; 
    text-align: center; 
}

.nav-link:hover, .nav-link.active {
    color: white; 
    background: rgba(255, 255, 255, 0.05);
    border-right-color: var(--accent-color);
}

/* Sidebar Footer */
.sidebar .mt-auto { margin-top: auto; }

/* =======================================================
   3. MOBİL HEADER (TELEFONDA GÖRÜNƏN BAŞLIQ)
   ======================================================= */
.mobile-header {
    display: none; /* Kompyuterdə gizli */
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%;
    height: var(--header-height);
    background: var(--sidebar-bg);
    z-index: 1040;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25); /* Daha belirgin kölgə */
}

.mobile-brand { font-size: 20px; font-weight: 800; color: white; }
.btn-toggle { background: none; border: none; color: white; font-size: 24px; cursor: pointer; padding: 5px; }

/* Overlay */
.overlay {
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0,0,0,0.6); 
    z-index: 1045; 
    backdrop-filter: blur(4px);
    transition: opacity 0.3s;
}
.overlay.active { display: block; }

/* =======================================================
   4. MAIN CONTENT (ƏSAS MƏZMUN SAHƏSİ)
   ======================================================= */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 30px;
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* =======================================================
   5. LANDING PAGE (ANA SƏHİFƏ DİZAYNI)
   ======================================================= */
/* Navbar (Ana Səhifə) */
.navbar { padding: 20px 0; transition: 0.3s; z-index: 1000; }
.navbar.scrolled { 
    background: var(--sidebar-bg); 
    box-shadow: 0 4px 20px rgba(0,0,0,0.2); 
    padding: 15px 0; 
}
.navbar-brand { font-weight: 800; font-size: 24px; color: white !important; }

/* Hero Section */
.hero-section {
    padding-top: 140px; 
    padding-bottom: 100px;
    min-height: 100vh;
    display: flex; 
    align-items: center;
    background: radial-gradient(circle at top right, #1e293b 0%, #0f172a 100%);
    position: relative;
    color: white;
    overflow: hidden;
}

.hero-title { font-size: 3.5rem; font-weight: 800; line-height: 1.2; margin-bottom: 20px; }
.hero-subtitle { font-size: 1.2rem; color: #94a3b8; margin-bottom: 40px; }

/* UÇAN KARTLAR ANIMASIYASI */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }

.hero-img-container {
    position: relative;
    height: 400px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-main-img {
    font-size: 300px;
    opacity: 0.1;
    color: white;
    z-index: 1;
}

.floating-card {
    position: absolute;
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(10px);
    padding: 15px 25px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    animation: float 4s ease-in-out infinite;
    z-index: 5;
    min-width: 180px;
}

.floating-card .icon-box {
    width: 45px; height: 45px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; margin-right: 15px;
    background: rgba(255,255,255,0.1);
}

.floating-card h5 { margin: 0; font-size: 16px; font-weight: 700; color: white; }
.floating-card p { margin: 0; font-size: 13px; color: #94a3b8; }

.card-1 { top: 10%; right: 10%; animation-delay: 0s; }
.card-2 { bottom: 20%; left: 0%; animation-delay: 1.5s; }
.card-3 { bottom: 10%; right: 5%; animation-delay: 3s; }

/* Xidmətlər Kartı */
.feature-card {
    background: rgba(255, 255, 255, 0.05); 
    padding: 40px 30px; 
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1); 
    transition: 0.3s; 
    height: 100%;
    color: white;
}
.feature-card:hover { 
    transform: translateY(-10px); 
    background: rgba(255, 255, 255, 0.08); 
    border-color: var(--accent-color); 
}

.feature-icon {
    width: 70px; height: 70px; 
    background: rgba(255, 102, 0, 0.1); 
    color: var(--accent-color);
    border-radius: 18px; 
    display: flex; align-items: center; justify-content: center; 
    font-size: 28px; 
    margin-bottom: 25px;
}

/* Footer */
.footer { 
    padding: 60px 0 30px; 
    background: #020617; 
    border-top: 1px solid rgba(255,255,255,0.05); 
    color: #94a3b8;
}

/* =======================================================
   6. DASHBOARD & KARTLAR
   ======================================================= */
.stat-card, .video-card, .table-card {
    background: white; 
    border-radius: 20px; 
    border: none;
    box-shadow: var(--shadow-soft); 
    transition: 0.3s;
    overflow: hidden; 
    margin-bottom: 20px;
    position: relative;
}

.stat-card:hover, .video-card:hover { 
    transform: translateY(-5px); 
    box-shadow: var(--shadow-hover); 
}

.stat-icon { 
    position: absolute; 
    right: 20px; 
    top: 20px; 
    font-size: 40px; 
    opacity: 0.1; 
    color: var(--primary-color);
}

.stat-card h6 { font-size: 14px; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.stat-card h2 { font-size: 32px; font-weight: 800; color: var(--text-dark); margin: 10px 0 0 0; }

.video-card .video-thumb { 
    height: 200px; 
    background: #000; 
    position: relative; 
}
.video-card .video-body { padding: 20px; }

/* =======================================================
   7. ADMIN PANELİ & CƏDVƏLLƏR
   ======================================================= */
.custom-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.custom-table thead th {
    background: #f8fafc; 
    color: var(--text-muted); 
    font-size: 12px; 
    text-transform: uppercase; 
    padding: 15px 20px; 
    border: none; 
    font-weight: 700;
    letter-spacing: 0.5px;
}

.custom-table tbody td {
    padding: 20px; 
    vertical-align: middle; 
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-dark); 
    font-size: 14px;
}

.custom-table tr:last-child td { border-bottom: none; }
.custom-table tr:hover { background-color: #fcfcfc; }

.badge-active { background: #dcfce7; color: #166534; padding: 6px 12px; border-radius: 30px; font-size: 11px; font-weight: 700; }
.badge-deactive { background: #fee2e2; color: #991b1b; padding: 6px 12px; border-radius: 30px; font-size: 11px; font-weight: 700; }
.badge-pro { background: #e0f2fe; color: #0369a1; padding: 5px 10px; border-radius: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; }

.badge-level { padding: 5px 10px; border-radius: 6px; font-weight: 700; font-size: 11px; text-transform: uppercase; }
.badge-level.badge-free { background-color: #f1f5f9; color: #475569; }
.badge-level.badge-plus { background-color: #fff7ed; color: #c2410c; }
.badge-level.badge-pro { background-color: #eff6ff; color: #1d4ed8; }

.btn-new { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; padding: 10px 20px; border-radius: 12px; }

/* =======================================================
   8. AUTH PAGES (GİRİŞ & QEYDİYYAT)
   ======================================================= */
.auth-card { 
    background: white; 
    padding: 40px; 
    border-radius: 20px; 
    box-shadow: var(--shadow-medium); 
    border: 1px solid rgba(0,0,0,0.02);
}

.form-control-custom {
    background: #f8f9fa; 
    border: 2px solid #e2e8f0; 
    padding: 12px 20px; 
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s;
}

.form-control-custom:focus {
    background: white; 
    border-color: var(--primary-color); 
    box-shadow: 0 0 0 4px rgba(0, 45, 98, 0.1);
}

.btn-pill { border-radius: 50px; padding: 12px 30px; font-weight: 700; letter-spacing: 0.5px; }

/* =======================================================
   9. AI CHAT & İMTAHAN SİSTEMİ
   ======================================================= */
.chat-container { 
    height: 75vh; 
    display: flex; 
    flex-direction: column; 
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.chat-box { flex-grow: 1; overflow-y: auto; padding: 25px; background: #f8fafc; }

.user-message {
    background: var(--primary-color); 
    color: white;
    padding: 12px 20px; 
    border-radius: 20px 20px 5px 20px;
    max-width: 80%; 
    align-self: flex-end; 
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(0, 45, 98, 0.2);
}

.ai-message {
    background: white; 
    color: var(--text-dark); 
    border: 1px solid #e2e8f0;
    padding: 15px 20px; 
    border-radius: 20px 20px 20px 5px;
    max-width: 85%; 
    align-self: flex-start; 
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.option-label {
    display: block; 
    padding: 15px 20px; 
    border: 2px solid #e2e8f0;
    border-radius: 12px; 
    cursor: pointer; 
    transition: 0.2s; 
    margin-bottom: 12px;
    background: white;
    font-weight: 500;
}
.option-label:hover { border-color: var(--primary-color); background: #f8fafc; }
.option-label:has(input:checked) { border-color: var(--primary-color); background: #eff6ff; color: var(--primary-color); font-weight: 700; }
.form-check-input { margin-right: 10px; }

/* Modal */
.modal-content { border-radius: 20px; border: none; overflow: hidden; box-shadow: var(--shadow-hover); }
.modal-header { border-bottom: 1px solid #f1f5f9; padding: 20px 25px; }
.modal-body { padding: 30px; }
.modal-title { font-weight: 700; color: var(--text-dark); }

/* =======================================================
   10. RESPONSIVE / MOBİL DİZAYN (TAM YENİLƏNİB)
   ======================================================= */
@media (max-width: 991px) {
    /* 1. Sidebar Gizlət və Düzəlt */
    .sidebar { 
        transform: translateX(-100%); 
        width: 270px; 
        top: var(--header-height); 
        height: calc(100vh - var(--header-height)); 
        box-shadow: 5px 0 15px rgba(0,0,0,0.2); /* Menyu açılarkən kölgə */
    }
    .sidebar.active { transform: translateX(0); }

    /* 2. Mobil Header Görünsün */
    .mobile-header { display: flex; }

    /* 3. ƏSAS DÜZƏLİŞ: Banner Problemini Həll Edən Hissə */
    .main-content {
        margin-left: 0;
        padding: 20px;
        /* Header hündürlüyü + 20px əlavə boşluq */
        padding-top: calc(var(--header-height) + 25px); 
        margin-top: 0; /* Margin yox, padding işlədirik ki, fon düz qalsın */
    }

    /* 4. Landing Page Mobildə */
    .hero-section {
        padding-top: 150px !important;
        text-align: center;
        height: auto;
    }
    .hero-title { font-size: 2.2rem; }
    
    /* Kartları gizlətmirik, amma səliqəli düzürük */
    .hero-img-container { 
        margin-top: 40px; 
        height: auto; 
        display: flex; 
        flex-direction: column; 
        gap: 15px; 
    }
    .hero-main-img { display: none; } /* Böyük ikonu gizlət */
    
    .floating-card { 
        position: static; /* Uçmasın, normal dursun */
        width: 90%; 
        margin: 0 auto; 
        transform: none !important; 
        animation: none;
        background: rgba(255,255,255,0.1);
    }

    /* 5. Cədvəllər və Formalar */
    .col-md-5, .col-md-6, .col-md-8 { width: 100%; padding: 0 10px; }
    .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    
    /* 6. Chat Mobildə */
    .chat-container { height: calc(100vh - 160px); }
    .ai-message, .user-message { max-width: 90%; font-size: 14px; }

    /* 7. Mobilə Özəl Fontlar */
    h2 { font-size: 24px; }
    .stat-card h2 { font-size: 28px; }
    
    /* 8. Alert Mesajları (Bannerlər) üçün Boşluq */
    .alert {
        margin-bottom: 20px;
        font-size: 14px;
    }
}
/* =======================================================
   11. YENİ: ROADMAP (TƏDRİS XƏRİTƏSİ) & STREAK
   ======================================================= */

/* --- STREAK ALOVU (BANNER) --- */
.streak-banner {
    background: linear-gradient(135deg, #2b2b2b 0%, #1a1a1a 100%);
    color: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
}
.streak-count { font-size: 48px; font-weight: 900; color: #ff9600; text-shadow: 0 4px 10px rgba(255, 150, 0, 0.4); }
.badge-icon { width: 50px; height: 50px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2)); transition: transform 0.2s; }
.badge-icon:hover { transform: scale(1.2) rotate(10deg); }

/* Promo Kod Kartı */
.promo-card {
    background: linear-gradient(135deg, #ffffff 0%, #fff9f0 100%);
    border: 2px dashed #f59e0b !important;
}
.promo-input {
    border-radius: 50px 0 0 50px !important;
    border: 1px solid #e2e8f0;
    padding-left: 20px !important;
}
.promo-btn {
    border-radius: 0 50px 50px 0 !important;
    padding: 0 25px !important;
}

/* --- DUOLINGO STYLE ROADMAP --- */
.roadmap-wrapper {
    position: relative;
    padding: 60px 0;
    overflow: hidden;
    background-color: #f7f9fc;
    border-radius: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.roadmap-path-svg {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.level-node {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 40px auto;
    position: relative;
    z-index: 2;
    border: 5px solid white;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none;
}

.level-node:hover { transform: scale(1.1) !important; z-index: 3; }

/* İlan effekti (Sağa-sola sürüşdürmə) */
.level-node:nth-child(odd) { transform: translateX(-60px); }
.level-node:nth-child(even) { transform: translateX(60px); }

/* Düyün Rəngləri */
.node-active {
    background-color: #58cc02; /* Duolingo Yaşılı */
    color: white;
    box-shadow: 0 6px 0 #46a302, 0 10px 10px rgba(0,0,0,0.1);
}
.node-locked {
    background-color: #e5e5e5;
    color: #afafaf;
    box-shadow: 0 6px 0 #cfcfcf;
    pointer-events: none;
}
.node-completed {
    background-color: #ffc800; /* Qızıl */
    color: white;
    box-shadow: 0 6px 0 #e5b400, 0 10px 10px rgba(0,0,0,0.1);
}

.node-icon { font-size: 28px; margin-bottom: 2px; }

/* Label (Başlıq) Dizaynı */
.node-label { 
    position: absolute; 
    bottom: -55px; 
    left: 50%;
    transform: translateX(-50%);
    background: white; 
    padding: 6px 12px; 
    border-radius: 12px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 200px; 
    z-index: 10;
    border: 1px solid #f0f0f0;
}

/* --- MOBİL ÜÇÜN XÜSUSİ DÜZƏLİŞ (ROADMAP) --- */
@media (max-width: 576px) {
    /* Mobildə dairələri çox sağa-sola atmırıq ki, ekrandan çıxmasın */
    .level-node:nth-child(odd) { transform: translateX(-30px); }
    .level-node:nth-child(even) { transform: translateX(30px); }
    
    .level-node:hover { transform: scale(1.1) translateX(0) !important; }
    
    .roadmap-path-svg { width: 100%; } /* SVG tam ekran olsun */
    .streak-count { font-size: 36px; } /* Şrifti biraz kiçildirik */
}