/* ==========================================================================
   Exam Portal Theme - Native Mobile App-Like Stylesheet
   Designed for seamless Native App Shell experience (PWA / Mobile App Look)
   ========================================================================== */

:root {
    --ep-primary: #2563eb;
    --ep-primary-dark: #1d4ed8;
    --ep-primary-light: #eff6ff;
    --ep-secondary: #7c3aed;
    --ep-success: #16a34a;
    --ep-success-light: #f0fdf4;
    --ep-warning: #f59e0b;
    --ep-warning-light: #fffbeb;
    --ep-danger: #dc2626;
    --ep-danger-light: #fef2f2;
    --ep-dark: #0f172a;
    --ep-slate: #1e293b;
    --ep-muted: #64748b;
    --ep-light: #f8fafc;
    --ep-border: #e2e8f0;
    --ep-card-bg: #ffffff;
    --ep-body-bg: #f8fafc;
    --ep-radius: 14px;
    --ep-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --ep-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.08), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
    --ep-shadow-lg: 0 14px 28px -4px rgba(15, 23, 42, 0.12), 0 6px 12px -3px rgba(15, 23, 42, 0.06);
    --ep-app-header-h: 64px;
    --ep-bottom-bar-h: 68px;
}

[data-theme="dark"] {
    --ep-body-bg: #090d16;
    --ep-card-bg: #111827;
    --ep-border: #1f2937;
    --ep-dark: #f9fafb;
    --ep-slate: #cbd5e1;
    --ep-muted: #9ca3af;
    --ep-light: #1f2937;
    --ep-primary-light: #1e293b;
    --ep-success-light: #064e3b;
    --ep-danger-light: #450a0a;
    --ep-warning-light: #451a03;
    --ep-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    --ep-shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.6);
}

/* Global Reset & Native App Typography */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body.ep-app-body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Plus Jakarta Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--ep-body-bg);
    color: var(--ep-dark);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    touch-action: manipulation;
    padding-bottom: var(--ep-bottom-bar-h);
}

@media (min-width: 769px) {
    body.ep-app-body {
        padding-bottom: 0;
    }
}

/* ==========================================================================
   1. NATIVE APP TOP BAR (APP SHELL HEADER)
   ========================================================================== */
.ep-site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--ep-border);
    box-shadow: var(--ep-shadow-sm);
    transition: background-color 0.25s, border-color 0.25s;
    height: var(--ep-app-header-h);
    display: flex;
    align-items: center;
}

[data-theme="dark"] .ep-site-header {
    background: rgba(17, 24, 39, 0.92);
}

.ep-header-inner {
    max-width: 1380px;
    width: 100%;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ep-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ep-dark);
}

.ep-brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--ep-primary) 0%, var(--ep-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    flex-shrink: 0;
}

.ep-brand-text {
    display: flex;
    flex-direction: column;
}

.ep-brand-title {
    font-size: 17px;
    font-weight: 900;
    letter-spacing: -0.4px;
    line-height: 1.2;
}

.ep-brand-subtitle {
    font-size: 10px;
    font-weight: 700;
    color: var(--ep-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Desktop Navigation Links */
.ep-desktop-nav {
    display: none;
}

@media (min-width: 900px) {
    .ep-desktop-nav {
        display: block;
    }
}

.ep-nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ep-nav-item a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--ep-slate);
    font-size: 14px;
    font-weight: 700;
    transition: all 0.2s;
}

.ep-nav-item.active a, .ep-nav-item a:hover {
    color: var(--ep-primary);
    background: var(--ep-primary-light);
}

.ep-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Wallet Coins Live Pill */
.ep-wallet-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    color: #92400e;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.2);
    transition: transform 0.15s, box-shadow 0.15s;
    cursor: pointer;
}

.ep-wallet-pill:active {
    transform: scale(0.96);
}

.ep-coin-sparkle {
    display: inline-block;
    animation: ep-coin-bob 2.5s ease-in-out infinite;
}

@keyframes ep-coin-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

@media (max-width: 480px) {
    .ep-coins-label {
        display: none;
    }
}

/* Generic Icon Buttons */
.ep-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--ep-border);
    background: var(--ep-card-bg);
    color: var(--ep-slate);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: background 0.2s, transform 0.15s;
}

.ep-icon-btn:active {
    transform: scale(0.92);
}

.ep-badge-dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid var(--ep-card-bg);
}

.ep-user-profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    background: var(--ep-card-bg);
    border: 1px solid var(--ep-border);
    border-radius: 24px;
    color: var(--ep-dark);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}

.ep-user-avatar-mini {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--ep-primary-light);
    color: var(--ep-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.ep-mobile-menu-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--ep-border);
    background: var(--ep-card-bg);
    color: var(--ep-dark);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

@media (min-width: 900px) {
    .ep-mobile-menu-btn {
        display: none;
    }
}

/* ==========================================================================
   2. SLIDE-IN APP NAVIGATION DRAWER
   ========================================================================== */
.ep-drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10010;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ep-drawer-backdrop.active {
    display: block;
    opacity: 1;
}

.ep-drawer-panel {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100%;
    background: var(--ep-card-bg);
    z-index: 10020;
    display: flex;
    flex-direction: column;
    box-shadow: 10px 0 25px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-right: 1px solid var(--ep-border);
}

.ep-drawer-panel.active {
    transform: translateX(320px);
}

.ep-drawer-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--ep-primary) 0%, var(--ep-secondary) 100%);
    color: #ffffff;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.ep-drawer-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ep-drawer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.ep-drawer-name {
    font-size: 15px;
    font-weight: 800;
    margin: 0;
    color: #ffffff;
}

.ep-drawer-email {
    font-size: 11px;
    opacity: 0.85;
    margin: 2px 0 6px;
}

.ep-drawer-wallet-tag {
    background: rgba(254, 240, 138, 0.25);
    color: #fef08a;
    border: 1px solid rgba(254, 240, 138, 0.5);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
}

.ep-drawer-close-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
}

.ep-drawer-menu {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
}

.ep-drawer-section-title {
    font-size: 11px;
    font-weight: 800;
    color: var(--ep-muted);
    padding: 8px 12px 4px;
    letter-spacing: 0.6px;
}

.ep-drawer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--ep-dark);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 2px;
    transition: background 0.15s;
}

.ep-drawer-item:hover, .ep-drawer-item.active {
    background: var(--ep-primary-light);
    color: var(--ep-primary);
}

.ep-drawer-icon {
    font-size: 18px;
}

.ep-drawer-badge {
    margin-left: auto;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--ep-primary-light);
    color: var(--ep-primary);
}

.ep-drawer-footer {
    padding: 16px;
    border-top: 1px solid var(--ep-border);
}

.ep-drawer-app-version {
    text-align: center;
    font-size: 11px;
    color: var(--ep-muted);
    margin-top: 10px;
}

/* ==========================================================================
   3. STICKY MOBILE APP BOTTOM NAVIGATION BAR
   ========================================================================== */
.ep-mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--ep-bottom-bar-h);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--ep-border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 8px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    z-index: 999;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .ep-mobile-bottom-bar {
    background: rgba(17, 24, 39, 0.96);
}

@media (min-width: 769px) {
    .ep-mobile-bottom-bar {
        display: none;
    }
}

.ep-bottom-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: none;
    border: none;
    padding: 6px 0;
    cursor: pointer;
    color: var(--ep-muted);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ep-bottom-icon-wrap {
    width: 44px;
    height: 26px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.2s;
}

.ep-bottom-icon {
    font-size: 18px;
    transition: transform 0.2s;
}

.ep-bottom-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.ep-bottom-item.active {
    color: var(--ep-primary);
}

.ep-bottom-item.active .ep-bottom-icon-wrap {
    background: var(--ep-primary-light);
    transform: translateY(-2px);
}

.ep-bottom-item.active .ep-bottom-icon {
    transform: scale(1.15);
}

.ep-bottom-item:active {
    transform: scale(0.92);
}

/* Adjust live chat FAB position above bottom bar */
@media (max-width: 768px) {
    .ep-chat-fab {
        bottom: 84px !important;
        right: 16px !important;
        width: 50px !important;
        height: 50px !important;
        font-size: 22px !important;
    }
}

/* ==========================================================================
   4. NOTIFICATIONS BOTTOM SHEET / MODAL
   ========================================================================== */
.ep-notif-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

@media (min-width: 769px) {
    .ep-notif-sheet-overlay {
        align-items: center;
    }
}

.ep-notif-sheet-overlay.active {
    display: flex;
}

.ep-notif-sheet {
    background: var(--ep-card-bg);
    width: 100%;
    max-width: 460px;
    border-radius: 20px 20px 0 0;
    border: 1px solid var(--ep-border);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--ep-shadow-lg);
    animation: ep-slide-up 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 769px) {
    .ep-notif-sheet {
        border-radius: 20px;
    }
}

@keyframes ep-slide-up {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.ep-notif-sheet-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--ep-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ep-notif-sheet-close {
    background: var(--ep-light);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ep-muted);
}

.ep-notif-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.ep-notif-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 8px;
    background: var(--ep-light);
    border: 1px solid var(--ep-border);
}

.ep-notif-item.unread {
    border-left: 4px solid var(--ep-primary);
    background: var(--ep-primary-light);
}

.ep-notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.ep-notif-content strong {
    font-size: 13px;
    display: block;
    margin-bottom: 2px;
    color: var(--ep-dark);
}

.ep-notif-content p {
    font-size: 12px;
    color: var(--ep-slate);
    margin: 0 0 4px;
    line-height: 1.4;
}

.ep-notif-content small {
    font-size: 10px;
    color: var(--ep-muted);
}

/* ==========================================================================
   5. HERO BANNER & PORTAL TABS
   ========================================================================== */
.ep-portal-root {
    max-width: 1380px;
    margin: 0 auto;
    padding: 16px;
}

.ep-app-hero-banner {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #7c3aed 100%);
    color: #ffffff;
    border-radius: 20px;
    padding: 28px 24px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
    position: relative;
    overflow: hidden;
}

.ep-hero-badge {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 8px;
}

.ep-hero-title {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -0.5px;
    margin: 0 0 6px;
}

.ep-hero-desc {
    font-size: 13px;
    opacity: 0.9;
    max-width: 500px;
    margin: 0;
    line-height: 1.5;
}

.ep-hero-quick-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ep-quick-stat-pill {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 14px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.15s, background 0.15s;
}

.ep-quick-stat-pill:hover, .ep-quick-stat-pill:active {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.25);
}

.ep-quick-stat-pill strong {
    font-size: 16px;
    display: block;
    line-height: 1.1;
}

.ep-quick-stat-pill small {
    font-size: 11px;
    opacity: 0.85;
}

/* Portal Tabs Header (Segmented Bar) */
.ep-portal-tabs {
    display: none;
    gap: 8px;
    background: var(--ep-card-bg);
    padding: 6px;
    border-radius: 16px;
    border: 1px solid var(--ep-border);
    margin-bottom: 24px;
    box-shadow: var(--ep-shadow-sm);
    overflow-x: auto;
}

@media (min-width: 769px) {
    .ep-portal-tabs {
        display: flex;
    }
}

.ep-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 12px;
    border: none;
    background: transparent;
    color: var(--ep-muted);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ep-tab-btn:hover {
    color: var(--ep-dark);
}

.ep-tab-btn.active {
    background: var(--ep-primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* ==========================================================================
   6. SECTION HEADERS & FILTER CHIPS
   ========================================================================== */
.ep-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.ep-section-title {
    font-size: 20px;
    font-weight: 900;
    margin: 0;
    color: var(--ep-dark);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.3px;
}

.ep-filter-chips {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.ep-chip {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--ep-border);
    background: var(--ep-card-bg);
    color: var(--ep-slate);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}

.ep-chip.active, .ep-chip:hover {
    background: var(--ep-primary);
    color: #ffffff;
    border-color: var(--ep-primary);
}

/* Grid Layouts */
.ep-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

@media (max-width: 600px) {
    .ep-grid {
        grid-template-columns: 1fr;
    }
}

/* Common Card Styling */
.ep-card, .ep-course-card, .ep-exam-card, .ep-library-card {
    background: var(--ep-card-bg);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    overflow: hidden;
    box-shadow: var(--ep-shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.ep-card:hover, .ep-course-card:hover, .ep-exam-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--ep-shadow);
}

/* ==========================================================================
   7. COURSE CARDS
   ========================================================================== */
.ep-course-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    background: #e2e8f0;
}

.ep-course-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ep-course-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.ep-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.ep-badge-free { background: #dcfce7; color: #15803d; }
.ep-badge-paid { background: #e0e7ff; color: #4338ca; }
.ep-badge-live { background: #fee2e2; color: #b91c1c; }
.ep-badge-upcoming { background: #fef3c7; color: #b45309; }

.ep-course-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--ep-dark);
    margin: 0 0 6px;
    line-height: 1.35;
}

.ep-course-desc {
    font-size: 12px;
    color: var(--ep-muted);
    margin: 0 0 14px;
    line-height: 1.45;
    flex: 1;
}

.ep-course-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--ep-border);
    padding-top: 12px;
    margin-top: auto;
}

.ep-price {
    font-size: 16px;
    font-weight: 900;
    color: #16a34a;
}

/* Common Buttons */
.ep-btn-primary {
    background: var(--ep-primary);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s, transform 0.1s;
}

.ep-btn-primary:active {
    transform: scale(0.96);
}

.ep-btn-secondary {
    background: var(--ep-light);
    color: var(--ep-slate);
    border: 1px solid var(--ep-border);
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s, transform 0.1s;
}

.ep-btn-secondary:active {
    transform: scale(0.96);
}

.ep-btn-review {
    background: #f3e8ff;
    color: #7e22ce;
    border: 1px solid #d8b4fe;
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

/* ==========================================================================
   8. IMMERSIVE IN-APP COURSE PLAYER SCREEN (MATCHES MOBILE APP)
   ========================================================================== */
.ep-course-player-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--ep-body-bg);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: ep-fade-in 0.2s ease;
}

@keyframes ep-fade-in {
    from { opacity: 0; transform: scale(0.99); }
    to { opacity: 1; transform: scale(1); }
}

.ep-player-topbar {
    height: 58px;
    background: var(--ep-card-bg);
    border-bottom: 1px solid var(--ep-border);
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
}

.ep-player-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--ep-light);
    border: 1px solid var(--ep-border);
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    color: var(--ep-slate);
}

.ep-player-course-info {
    flex: 1;
    overflow: hidden;
}

.ep-player-title {
    font-size: 15px;
    font-weight: 900;
    margin: 0;
    color: var(--ep-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ep-player-subtitle {
    font-size: 11px;
    color: var(--ep-muted);
}

.ep-player-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ep-player-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

@media (max-width: 900px) {
    .ep-player-body {
        flex-direction: column;
        overflow-y: auto;
    }
}

.ep-player-viewport-col {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ep-player-media-box {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000000;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--ep-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ep-video-speed-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--ep-card-bg);
    border: 1px solid var(--ep-border);
    padding: 8px 14px;
    border-radius: 10px;
}

.ep-speed-btn {
    background: none;
    border: 1px solid var(--ep-border);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--ep-slate);
    cursor: pointer;
}

.ep-speed-btn.active {
    background: var(--ep-primary);
    color: #ffffff;
    border-color: var(--ep-primary);
}

.ep-lesson-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    background: var(--ep-card-bg);
    border: 1px solid var(--ep-border);
    padding: 12px 16px;
    border-radius: 12px;
}

.ep-lesson-nav-controls {
    display: flex;
    gap: 8px;
}

.ep-course-progress-card {
    background: var(--ep-card-bg);
    border: 1px solid var(--ep-border);
    border-radius: 12px;
    padding: 14px 16px;
}

.ep-progress-bar-track {
    width: 100%;
    height: 8px;
    background: var(--ep-light);
    border-radius: 4px;
    overflow: hidden;
}

.ep-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.ep-player-tabs-header {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid var(--ep-border);
    overflow-x: auto;
}

.ep-player-tab {
    padding: 8px 16px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--ep-muted);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.ep-player-tab.active {
    color: var(--ep-primary);
    border-bottom-color: var(--ep-primary);
}

.ep-player-panel {
    background: var(--ep-card-bg);
    border: 1px solid var(--ep-border);
    border-radius: 12px;
    padding: 18px;
}

.ep-lesson-rich-text {
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--ep-slate);
}

/* Curriculum Syllabus Sidebar Column */
.ep-player-syllabus-col {
    width: 360px;
    background: var(--ep-card-bg);
    border-left: 1px solid var(--ep-border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

@media (max-width: 900px) {
    .ep-player-syllabus-col {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--ep-border);
    }
}

.ep-syllabus-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--ep-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ep-syllabus-accordion {
    padding: 10px;
}

.ep-chapter-block {
    border: 1px solid var(--ep-border);
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
}

.ep-chapter-title-bar {
    background: var(--ep-light);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    color: var(--ep-dark);
}

.ep-lesson-item {
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid var(--ep-border);
    cursor: pointer;
    transition: background 0.15s;
    font-size: 12.5px;
}

.ep-lesson-item:hover, .ep-lesson-item.active {
    background: var(--ep-primary-light);
    color: var(--ep-primary);
}

.ep-lesson-item.completed .ep-lesson-icon {
    color: #16a34a;
}

/* Course Completion Certificate Render Card */
.ep-cert-card {
    background: #ffffff;
    border: 4px double #d4af37;
    border-radius: 14px;
    padding: 24px;
    color: #1e293b;
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.2);
    position: relative;
    max-width: 680px;
    margin: 0 auto;
}

.ep-cert-header {
    text-align: center;
}

.ep-cert-recipient {
    font-size: 24px;
    font-weight: 900;
    color: #1e3a8a;
    text-align: center;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 6px;
    margin: 12px 0;
}

.ep-cert-course-name {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    text-align: center;
}

.ep-cert-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    border-top: 1px dashed #cbd5e1;
    padding-top: 16px;
}

.ep-cert-seal {
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 900;
    display: inline-block;
}

/* ==========================================================================
   9. DIGITAL DOCUMENT & PDF VIEWER
   ========================================================================== */
.ep-viewer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--ep-body-bg);
    z-index: 100000;
    display: flex;
    flex-direction: column;
}

.ep-viewer-topbar {
    height: 56px;
    background: var(--ep-card-bg);
    border-bottom: 1px solid var(--ep-border);
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ep-viewer-title {
    font-size: 14px;
    font-weight: 800;
    margin: 0;
}

.ep-viewer-subtitle {
    font-size: 11px;
    color: var(--ep-muted);
}

.ep-viewer-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ep-reader-theme-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--ep-border);
    background: var(--ep-card-bg);
    cursor: pointer;
    font-size: 14px;
}

.ep-reader-theme-btn.active {
    border-color: var(--ep-primary);
}

.ep-viewer-viewport {
    flex: 1;
    overflow-y: auto;
    padding: 24px 16px;
    display: flex;
    justify-content: center;
}

.ep-viewer-content-sheet {
    background: #ffffff;
    color: #1e293b;
    max-width: 800px;
    width: 100%;
    padding: 36px;
    border-radius: 12px;
    box-shadow: var(--ep-shadow);
    line-height: 1.8;
    font-size: 15px;
}

.ep-viewer-content-sheet[data-rtheme="sepia"] {
    background: #fbf0d9;
    color: #5f4b32;
}

.ep-viewer-content-sheet[data-rtheme="dark"] {
    background: #1e293b;
    color: #e2e8f0;
}

/* ==========================================================================
   10. CBT EXAM ROOM (NTA / TCS-iON STYLE)
   ========================================================================== */
.ep-cbt-container {
    background: var(--ep-card-bg);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    overflow: hidden;
    box-shadow: var(--ep-shadow-lg);
    margin-top: 10px;
}

.ep-cbt-header {
    background: #1e293b;
    color: #ffffff;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ep-cbt-title {
    font-size: 16px;
    font-weight: 800;
}

.ep-cbt-timer {
    background: #0f172a;
    border: 1px solid #334155;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 900;
    color: #f59e0b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ep-cbt-body {
    display: flex;
    min-height: 520px;
}

@media (max-width: 800px) {
    .ep-cbt-body {
        flex-direction: column;
    }
}

.ep-question-pane {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.ep-question-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--ep-border);
}

.ep-qnum-badge {
    background: var(--ep-primary-light);
    color: var(--ep-primary);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
}

.ep-marks-badge {
    font-size: 12px;
    font-weight: 700;
    color: #16a34a;
}

.ep-question-text {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.6;
    margin-bottom: 24px;
    color: var(--ep-dark);
}

.ep-options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}

.ep-option-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1.5px solid var(--ep-border);
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s;
}

.ep-option-label:hover {
    border-color: var(--ep-primary);
    background: var(--ep-primary-light);
}

.ep-option-label.selected {
    border-color: var(--ep-primary);
    background: var(--ep-primary-light);
    font-weight: 700;
}

.ep-question-actions {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 18px;
    border-top: 1px solid var(--ep-border);
}

/* Palette Sidebar */
.ep-palette-pane {
    width: 280px;
    background: var(--ep-light);
    border-left: 1px solid var(--ep-border);
    padding: 18px;
    display: flex;
    flex-direction: column;
}

@media (max-width: 800px) {
    .ep-palette-pane {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--ep-border);
    }
}

.ep-palette-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 11px;
    margin: 14px 0;
}

.ep-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ep-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 4px;
}

.ep-dot-answered { background: #16a34a; }
.ep-dot-unanswered { background: #dc2626; }
.ep-dot-marked { background: #7e22ce; }
.ep-dot-unvisited { background: #cbd5e1; }

.ep-palette-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    max-height: 260px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.ep-pal-btn {
    aspect-ratio: 1/1;
    border: 1px solid var(--ep-border);
    border-radius: 8px;
    background: #cbd5e1;
    color: #1e293b;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ep-pal-btn.answered { background: #16a34a; color: #ffffff; border-color: #15803d; }
.ep-pal-btn.unanswered { background: #dc2626; color: #ffffff; border-color: #b91c1c; }
.ep-pal-btn.marked { background: #7e22ce; color: #ffffff; border-color: #6b21a8; }
.ep-pal-btn.active { outline: 2px solid var(--ep-primary); outline-offset: 2px; }

.ep-palette-submit {
    margin-top: auto;
    background: #16a34a;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    width: 100%;
}

/* ==========================================================================
   11. WALLET & REWARDS TAB
   ========================================================================== */
.ep-wallet-hero-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #ffffff;
    border-radius: 20px;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    box-shadow: var(--ep-shadow-lg);
}

.ep-reward-pill {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid #f59e0b;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
}

.ep-wallet-coin-display {
    font-size: 42px;
    font-weight: 900;
    margin: 12px 0 4px;
    color: #fde047;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ep-redeem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.ep-redeem-card {
    background: var(--ep-card-bg);
    border: 1px solid var(--ep-border);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--ep-shadow-sm);
}

.ep-redeem-icon {
    font-size: 32px;
}

.ep-redeem-details {
    flex: 1;
}

.ep-redeem-details h4 {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 800;
    color: var(--ep-dark);
}

.ep-redeem-details p {
    margin: 0 0 6px;
    font-size: 11px;
    color: var(--ep-muted);
}

.ep-redeem-cost {
    font-size: 12px;
    font-weight: 800;
    color: #f59e0b;
}

/* ==========================================================================
   12. TOAST SYSTEM & SPINNER
   ========================================================================== */
.ep-toast-wrapper {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

@media (max-width: 768px) {
    .ep-toast-wrapper {
        bottom: 84px;
    }
}

.ep-toast {
    background: #0f172a;
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
    animation: ep-toast-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.ep-toast.success { background: #16a34a; }
.ep-toast.error { background: #dc2626; }

@keyframes ep-toast-in {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.ep-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--ep-border);
    border-top-color: var(--ep-primary);
    border-radius: 50%;
    animation: ep-spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes ep-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   13. MODAL OVERLAYS & FOOTER
   ========================================================================== */
.ep-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.ep-modal-overlay.active {
    display: flex;
}

.ep-modal-box {
    background: var(--ep-card-bg);
    border-radius: 20px;
    max-width: 520px;
    width: 100%;
    padding: 26px;
    box-shadow: var(--ep-shadow-lg);
    border: 1px solid var(--ep-border);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.ep-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--ep-light);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ep-muted);
}

.ep-search-input, .ep-select {
    height: 42px;
    border: 1px solid var(--ep-border);
    border-radius: 10px;
    padding: 0 14px;
    background: var(--ep-card-bg);
    color: var(--ep-dark);
    font-size: 13px;
    outline: none;
}

.ep-search-input:focus, .ep-select:focus {
    border-color: var(--ep-primary);
}

.ep-filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.ep-filter-bar .ep-search-input {
    flex: 1;
    min-width: 200px;
}

.ep-chat-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ep-primary) 0%, var(--ep-secondary) 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    cursor: pointer;
    z-index: 900;
    transition: transform 0.2s;
}

.ep-chat-fab:active {
    transform: scale(0.92);
}

.ep-chat-drawer-container {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 350px;
    max-width: 90vw;
    height: 480px;
    background: var(--ep-card-bg);
    border-radius: 18px;
    border: 1px solid var(--ep-border);
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
    z-index: 9999;
    flex-direction: column;
    overflow: hidden;
}

.ep-site-footer {
    background: var(--ep-card-bg);
    border-top: 1px solid var(--ep-border);
    padding: 30px 20px;
    margin-top: 40px;
}

.ep-footer-inner {
    max-width: 1380px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

/* Scorecard circle */
.ep-scorecard {
    background: var(--ep-card-bg);
    border: 1px solid var(--ep-border);
    border-radius: 20px;
    padding: 32px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: var(--ep-shadow-lg);
}

.ep-score-circle {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 6px solid #16a34a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.ep-score-num {
    font-size: 26px;
    font-weight: 900;
    color: #16a34a;
}

.ep-score-label {
    font-size: 11px;
    color: var(--ep-muted);
}

.ep-result-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 20px 0;
}

@media (max-width: 500px) {
    .ep-result-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.ep-res-box {
    background: var(--ep-light);
    border: 1px solid var(--ep-border);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
}

.ep-res-val {
    font-size: 20px;
    font-weight: 900;
    color: var(--ep-dark);
}

.ep-res-lbl {
    font-size: 11px;
    color: var(--ep-muted);
    margin-top: 2px;
}
