/* =========================================
   FORCE HEADER OVERRIDE – DO NOT MOVE
========================================= */

body .lp-main-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    width: 100%;
    background: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(15px);
}

body .lp-main-header * {
    box-sizing: border-box;
    font-family: inherit;
}

body .lp-main-header ul,
body .lp-main-header li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}


body .lp-main-header a {
    text-decoration: none !important;
    color: rgba(255,255,255,0.9) !important;
}

body .lp-main-header input {
    border: none !important;
    outline: none !important;
    background: transparent !important;
}


:root {
    --lp-primary: #ff4081;
    --lp-bg: #f8faff;
    --lp-surface: #ffffff;
    --lp-text: #1a1c2e;
    --lp-text-sec: #64748b;
    --lp-border: #e2e8f0;
    --lp-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

body.dark-mode {
    --lp-bg: #0f172a;
    --lp-surface: #1e293b;
    --lp-text: #f8fafc;
    --lp-text-sec: #94a3b8;
    --lp-border: #334155;
}

body.lppa-app {
    background: var(--lp-bg) !important;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--lp-text);
    margin: 0;
}
/* Hide external plugin UI inside practice app */
body.lppa-app .whatsapp,
body.lppa-app .whatsapp-widget,
body.lppa-app #whatsapp,
body.lppa-app .footer-snippet,
body.lppa-app footer {
  display: none !important;
}
/* --- HERO SECTION REFINEMENT --- */
.lp-home-hero {
    background: #1a237e;
    padding: 120px 20px 180px;
    position: relative;
    text-align: center;
    color: white;
    overflow: hidden;
}

.lp-hero-inner {
    position: relative;
    z-index: 5;
    max-width: 800px;
    margin: 0 auto;
}

.lp-hero-text h1 { font-size: 2.5rem; font-weight: 800; margin: 0; }
.lp-hero-text p { opacity: 0.8; font-size: 1.1rem; }

.lp-hero-search-box {
    margin: 30px auto 0;
    max-width: 400px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    padding: 8px;
    border-radius: 50px;
    display: flex;
}

.lp-hero-search-box input {
    background: transparent; border: none; padding: 12px 20px;
    flex: 1; color: white; outline: none;
}

.lp-hero-search-box button {
    background: var(--lp-primary); color: white; border: none;
    padding: 0 25px; border-radius: 50px; cursor: pointer; font-weight: 700;
}

.lp-wave-container {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 120px;
    line-height: 0;
}

.lp-wave-container svg { width: 100%; height: 100%; }
.lp-wave-container path { fill: var(--lp-bg); }

/* --- DASHBOARD MAIN SPACING --- */
.lp-dashboard-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px;
    position: relative;
    z-index: 10;
}

.lp-section-title { margin-bottom: 40px; text-align: left; }
.lp-section-title h2 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }

/* --- GRID SYSTEM --- */
.lp-modern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    justify-content: center;
}

/* --- CARD REFINEMENT --- */
.lp-subject-card-v2 {
    background: var(--lp-surface);
    padding: 24px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--lp-border);
    transition: all 0.3s ease;
}

.lp-subject-card-v2:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--lp-primary);
}

.lp-card-icon {
    width: 64px; height: 64px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; margin-right: 20px; flex-shrink: 0;
    color: white;
}

.lp-card-content h3 { margin: 0 0 4px 0; font-size: 1.25rem; font-weight: 700; color: var(--lp-text); }
.lp-card-content span { font-size: 0.9rem; color: var(--lp-primary); font-weight: 600; }

/* --- QUIZ INTERFACE --- */
.lp-quiz-header-v2 {
    background: var(--lp-surface);
    padding: 15px 20px;
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.header-top {
    display: flex; align-items: center; gap: 15px;
    max-width: 800px; margin: 0 auto;
}

.lp-progress-container { flex: 1; height: 10px; background: var(--lp-border); border-radius: 20px; overflow: hidden; }
#lp-progress-fill { height: 100%; background: #00e676; transition: 0.4s; }

.lp-timer-v2 { position: relative; width: 45px; height: 45px; }
.lp-timer-label {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 800;
}

.lp-timer-svg { transform: rotate(-90deg); }
.lp-timer-rail { stroke: var(--lp-border); stroke-width: 8; fill: none; }
.lp-timer-fill { stroke: var(--lp-primary); stroke-width: 8; fill: none; stroke-linecap: round; }

.lp-quiz-content-area { max-width: 700px; margin: 40px auto 120px; padding: 0 20px; }
.lp-q-badge { background: rgba(255,64,129,0.1); color: var(--lp-primary); padding: 5px 15px; border-radius: 50px; font-weight: 800; font-size: 12px; }
.lp-q-text-v2 { font-size: 1.8rem; margin: 25px 0 40px; line-height: 1.3; }

.lp-opt-card {
    display: flex; align-items: center; padding: 18px 25px;
    background: var(--lp-surface); border: 2px solid var(--lp-border);
    border-radius: 20px; margin-bottom: 15px; cursor: pointer; transition: 0.2s;
}

.lp-opt-marker {
    width: 35px; height: 35px; border: 2px solid var(--lp-border);
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    margin-right: 20px; font-weight: 800; flex-shrink: 0;
}

.lp-opt-card input { display: none; }
.lp-opt-card.lp-correct { border-color: #00c853; background: rgba(0, 200, 83, 0.05); }
.lp-opt-card.lp-wrong { border-color: #ff5252; background: rgba(255, 82, 82, 0.05); }

.lp-quiz-footer-v2 {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: var(--lp-surface); padding: 20px;
    border-top: 1px solid var(--lp-border);
}
.footer-inner { max-width: 700px; margin: 0 auto; }
.lp-btn-primary { width: 100%; padding: 16px; background: var(--lp-primary); color: white; border: none; border-radius: 15px; font-weight: 800; font-size: 1.1rem; cursor: pointer; }
.lp-btn-primary:disabled { background: #cbd5e1; cursor: not-allowed; }

/* =========================
   LEGIT PREP HEADER (FINAL)
========================= */

body .lp-main-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    width: 100%;
    background: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(15px);
}

body .lp-main-header .header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 35px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

body .lp-main-header .lp-logo {
    height: 46px;
}

body .lp-main-header .lp-search-box-container {
    flex: 1;
    max-width: 420px;
}

body .lp-main-header .lp-search-inner-rect {
    background: rgba(255,255,255,0.12);
    border-radius: 50px;
    padding: 8px 25px;
}

body .lp-main-header .lp-search-inner-rect input {
    color: #fff;
    width: 100%;
}

body .lp-main-header .lp-tabs-list {
    display: flex;
    align-items: center;
    gap: 32px;
}

body .lp-main-header .lp-nav-link {
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

/* HEADER UTILITIES */
body .lp-main-header .lp-header-utilities {
    display: flex;
    align-items: center;
    gap: 15px;
}

body .lp-main-header .lp-theme-pill-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.18);
    color: #ffffff;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* MOBILE HEADER */
@media (max-width: 1024px) {
    body .lp-main-header .lp-mobile-hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
    }

    body .lp-main-header .lp-nav-tabs-container {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #0a192f;
        padding: 20px;
    }

    body .lp-main-header .lp-nav-tabs-container.show-menu {
        display: block;
    }

    body .lp-main-header .lp-tabs-list {
        flex-direction: column;
        gap: 18px;
    }
}
/* SEARCH VISIBILITY FIX */
body .lp-main-header .lp-search-inner-rect input {
    color: #ffffff !important;
    font-size: 0.95rem;
}

body .lp-main-header .lp-search-inner-rect input::placeholder {
    color: rgba(255, 255, 255, 0.55) !important;
}
/* ===============================
   MOBILE HEADER BEHAVIOUR FIX
=============================== */

@media (max-width: 768px) {

    /* Keep header compact */
    body .lp-main-header .header-inner {
        gap: 12px;
    }

    /* Hide nav by default */
    body .lp-main-header .lp-nav-tabs-container {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #0a192f;
        padding: 20px 0;
        text-align: center;
    }

    /* Show nav ONLY when hamburger clicked */
    body .lp-main-header .lp-nav-tabs-container.show-menu {
        display: block;
    }

    /* Stack menu items */
    body .lp-main-header .lp-tabs-list {
        flex-direction: column;
        gap: 18px;
    }

    body .lp-main-header .lp-nav-link {
        font-size: 1.05rem;
    }

    /* SHOW hamburger */
    body .lp-main-header .lp-mobile-hamburger {
        display: flex;
    }

    /* Keep search visible */
    body .lp-main-header .lp-search-box-container {
        max-width: 160px;
    }
}

/* ===============================
   MOBILE SEARCH VISIBILITY FIX
=============================== */

.lp-search-inner-rect {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lp-search-icon {
    font-size: 14px;
    opacity: 0.8;
}

@media (max-width: 768px) {

    body .lp-main-header .lp-search-box-container {
        max-width: 120px;
        flex: 0 0 auto;
    }

    body .lp-main-header .lp-search-inner-rect {
        padding: 6px 12px;
        border-radius: 30px;
        background: rgba(255,255,255,0.18);
    }

    body .lp-main-header .lp-search-inner-rect input {
        font-size: 0.85rem;
        color: #fff;
    }

    body .lp-main-header .lp-search-inner-rect input::placeholder {
        color: rgba(255,255,255,0.7);
    }
}
/* ======================================
   MOBILE SEARCH ICON (NO DESKTOP CHANGE)
====================================== */

/* default: hide icon (desktop untouched) */
.lp-search-icon {
    display: none;
}

/* MOBILE ONLY */
@media (max-width: 768px) {

    body .lp-main-header .lp-search-box-container {
        max-width: 110px;
        flex: 0 0 auto;
    }

    body .lp-main-header .lp-search-inner-rect {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 6px 12px;
        border-radius: 28px;
        background: rgba(255,255,255,0.18);
    }

    /* SHOW SEARCH ICON */
    body .lp-main-header .lp-search-icon {
        display: inline-block;
        width: 14px;
        height: 14px;
        opacity: 0.9;
        background: no-repeat center;
        background-size: contain;

        /* clean white search icon (SVG) */
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M10 2a8 8 0 105.293 14.293l4.707 4.707 1.414-1.414-4.707-4.707A8 8 0 0010 2zm0 2a6 6 0 110 12A6 6 0 0110 4z'/%3E%3C/svg%3E");
    }

    body .lp-main-header .lp-search-inner-rect input {
        font-size: 0.85rem;
        color: #ffffff !important;
        width: 100%;
    }

    body .lp-main-header .lp-search-inner-rect input::placeholder {
        color: rgba(255,255,255,0.7) !important;
    }
}
/* ===============================
   FINAL HAMBURGER VISIBILITY FIX
   (MOBILE ONLY – DESKTOP SAFE)
=============================== */

/* Desktop: hide hamburger */
@media (min-width: 769px) {
    body .lp-mobile-hamburger {
        display: none !important;
    }
}

/* Mobile: show hamburger */
@media (max-width: 768px) {
    body .lp-mobile-hamburger {
        display: flex !important;
        flex-direction: column;
        gap: 5px;
        background: transparent;
        border: none;
        padding: 8px;
        cursor: pointer;
    }

    body .lp-mobile-hamburger span {
        width: 26px;
        height: 3px;
        background-color: #ffffff !important;
        border-radius: 2px;
        display: block;
    }
}

/* =========================================
   DESKTOP HEADER — SINGLE LINE (FINAL)
   MOBILE COMPLETELY UNTOUCHED
========================================= */
@media (min-width: 1025px) {

  /* Header container */
  body .lp-main-header {
    position: sticky;
    top: 0;
    z-index: 9999;
  }

  body .lp-main-header .header-inner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 32px;
    height: 72px;
    width: 100%;
  }

  /* Logo */
  body .lp-logo-box {
    flex: 0 0 auto;
  }

  /* Search – after logo */
  body .lp-search-box-container {
    flex: 0 0 360px;
    max-width: 360px;
  }

  /* Nav – same line */
  body .lp-nav-tabs-container {
    display: flex !important;
    align-items: center;
    margin-left: auto;
    position: static !important;
    background: transparent !important;
    padding: 0 !important;
  }

  body .lp-tabs-list {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 28px;
    white-space: nowrap;
  }

  /* Theme icon */
  body .lp-header-utilities {
    flex: 0 0 auto;
    margin-left: 20px;
  }

  body .lp-theme-pill-btn {
    width: 46px;
    height: 46px;
    font-size: 22px;
  }

  /* Desktop: no hamburger */
  body .lp-mobile-hamburger {
    display: none !important;
  }
}
/* =========================================
   DESKTOP HEADER – FINAL & CLEAN
   MOBILE COMPLETELY UNCHANGED
========================================= */
@media (min-width: 1025px) {

  .lp-main-header .header-inner {
    display: flex;
    align-items: center;
    gap: 32px;
    height: 72px;
  }

  /* Logo */
  .lp-logo-box {
    flex: 0 0 auto;
  }

  /* Search (after logo, not centered) */
  .lp-search-box-container {
    flex: 0 0 360px;
    max-width: 360px;
  }

  /* Nav on same line */
  .lp-nav-tabs-container {
    margin-left: auto;
    position: static;
    background: transparent;
    display: block !important;
  }

  .lp-tabs-list {
    display: flex;
    align-items: center;
    gap: 28px;
    white-space: nowrap;
  }

  /* Theme icon at extreme right */
  .lp-header-utilities {
    margin-left: 20px;
    display: flex;
    align-items: center;
  }

  /* Never show hamburger on desktop */
  .lp-mobile-hamburger {
    display: none !important;
  }
}
/* --- ADVANCED RESULT UI --- */
.lp-result-portal-v2 {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.5s ease;
}

.lp-result-glass-card {
    background: var(--lp-surface);
    width: 100%;
    max-width: 500px;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border: 1px solid var(--lp-border);
}

.lp-result-header-v2 {
    padding: 40px 20px;
    text-align: center;
    color: white;
}

.lp-result-badge-v2 {
    font-size: 50px;
    margin-bottom: 10px;
}

.lp-result-header-v2 h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 800;
}

.lp-main-stats-v2 {
    padding: 30px 20px;
    text-align: center;
}

.lp-circle-score {
    width: 120px;
    height: 120px;
    border: 8px solid;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.lp-score-num {
    font-size: 1.8rem;
    font-weight: 800;
    display: block;
}

.lp-score-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lp-stats-grid-v2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 0 30px 30px;
}

.lp-stat-item {
    background: var(--lp-bg);
    padding: 15px;
    border-radius: 20px;
    text-align: center;
}

.lp-stat-val {
    display: block;
    font-size: 1.3rem;
    font-weight: 800;
}

.lp-stat-lab {
    font-size: 0.75rem;
    color: var(--lp-text-sec);
}

.lp-result-actions-v2 {
    padding: 20px 30px 40px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lp-btn-reattempt {
    background: var(--lp-primary);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.lp-btn-dashboard {
    background: transparent;
    border: 2px solid var(--lp-border);
    color: var(--lp-text);
    padding: 15px;
    border-radius: 15px;
    font-weight: 700;
    cursor: pointer;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
/* --- PREMIUM STYLE BACK ARROW --- */
.lp-back-arrow-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: var(--lp-surface); /* Matches your theme background */
    border: 1.5px solid var(--lp-border);
    border-radius: 12px;
    color: var(--lp-text) !important;
    font-size: 22px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.lp-back-arrow-btn:hover {
    background: var(--lp-primary); /* Uses your brand blue/pink */
    color: #ffffff !important;
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Mobile Adjustment */
@media (max-width: 768px) {
    .lp-back-arrow-btn {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
}
.lp-opt-card.lp-correct { border-color: #00e676 !important; background: rgba(0, 230, 118, 0.1) !important; }
.lp-opt-card.lp-wrong { border-color: #ff5252 !important; background: rgba(255, 82, 82, 0.1) !important; }
.lp-opt-card input[type="radio"] { display: none; }
/* --- Enhanced Solution Analysis Styles --- */
.lp-explanation-v2 {
    margin-top: 25px;
    animation: fadeInSlide 0.4s ease-out;
}

.lp-expl-card {
    background: #f0f7ff; /* Soft blue background for focus */
    border-left: 6px solid #00e676; /* Vibrant green indicator */
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Support for Dark Mode */
.dark-mode .lp-expl-card {
    background: #1e293b;
    border-left: 6px solid #00e676;
    color: #f1f5f9;
}

.lp-expl-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding-bottom: 12px;
}

.lp-expl-label {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 0.9rem;
    color: #475569;
    letter-spacing: 0.5px;
}

.lp-correct-ans-badge {
    background: #00e676;
    color: #fff;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
}

.lp-expl-text {
    line-height: 1.8; /* Better readability for long legal/GK texts */
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
}

.lp-expl-footer {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: #94a3b8;
}

@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}