 :root {
      --gx-red:     #c0392b;
      --gx-red-lt:  #e74c3c;
      --gx-gold:    #d4a017;
      --gx-gold-lt: #f1c40f;
      --gx-dark:    #0d0d0d;
      --gx-dark2:   #161616;
      --gx-dark3:   #1f1f1f;
      --gx-card:    #1a1a1a;
      --gx-border:  #2a2a2a;
      --gx-text:    #e8e8e8;
      --gx-muted:   #888;
    }

    * { box-sizing: border-box; }

    body {
      font-family: 'Nunito', sans-serif;
      background: var(--gx-dark);
      color: var(--gx-text);
      min-height: 100vh;
    }

    h1,h2,h3,h4,h5,.brand-font { font-family: 'Rajdhani', sans-serif; }

    /* ===== SCROLLBAR ===== */
    ::-webkit-scrollbar { width: 6px; }
    ::-webkit-scrollbar-track { background: var(--gx-dark2); }
    ::-webkit-scrollbar-thumb { background: var(--gx-red); border-radius: 3px; }

    /* ===== GRADIENT TEXT ===== */
    .grad-text {
      background: linear-gradient(135deg, var(--gx-red-lt), var(--gx-gold));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    /* ===== BUTTONS ===== */
    .btn-gx {
      background: linear-gradient(135deg, var(--gx-red), var(--gx-red-lt));
      color: #fff;
      border: none;
      font-family: 'Rajdhani', sans-serif;
      font-weight: 700;
      font-size: 1rem;
      letter-spacing: .5px;
      transition: all .3s;
    }
    .btn-gx:hover { background: linear-gradient(135deg, var(--gx-red-lt), var(--gx-red)); color:#fff; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(192,57,43,.4); }

    .btn-gold {
      background: linear-gradient(135deg, var(--gx-gold), var(--gx-gold-lt));
      color: #111;
      border: none;
      font-family: 'Rajdhani', sans-serif;
      font-weight: 700;
      letter-spacing: .5px;
      transition: all .3s;
    }
    .btn-gold:hover { filter: brightness(1.1); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(212,160,23,.4); color:#111; }

    .btn-outline-gx {
      border: 2px solid var(--gx-red);
      color: var(--gx-red);
      background: transparent;
      font-family: 'Rajdhani', sans-serif;
      font-weight: 700;
      transition: all .3s;
    }
    .btn-outline-gx:hover { background: var(--gx-red); color: #fff; }

    /* ===== CARDS ===== */
    .gx-card {
      background: var(--gx-card);
      border: 1px solid var(--gx-border);
      border-radius: 14px;
      transition: transform .3s, box-shadow .3s;
    }
    .gx-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,.5); }
    .gx-card .card-top-line { height: 3px; background: linear-gradient(90deg, var(--gx-red), var(--gx-gold)); border-radius: 14px 14px 0 0; }

    /* ===== BADGE ===== */
    .badge-gx { background: rgba(192,57,43,.2); color: var(--gx-red-lt); border: 1px solid rgba(192,57,43,.3); }
    .badge-gold { background: rgba(212,160,23,.15); color: var(--gx-gold-lt); border: 1px solid rgba(212,160,23,.3); }

    /* ===== SIDEBAR ===== */
    #sidebar {
      width: 260px;
      min-height: 100vh;
      background: var(--gx-dark2);
      border-right: 1px solid var(--gx-border);
      position: fixed;
      top: 0; left: 0;
      z-index: 1000;
      transition: transform .3s;
      overflow-y: auto;
    }
    #sidebar.collapsed { transform: translateX(-260px); }

    .sidebar-logo img { width: 52px; height: 52px; object-fit: cover; border-radius: 50%; border: 2px solid var(--gx-gold); }
    .sidebar-logo .brand-name { font-family: 'Rajdhani', sans-serif; font-size: 1.3rem; font-weight: 700; line-height: 1; }

    .nav-section-label {
      font-size: .65rem;
      font-weight: 700;
      letter-spacing: 1.5px;
      color: var(--gx-muted);
      text-transform: uppercase;
      padding: 14px 20px 4px;
    }

    .sidebar-link {
      display: flex; align-items: center; gap: 12px;
      padding: 10px 20px;
      color: #bbb;
      text-decoration: none;
      border-radius: 10px;
      margin: 2px 10px;
      font-weight: 600;
      font-size: .9rem;
      transition: all .25s;
    }
    .sidebar-link:hover, .sidebar-link.active {
      background: rgba(192,57,43,.15);
      color: var(--gx-red-lt);
    }
    .sidebar-link.active { border-left: 3px solid var(--gx-red); }
    .sidebar-link i { font-size: 1.1rem; width: 20px; text-align: center; }

    /* ===== TOPBAR ===== */
    #topbar {
      height: 64px;
      background: var(--gx-dark2);
      border-bottom: 1px solid var(--gx-border);
      display: flex; align-items: center;
      padding: 0 24px;
      position: sticky; top: 0; z-index: 900;
      backdrop-filter: blur(10px);
    }

    /* ===== MAIN CONTENT ===== */
    #main-content {
      margin-left: 260px;
      min-height: 100vh;
      transition: margin-left .3s;
    }
    #main-content.expanded { margin-left: 0; }

    /* ===== STAT CARDS ===== */
    .stat-card {
      background: var(--gx-card);
      border: 1px solid var(--gx-border);
      border-radius: 14px;
      padding: 20px;
      position: relative;
      overflow: hidden;
    }
    .stat-card::before {
      content: '';
      position: absolute;
      top: 0; left: 0; right: 0;
      height: 3px;
    }
    .stat-card.red::before { background: linear-gradient(90deg, var(--gx-red), var(--gx-red-lt)); }
    .stat-card.gold::before { background: linear-gradient(90deg, var(--gx-gold), var(--gx-gold-lt)); }
    .stat-card.blue::before { background: linear-gradient(90deg, #2980b9, #3498db); }
    .stat-card.green::before { background: linear-gradient(90deg, #27ae60, #2ecc71); }

    .stat-icon {
      width: 48px; height: 48px;
      border-radius: 12px;
      display: flex; align-items: center; justify-content: center;
      font-size: 1.4rem;
    }

    /* ===== COURSE CARD ===== */
    .course-card {
      background: var(--gx-card);
      border: 1px solid var(--gx-border);
      border-radius: 14px;
      overflow: hidden;
      transition: all .3s;
    }
    .course-card:hover { transform: translateY(-5px); box-shadow: 0 16px 40px rgba(0,0,0,.6); border-color: var(--gx-red); }
    .course-thumb {
      height: 175px;
      background: linear-gradient(135deg, #1a0a0a, #2d0f0f);
      display: flex; align-items: center; justify-content: center;
      position: relative;
      overflow: hidden;
    }
    .course-thumb-icon {
      width: 76px; height: 76px;
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-size: 2.1rem;
      position: relative; z-index: 1;
      box-shadow: 0 6px 24px rgba(0,0,0,.5);
    }
    .course-thumb-label {
      font-size: .72rem;
      color: rgba(255,255,255,.5);
      letter-spacing: .5px;
      font-weight: 600;
      position: relative; z-index: 1;
      margin-top: 6px;
    }
    .course-thumb .play-btn {
      width: 52px; height: 52px;
      background: rgba(192,57,43,.85);
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-size: 1.3rem;
      color: #fff;
      cursor: pointer;
      transition: all .3s;
    }
    .course-thumb .play-btn:hover { background: var(--gx-red-lt); transform: scale(1.1); }
    .course-thumb .badge-pos { position: absolute; top: 10px; right: 10px; }
    .progress-bar-gx { background: linear-gradient(90deg, var(--gx-red), var(--gx-gold)); }

    /* ===== VIDEO PLAYER ===== */
    .video-container {
      background: #000;
      border-radius: 14px;
      overflow: hidden;
      aspect-ratio: 16/9;
      position: relative;
    }
    .video-container video, .video-container iframe {
      width: 100%; height: 100%;
      border: none;
    }
    .video-overlay {
      position: absolute; inset: 0;
      background: linear-gradient(135deg, rgba(192,57,43,.15), rgba(212,160,23,.05));
      display: flex; align-items: center; justify-content: center;
      cursor: pointer;
      transition: opacity .3s;
    }
    .video-overlay .big-play {
      width: 80px; height: 80px;
      background: rgba(192,57,43,.9);
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-size: 2rem;
      color: #fff;
      transition: transform .3s;
    }
    .video-overlay:hover .big-play { transform: scale(1.1); }

    /* ===== LESSON LIST ===== */
    .lesson-item {
      padding: 12px 16px;
      border-bottom: 1px solid var(--gx-border);
      display: flex; align-items: center; gap: 12px;
      cursor: pointer;
      transition: background .2s;
      border-radius: 8px;
    }
    .lesson-item:hover { background: rgba(192,57,43,.1); }
    .lesson-item.active { background: rgba(192,57,43,.15); border-left: 3px solid var(--gx-red); }
    .lesson-item.completed .lesson-num { background: #27ae60; }
    .lesson-num {
      width: 28px; height: 28px;
      border-radius: 50%;
      background: var(--gx-border);
      display: flex; align-items: center; justify-content: center;
      font-size: .75rem; font-weight: 700;
      flex-shrink: 0;
    }

    /* ===== QUIZ ===== */
    .quiz-option {
      padding: 12px 16px;
      border: 2px solid var(--gx-border);
      border-radius: 10px;
      cursor: pointer;
      transition: all .2s;
      margin-bottom: 8px;
    }
    .quiz-option:hover { border-color: var(--gx-red); background: rgba(192,57,43,.1); }
    .quiz-option.selected { border-color: var(--gx-gold); background: rgba(212,160,23,.1); }
    .quiz-option.correct { border-color: #27ae60; background: rgba(39,174,96,.15); }
    .quiz-option.wrong { border-color: var(--gx-red); background: rgba(192,57,43,.15); }

    /* ===== LOGIN PAGE ===== */
    #login-page {
      min-height: 100vh;
      background: var(--gx-dark);
      display: flex; align-items: center; justify-content: center;
      position: relative;
      overflow: hidden;
    }
    #login-page::before {
      content: '';
      position: absolute;
      width: 600px; height: 600px;
      background: radial-gradient(circle, rgba(192,57,43,.12) 0%, transparent 70%);
      top: -100px; right: -100px;
      border-radius: 50%;
    }
    #login-page::after {
      content: '';
      position: absolute;
      width: 400px; height: 400px;
      background: radial-gradient(circle, rgba(212,160,23,.08) 0%, transparent 70%);
      bottom: -50px; left: -50px;
      border-radius: 50%;
    }
    .login-card {
      background: var(--gx-card);
      border: 1px solid var(--gx-border);
      border-radius: 20px;
      padding: 40px;
      width: 100%;
      max-width: 440px;
      position: relative;
      z-index: 1;
      box-shadow: 0 24px 80px rgba(0,0,0,.6);
    }
    .login-card::before {
      content: '';
      position: absolute;
      top: 0; left: 0; right: 0;
      height: 4px;
      background: linear-gradient(90deg, var(--gx-red), var(--gx-gold));
      border-radius: 20px 20px 0 0;
    }
    .form-control-gx {
      background: var(--gx-dark3) !important;
      border: 1px solid var(--gx-border) !important;
      color: var(--gx-text) !important;
      border-radius: 10px !important;
      padding: 12px 16px !important;
      font-size: .95rem !important;
      transition: all .3s !important;
    }
    .form-control-gx:focus {
      border-color: var(--gx-red) !important;
      box-shadow: 0 0 0 3px rgba(192,57,43,.2) !important;
    }
    .form-control-gx::placeholder { color: var(--gx-muted) !important; }

    /* ===== LANDING HERO ===== */
    #landing-page {
      min-height: 100vh;
      background: var(--gx-dark);
    }
    .hero-section {
      min-height: 100vh;
      background: radial-gradient(ellipse at 70% 50%, rgba(192,57,43,.15) 0%, transparent 60%),
                  radial-gradient(ellipse at 20% 80%, rgba(212,160,23,.08) 0%, transparent 50%),
                  var(--gx-dark);
      display: flex; align-items: center;
      position: relative;
      overflow: hidden;
    }
    .hero-grid-bg {
      position: absolute; inset: 0;
      background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
                        linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
      background-size: 40px 40px;
    }
    .navbar-gx {
      background: rgba(13,13,13,.9) !important;
      backdrop-filter: blur(12px);
      border-bottom: 1px solid var(--gx-border);
    }
    .feature-icon-box {
      width: 56px; height: 56px;
      border-radius: 14px;
      display: flex; align-items: center; justify-content: center;
      font-size: 1.5rem;
    }

    /* ===== TABS ===== */
    .nav-tabs-gx .nav-link {
      color: var(--gx-muted);
      border: none;
      border-bottom: 2px solid transparent;
      padding: 10px 20px;
      font-weight: 600;
      font-family: 'Rajdhani', sans-serif;
      font-size: 1rem;
      transition: all .2s;
    }
    .nav-tabs-gx .nav-link:hover { color: var(--gx-text); }
    .nav-tabs-gx .nav-link.active {
      color: var(--gx-red-lt);
      border-bottom-color: var(--gx-red);
      background: transparent;
    }

    /* ===== PROFILE AVATAR ===== */
    .avatar {
      width: 36px; height: 36px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--gx-red), var(--gx-gold));
      display: flex; align-items: center; justify-content: center;
      font-weight: 700; font-size: .9rem; color: #fff;
    }

    /* ===== CERTIFICATE ===== */
    .certificate-box {
      border: 3px solid var(--gx-gold);
      border-radius: 16px;
      background: linear-gradient(135deg, #1a1200, #0d0d0d);
      padding: 40px;
      text-align: center;
      position: relative;
      overflow: hidden;
    }
    .certificate-box::before {
      content: '';
      position: absolute; inset: 8px;
      border: 1px solid rgba(212,160,23,.3);
      border-radius: 10px;
      pointer-events: none;
    }

    /* ===== ANIMATIONS ===== */
    @keyframes fadeInUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
    @keyframes pulse-red { 0%,100%{ box-shadow:0 0 0 0 rgba(192,57,43,.4); } 50%{ box-shadow:0 0 0 12px rgba(192,57,43,0); } }
    .animate-fade { animation: fadeInUp .6s ease both; }
    .delay-1 { animation-delay: .1s; }
    .delay-2 { animation-delay: .2s; }
    .delay-3 { animation-delay: .3s; }
    .pulse-red { animation: pulse-red 2s infinite; }

    /* ===== RESPONSIVE ===== */
    @media (max-width: 768px) {
      #sidebar { transform: translateX(-260px); }
      #sidebar.open { transform: translateX(0); }
      #main-content { margin-left: 0 !important; }
    }

    /* ===== MISC ===== */
    .divider-gold {
      height: 2px;
      background: linear-gradient(90deg, transparent, var(--gx-gold), transparent);
      margin: 2px 0;
    }
    .notification-dot {
      width: 8px; height: 8px;
      background: var(--gx-red);
      border-radius: 50%;
      position: absolute; top: 4px; right: 4px;
    }
    .progress { background: var(--gx-border); height: 6px; border-radius: 4px; }
    .section-heading { font-size: 1.6rem; font-weight: 700; }
    footer { border-top: 1px solid var(--gx-border); }