@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg: #F8FAFC;
    --card: #FFFFFF;
    --text: #0F172A;
    --muted: #64748B;
    --border: #E2E8F0;
    --input: #F8FAFC;
    --input-border: #CBD5E1;
    --primary: #7c3aed;
    --primary-hover: #6d28d9;
    --primary2: #9333ea;
    --accent: #FBBF24;
    --accent-glow: rgba(251, 191, 36, 0.4);
    --primary-gradient: linear-gradient(135deg, #7c3aed 0%, #9333ea 55%, #c026d3 100%);
    --primary-glow: 0 10px 25px -5px rgba(124, 58, 237, 0.35);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 26px;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 10px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 16px 32px -4px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.03);
    --shadow-xl: 0 20px 40px -10px rgba(124, 58, 237, 0.18);
}

body.dark {
    --bg: #0B0F19;
    --card: #151B2B;
    --text: #F8FAFC;
    --muted: #94A3B8;
    --border: #232B3E;
    --input: #0F1422;
    --input-border: #2A344B;
    --primary: #9333ea;
    --primary-hover: #a855f7;
    --primary2: #7c3aed;
    --primary-gradient: linear-gradient(135deg, #9333ea 0%, #a855f7 55%, #c026d3 100%);
    --shadow-lg: 0 16px 32px -4px rgba(0, 0, 0, 0.45);
    --shadow-xl: 0 20px 40px -10px rgba(0, 0, 0, 0.55);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

/* LOCK SCREEN STATICALLY - PREVENT HORIZONTAL SCROLL & WOBBLE */
html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden !important;
    position: relative;
    background: var(--bg);
    min-height: 100vh;
    color: var(--text);
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: pan-y;
}

/* ---------- APP SHELL & LAYOUT ---------- */
.app-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
}

.sidebar {
    width: min(320px, 82vw) !important;
    max-width: 340px !important;
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    height: 100vh !important;
    height: 100dvh !important;
    background: var(--card) !important;
    box-shadow: 6px 0 28px rgba(0, 0, 0, 0.28) !important;
    border-right: 1px solid var(--border) !important;
    color: var(--text) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain !important;
    z-index: 2200 !important;
    transform: translateX(-105%) !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease !important;
    visibility: hidden !important;
}

.sidebar.open {
    transform: translateX(0%) !important;
    visibility: visible !important;
}

.sidebar-brand {
    padding: 22px 20px;
    font-size: 19px;
    font-weight: 800;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    letter-spacing: -0.02em;
}

.sidebar-close {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--input) !important;
    color: var(--muted) !important;
    border: 1px solid var(--border) !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 0 !important;
    border-radius: 50% !important;
    font-size: 15px !important;
    cursor: pointer !important;
    padding: 0 !important;
}

.sidebar-close:hover {
    color: var(--text) !important;
    background: var(--border) !important;
}

.sidebar-backdrop {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    background: rgba(15, 23, 42, 0.65) !important;
    backdrop-filter: blur(4px) !important;
    z-index: 2100 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.28s ease !important;
}

.sidebar-backdrop.show {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.side-tab {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    background: transparent;
    color: var(--muted);
    box-shadow: none;
    padding: 11px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.side-tab:hover {
    background: rgba(124, 58, 237, 0.08);
    color: var(--primary);
    transform: none;
    box-shadow: none;
}

.side-tab.active {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: var(--primary-glow);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-footer button, .sidebar-footer .user-chip {
    background: var(--input);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    padding: 10px;
    text-align: center;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: none;
}

.main-area {
    flex: 1;
    min-width: 0;
    width: 100%;
    max-width: 100vw;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* ---------- TOPBAR (PW STYLE) ---------- */
.topbar {
    background: var(--card) !important;
    padding: max(8px, env(safe-area-inset-top, 0px)) 16px 8px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: 1px solid var(--border) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 30 !important;
    backdrop-filter: blur(14px) !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    min-height: 54px !important; height: auto !important;
    gap: 8px !important;
}

.topbar-left {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
    flex: 1 !important;
}

.topbar h1 {
    font-size: 16px !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
    color: var(--text) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin: 0 !important;
}

.topbar-right {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
}

.brand-chip {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-weight: 800 !important;
    font-size: 16px !important;
    letter-spacing: -0.01em !important;
    color: var(--text) !important;
    flex-shrink: 0 !important;
}

.brand-chip img {
    width: 28px !important;
    height: 28px !important;
    border-radius: 8px !important;
    object-fit: cover !important;
    box-shadow: 0 4px 10px rgba(124, 58, 237, 0.25) !important;
    flex-shrink: 0 !important;
}

.menu-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    color: var(--text) !important;
    border: none !important;
    box-shadow: none !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 0 !important;
    padding: 0 !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    transition: background 0.15s ease !important;
}

.menu-toggle:active {
    background: var(--input) !important;
    transform: scale(0.94) !important;
}

.topbar-back-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    color: var(--text) !important;
    border: none !important;
    box-shadow: none !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 0 !important;
    padding: 0 !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    transition: background 0.15s ease !important;
}

.topbar-back-btn:active {
    background: var(--input) !important;
    transform: scale(0.94) !important;
}

.user-avatar-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 0 !important;
    border-radius: 50% !important;
    background: var(--primary-gradient) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 3px 10px rgba(124, 58, 237, 0.3) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    transition: transform 0.15s ease !important;
}

.user-avatar-btn:active {
    transform: scale(0.92) !important;
}

.streak-pill {
    background: rgba(255, 107, 53, 0.12) !important;
    color: #ff6b35 !important;
    border: 1px solid rgba(255, 107, 53, 0.25) !important;
    padding: 6px 11px !important;
    border-radius: 100px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.icon-btn {
    background: var(--input);
    color: var(--text);
    border: 1px solid var(--border);
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-md);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.icon-btn:hover {
    background: var(--border);
    transform: none;
    box-shadow: none;
}

.topbar .user-chip {
    background: var(--primary-gradient);
    color: #fff;
    padding: 7px 13px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
    white-space: nowrap;
    cursor: pointer;
    flex-shrink: 0;
}

.container {
    max-width: 1080px;
    margin: 20px auto;
    padding: 0 16px;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
}

@media (max-width: 820px) {
    .menu-toggle {
        display: inline-flex !important;
    }
    .app-shell {
        display: block;
    }
    .container {
        margin: 14px auto;
        padding: 0 14px;
    }
    .main-area {
        padding-bottom: calc(85px + env(safe-area-inset-bottom, 0px));
    }
    /* Hide desktop-only fullscreen button on mobile */
    #fullscreenBtn {
        display: none !important;
    }
    .topbar .user-chip span.user-name {
        display: none;
    }
}

/* ---------- TELEGRAM-STYLE MODERN BOTTOM NAVIGATION BAR ---------- */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card);
    border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    z-index: 1000 !important;
    backdrop-filter: blur(16px);
    grid-template-columns: repeat(5, 1fr);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
}

@media (max-width: 820px) {
    .mobile-bottom-nav {
        display: grid;
    }
}

.mobile-nav-item {
    background: transparent;
    border: none;
    box-shadow: none;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px 2px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    min-width: 0;
    width: 100%;
}

.mobile-nav-item:hover, .mobile-nav-item:active {
    background: transparent;
    transform: none;
    box-shadow: none;
}

.mobile-nav-pill {
    width: 48px;
    height: 30px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    background: transparent;
}

.mobile-nav-pill svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    transition: all 0.2s ease;
}

.mobile-nav-item .nav-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--muted);
    transition: color 0.2s ease;
    white-space: nowrap;
}

/* Telegram-style active pill state */
.mobile-nav-item.active .mobile-nav-pill {
    background: rgba(124, 58, 237, 0.12);
    color: var(--primary);
}

body.dark .mobile-nav-item.active .mobile-nav-pill {
    background: rgba(192, 132, 252, 0.18);
    color: var(--primary);
}

.mobile-nav-item.active .nav-label {
    color: var(--primary);
    font-weight: 800;
}

/* ---------- IN-APP NOTIFICATION TOAST (COMPLETELY HIDDEN UNLESS ACTIVE) ---------- */
.in-app-toast {
    display: none !important;
    position: fixed;
    top: -140px;
    left: 50%;
    transform: translateX(-50%);
    width: min(380px, 92vw);
    background: var(--card);
    color: var(--text);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    padding: 14px 16px;
    align-items: flex-start;
    gap: 12px;
    z-index: 5000;
    transition: top 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    box-sizing: border-box;
}

.in-app-toast.show {
    display: flex !important;
    top: calc(env(safe-area-inset-top, 0px) + 14px);
    opacity: 1;
    pointer-events: auto;
}

.in-app-toast-icon {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
}

.in-app-toast-text {
    flex: 1;
    min-width: 0;
}

.in-app-toast-text b {
    display: block;
    margin-bottom: 2px;
    font-size: 14px;
    font-weight: 700;
}

.in-app-toast-text div {
    font-size: 13px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.in-app-toast-close {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 16px;
    cursor: pointer;
    padding: 2px 6px;
    flex-shrink: 0;
    box-shadow: none;
}

/* ---------- LOGIN & AUTH SCREEN ---------- */
#loginScreen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: var(--bg);
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(124, 58, 237, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(192, 38, 211, 0.1) 0%, transparent 45%);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
}

.login-wrap {
    width: 100%;
    max-width: 440px;
    margin: auto;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
}

.login-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 38px 28px;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(16px);
    position: relative;
    box-sizing: border-box;
}

.auth-logo-badge {
    width: 84px !important;
    height: 84px !important;
    max-width: 84px !important;
    max-height: 84px !important;
    margin: 0 auto 18px !important;
    border-radius: 22px !important;
    background: var(--primary-gradient);
    padding: 3px;
    box-shadow: 0 12px 28px -6px rgba(124, 58, 237, 0.45) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

.auth-logo-badge img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    border-radius: 19px !important;
    object-fit: cover !important;
    display: block !important;
}

.auth-segment {
    display: flex;
    background: var(--input);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 4px;
    margin: 20px 0 24px;
}

.auth-seg-btn {
    flex: 1;
    background: transparent;
    color: var(--muted);
    font-weight: 700;
    font-size: 13.5px;
    padding: 10px 16px;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    box-shadow: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-seg-btn:hover {
    transform: none;
    box-shadow: none;
    color: var(--text);
}

.auth-seg-btn.active {
    background: var(--card);
    color: var(--primary);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.login-card h2 {
    text-align: center;
    color: var(--text);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.login-card .subtitle {
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 12px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: var(--muted);
    font-size: 12.5px;
}

.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.btn-google {
    background: var(--card);
    color: var(--text);
    border: 1.5px solid var(--border);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
    font-size: 14.5px;
    padding: 13px 20px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.btn-google:hover {
    background: var(--input);
    border-color: var(--muted);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-google img {
    width: 20px;
    height: 20px;
}

.switch-link {
    text-align: center;
    margin-top: 18px;
    color: var(--primary);
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
}

.switch-link:hover {
    text-decoration: underline;
}

/* ---------- EMAIL OTP STYLES ---------- */
.auth-method-switch {
    margin: 16px 0 20px;
    background: var(--input);
}
.auth-sub-segment {
    margin: 12px 0 18px;
}
.otp-hint-badge {
    text-align: center;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--muted);
    margin-top: 12px;
    line-height: 1.4;
}
.otp-sent-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 18px;
    text-align: left;
}
.otp-sent-icon {
    font-size: 24px;
    flex-shrink: 0;
}
.otp-sent-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text);
}
.otp-sent-sub {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
    word-break: break-all;
}
.otp-edit-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--primary);
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
}
.otp-edit-btn:hover {
    background: var(--card);
}
.otp-inputs-grid {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 18px 0 20px;
}
.otp-digit {
    width: 44px;
    height: 52px;
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--input);
    color: var(--text);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: inherit;
}
.otp-digit:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.25);
    background: var(--card);
    outline: none;
    transform: translateY(-2px);
}
.otp-resend-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 13px;
    color: var(--muted);
}
.btn-resend-link {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    padding: 2px 6px;
    text-decoration: underline;
}
.btn-resend-link:hover {
    color: var(--primary-dark, #6d28d9);
}
.otp-dev-box {
    background: rgba(124, 58, 237, 0.08);
    border: 1px dashed var(--primary);
    border-radius: var(--radius-md);
    padding: 12px;
    margin: 12px 0 16px;
    text-align: center;
    font-size: 12.5px;
    color: var(--text);
}
.otp-code-highlight {
    font-family: monospace;
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 2px;
    padding: 2px 8px;
    background: var(--card);
    border-radius: 6px;
    border: 1px solid var(--border);
    display: inline-block;
    margin: 4px 6px;
}
.btn-sm-autofill {
    display: inline-block;
    background: var(--primary-gradient);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 6px;
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.3);
}
.btn-sm-autofill:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}
.otp-dev-sub {
    font-size: 11px;
    color: var(--muted);
    margin-top: 8px;
    line-height: 1.35;
}

/* ---------- CARDS, HEADINGS & BUTTONS ---------- */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

h2 {
    color: var(--text);
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
}

.subtitle {
    color: var(--muted);
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
}

label {
    font-weight: 600;
    font-size: 13.5px;
    color: var(--muted);
    display: block;
    margin-top: 12px;
    margin-bottom: 4px;
}

select, input, textarea {
    width: 100%;
    padding: 13px 16px;
    margin: 6px 0;
    border: 1.5px solid var(--input-border);
    border-radius: var(--radius-md);
    font-size: 15px;
    background: var(--input);
    color: var(--text);
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

select:focus, input:focus, textarea:focus {
    border-color: var(--primary);
    background: var(--card);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

button {
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    padding: 13px 22px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 700;
    font-size: 14.5px;
    transition: all 0.2s ease;
    box-shadow: var(--primary-glow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px -4px rgba(124, 58, 237, 0.45);
    opacity: 0.96;
}

button:active {
    transform: scale(0.98);
}

.btn-full {
    width: 100%;
    margin-top: 12px;
}

.btn-secondary {
    background: #ff9800;
    box-shadow: 0 4px 14px rgba(255, 152, 0, 0.3);
}

.btn-danger {
    background: #ef4444;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.btn-green {
    background: #10b981;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-grey {
    background: var(--input);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: none;
}

.btn-grey:hover {
    background: var(--border);
    box-shadow: none;
}

/* ---------- MODALS & OVERLAYS (ACTIVITY PICKER FIXED) ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.modal-overlay.hidden {
    display: none !important;
}

.modal-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 28px 22px;
    max-width: 440px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    box-sizing: border-box;
}

/* ACTIVITY PICKER GRID - PROFESSIONAL, NEVER COLLAPSES */
.activity-picker-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
    margin-top: 18px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.activity-picker-grid button {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 16px 6px !important;
    background: var(--input) !important;
    border: 1.5px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
    font-size: 24px !important;
    color: var(--text) !important;
    box-shadow: none !important;
    width: 100% !important;
    min-height: 86px !important;
    transform: none !important;
    box-sizing: border-box !important;
}

.activity-picker-grid button:hover, .activity-picker-grid button:active {
    border-color: var(--primary) !important;
    background: rgba(124, 58, 237, 0.08) !important;
    transform: translateY(-2px) !important;
    box-shadow: var(--shadow-sm) !important;
}

.activity-picker-grid button span {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: var(--text) !important;
    white-space: nowrap !important;
}

.co-price-row {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    font-size: 14px;
    color: var(--text);
}

.co-total-row {
    border-top: 1px solid var(--border);
    margin-top: 8px;
    padding-top: 10px;
    font-weight: 800;
    font-size: 17px;
}

.co-coupon-row {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.co-coupon-row input {
    margin: 0;
    flex: 1;
}

.co-coupon-row button {
    width: auto;
    white-space: nowrap;
}

/* ---------- STATS GRID ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 600px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
}

.stat-box {
    padding: 20px 14px;
    border-radius: var(--radius-md);
    text-align: center;
    background: var(--input);
    border: 1px solid var(--border);
    transition: transform 0.2s ease;
    box-sizing: border-box;
}

.stat-box:hover {
    transform: translateY(-2px);
}

.stat-num {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    margin-top: 5px;
}

.hidden {
    display: none !important;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    background: var(--primary-gradient);
    color: #fff;
}

.badge-green {
    background: #10b981 !important;
}

.badge-time {
    background: #64748b !important;
}

.msg {
    text-align: center;
    padding: 12px 16px;
    margin: 12px 0;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
}

.msg.error {
    background: #fee2e2;
    color: #ef4444;
}

.msg.success {
    background: #d1fae5;
    color: #10b981;
}

/* ---------- COUNTDOWN & STREAK ---------- */
.countdown-banner {
    background: linear-gradient(135deg, #1e293b, #334155);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    box-sizing: border-box;
}

.countdown-banner.urgent {
    background: linear-gradient(135deg, #991b1b, #dc2626);
}

.countdown-banner.soon {
    background: linear-gradient(135deg, #b45309, #d97706);
}

.countdown-num {
    font-size: 36px;
    font-weight: 800;
    line-height: 1;
}

.countdown-edit {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.countdown-edit input {
    width: auto;
    margin: 0;
    padding: 8px 12px;
}

.countdown-edit button {
    padding: 8px 14px;
    font-size: 13px;
}

.freeze-box {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.freeze-btn {
    background: rgba(255, 255, 255, 0.25);
    font-size: 13px;
    padding: 8px 14px;
    box-shadow: none;
}

.freeze-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ---------- CBT / TEST ENGINE ---------- */
.test-layout {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.question-panel {
    flex: 3;
    min-width: 300px;
}

.palette-panel {
    flex: 1;
    min-width: 220px;
}

.question-text {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.6;
    color: var(--text);
}

.option {
    padding: 15px 18px;
    margin: 12px 0;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--card);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
}

.option:hover {
    border-color: var(--primary);
    background: rgba(124, 58, 237, 0.04);
}

.option.selected {
    border-color: var(--primary);
    background: rgba(124, 58, 237, 0.09);
    box-shadow: 0 0 0 2px var(--primary);
    font-weight: 600;
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.pal-btn {
    padding: 10px 0;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    background: var(--input);
    color: var(--text);
    cursor: pointer;
    font-weight: 700;
    box-shadow: none;
}

.pal-btn.answered {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
}

.pal-btn.review {
    background: #f59e0b;
    color: #fff;
    border-color: #f59e0b;
}

.pal-btn.current {
    border-color: var(--primary);
    border-width: 2.5px;
}

.nav-btns {
    display: flex;
    gap: 10px;
    margin-top: 22px;
    flex-wrap: wrap;
}

.nav-btns button {
    flex: 1;
    min-width: 110px;
}

.result-review {
    border-left: 4px solid var(--border);
    padding: 14px;
    margin: 12px 0;
    border-radius: var(--radius-sm);
    background: var(--input);
    position: relative;
}

.bookmark-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    color: #ff9800;
    padding: 4px;
    font-size: 18px;
    box-shadow: none;
}

/* ---------- STUDY TIMER & GOALS ---------- */
.sw-circle {
    width: 260px;
    height: 260px;
    margin: 20px auto;
    position: relative;
}

.sw-circle svg {
    transform: rotate(-90deg);
}

.sw-track {
    fill: none;
    stroke: var(--border);
    stroke-width: 14;
}

.sw-progress {
    fill: none;
    stroke: url(#grad);
    stroke-width: 14;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s;
}

.sw-center {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.sw-time {
    font-size: 42px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
}

.sw-status {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.sw-goal {
    text-align: center;
    color: var(--muted);
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 500;
}

.goal-ring-wrap {
    width: 170px;
    height: 170px;
    margin: 14px auto 8px;
    position: relative;
}

.goal-ring-wrap svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.goal-ring-bg {
    fill: none;
    stroke: var(--border);
    stroke-width: 12;
}

.goal-ring-fg {
    fill: none;
    stroke: #ef4444;
    stroke-width: 12;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.6s ease, stroke 0.4s;
}

.goal-ring-fg.amber { stroke: #f59e0b; }
.goal-ring-fg.green { stroke: #10b981; }
.goal-ring-fg.gold { stroke: #fbbf24; }

.goal-ring-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.goal-ring-time {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
}

.goal-ring-sub {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

.goal-status {
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    margin-top: 8px;
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 180px;
    padding: 24px 6px 8px;
    position: relative;
}

.bar-chart .grid-line {
    position: absolute;
    left: 6px;
    right: 6px;
    height: 1px;
    background: var(--border);
    z-index: 0;
}

.bar-chart .grid-line span {
    position: absolute;
    left: 0;
    top: -16px;
    font-size: 10px;
    color: var(--muted);
}

.bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    height: 100%;
    position: relative;
    z-index: 1;
}

.bar {
    width: 60%;
    max-width: 32px;
    background: var(--primary-gradient);
    border-radius: 8px 8px 4px 4px;
    min-height: 4px;
    transition: height 0.6s cubic-bezier(.2, .8, .2, 1);
    box-shadow: 0 4px 12px -2px rgba(124, 58, 237, 0.35);
}

.bar.is-today {
    background: linear-gradient(180deg, #fbbf24, #f59e0b);
    box-shadow: 0 4px 12px -2px rgba(245, 158, 11, 0.4);
}

.bar-label {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
}

.bar-label.is-today {
    color: var(--primary);
    font-weight: 800;
}

.bar-val {
    font-size: 11px;
    color: var(--text);
    font-weight: 700;
    min-height: 14px;
}

.bar-val.is-today {
    color: #f59e0b;
}

.streak-flame {
    color: #f59e0b;
    font-weight: 800;
}

/* ---------- BATCHES & STORE ---------- */
.batch-toptabs {
    display: flex;
    gap: 0;
    margin-bottom: 18px;
    border-bottom: 2px solid var(--border);
}

.batch-toptabs button {
    flex: 1;
    background: transparent;
    color: var(--muted);
    box-shadow: none;
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    padding: 12px 10px;
    font-size: 14.5px;
}

.batch-toptabs button.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.batch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.batch-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 0;
    padding: 0;
    background: var(--card);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.batch-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.batch-banner {
    position: relative;
    width: 100%;
    padding-top: 50%;
    background: var(--primary-gradient);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.batch-banner img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.batch-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.7) 100%);
    display: flex;
    align-items: flex-end;
    padding: 14px;
}

.batch-banner-overlay h3 {
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    margin: 0;
}

.batch-card-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.batch-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
}

.batch-action-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
    gap: 14px !important;
    margin-top: 10px !important;
}

.batch-action-btn {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 22px 14px !important;
    background: var(--input) !important;
    color: var(--text) !important;
    border: 1.5px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
    font-weight: 700 !important;
    font-size: 14.5px !important;
    box-shadow: none !important;
}

.batch-action-btn:hover {
    border-color: var(--primary) !important;
    background: rgba(124, 58, 237, 0.06) !important;
}

.batch-action-btn .baa-icon {
    font-size: 32px;
    margin-bottom: 4px;
}

/* ---------- DOUBT AI CHAT ---------- */
.chat-shell {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 160px);
    min-height: 440px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.chat-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    gap: 12px;
    background: var(--input);
}

.chat-top-bar b {
    font-size: 16px;
    font-weight: 800;
}

.chat-subtitle {
    display: block;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 500;
    margin-top: 2px;
}

.chat-top-bar button {
    font-size: 13px;
    padding: 8px 14px;
    width: auto;
    border-radius: var(--radius-md);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-bubble {
    max-width: 82%;
    padding: 14px 18px;
    border-radius: 20px;
    font-size: 14.5px;
    line-height: 1.6;
    word-wrap: break-word;
}

.chat-bubble-row.user .chat-bubble {
    background: var(--primary-gradient);
    color: #fff;
    border-bottom-right-radius: 4px;
    box-shadow: var(--primary-glow);
}

.chat-bubble-row.model .chat-bubble {
    background: var(--input);
    color: var(--text);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}

.chat-input-bar {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 14px 18px;
    border-top: 1px solid var(--border);
    background: var(--card);
}

.chat-input-bar textarea {
    flex: 1;
    margin: 0;
    resize: none;
    max-height: 120px;
    padding: 12px 18px;
    border-radius: 24px;
    font-size: 14.5px;
    line-height: 1.4;
}

.chat-send-btn, .chat-attach-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-attach-btn {
    background: var(--input);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: none;
    font-size: 18px;
}

/* ---------- CALENDAR, TIMETABLE & NOTEBOOK ---------- */
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.cal-dayname {
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    padding: 6px 0;
}

.cal-cell {
    min-height: 70px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px;
    cursor: pointer;
    position: relative;
    transition: 0.2s;
    font-size: 12px;
    background: var(--card);
}

.cal-cell:hover {
    border-color: var(--primary);
}

.cal-cell.today {
    border: 2px solid var(--primary);
}

.cal-cell.empty {
    border: none;
    cursor: default;
    background: transparent;
}

.tt-slot-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    gap: 10px;
    flex-wrap: wrap;
    background: var(--card);
}

.tt-track-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    flex-wrap: wrap;
    background: var(--card);
}

/* ---------- FULLSCREEN OVERLAYS & EMBEDS ---------- */
.video-player-overlay:not(.hidden), .pdf-viewer-overlay:not(.hidden) {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 2000;
    display: flex;
    flex-direction: column;
}

.global-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3.5px;
    z-index: 99999;
    background: linear-gradient(90deg, #7c3aed, #a855f7, #ec4899, #3b82f6, #7c3aed);
    background-size: 250% 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.global-loader.show {
    opacity: 1;
    animation: progressShimmer 1.2s linear infinite;
}

@keyframes progressShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.global-loader .mini-spin,
.global-loader span {
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* STRICT CONTAINMENT FOR ROCK-SOLID STATIC MOBILE DISPLAY */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    position: relative;
    overscroll-behavior-x: none;
    -webkit-overflow-scrolling: touch;
}

.app-shell, .main-area, .container, .card, #dashScreen, #setupScreen, #studyScreen, #analyticsScreen, #batchesScreen, #doubtScreen, #profileScreen, #notebookScreen, #bookmarkScreen, #historyScreen, #timetableScreen, #syllabusScreen, #plannerScreen, #walletScreen {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

/* STREAK & BADGES OVERFLOW FIX */
#streakWeek {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 4px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    margin-top: 16px !important;
}

#streakWeek > div {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    text-align: center !important;
}

#streakWeek > div > div:first-child {
    width: 32px !important;
    height: 32px !important;
    font-size: 14px !important;
    margin: 0 auto !important;
}

#badges {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.badge-item {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 12px !important;
    margin: 0 !important;
    border-radius: 100px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    background: var(--input) !important;
    border: 1px solid var(--border) !important;
    color: var(--muted) !important;
    opacity: 0.65;
    box-sizing: border-box !important;
}

.badge-item.earned {
    opacity: 1 !important;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.2)) !important;
    color: #b45309 !important;
    border-color: #f59e0b !important;
}

body.dark .badge-item.earned {
    background: rgba(251, 191, 36, 0.15) !important;
    color: #fbbf24 !important;
    border-color: rgba(251, 191, 36, 0.4) !important;
}

.stats-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

@media (min-width: 600px) {
    .stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 820px) {
    .stats-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

.stat-box {
    min-width: 0 !important;
    overflow: hidden !important;
    word-break: break-word !important;
}

/* FIXED COUNTDOWN ON MOBILE */
.countdown-banner {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.countdown-edit {
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    max-width: 100% !important;
}

.countdown-edit input[type="date"] {
    max-width: 100% !important;
    min-width: 0 !important;
}

/* ---------- TOPBAR STREAK PILL ---------- */
.streak-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.25);
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.streak-pill:hover {
    transform: scale(1.05);
}

/* ---------- HERO WELCOME CARD ---------- */
.hero-welcome-card {
    background: linear-gradient(135deg, #7c3aed 0%, #9333ea 50%, #c026d3 100%);
    color: #fff;
    border-radius: var(--radius-xl);
    padding: 24px 22px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    box-shadow: 0 14px 30px -8px rgba(124, 58, 237, 0.4);
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.hero-welcome-card::after {
    content: '';
    position: absolute;
    right: -20px;
    bottom: -30px;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(255,255,255,0.18) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-welcome-text {
    flex: 1;
    min-width: 0;
}

.hero-greeting {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.hero-subtext {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 14px;
    line-height: 1.4;
}

.countdown-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
}

.countdown-badge b {
    color: #fbbf24;
    font-size: 14px;
}

.cd-edit-btn {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    font-size: 13px;
    cursor: pointer;
    opacity: 0.85;
}
.cd-edit-btn:hover {
    opacity: 1;
    transform: none;
}

.hero-goal-widget {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.hero-streak-badge {
    background: rgba(0, 0, 0, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.32);
    backdrop-filter: blur(8px);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.hero-streak-badge:active {
    transform: scale(0.95);
}

.hero-streak-badge span {
    color: #fbbf24;
    font-weight: 800;
}

.goal-ring-wrap-compact {
    width: 90px;
    height: 90px;
    position: relative;
}

.goal-ring-wrap-compact svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.goal-ring-wrap-compact .goal-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 14;
}

.goal-ring-wrap-compact .goal-ring-fg {
    fill: none;
    stroke: #fbbf24;
    stroke-width: 14;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.6s ease;
}

.goal-ring-wrap-compact .goal-ring-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.goal-ring-wrap-compact .goal-ring-time {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
}

.goal-ring-wrap-compact .goal-ring-sub {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.8);
}

/* ---------- QUICK ACTION SHORTCUTS (HORIZONTALLY SLIDABLE CAROUSEL) ---------- */
.quick-actions-carousel {
    display: flex !important;
    gap: 12px !important;
    overflow-x: auto !important;
    padding: 6px 2px 14px !important;
    margin: 4px 0 16px !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    scroll-snap-type: x mandatory !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.quick-actions-carousel::-webkit-scrollbar {
    display: none !important;
}

.quick-actions-carousel .qa-tile {
    flex: 0 0 152px !important;
    min-width: 152px !important;
    max-width: 165px !important;
    scroll-snap-align: start !important;
    background: var(--card) !important;
    border: 1.5px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
    padding: 12px 14px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    cursor: pointer !important;
    box-shadow: var(--shadow-sm) !important;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
    text-align: left !important;
    box-sizing: border-box !important;
}

.quick-actions-carousel .qa-tile:hover,
.quick-actions-carousel .qa-tile:active {
    border-color: var(--primary) !important;
    transform: translateY(-2px) !important;
    box-shadow: var(--shadow-md) !important;
}

.quick-actions-carousel .qa-icon {
    width: 38px !important;
    height: 38px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    flex-shrink: 0 !important;
}

.quick-actions-carousel .qa-info {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
}

.quick-actions-carousel .qa-info b {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--text) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
}

.quick-actions-carousel .qa-info small {
    font-size: 11px !important;
    color: var(--muted) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
    margin-top: 1px !important;
}
    text-overflow: ellipsis;
}

/* ---------- STREAK MODERN CARD ---------- */
.streak-modern-card {
    border-left: 4px solid #f59e0b;
}

.streak-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.streak-main-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.streak-flame-icon {
    font-size: 32px;
    line-height: 1;
}

.streak-count-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.01em;
}

.streak-subtitle {
    font-size: 12.5px;
    color: var(--muted);
    margin-top: 1px;
}

.streak-best-pill {
    background: var(--input);
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text);
}

.streak-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.streak-freeze-tag {
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
}

.streak-freeze-btn {
    background: var(--input) !important;
    color: var(--text) !important;
    border: 1px solid var(--border) !important;
    box-shadow: none !important;
    font-size: 12px !important;
    padding: 7px 14px !important;
    border-radius: 8px !important;
}

.streak-freeze-btn:hover {
    background: var(--border) !important;
}

/* ---------- METRICS SEGMENT (TODAY VS ALL TIME) ---------- */
.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.card-header-flex h2 {
    margin-bottom: 0;
}

.metrics-segment {
    display: flex;
    background: var(--input);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 3px;
}

.metrics-seg-btn {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--muted) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 6px 14px !important;
    border-radius: 100px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.metrics-seg-btn.active {
    background: var(--card) !important;
    color: var(--primary) !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06) !important;
}

/* ========================================================
   MODERN STUDY SCREEN & STOPWATCH CONTROLS
   ======================================================== */
.mode-toggle {
    display: flex !important;
    background: var(--input) !important;
    border: 1.5px solid var(--border) !important;
    border-radius: 100px !important;
    padding: 4px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 18px !important;
    gap: 4px !important;
}

.mode-toggle button {
    flex: 1 1 0 !important;
    background: transparent !important;
    color: var(--muted) !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 100px !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    text-align: center !important;
    transition: all 0.25s ease !important;
    white-space: nowrap !important;
    min-width: 0 !important;
    height: auto !important;
    transform: none !important;
}

.mode-toggle button.active {
    background: var(--card) !important;
    color: var(--primary) !important;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.16) !important;
}

/* Daily Goal Row & Tiny Pencil Icon */
.sw-goal {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--muted) !important;
    margin: 14px auto 16px !important;
    text-align: center !important;
}

.sw-goal b {
    color: var(--text) !important;
    font-weight: 700 !important;
}

.goal-edit-link {
    background: rgba(124, 58, 237, 0.1) !important;
    color: var(--primary) !important;
    border: none !important;
    box-shadow: none !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 0 !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    margin: 0 2px !important;
    vertical-align: middle !important;
    transition: transform 0.15s ease, background 0.15s ease !important;
}

.goal-edit-link:hover {
    transform: scale(1.15) !important;
    background: rgba(124, 58, 237, 0.2) !important;
}

.sw-controls-grid {
    display: grid !important;
    grid-template-columns: 1.35fr 1fr 1fr !important;
    gap: 10px !important;
    margin-top: 24px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.sw-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 13px 12px !important;
    border-radius: var(--radius-md) !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    border: none !important;
    box-shadow: var(--shadow-sm) !important;
    transition: transform 0.15s, box-shadow 0.15s !important;
    min-width: 0 !important;
    white-space: nowrap !important;
}

.sw-btn:active {
    transform: scale(0.97) !important;
}

.sw-btn-start {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
}

.sw-btn-save {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3) !important;
}

.sw-btn-reset {
    background: var(--input) !important;
    color: var(--text) !important;
    border: 1.5px solid var(--border) !important;
    box-shadow: none !important;
}

/* ========================================================
   MODERN STUDY HISTORY LIST (Image 2)
   ======================================================== */
#recordsList {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin-top: 14px !important;
}

.record-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 14px !important;
    background: var(--input) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

.record-item:hover {
    background: var(--card) !important;
    border-color: rgba(124, 58, 237, 0.3) !important;
    box-shadow: var(--shadow-sm) !important;
}

.record-item.is-today {
    background: rgba(124, 58, 237, 0.07) !important;
    border-color: rgba(124, 58, 237, 0.35) !important;
}

.record-date-col {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.record-day-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
    background: var(--card) !important;
    border: 1px solid var(--border) !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    color: var(--primary) !important;
    flex-shrink: 0 !important;
}

.record-date-text {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
}

.record-date-text b {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--text) !important;
}

.today-tag {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #10b981 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.record-time-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 14px !important;
    border-radius: 100px !important;
    background: rgba(124, 58, 237, 0.12) !important;
    color: var(--primary) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    flex-shrink: 0 !important;
}

/* ========================================================
   MODERN VIDEO PLAYER OVERLAY & CONTROLS (Image 3)
   ======================================================== */
.video-player-overlay:not(.hidden) {
    position: fixed !important;
    inset: 0 !important;
    background: #000 !important;
    z-index: 2500 !important;
    display: flex !important;
    flex-direction: column !important;
}

.pdf-viewer-overlay:not(.hidden) {
    position: fixed !important;
    inset: 0 !important;
    background: #000 !important;
    z-index: 2500 !important;
    display: flex !important;
    flex-direction: column !important;
}

.vp-header {
    height: 52px !important;
    background: rgba(10, 10, 14, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 16px !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
    z-index: 30 !important;
}

.vp-back {
    background: transparent !important;
    color: #fff !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 22px !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 0 !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
}

.vp-title {
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    flex: 1 !important;
    margin: 0 12px !important;
}

.vp-fs-btn {
    background: rgba(255,255,255,0.12) !important;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    padding: 6px 12px !important;
    box-shadow: none !important;
    min-width: 0 !important;
    cursor: pointer !important;
}

.vp-stage {
    flex: 1 !important;
    position: relative !important;
    background: #000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

.custom-player {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #000 !important;
    touch-action: manipulation !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

.custom-player.cp-cursor-hide {
    cursor: none !important;
}

.cp-media {
    position: relative !important;
    z-index: 1 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.cp-media video, .cp-media iframe, #ytPlayerTarget {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    border: none !important;
}

.cp-tap-layer {
    position: absolute !important;
    inset: 0 !important;
    z-index: 15 !important;
    background: transparent !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    cursor: pointer !important;
}

.cp-error {
    position: relative !important;
    z-index: 28 !important;
}

.cp-center-controls {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    display: flex !important;
    align-items: center !important;
    gap: 24px !important;
    z-index: 25 !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    transition: opacity 0.25s ease, visibility 0.25s ease !important;
}

.cp-center-controls.cp-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.cp-center-btn {
    background: rgba(18, 18, 24, 0.78) !important;
    color: #fff !important;
    border: 1.5px solid rgba(255, 255, 255, 0.28) !important;
    border-radius: 50% !important;
    width: 52px !important;
    height: 52px !important;
    min-width: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    backdrop-filter: blur(8px) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5) !important;
    transition: transform 0.15s ease !important;
}

.cp-center-btn:active {
    transform: scale(0.92) !important;
}

.cp-center-btn span {
    font-size: 10px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    margin-top: -1px !important;
    color: #ffffff !important;
}

.cp-center-btn svg,
.cp-btn svg,
.cp-icon {
    fill: #ffffff !important;
    color: #ffffff !important;
    display: block !important;
}

.cp-center-btn svg {
    width: 20px !important;
    height: 20px !important;
}

.cp-center-play {
    width: 64px !important;
    height: 64px !important;
    background: var(--primary-gradient) !important;
    border-color: transparent !important;
}

.cp-center-play svg {
    width: 28px !important;
    height: 28px !important;
}

.cp-controls {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.72) 65%, transparent 100%) !important;
    padding: 28px 14px calc(14px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 25 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    opacity: 1 !important;
    visibility: visible !important;
    transition: opacity 0.25s ease, visibility 0.25s ease !important;
}

.cp-controls.cp-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.cp-progress-wrap {
    position: relative !important;
    width: 100% !important;
    height: 30px !important;
    display: flex !important;
    align-items: center !important;
    background: transparent !important;
    cursor: pointer !important;
    touch-action: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.cp-progress-track {
    position: relative !important;
    width: 100% !important;
    height: 6px !important;
    background: rgba(255, 255, 255, 0.34) !important;
    border-radius: 999px !important;
    transition: height 0.15s ease !important;
    pointer-events: none !important;
}

.cp-progress-wrap.seeking .cp-progress-track {
    height: 9px !important;
}

.cp-progress-played {
    height: 100% !important;
    background: linear-gradient(90deg, #8b5cf6 0%, #c026d3 100%) !important;
    border-radius: 999px !important;
    width: 0%;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.7) !important;
    pointer-events: none !important;
}

.cp-progress-handle {
    position: absolute !important;
    top: 50% !important;
    left: 0%;
    transform: translate(-50%, -50%) !important;
    width: 16px !important;
    height: 16px !important;
    background: #fff !important;
    border-radius: 50% !important;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.45), 0 2px 8px rgba(0,0,0,0.6) !important;
    pointer-events: none !important;
    transition: transform 0.15s ease !important;
}

.cp-progress-wrap.seeking .cp-progress-handle {
    transform: translate(-50%, -50%) scale(1.25) !important;
}

.cp-controls-row {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
}

.cp-btn {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #fff !important;
    padding: 6px !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 0 !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    font-size: 15px !important;
    flex-shrink: 0 !important;
}

.cp-btn:hover {
    background: rgba(255, 255, 255, 0.15) !important;
}

.cp-btn svg {
    width: 19px !important;
    height: 19px !important;
}

.cp-time {
    color: #fff !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    font-variant-numeric: tabular-nums !important;
}

.cp-spacer {
    flex: 1 !important;
}

.cp-volume-wrap {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.cp-volume-wrap input[type="range"] {
    width: 60px !important;
    accent-color: var(--primary) !important;
}

@media (max-width: 600px) {
    .cp-volume-wrap input[type="range"] {
        display: none !important;
    }
    .cp-controls-row {
        gap: 4px !important;
    }
    .cp-btn {
        width: 34px !important;
        height: 34px !important;
        font-size: 14px !important;
    }
}

body.vp-open #zafixDiagnosticsPill {
    display: none !important;
}

.cp-speed-wrap {
    position: relative !important;
}

.cp-speed-menu {
    position: absolute !important;
    bottom: 42px !important;
    right: 0 !important;
    background: rgba(20, 20, 26, 0.96) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255,255,255,0.18) !important;
    border-radius: 12px !important;
    padding: 6px !important;
    display: none !important;
    flex-direction: column !important;
    gap: 3px !important;
    z-index: 35 !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.6) !important;
}

.cp-speed-menu.show {
    display: flex !important;
}

.cp-speed-menu button {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #fff !important;
    padding: 6px 14px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    text-align: left !important;
    min-width: 64px !important;
    width: 100% !important;
    cursor: pointer !important;
    transform: none !important;
}

.cp-speed-menu button:hover, .cp-speed-menu button.active {
    background: var(--primary) !important;
    color: #fff !important;
}

/* Video Player Floating Doubts/Comments Action Button & Drawer */
.vp-comment-fab {
    position: absolute !important;
    bottom: 24px !important;
    right: 20px !important;
    width: 48px !important;
    height: 48px !important;
    min-width: 0 !important;
    border-radius: 50% !important;
    background: var(--primary-gradient) !important;
    color: #fff !important;
    border: 2px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    z-index: 40 !important;
    cursor: pointer !important;
    padding: 0 !important;
    transition: transform 0.18s ease !important;
}

.vp-comment-fab:active {
    transform: scale(0.92) !important;
}

.vp-fab-badge {
    position: absolute !important;
    top: -4px !important;
    right: -4px !important;
    background: #ef4444 !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    padding: 2px 6px !important;
    border-radius: 10px !important;
    border: 2px solid #000 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.vp-drawer {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    max-height: 72vh !important;
    background: rgba(18, 18, 24, 0.98) !important;
    backdrop-filter: blur(18px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: 20px 20px 0 0 !important;
    padding: 16px !important;
    z-index: 50 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    transform: translateY(105%) !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.7) !important;
}

.vp-drawer.open {
    transform: translateY(0%) !important;
}

.vp-drawer-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
}

.vp-drawer-tabs {
    display: flex !important;
    gap: 8px !important;
}

.vp-drawer-tabs button {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #a1a1aa !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 100px !important;
    padding: 7px 14px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    box-shadow: none !important;
    width: auto !important;
    min-width: 0 !important;
    transform: none !important;
}

.vp-drawer-tabs button.active {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: transparent !important;
}

.vp-drawer-close {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #a1a1aa !important;
    font-size: 18px !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    padding: 0 !important;
    border-radius: 50% !important;
}

.vp-desc {
    color: #e4e4e7 !important;
    font-size: 14px !important;
    line-height: 1.55 !important;
    max-height: 220px !important;
    overflow-y: auto !important;
    padding: 4px 0 !important;
}

.vp-doubts {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    max-height: 360px !important;
}

.vp-doubts-list {
    flex: 1 !important;
    max-height: 240px !important;
    overflow-y: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

.vp-doubts-input {
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
    width: 100% !important;
}

.vp-doubts-input input {
    flex: 1 !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: 12px !important;
    color: #fff !important;
    padding: 10px 14px !important;
    font-size: 13px !important;
}

.vp-doubts-input button {
    width: 44px !important;
    height: 44px !important;
    min-width: 0 !important;
    border-radius: 12px !important;
    background: var(--primary) !important;
    color: #fff !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    padding: 0 !important;
    font-size: 16px !important;
    transform: none !important;
}

/* ========================================================
   MODERN BATCH STUDY SUBTABS & PW-STYLE CARDS (Images 4,6,7)
   ======================================================== */
.subtabs {
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto !important;
    padding: 4px 2px 14px !important;
    margin-bottom: 16px !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    border-bottom: 1px solid var(--border) !important;
}

.subtabs::-webkit-scrollbar {
    display: none !important;
}

.subtab {
    flex: 1 1 0 !important;
    min-width: 78px !important;
    background: var(--input) !important;
    color: var(--muted) !important;
    border: 1px solid var(--border) !important;
    border-radius: 100px !important;
    padding: 9px 12px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    box-shadow: none !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    transition: all 0.2s ease !important;
    transform: none !important;
}

.subtab.active {
    background: var(--primary-gradient) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.28) !important;
}

/* PW-Style Subject Cards (Image 7) */
.subject-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
}

.pw-subject-card {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 14px 16px !important;
    background: var(--card) !important;
    border: 1.5px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: var(--shadow-sm) !important;
}

.pw-subject-card:hover {
    border-color: var(--primary) !important;
    transform: translateY(-2px) !important;
    box-shadow: var(--shadow-md) !important;
}

.pw-subject-avatar {
    width: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
}

.pw-subject-info {
    flex: 1 !important;
    min-width: 0 !important;
}

.pw-subject-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--text) !important;
    margin-bottom: 2px !important;
}

.pw-subject-meta {
    font-size: 12px !important;
    color: var(--muted) !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-bottom: 6px !important;
}

.pw-meta-dot {
    opacity: 0.5 !important;
}

.pw-done-tag {
    color: #10b981 !important;
    font-weight: 600 !important;
}

.pw-progress-bar {
    width: 100% !important;
    height: 5px !important;
    background: var(--input) !important;
    border-radius: 100px !important;
    overflow: hidden !important;
}

.pw-progress-fill {
    height: 100% !important;
    border-radius: 100px !important;
    transition: width 0.3s ease !important;
}

.pw-subject-arrow {
    font-size: 20px !important;
    color: var(--muted) !important;
    font-weight: 700 !important;
    padding-left: 4px !important;
}

/* PW-Style Chapter & Lecture Cards */
.chapter-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 14px 16px !important;
    margin-bottom: 10px !important;
    background: var(--card) !important;
    border: 1.5px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.chapter-item:hover {
    border-color: var(--primary) !important;
    background: rgba(124, 58, 237, 0.04) !important;
}

.chapter-item b {
    font-size: 15px !important;
    color: var(--text) !important;
}

.chapter-item span {
    font-size: 20px !important;
    color: var(--muted) !important;
    font-weight: 700 !important;
}

.pw-lecture-card {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 14px 16px !important;
    margin-bottom: 10px !important;
    background: var(--card) !important;
    border: 1.5px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.pw-lecture-card:hover {
    border-color: var(--primary) !important;
    box-shadow: var(--shadow-sm) !important;
}

.pw-lecture-avatar {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: rgba(124, 58, 237, 0.12) !important;
    color: var(--primary) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.pw-lecture-info {
    flex: 1 !important;
    min-width: 0 !important;
}

.pw-lecture-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--text) !important;
}

.pw-lecture-status {
    margin-top: 4px !important;
}

.pw-lecture-desc {
    font-size: 12px !important;
    color: var(--muted) !important;
    margin-top: 2px !important;
}

.pw-play-btn {
    background: var(--primary-gradient) !important;
    color: #fff !important;
    border: none !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3) !important;
}

.breadcrumb {
    padding: 10px 14px !important;
    background: var(--input) !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--muted) !important;
    margin-bottom: 14px !important;
}

.breadcrumb .crumb {
    color: var(--primary) !important;
    cursor: pointer !important;
    font-weight: 700 !important;
}

.lec-badge {
    display: inline-block !important;
    padding: 2px 8px !important;
    border-radius: 100px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
}

.lec-badge.lec-done {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #059669 !important;
}

.lec-badge.lec-progress {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #d97706 !important;
}

/* ========================================================
   PW-STYLE SIDEBAR DRAWER (Image 8)
   ======================================================== */
.sidebar {
    width: min(320px, 84vw) !important;
    background: var(--card) !important;
    box-shadow: 4px 0 24px rgba(0,0,0,0.18) !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain !important;
}

.pw-drawer-header {
    padding: 20px 18px 16px !important;
    background: var(--card) !important;
    border-bottom: 1px solid var(--border) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.pw-drawer-user-card {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    cursor: pointer !important;
    flex: 1 !important;
}

.pw-drawer-avatar {
    width: 46px !important;
    height: 46px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 22px !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
    flex-shrink: 0 !important;
}

.pw-drawer-user-meta {
    display: flex !important;
    flex-direction: column !important;
}

.pw-drawer-greeting {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--text) !important;
}

.pw-drawer-view-profile {
    font-size: 12px !important;
    color: var(--muted) !important;
    font-weight: 500 !important;
}

.sidebar-close {
    background: var(--input) !important;
    border: 1px solid var(--border) !important;
    color: var(--muted) !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 0 !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 15px !important;
    cursor: pointer !important;
    box-shadow: none !important;
    transform: none !important;
}

.sidebar-close:hover {
    color: var(--text) !important;
    background: var(--border) !important;
}

.pw-drawer-purchases {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 12px 14px 4px !important;
    padding: 11px 14px !important;
    background: var(--input) !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--text) !important;
    cursor: pointer !important;
    box-shadow: none !important;
    transition: all 0.15s ease !important;
}

.pw-drawer-purchases:hover, .pw-drawer-purchases:active {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

.pw-purchases-icon {
    font-size: 16px !important;
}

.pw-drawer-banner {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin: 6px 14px 10px !important;
    padding: 10px 14px !important;
    background: rgba(124, 58, 237, 0.08) !important;
    border: 1px solid rgba(124, 58, 237, 0.22) !important;
    border-radius: 12px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--primary) !important;
    cursor: pointer !important;
    transition: background 0.15s ease !important;
}

.pw-drawer-banner:hover, .pw-drawer-banner:active {
    background: rgba(124, 58, 237, 0.14) !important;
}

.pw-banner-arrow {
    font-size: 16px !important;
    color: var(--primary) !important;
    font-weight: 800 !important;
}

.pw-drawer-setting-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 18px !important;
    border-top: 1px solid var(--border) !important;
    border-bottom: 1px solid var(--border) !important;
    cursor: pointer !important;
    background: var(--card) !important;
    transition: background 0.15s ease !important;
    margin-bottom: 6px !important;
}

.pw-drawer-setting-row:hover {
    background: rgba(124, 58, 237, 0.04) !important;
}

.pw-setting-left {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--text) !important;
}

.pw-setting-icon {
    font-size: 18px !important;
}

.pw-toggle-switch {
    width: 48px !important;
    height: 28px !important;
    background: #e2e8f0 !important;
    border-radius: 100px !important;
    position: relative !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    transition: background-color 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body.dark .pw-toggle-switch,
.pw-toggle-switch.active {
    background: var(--primary) !important;
}

.pw-toggle-thumb {
    position: absolute !important;
    top: 3px !important;
    left: 3px !important;
    width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body.dark .pw-toggle-switch .pw-toggle-thumb,
.pw-toggle-switch.active .pw-toggle-thumb {
    transform: translateX(20px) !important;
}

.sidebar-nav {
    padding: 10px 12px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    flex: 1 !important;
}

.side-tab {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 11px 14px !important;
    border-radius: 12px !important;
    background: transparent !important;
    border: none !important;
    color: var(--text) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-align: left !important;
    box-shadow: none !important;
    cursor: pointer !important;
    min-width: 0 !important;
    width: 100% !important;
    transition: all 0.15s ease !important;
}

.side-tab:hover {
    background: rgba(124, 58, 237, 0.08) !important;
    color: var(--primary) !important;
}

.side-tab.active {
    background: rgba(124, 58, 237, 0.12) !important;
    color: var(--primary) !important;
    font-weight: 700 !important;
}

.side-icon {
    font-size: 18px !important;
    width: 24px !important;
    text-align: center !important;
    flex-shrink: 0 !important;
}

.side-text {
    flex: 1 !important;
}

.side-badge {
    font-size: 10px !important;
    font-weight: 800 !important;
    padding: 3px 8px !important;
    border-radius: 100px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    flex-shrink: 0 !important;
}

.badge-popular {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #059669 !important;
}

.badge-ai {
    background: rgba(124, 58, 237, 0.15) !important;
    color: var(--primary) !important;
}

.sidebar-footer {
    padding: 14px 16px !important;
    border-top: 1px solid var(--border) !important;
    background: var(--card) !important;
}

.logout-btn {
    width: 100% !important;
    background: rgba(239, 68, 68, 0.08) !important;
    color: #ef4444 !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
    border-radius: 10px !important;
    padding: 11px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    box-shadow: none !important;
    cursor: pointer !important;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.15) !important;
}

/* ========================================================
   UNIFIED SYSTEM-WIDE COMPONENTS & FIXES
   ======================================================== */

/* 1. Global Back Buttons & Navigation Bars */
.nav-back-header {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 16px !important;
}

.nav-back-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: var(--input) !important;
    color: var(--text) !important;
    border: 1.5px solid var(--border) !important;
    border-radius: 100px !important;
    padding: 8px 16px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
    width: auto !important;
    min-width: 0 !important;
}

.nav-back-btn:hover {
    background: var(--card) !important;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

.nav-back-btn svg {
    flex-shrink: 0 !important;
}

/* 2. Standardized Semantic Stat Boxes */
.stat-box {
    border-radius: var(--radius-md) !important;
    padding: 14px !important;
    text-align: center !important;
    border: 1.5px solid var(--border) !important;
    background: var(--input) !important;
    box-shadow: none !important;
    transition: transform 0.15s ease !important;
}

.stat-box .stat-num {
    font-size: 22px !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
}

.stat-box .stat-label {
    font-size: 12px !important;
    font-weight: 600 !important;
    margin-top: 4px !important;
    color: var(--muted) !important;
}

.stat-box.stat-purple {
    background: rgba(124, 58, 237, 0.08) !important;
    border-color: rgba(124, 58, 237, 0.2) !important;
    color: var(--primary) !important;
}
.stat-box.stat-purple .stat-num { color: var(--primary) !important; }

.stat-box.stat-green {
    background: rgba(16, 185, 129, 0.08) !important;
    border-color: rgba(16, 185, 129, 0.2) !important;
    color: #059669 !important;
}
.stat-box.stat-green .stat-num { color: #059669 !important; }

.stat-box.stat-blue {
    background: rgba(59, 130, 246, 0.08) !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
    color: #2563eb !important;
}
.stat-box.stat-blue .stat-num { color: #2563eb !important; }

.stat-box.stat-amber {
    background: rgba(245, 158, 11, 0.08) !important;
    border-color: rgba(245, 158, 11, 0.2) !important;
    color: #d97706 !important;
}
.stat-box.stat-amber .stat-num { color: #d97706 !important; }

.stat-box.stat-red {
    background: rgba(239, 68, 68, 0.08) !important;
    border-color: rgba(239, 68, 68, 0.2) !important;
    color: #dc2626 !important;
}
.stat-box.stat-red .stat-num { color: #dc2626 !important; }

/* 3. CBT Test Footer Navigation Buttons */
.test-cbt-footer {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1.2fr 1.4fr !important;
    gap: 8px !important;
    margin-top: 18px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

@media (max-width: 480px) {
    .test-cbt-footer {
        grid-template-columns: 1fr 1fr !important;
    }
}

.cbt-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 12px 10px !important;
    border-radius: var(--radius-md) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    box-shadow: none !important;
    min-width: 0 !important;
    white-space: nowrap !important;
    transition: all 0.15s ease !important;
}

.cbt-btn-prev {
    background: var(--input) !important;
    color: var(--text) !important;
    border: 1.5px solid var(--border) !important;
}

.cbt-btn-clear {
    background: rgba(0,0,0,0.04) !important;
    color: var(--muted) !important;
    border: 1.5px solid var(--border) !important;
}

.cbt-btn-review {
    background: rgba(245, 158, 11, 0.12) !important;
    color: #d97706 !important;
    border: 1.5px solid rgba(245, 158, 11, 0.3) !important;
}

.cbt-btn-next {
    background: var(--primary-gradient) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3) !important;
}

/* 4. Batch Top Tabs Segmented Control */
.batch-toptabs {
    display: flex !important;
    background: var(--input) !important;
    border: 1.5px solid var(--border) !important;
    border-radius: 100px !important;
    padding: 4px !important;
    margin: 12px 0 16px !important;
    gap: 4px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.batch-toptabs button {
    flex: 1 1 0 !important;
    background: transparent !important;
    color: var(--muted) !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 100px !important;
    padding: 10px 14px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    text-align: center !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    min-width: 0 !important;
    transform: none !important;
}

.batch-toptabs button.active {
    background: var(--card) !important;
    color: var(--primary) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
}

/* 5. Profile Options List (PW Style) */
.profile-options-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin-top: 10px !important;
}

.profile-opt-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 14px 16px !important;
    background: var(--input) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
    cursor: pointer !important;
    box-shadow: none !important;
    width: 100% !important;
    color: var(--text) !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-align: left !important;
    transition: all 0.15s ease !important;
    transform: none !important;
}

.profile-opt-item:hover {
    background: var(--card) !important;
    border-color: var(--primary) !important;
}

.profile-opt-item.opt-danger {
    color: #ef4444 !important;
}

.profile-opt-item.opt-danger:hover {
    background: rgba(239, 68, 68, 0.08) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
}

.opt-left {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.opt-icon {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    flex-shrink: 0 !important;
}

.opt-arrow {
    font-size: 18px !important;
    color: var(--muted) !important;
    font-weight: 700 !important;
}

/* ========================================================
   PERSISTENT AUTH IMMEDIATE DISPLAY
   ======================================================== */
html.is-logged-in #loginScreen {
    display: none !important;
}
html.is-logged-in #appScreen {
    display: block !important;
}

/* ========================================================
   STUDY HISTORY SHOW ALL / LESS TOGGLE
   ======================================================== */
.history-toggle-btn {
    width: 100% !important;
    background: var(--input) !important;
    border: 1.5px dashed var(--border) !important;
    color: var(--primary) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    padding: 11px 16px !important;
    border-radius: var(--radius-md) !important;
    margin-top: 10px !important;
    cursor: pointer !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
}
.history-toggle-btn:hover, .history-toggle-btn:active {
    background: rgba(124, 58, 237, 0.08) !important;
    border-color: var(--primary) !important;
}

/* ========================================================
   UNIVERSAL VISIBILITY RULES (Must never be overridden)
   ======================================================== */
.hidden,
[hidden],
.modal-overlay.hidden,
.video-player-overlay.hidden,
.pdf-viewer-overlay.hidden,
#videoPlayerOverlay.hidden,
#pdfViewerOverlay.hidden,
#pwStudyDrawer.hidden,
#activityPickerOverlay.hidden,
#plansPopupOverlay.hidden,
#studentInfoOverlay.hidden,
#checkoutOverlay.hidden,
#parentShareOverlay.hidden,
#examDateModalOverlay.hidden,
#badgeModal.hidden {
    display: none !important;
}

.vp-header-doubt-btn {
    background: var(--primary-gradient) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    padding: 6px 14px !important;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4) !important;
    min-width: 0 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    position: relative !important;
    flex-shrink: 0 !important;
}

.vp-header-doubt-btn:active {
    transform: scale(0.95) !important;
}

.vp-comment-fab {
    display: none !important;
}

/* PDF VIEWER STAGE FULL SCREEN */
.pdf-viewer-stage {
    flex: 1 !important;
    width: 100% !important;
    height: calc(100% - 52px) !important;
    position: relative !important;
    background: #111 !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: stretch !important;
}

.pdf-viewer-stage iframe {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    display: block !important;
    flex: 1 !important;
}


/* ========================================================
   APP NATIVE-STYLE SPLASH SCREEN ANIMATION
   ======================================================== */
.app-splash-screen {
    position: fixed !important;
    inset: 0 !important;
    background: radial-gradient(circle at 50% 40%, #1e1b4b 0%, #0b0f19 80%) !important;
    z-index: 10000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;
    transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.45s ease !important;
}

.app-splash-screen.fade-out {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.splash-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    animation: splashContentIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.splash-logo-container {
    position: relative !important;
    width: 96px !important;
    height: 96px !important;
    margin-bottom: 20px !important;
}

.splash-aura {
    position: absolute !important;
    inset: -12px !important;
    border-radius: 28px !important;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.6), rgba(217, 70, 239, 0.4)) !important;
    filter: blur(18px) !important;
    animation: splashAuraPulse 2s infinite ease-in-out alternate !important;
}

.splash-logo-badge {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 24px !important;
    object-fit: cover !important;
    box-shadow: 0 16px 36px -6px rgba(124, 58, 237, 0.6) !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    display: block !important;
}

.splash-brand-title {
    font-size: 26px !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
    color: #fff !important;
    margin-bottom: 6px !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4) !important;
}

.splash-brand-subtitle {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: rgba(255, 255, 255, 0.75) !important;
    margin-bottom: 28px !important;
    letter-spacing: 0.01em !important;
}

.splash-progress-track {
    width: 180px !important;
    height: 3px !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border-radius: 100px !important;
    overflow: hidden !important;
    margin-bottom: 36px !important;
}

.splash-progress-bar {
    width: 0% !important;
    height: 100% !important;
    background: var(--primary-gradient) !important;
    border-radius: 100px !important;
    animation: splashProgressFill 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.splash-doctor-tag {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: rgba(255, 255, 255, 0.6) !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
}

@keyframes splashContentIn {
    0% { transform: scale(0.92); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes splashAuraPulse {
    0% { transform: scale(0.95); opacity: 0.5; }
    100% { transform: scale(1.15); opacity: 0.9; }
}

@keyframes splashProgressFill {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* ========================================================
   1. NEET PYQ ARCHIVE STYLES
   ======================================================== */
.pyq-hero-card {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(124, 58, 237, 0.08) 100%) !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
}

.pyq-year-pills {
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto !important;
    padding: 8px 0 14px !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
}

.pyq-year-pills::-webkit-scrollbar {
    display: none !important;
}

.pyq-year-pill {
    background: var(--card) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
    padding: 6px 14px !important;
    border-radius: 100px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    box-shadow: none !important;
    transition: all 0.15s ease !important;
}

.pyq-year-pill.active {
    background: #ef4444 !important;
    color: #fff !important;
    border-color: #ef4444 !important;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35) !important;
}

.pyq-subject-tabs {
    display: flex !important;
    gap: 6px !important;
    background: var(--input) !important;
    padding: 4px !important;
    border-radius: var(--radius-md) !important;
    margin-top: 6px !important;
}

.pyq-subject-tabs button {
    flex: 1 !important;
    background: transparent !important;
    border: none !important;
    color: var(--muted) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 8px !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    box-shadow: none !important;
    transition: all 0.15s ease !important;
}

.pyq-subject-tabs button.active {
    background: var(--card) !important;
    color: var(--text) !important;
    box-shadow: var(--shadow-sm) !important;
}

.pyq-controls-bar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px 4px !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
}

.pyq-count-label {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--muted) !important;
}

.btn-mock-launch {
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%) !important;
    color: #fff !important;
    border: none !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    padding: 8px 14px !important;
    border-radius: 100px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35) !important;
    cursor: pointer !important;
}

.pyq-card {
    margin-bottom: 14px !important;
    padding: 18px !important;
}

.pyq-card-header {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
}

.pyq-badge-year {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #ef4444 !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    padding: 3px 8px !important;
    border-radius: 6px !important;
}

.pyq-badge-subj {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: var(--muted) !important;
}

.pyq-qtext {
    font-size: 15px !important;
    line-height: 1.5 !important;
    color: var(--text) !important;
    margin-bottom: 14px !important;
}

.pyq-options-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
}

.pyq-opt-btn {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #0f172a !important;
    padding: 12px 16px !important;
    border-radius: 12px !important;
    text-align: left !important;
    cursor: pointer !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05) !important;
    transition: all 0.15s ease !important;
    width: 100% !important;
}

.pyq-opt-letter {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    background: #f1f5f9 !important;
    border: 1.5px solid #94a3b8 !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    color: #334155 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.pyq-opt-text {
    font-size: 14.5px !important;
    font-weight: 600 !important;
    line-height: 1.45 !important;
    color: #0f172a !important;
    flex: 1 !important;
}

/* Light mode crisp styling */
body:not(.dark) .pyq-opt-btn {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}
body:not(.dark) .pyq-opt-btn:hover {
    background: #f8fafc !important;
    border-color: #7c3aed !important;
}
body:not(.dark) .pyq-opt-text {
    color: #0f172a !important;
}
body:not(.dark) .pyq-opt-letter {
    background: #f1f5f9 !important;
    border-color: #94a3b8 !important;
    color: #1e293b !important;
}

/* Dark mode styling */
body.dark .pyq-opt-btn {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}
body.dark .pyq-opt-text {
    color: #f8fafc !important;
}
body.dark .pyq-opt-letter {
    background: #0f172a !important;
    border-color: #475569 !important;
    color: #cbd5e1 !important;
}

.pyq-opt-btn.is-correct {
    background: rgba(16, 185, 129, 0.14) !important;
    border-color: #10b981 !important;
}
.pyq-opt-btn.is-correct .pyq-opt-text {
    color: #065f46 !important;
}
body.dark .pyq-opt-btn.is-correct .pyq-opt-text {
    color: #6ee7b7 !important;
}
.pyq-opt-btn.is-correct .pyq-opt-letter {
    background: #10b981 !important;
    color: #fff !important;
    border-color: #10b981 !important;
}

.pyq-opt-btn.is-wrong {
    background: rgba(239, 68, 68, 0.14) !important;
    border-color: #ef4444 !important;
}
.pyq-opt-btn.is-wrong .pyq-opt-text {
    color: #991b1b !important;
}
body.dark .pyq-opt-btn.is-wrong .pyq-opt-text {
    color: #fca5a5 !important;
}
.pyq-opt-btn.is-wrong .pyq-opt-letter {
    background: #ef4444 !important;
    color: #fff !important;
    border-color: #ef4444 !important;
}

.pyq-solution-box {
    margin-top: 14px !important;
    padding: 14px !important;
    background: var(--input) !important;
    border-left: 3.5px solid #10b981 !important;
    border-radius: 0 var(--radius-md) var(--radius-md) 0 !important;
}

.pyq-sol-header {
    color: #10b981 !important;
    font-size: 13px !important;
    margin-bottom: 6px !important;
}

.pyq-sol-body {
    font-size: 13px !important;
    color: var(--text) !important;
    line-height: 1.5 !important;
    margin-bottom: 8px !important;
}

.pyq-ncert-tag {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: var(--muted) !important;
}

/* ========================================================
   2. NCERT FLASHCARDS (3D FLIP)
   ======================================================== */
.fc-subject-tabs {
    display: flex !important;
    gap: 6px !important;
    background: var(--input) !important;
    padding: 4px !important;
    border-radius: var(--radius-md) !important;
    margin-top: 10px !important;
}

.fc-subject-tabs button {
    flex: 1 !important;
    background: transparent !important;
    border: none !important;
    color: var(--muted) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 8px 4px !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    box-shadow: none !important;
    transition: all 0.15s ease !important;
    text-align: center !important;
}

.fc-subject-tabs button.active {
    background: var(--card) !important;
    color: var(--text) !important;
    box-shadow: var(--shadow-sm) !important;
}

.fc-wrapper {
    max-width: 540px !important;
    margin: 14px auto 0 !important;
}

.fc-progress-bar-wrap {
    margin-bottom: 14px !important;
}

.fc-progress-info {
    display: flex !important;
    justify-content: space-between !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: var(--muted) !important;
    margin-bottom: 6px !important;
}

.fc-progress-track {
    width: 100% !important;
    height: 6px !important;
    background: var(--input) !important;
    border: 1px solid var(--border) !important;
    border-radius: 100px !important;
    overflow: hidden !important;
}

.fc-progress-fill {
    width: 10% !important;
    height: 100% !important;
    background: var(--primary-gradient) !important;
    transition: width 0.3s ease !important;
}

.fc-card-scene {
    width: 100% !important;
    height: 270px !important;
    perspective: 1000px !important;
    cursor: pointer !important;
}

.fc-card {
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
    transform-style: preserve-3d !important;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.fc-card.is-flipped {
    transform: rotateY(180deg) !important;
}

.fc-card-face {
    position: absolute !important;
    inset: 0 !important;
    backface-visibility: hidden !important;
    border-radius: var(--radius-lg) !important;
    padding: 24px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    box-shadow: var(--shadow-lg) !important;
    border: 1.5px solid var(--border) !important;
    box-sizing: border-box !important;
}

.fc-card-front {
    background: var(--card) !important;
}

.fc-card-back {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(147, 51, 234, 0.04) 100%), var(--card) !important;
    transform: rotateY(180deg) !important;
    border-color: rgba(124, 58, 237, 0.3) !important;
}

.fc-deck-badge {
    align-self: flex-start !important;
    background: var(--input) !important;
    border: 1px solid var(--border) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 4px 10px !important;
    border-radius: 100px !important;
    color: var(--primary) !important;
}

.fc-question-text {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: var(--text) !important;
    line-height: 1.5 !important;
    text-align: center !important;
    margin: auto 0 !important;
}

.fc-answer-text {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: var(--text) !important;
    line-height: 1.5 !important;
    text-align: center !important;
    margin: auto 0 !important;
}

.fc-hint {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: var(--muted) !important;
    text-align: center !important;
}

.fc-ncert-ref {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: var(--primary) !important;
    text-align: center !important;
}

.fc-controls-row {
    display: flex !important;
    gap: 8px !important;
    margin-top: 16px !important;
}

.fc-btn {
    flex: 1 !important;
    padding: 11px 8px !important;
    border-radius: var(--radius-md) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    box-shadow: none !important;
    border: 1px solid var(--border) !important;
    background: var(--card) !important;
    color: var(--text) !important;
    transition: all 0.15s ease !important;
}

.fc-btn-master {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
    flex: 1.3 !important;
}

/* ========================================================
   3. NEET RANK PREDICTOR & COLLEGE CUTOFF STYLES
   ======================================================== */
.rank-input-card {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(245, 158, 11, 0.06) 100%) !important;
    border: 1px solid rgba(124, 58, 237, 0.2) !important;
}

.rank-input-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    margin-top: 14px !important;
}

@media(max-width: 500px) {
    .rank-input-grid {
        grid-template-columns: 1fr !important;
    }
}

.rank-field label {
    display: block !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: var(--muted) !important;
    margin-bottom: 6px !important;
}

.score-input-wrap {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

.score-input-wrap input {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: var(--primary) !important;
    padding-right: 60px !important;
}

.score-max-tag {
    position: absolute !important;
    right: 14px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--muted) !important;
}

.score-presets-row {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 12px !important;
    flex-wrap: wrap !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: var(--muted) !important;
}

.score-presets-row button {
    background: var(--input) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
    padding: 4px 10px !important;
    border-radius: 100px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    box-shadow: none !important;
}

.rank-results-summary {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
}

@media(max-width: 600px) {
    .rank-results-summary {
        grid-template-columns: 1fr !important;
    }
}

.rank-stat-card {
    background: var(--card) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
    padding: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: var(--shadow-sm) !important;
}

.rsc-label {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: var(--muted) !important;
    text-transform: uppercase !important;
    margin-bottom: 4px !important;
}

.rsc-val {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: var(--text) !important;
    margin-bottom: 4px !important;
}

.air-glow {
    color: var(--primary) !important;
}

.status-safe { color: #10b981 !important; }
.status-borderline { color: #f59e0b !important; }
.status-reach { color: #ef4444 !important; }

.rsc-sub {
    font-size: 11px !important;
    color: var(--muted) !important;
    font-weight: 600 !important;
}

.colleges-match-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    margin-top: 12px !important;
}

.college-item {
    background: var(--input) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
    padding: 14px 16px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 12px !important;
}

.college-item.is-matched {
    border-left: 3.5px solid #10b981 !important;
}

.college-info b {
    display: block !important;
    font-size: 14px !important;
    color: var(--text) !important;
    margin-bottom: 3px !important;
}

.college-tag {
    display: block !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: var(--primary) !important;
    margin-bottom: 4px !important;
}

.college-meta {
    font-size: 11px !important;
    color: var(--muted) !important;
    font-weight: 600 !important;
}

