/* ============================================================
   EM-THEME.CSS — Testrick Design System
   Single source of truth for all site styles.
   ============================================================ */

/* ============================================================
   1. CSS VARIABLES (Design Tokens)
   ============================================================ */
:root {
    /* Primary Colors */
    --primary-color: #4f6ef7;
    --primary-hover: #3b55d9;
    --primary-light: #eef2ff;
    --primary-rgb: 79, 110, 247;

    /* Accent Colors */
    --accent-purple: #8b5cf6;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;
    --accent-cyan: #06b6d4;

    /* Light Theme (Default) */
    --bg-body: #f4f6fb;
    --bg-card: #ffffff;
    --bg-section: #f8fafc;
    --bg-elevated: #ffffff;
    --text-main: #111827;
    --text-secondary: #374151;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --border-subtle: #f3f4f6;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(var(--primary-rgb), 0.15);

    /* Radii */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #4f6ef7 0%, #7c3aed 100%);
    --gradient-hero: linear-gradient(135deg, #1e3a8a 0%, #4f6ef7 50%, #7c3aed 100%);
    --gradient-surface: linear-gradient(135deg, rgba(79,110,247,0.04) 0%, rgba(124,58,237,0.03) 100%);
    --gradient-card-hover: linear-gradient(135deg, rgba(79,110,247,0.06) 0%, rgba(124,58,237,0.04) 100%);

    /* Navbar */
    --navbar-height: 64px;
    --navbar-bg: rgba(255, 255, 255, 0.85);
    --navbar-border: rgba(0, 0, 0, 0.06);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="dark"] {
    --bg-body: #0c111d;
    --bg-card: #161b2e;
    --bg-section: #111827;
    --bg-elevated: #1e293b;
    --text-main: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #1e293b;
    --border-subtle: #1e293b;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(var(--primary-rgb), 0.2);
    --navbar-bg: rgba(12, 17, 29, 0.9);
    --navbar-border: rgba(255, 255, 255, 0.06);
    --gradient-surface: linear-gradient(135deg, rgba(79,110,247,0.06) 0%, rgba(124,58,237,0.04) 100%);
    --gradient-card-hover: linear-gradient(135deg, rgba(79,110,247,0.1) 0%, rgba(124,58,237,0.06) 100%);
}


/* ============================================================
   2. BASE STYLES (Reset, body, typography, links, scrollbar)
   ============================================================ */
* {
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none !important;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.9rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-base), color var(--transition-base);
}

a {
    text-decoration: none !important;
    color: unset;
    transition: color var(--transition-fast);
}

/* Typography */
.playfair {
    font-family: 'Playfair Display', serif;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================================
   3. LAYOUT COMPONENTS (Header, Footer, Sidebar)
   ============================================================ */

/* --- Header / Navbar --- */
.navbar-main {
    background: var(--navbar-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--navbar-border);
    padding: 0.5rem 0;
    min-height: var(--navbar-height);
    transition: all var(--transition-base);
}

/* Brand */
.brand-logo-wrap {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-text {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hamburger Toggle */
.navbar-toggler {
    width: 36px;
    height: 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: transparent !important;
    border: none !important;
}

.toggler-bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: all var(--transition-base);
}

.navbar-toggler[aria-expanded="true"] .toggler-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.navbar-toggler[aria-expanded="true"] .toggler-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.navbar-toggler[aria-expanded="true"] .toggler-bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Nav Links */
.nav-link-main {
    color: var(--text-secondary) !important;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 0.875rem !important;
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.nav-link-icon {
    font-size: 0.8rem;
    opacity: 0.5;
    transition: opacity var(--transition-fast);
}

.nav-link-main:hover {
    color: var(--primary-color) !important;
    background: var(--gradient-surface);
}

.nav-link-main:hover .nav-link-icon {
    opacity: 0.9;
}

.nav-link-main.active {
    color: var(--primary-color) !important;
    background: var(--primary-light);
    font-weight: 600;
}

.nav-link-main.active .nav-link-icon {
    opacity: 1;
}

[data-theme="dark"] .nav-link-main.active {
    background: rgba(var(--primary-rgb), 0.12);
}

[data-theme="dark"] .nav-link-main:hover {
    background: rgba(var(--primary-rgb), 0.08);
}

/* Dropdown Menu (Modern) */
.dropdown-menu-modern {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    padding: 0.5rem;
    margin-top: 0.5rem !important;
    animation: dropdownFadeIn var(--transition-base) ease;
    min-width: 220px;
}

[data-theme="dark"] .dropdown-menu-modern {
    background: var(--bg-elevated);
    border-color: rgba(255,255,255,0.08);
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.dropdown-menu-modern .dropdown-item {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.55rem 0.875rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all var(--transition-fast);
}

.dropdown-item-icon {
    width: 18px;
    text-align: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.dropdown-menu-modern .dropdown-item:hover {
    background: var(--gradient-card-hover);
    color: var(--primary-color);
    transform: translateX(2px);
}

.dropdown-item-danger {
    color: var(--accent-rose) !important;
}

.dropdown-item-danger:hover {
    background: rgba(244, 63, 94, 0.08) !important;
    color: var(--accent-rose) !important;
}

.text-purple { color: var(--accent-purple) !important; }

/* User Dropdown */
.user-dropdown {
    min-width: 240px;
}

.user-dropdown-header {
    padding: 0.875rem 1rem;
    background: var(--gradient-surface);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.user-avatar-trigger {
    transition: all var(--transition-fast);
}

.user-avatar-trigger:hover {
    opacity: 0.85;
}

.user-avatar-img {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--primary-light);
    transition: border-color var(--transition-fast);
}

.user-avatar-img:hover {
    border-color: var(--primary-color);
}

.user-avatar-placeholder {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    background: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

[data-theme="dark"] .user-avatar-placeholder {
    background: rgba(var(--primary-rgb), 0.15);
}

/* Theme Toggle */
.btn-theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: var(--bg-section);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 0.875rem;
}

.btn-theme-toggle:hover {
    background: var(--primary-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: rotate(15deg);
}

[data-theme="dark"] .btn-theme-toggle {
    background: rgba(var(--primary-rgb), 0.1);
    border-color: rgba(var(--primary-rgb), 0.2);
    color: var(--accent-amber);
}

/* Auth Buttons in Navbar */
.btn-nav-login {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 1.25rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    background: transparent;
    transition: all var(--transition-base);
}

.btn-nav-login:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-light);
}

.btn-nav-signup {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 1.25rem;
    border: none;
    border-radius: var(--radius-full);
    color: #fff;
    background: var(--gradient-primary);
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.3);
    transition: all var(--transition-base);
}

.btn-nav-signup:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.4);
    color: #fff;
}

/* Navbar responsive */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: var(--bg-card);
        border-radius: var(--radius-md);
        padding: 1rem;
        margin-top: 0.5rem;
        box-shadow: var(--shadow-lg);
        border: 1px solid var(--border-color);
    }

    .nav-link-main {
        padding: 0.65rem 1rem !important;
    }

    .dropdown-menu-modern {
        box-shadow: none;
        border: none;
        padding-left: 1rem;
        background: transparent;
    }
}

@media (min-width: 1280px) {
    .nav-item {
        padding: 0;
    }
}

/* --- Footer --- */
.footer {
    font-size: 14px;
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    color: var(--text-main);
}

[data-theme="dark"] .footer {
    background-color: var(--bg-section);
}

.footer h4 {
    font-size: 16px;
    font-weight: bold;
    position: relative;
    padding-bottom: 12px;
}

.footer .footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer .footer-links ul li {
    padding: 10px 0;
    display: flex;
    align-items: center;
}

.footer .footer-links ul li:first-child {
    padding-top: 0;
}

/* --- Sidebar --- */
.profile-sidebar {
    border-radius: var(--radius-md);
}

.profile-sidebar-header {
    background-color: var(--bg-section);
    border-color: var(--border-color) !important;
}

/* ============================================================
   4. UI COMPONENTS (Cards, Buttons, Badges, Forms)
   ============================================================ */

/* --- Modern Card --- */
.modern-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.modern-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* --- Glass Card --- */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
}

[data-theme="dark"] .glass-card {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- Buttons --- */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: var(--radius-sm);
    padding: 10px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: var(--radius-sm);
    padding: 10px 24px;
    font-weight: 600;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* --- Badges --- */
.badge-premium {
    background-color: #f59e0b;
    color: #fff;
    font-size: 10px;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
}

.badge-free {
    background-color: #10b981;
    color: #fff;
    font-size: 10px;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
}

/* --- Forms / Inputs --- */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(72, 108, 255, 0.15);
}

/* --- Section Header --- */
.section-title {
    font-weight: 800;
    font-size: 2rem;
    margin-bottom: 10px;
}

.section-subtitle {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.section-header {
    text-align: center;
    padding-bottom: 40px;
}

.section-header h2 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 20px;
    position: relative;
}

.section-header h2:after {
    content: "";
    position: absolute;
    display: block;
    width: 50px;
    height: 3px;
    background: var(--primary-color);
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
}

.section-header p {
    margin-bottom: 0;
    color: var(--text-muted);
}

/* ============================================================
   5. PAGE-SPECIFIC STYLES
   ============================================================ */

/* --- Hero Section --- */
.hero {
    padding: 100px 0;
    background: var(--bg-body);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 2rem;
    color: var(--text-main);
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 500px;
    margin-bottom: 2.5rem;
}

/* --- Stat Cards (Hero) --- */
.stat-card {
    border-left: 3px solid var(--primary-color);
    padding: 10px 20px;
    background: var(--bg-card);
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.stat-val {
    font-size: 1.8rem;
    font-weight: 800;
    display: block;
    color: var(--text-main);
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
}

/* --- Featured Content Cards (Hero right side) --- */
.featured-card {
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    transition: transform 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-5px);
}

.card-economic {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.card-daily-quiz {
    background: #e6fffa;
    border: 1px solid #b2f5ea;
}

[data-theme="dark"] .card-daily-quiz {
    background: #1a3a3a;
    border-color: #2c5e5e;
}

.card-word-day {
    background: var(--primary-color);
    color: #fff;
}

.card-international {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

/* --- Search Container --- */
.search-container {
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

/* --- Profile Page --- */
.profile-hero {
    background-color: var(--primary-color);
    background-image: linear-gradient(135deg, #1e3a8a 0%, #486cff 100%);
    position: relative;
}

.profile-hero-pattern {
    opacity: 0.1;
    background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.35) 1px, transparent 0);
    background-size: 20px 20px;
    pointer-events: none;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    object-fit: cover;
}

.profile-avatar-edit {
    width: 34px;
    height: 34px;
    background-color: #f59e0b;
    color: #1e3a8a;
    font-size: 12px;
    border: 2px solid #1e3a8a;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.profile-avatar-edit:hover {
    transform: scale(1.1);
    color: #1e3a8a;
}

.profile-nav-link {
    color: var(--text-muted);
    border-right: 3px solid transparent;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.profile-nav-link:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.profile-nav-link.active {
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-right-color: var(--primary-color);
    font-weight: 700;
}

[data-theme="dark"] .profile-nav-link:hover,
[data-theme="dark"] .profile-nav-link.active {
    background-color: rgba(72, 108, 255, 0.12);
}

.profile-nav-logout:hover {
    background-color: #fee2e2 !important;
    color: #dc2626 !important;
}

[data-theme="dark"] .profile-nav-logout:hover {
    background-color: rgba(220, 38, 38, 0.12) !important;
}

.profile-stat-val {
    font-size: 1.8rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.profile-card-header {
    background-color: var(--bg-section);
    border-color: var(--border-color) !important;
}

.profile-renewal-box {
    background-color: var(--bg-section);
    border: 1px solid var(--border-color);
}

.profile-renewal-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(245, 158, 11, 0.15);
    flex-shrink: 0;
}

.profile-activity-item {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.profile-activity-item:last-child {
    border-bottom: none;
}

.profile-activity-item:hover {
    background-color: var(--bg-section);
}

.profile-activity-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.profile-activity-editorial {
    background-color: rgba(72, 108, 255, 0.1);
    color: var(--primary-color);
}

.profile-activity-quiz {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.profile-activity-vocab {
    background-color: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.profile-chart-container {
    background-color: var(--bg-section);
    min-height: 160px;
}

.profile-bar {
    min-height: 10px;
    transition: opacity 0.2s ease;
}

.profile-bar-inactive {
    background-color: var(--primary-color);
    opacity: 0.2;
}

.profile-bar-inactive:hover {
    opacity: 0.6;
}

.profile-legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* --- Testimonials (Swiper) --- */
.testimonials .swiper-pagination {
    margin-top: 20px;
    position: relative;
}

.testimonials .swiper-pagination .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background-color: rgba(0, 0, 0, 0.2);
    opacity: 1;
}

.testimonials .swiper-pagination .swiper-pagination-bullet-active {
    background-color: var(--primary-color);
}

/* --- Category Cards --- */
.category-card img:hover {
    box-shadow: 0 0 5px 0 rgba(72, 108, 255, 0.5) !important;
}

.category-card img {
    box-shadow: 0 0 5px 0 rgba(97, 97, 113, 0.2);
    transition: box-shadow 0.3s ease;
}

/* --- Editorial Service Items (legacy pages — will be phased out) --- */
.services .service-item {
    padding: 14px;
    background: var(--bg-card);
    height: 100%;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.services .card {
    box-shadow: 0 0 6px rgba(3, 99, 255, 0.12);
    border: 1px solid var(--border-color);
    font-size: 0.9rem !important;
    position: relative;
}

.services .card-footer {
    background-color: inherit !important;
    border: none;
}

.services .card-footer span {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

/* --- Type Filter Buttons (Category pages) --- */
.type_filter_btn {
    display: inline-block;
    padding: 20px 25px !important;
    background-color: var(--bg-card) !important;
    margin: 15px;
    text-decoration: none;
    color: var(--text-main);
    font-size: 16px;
    border: 2px solid var(--primary-color);
    font-weight: bold !important;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.type_filter_btn:hover {
    background-color: var(--primary-color) !important;
    color: #fff;
}

/* --- Social Login (Auth pages) --- */
.social-login a {
    display: inline-block;
    border: 1px solid var(--border-color);
    padding: 7px 25px;
    border-radius: var(--radius-sm);
    color: unset;
    transition: all 0.3s ease;
}

.social-login a:hover {
    border-color: var(--primary-color);
}

.social-login a img {
    width: 16px;
    margin-right: 4px;
}

.social-login {
    margin: 10px 0;
}

/* --- Contact Us Icons --- */
.contact_us_icon img {
    transition: 0.3s;
    position: relative;
    z-index: 1;
}

/* --- Readmore Button --- */
.readmore {
    cursor: pointer;
    outline: none;
    text-transform: capitalize;
    text-decoration: none;
    white-space: nowrap;
    text-align: center;
    display: inline-block;
    background: var(--primary-color);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: #fff;
    padding: 0.375rem 1.5rem;
    line-height: 1.6;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.readmore:hover {
    background: var(--primary-hover);
    color: #fff;
}

/* --- Datepicker Overrides --- */
.ui-state-active,
.ui-widget-content .ui-state-active,
.ui-widget-header .ui-state-active,
a.ui-button:active,
.ui-button:active,
.ui-button.ui-state-active:hover {
    border: 1px solid var(--primary-color);
    background: var(--primary-color);
    font-weight: normal;
    color: #ffffff;
    border-radius: 5px !important;
    text-align: center !important;
}

.ui-state-default,
.ui-widget-content .ui-state-default,
.ui-widget-header .ui-state-default,
.ui-button,
html .ui-button.ui-state-disabled:hover,
html .ui-button.ui-state-disabled:active {
    border: 1px solid #c5c5c5;
    background: #f6f6f6;
    font-weight: normal;
    color: #454545;
    text-align: center !important;
    border-radius: 4px !important;
}

.ui-state-highlight,
.ui-widget-content .ui-state-highlight,
.ui-widget-header .ui-state-highlight {
    background: #10b981 !important;
    color: #fff !important;
    border: 1px solid #10b981 !important;
}

.ui-datepicker-calendar a:hover {
    color: #111 !important;
}

.ui-widget-header a:hover {
    color: #333333 !important;
}

/* --- Star Rating --- */
.fa-star {
    color: gold;
}

section {
    scroll-margin-top: 70px;
    padding: 30px 0;
    overflow: hidden;
}

/* ============================================================
   6. UTILITY CLASSES (Sizing, Typography, Colors, Effects)
   ============================================================ */

/* --- Sizing Utilities --- */
.size-32 { width: 32px; height: 32px; }
.size-35 { width: 35px; height: 35px; }
.size-40 { width: 40px; height: 40px; }
.size-60 { width: 60px; height: 60px; }
.size-80 { width: 80px; height: 80px; }
.size-100x70 { width: 100px; height: 70px; }
.size-120 { width: 120px; height: 120px; }

.img-card-sm { height: 180px; object-fit: cover; }
.img-card-md { height: 200px; object-fit: cover; }
.img-cover { object-fit: cover; }
.progress-sm { width: 100px; height: 6px; }
.max-w-120 { max-width: 120px; }

/* --- Avatar & Thumbnail --- */
.avatar-sm { width: 32px; height: 32px; object-fit: cover; }
.avatar-md { width: 60px; height: 60px; object-fit: cover; }
.avatar-lg { width: 120px; height: 120px; object-fit: cover; }
.thumbnail-sm { width: 80px; height: 80px; object-fit: cover; }
.thumbnail-md { width: 100px; height: 70px; object-fit: cover; }

/* --- Icon Circles --- */
.icon-circle-sm {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-circle-md {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-circle-lg {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Typography Utilities --- */
.x-small { font-size: 0.75rem !important; }
.fs-10 { font-size: 10px !important; }
.fs-08rem { font-size: 0.8rem !important; }
.fs-075rem { font-size: 0.75rem !important; }
.fs-1rem { font-size: 1rem !important; }
.tracking-wide { letter-spacing: 0.05em; }
.tracking-wider { letter-spacing: 0.1em; }
.tracking-widest { letter-spacing: 0.12em; }

/* --- Color Utilities --- */
.text-main { color: var(--text-main) !important; }
.text-theme-muted { color: var(--text-muted) !important; }
.text-streak { color: #f97316 !important; }

/* --- Soft Background Utilities --- */
.bg-soft-primary { background-color: rgba(72, 108, 255, 0.1) !important; }
.bg-soft-success { background-color: rgba(16, 185, 129, 0.15) !important; }
.bg-soft-warning { background-color: rgba(245, 158, 11, 0.15) !important; }
.bg-soft-danger { background-color: rgba(220, 38, 38, 0.1) !important; }

/* --- Hover Utilities --- */
.hover-text-primary:hover { color: var(--primary-color) !important; }
.hover-opacity-100:hover { opacity: 1 !important; }
.hover-bg-secondary:hover { background-color: #374151 !important; }
.transition-300 { transition: all 0.3s ease; }

/* --- Layout Helpers --- */
.sticky-below-header { top: 80px; }

/* --- Component Patterns (reusable across pages) --- */
.stat-label-text {
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
}

.card-header-title {
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Text truncation helpers */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================================
   7. RESPONSIVE OVERRIDES
   ============================================================ */
@media (max-width: 767.98px) {
    .hero {
        padding: 60px 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .profile-avatar {
        width: 96px;
        height: 96px;
    }

    .profile-stat-val {
        font-size: 1.4rem;
    }

    .search-container {
        margin-top: 0;
        border-radius: var(--radius-md);
    }
}

@media (max-width: 575px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

/* ============================================================
   8. AUTH PAGES (Login, Register, OTP — standalone layout)
   ============================================================ */

/* --- Auth Body --- */
.auth-body {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 50%, #dbeafe 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    position: relative;
    overflow-x: hidden;
}

/* --- Animated Background Shapes --- */
.auth-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    z-index: 0;
    animation: auth-float 12s infinite ease-in-out alternate;
}

.auth-shape-1 {
    width: 320px;
    height: 320px;
    top: -80px;
    left: -60px;
    background: linear-gradient(135deg, #486cff 0%, #708bff 100%);
}

.auth-shape-2 {
    width: 280px;
    height: 280px;
    bottom: -60px;
    right: -60px;
    background: linear-gradient(135deg, #a78bfa 0%, #c4b5fd 100%);
    animation-delay: -6s;
}

@keyframes auth-float {
    0%   { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(30px, 40px) rotate(10deg); }
}

@keyframes auth-fade-in-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- Auth Glass Card --- */
.auth-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 32px rgba(72, 108, 255, 0.08);
    animation: auth-fade-in-up 0.7s ease-out;
    position: relative;
    z-index: 1;
}

/* --- Auth Logo --- */
.auth-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

/* --- Auth Form Controls --- */
.auth-form-icon {
    position: relative;
}

.auth-form-icon .form-control,
.auth-form-icon .form-select {
    padding-left: 3rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.auth-form-icon .form-control:focus,
.auth-form-icon .form-select:focus {
    background: #fff;
    box-shadow: 0 4px 12px rgba(72, 108, 255, 0.1);
    border-color: var(--primary-color);
}

.auth-form-icon label {
    padding-left: 3rem;
}

.auth-input-icon {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1rem;
    z-index: 4;
    display: flex;
    align-items: center;
    height: 100%;
    transition: color 0.3s ease;
}

.form-control:focus ~ .auth-input-icon {
    color: var(--primary-color);
}

/* --- Auth Gradient Button --- */
.btn-auth-gradient {
    background: var(--gradient-primary);
    border: none;
    color: #fff;
    padding: 14px;
    border-radius: var(--radius-md);
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-auth-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(72, 108, 255, 0.35);
    color: #fff;
}

.btn-auth-gradient::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn-auth-gradient:hover::after {
    left: 100%;
}

/* --- Auth Social Button --- */
.btn-auth-social {
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #374151;
    font-weight: 500;
    padding: 12px;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-auth-social:hover {
    background: #f9fafb;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    color: #374151;
}

.btn-auth-social img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* --- Auth Divider --- */
.auth-divider span {
    padding: 0 15px;
    color: #9ca3af;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* --- Auth Link --- */
.auth-link {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: var(--primary-hover);
    text-decoration: underline !important;
}

/* --- OTP Input Group --- */
.otp-input {
    width: 50px;
    height: 55px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    border: 2px solid #e5e7eb;
    background: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.otp-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(72, 108, 255, 0.15);
    background: #fff;
    outline: none;
}

/* --- Auth OTP phone field (readonly look) --- */
.auth-phone-display {
    letter-spacing: 4px;
    font-weight: 700;
    font-size: 1.1rem;
    background: rgba(72, 108, 255, 0.06);
    border: 1px dashed var(--primary-color);
    border-radius: var(--radius-md);
    color: var(--primary-color);
}

/* --- Auth footer --- */
.auth-footer {
    font-size: 0.75rem;
    color: #9ca3af;
}

.auth-footer a {
    color: #6b7280;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.auth-footer a:hover {
    color: var(--primary-color);
}

/* --- Auth responsive --- */
@media (max-width: 575px) {
    .auth-card {
        border-radius: 16px;
    }

    .auth-logo {
        width: 48px;
        height: 48px;
    }

    .otp-input {
        width: 44px;
        height: 48px;
        font-size: 1.2rem;
    }
}

/* --- Edit Profile (main layout version) --- */
.edit-profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.edit-profile-header {
    background: var(--gradient-primary);
    color: #fff;
}

.edit-profile-label {
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
}

/* ============================================================
   9. CONTENT PAGES (Categories, Editorial Detail, Listings)
   ============================================================ */

/* --- Category Card Backgrounds (cycled via Blade) --- */
.cat-bg-1 { background-color: #edf5ff; }
.cat-bg-2 { background-color: #f7e0db; }
.cat-bg-3 { background-color: #ebffe4; }

[data-theme="dark"] .cat-bg-1 { background-color: rgba(72, 108, 255, 0.1); }
[data-theme="dark"] .cat-bg-2 { background-color: rgba(247, 224, 219, 0.1); }
[data-theme="dark"] .cat-bg-3 { background-color: rgba(16, 185, 129, 0.1); }

/* --- Editorial Detail Page --- */
.editorial-heading {
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.editorial-image {
    width: 300px;
    max-width: 100%;
}

.editorial-body {
    font-size: 1rem;
}

.editorial-content-area {
    font-size: 1.2rem;
}

.editorial-sidebar {
    font-size: 1rem;
    height: 150vh;
    overflow-y: auto;
}

/* --- Like / Icon Buttons --- */
.icon-btn {
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: #6c757d;
    transition: color 0.2s ease-in-out;
}

.icon-btn:hover {
    color: #495057;
}

#like-btn {
    color: #cecece75;
    text-shadow: 1px 0px 1px gray;
}

.liked {
    color: var(--primary-color) !important;
    text-shadow: 1px 0px 1px rgba(72, 108, 255, 0.3);
}

.like-btn.liked,
.dislike-btn.disliked {
    color: var(--primary-color);
}

.like-dislike-container {
    flex-grow: 1;
    justify-content: flex-end;
}

/* --- PDF Link --- */
.pdf-link {
    text-decoration: none;
    color: #6c757d;
    transition: color 0.2s ease-in-out;
}

.pdf-link:hover {
    color: #495057;
}

/* --- Overlay (meaning popup) --- */
#overlay {
    position: fixed;
    display: none;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100000;
    cursor: pointer;
}

#overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    font-size: 14px;
    color: var(--text-main);
    background-color: var(--bg-card);
    padding: 15px;
    border-radius: 15px;
    transform: translate(-50%, -50%);
}

/* --- Vocab Sidebar --- */
.vocab-bookmark {
    position: absolute;
    right: 5%;
    cursor: pointer;
}

/* --- Spinner --- */
@keyframes spinner {
    0%   { transform: translate3d(-50%, -50%, 0) rotate(0deg); }
    100% { transform: translate3d(-50%, -50%, 0) rotate(360deg); }
}

.spin::before {
    animation: 1.5s linear infinite spinner;
    animation-play-state: inherit;
    border: solid 5px #cfd0d1;
    border-bottom-color: var(--primary-color);
    border-radius: 50%;
    content: "";
    height: 40px;
    width: 40px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate3d(-50%, -50%, 0);
    will-change: transform;
    z-index: 1000;
}

/* --- Fullscreen bg --- */
:-webkit-full-screen { background-color: var(--bg-body); }
:-ms-fullscreen { background-color: var(--bg-body); }
:fullscreen { background-color: var(--bg-body); }

/* --- Bold vocab word in editorial content --- */
.get-meaning.vocab-word {
    font-weight: bold;
    cursor: pointer;
}

.get-meaning {
    cursor: pointer;
}

/* --- Datewise Editorial Badge --- */
.datewise-edi-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 4px;
}

.datewise-edi-badge-premium {
    background-color: #f59e0b;
    color: #fff;
}

.datewise-edi-badge-free {
    background-color: var(--primary-color);
    color: #fff;
}

/* --- Min height for card titles (editorial listing) --- */
.min-height-58 {
    min-height: 58px;
}

/* --- Radio filter align --- */
.filter-radio-label {
    vertical-align: middle;
}

/* --- Content responsive --- */
@media (max-width: 767px) {
    .editorial-sidebar {
        height: auto;
        max-height: 50vh;
    }

    .editorial-image {
        width: 100%;
    }
}

/* ============================================================
   10. DAILY LEARNING PAGES (Word of Day, Phrase, Vocab Treasury)
   ============================================================ */

/* --- Section divider --- */
.section-divider {
    box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .section-divider {
    box-shadow: 1px 1px 1px 1px rgba(255, 255, 255, 0.1);
}

/* --- Vocab Treasury Scroll Area --- */
.vocab-treasury-scroll {
    height: 150vh;
    overflow-y: auto;
    overflow-x: hidden;
}

@media (max-width: 767px) {
    .vocab-treasury-scroll {
        height: auto;
        max-height: 80vh;
    }
}

/* --- Daily feed list item (JS-generated opacity fix) --- */
.daily-feed-item {
    opacity: 1;
    list-style: none;
}

/* ============================================================
   11. MEDIA & RESOURCES (Videos, PDFs)
   ============================================================ */

/* --- Video iframe container --- */
.video-iframe-container {
    min-height: 283px;
}

.video-iframe-container iframe {
    min-height: 283px;
}

/* --- Word/Phrase card glow --- */
.card-glow-icon {
    box-shadow: 0 0 30px 5px rgba(72, 108, 255, 0.15);
    height: auto;
}

/* --- Card max width utility --- */
.card-max-540 {
    max-width: 540px;
}

/* ============================================================
   12. STATIC & INFO PAGES (Contact, About, Policies)
   ============================================================ */

/* --- Contact page icon images --- */
.contact-icon-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

/* ============================================================
   13. EDITORIAL READ PAGE REDESIGN
   ============================================================ */

/* --- Page container --- */
.edi-read-page {
    background-color: #f8f9fa;
    min-height: 70vh;
}

[data-theme="dark"] .edi-read-page {
    background-color: var(--em-bg-dark, #1a1a2e);
}

/* --- Breadcrumb --- */
.edi-breadcrumb .breadcrumb-item a {
    color: var(--em-primary, #486cff);
    text-decoration: none;
    transition: color 0.2s ease;
}

.edi-breadcrumb .breadcrumb-item a:hover {
    color: var(--em-primary-dark, #3a5bdb);
}

.edi-breadcrumb .breadcrumb-item.active {
    color: #6c757d;
}

/* --- Main content card --- */
.edi-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

[data-theme="dark"] .edi-card {
    background: var(--em-card-dark, #16213e);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* --- Category badge --- */
.edi-category-badge {
    background: var(--em-primary, #486cff);
    color: #fff;
    font-weight: 500;
    padding: 0.45rem 1rem;
    font-size: 0.813rem;
    border-radius: 6px;
    display: inline-block;
}

/* --- Title --- */
.edi-title {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.3;
    color: #1a1a2e;
}

[data-theme="dark"] .edi-title {
    color: #eee;
}

/* --- Meta info --- */
.edi-meta {
    color: #6c757d;
    font-size: 0.9rem;
}

.edi-meta i {
    margin-right: 4px;
}

/* --- Audio player card --- */
.edi-audio-card {
    background: #f0f4ff;
    border-left: 4px solid var(--em-primary, #486cff);
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

[data-theme="dark"] .edi-audio-card {
    background: rgba(72, 108, 255, 0.1);
}

.edi-audio-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
    background: var(--em-primary, #486cff);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
}

.edi-audio-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(72, 108, 255, 0.3);
}

.edi-audio-label h6 {
    margin-bottom: 0;
    font-weight: 600;
    font-size: 0.95rem;
}

.edi-audio-label small {
    color: #6c757d;
}

/* --- Waveform animation --- */
.edi-waveform {
    display: flex;
    gap: 3px;
    align-items: center;
    height: 30px;
}

.edi-waveform-bar {
    width: 4px;
    background: var(--em-primary, #486cff);
    border-radius: 2px;
    animation: ediWave 1.2s ease-in-out infinite;
}

.edi-waveform-bar:nth-child(1) { height: 12px; animation-delay: 0s; }
.edi-waveform-bar:nth-child(2) { height: 20px; animation-delay: 0.1s; }
.edi-waveform-bar:nth-child(3) { height: 28px; animation-delay: 0.2s; }
.edi-waveform-bar:nth-child(4) { height: 18px; animation-delay: 0.3s; }
.edi-waveform-bar:nth-child(5) { height: 14px; animation-delay: 0.4s; }

@keyframes ediWave {
    0%, 100% { transform: scaleY(1); opacity: 0.6; }
    50% { transform: scaleY(1.5); opacity: 1; }
}

/* --- Native audio styling fallback --- */
.edi-audio-native {
    width: 100%;
    margin-top: 0.75rem;
    border-radius: 8px;
}

/* --- Editorial content --- */
.edi-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #374151;
    text-align: justify;
}

[data-theme="dark"] .edi-content {
    color: #d1d5db;
}

.edi-content p {
    margin-bottom: 1.25rem;
}

/* --- Action buttons --- */
.edi-action-btn {
    border: 1.5px solid var(--em-primary, #486cff);
    color: var(--em-primary, #486cff);
    background: transparent;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.edi-action-btn:hover {
    background: var(--em-primary, #486cff);
    color: #fff;
    transform: translateY(-1px);
}

.edi-action-btn i {
    margin-right: 6px;
}

/* --- Sticky sidebar --- */
.edi-sticky-sidebar {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

/* --- Hard Words card --- */
.edi-hw-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

[data-theme="dark"] .edi-hw-card {
    background: var(--em-card-dark, #16213e);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.edi-hw-header {
    background: var(--em-primary, #486cff);
    color: #fff;
    padding: 0.85rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
}

.edi-hw-header i {
    margin-right: 8px;
}

/* --- Hard words scrollable list --- */
.edi-hw-list {
    max-height: 500px;
    overflow-y: auto;
    padding: 0;
}

.edi-hw-list::-webkit-scrollbar {
    width: 5px;
}

.edi-hw-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.edi-hw-list::-webkit-scrollbar-thumb {
    background: #aaa;
    border-radius: 3px;
}

.edi-hw-list::-webkit-scrollbar-thumb:hover {
    background: #888;
}

/* --- Individual word item --- */
.edi-hw-item {
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: background-color 0.2s ease;
}

.edi-hw-item:last-child {
    border-bottom: none;
}

.edi-hw-item:hover {
    background-color: #f8f9fa;
}

[data-theme="dark"] .edi-hw-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .edi-hw-item {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.edi-hw-word {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--em-primary, #486cff);
    margin-bottom: 0;
}

.edi-hw-meaning {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #6c757d;
    margin-bottom: 0.35rem;
}

.edi-hw-example {
    font-size: 0.8rem;
    line-height: 1.4;
    background: #f8f9fa;
    padding: 6px 10px;
    border-radius: 4px;
    font-style: italic;
    color: #6c757d;
    margin-bottom: 0;
}

[data-theme="dark"] .edi-hw-example {
    background: rgba(255, 255, 255, 0.05);
}

/* --- Bookmark toggle button --- */
.edi-bookmark-btn {
    border: 1.5px solid var(--em-primary, #486cff);
    color: var(--em-primary, #486cff);
    background: transparent;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.edi-bookmark-btn:hover,
.edi-bookmark-btn.saved {
    background: #28a745;
    border-color: #28a745;
    color: #fff;
}

/* --- Hard Words footer --- */
.edi-hw-footer {
    background: #f8f9fa;
    padding: 0.75rem 1.1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .edi-hw-footer {
    background: rgba(255, 255, 255, 0.03);
    border-top-color: rgba(255, 255, 255, 0.06);
}

.edi-hw-footer small {
    color: #6c757d;
}

.edi-hw-footer .btn {
    font-size: 0.8rem;
}

/* --- Study Tip card --- */
.edi-tip-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-top: 1rem;
}

[data-theme="dark"] .edi-tip-card {
    background: var(--em-card-dark, #16213e);
}

.edi-tip-card h6 {
    color: var(--em-primary, #486cff);
    font-weight: 700;
}

.edi-tip-card p {
    font-size: 0.85rem;
    color: #6c757d;
}

/* --- Mobile floating button --- */
.edi-mobile-fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.edi-mobile-fab button {
    padding: 12px 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 50px;
    background: var(--em-primary, #486cff);
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px rgba(72, 108, 255, 0.35);
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.edi-mobile-fab button:hover {
    transform: translateY(-2px);
}

/* --- Offcanvas customization --- */
.edi-offcanvas {
    width: 90%;
    max-width: 400px;
}

.edi-offcanvas .offcanvas-header {
    background: var(--em-primary, #486cff);
    color: #fff;
}

/* --- Responsive --- */
@media (max-width: 991.98px) {
    .edi-sticky-sidebar {
        position: relative;
        top: 0;
    }

    .edi-content {
        font-size: 1rem;
    }
}

@media (max-width: 767.98px) {
    .edi-title {
        font-size: 1.5rem;
    }

    .edi-audio-card {
        padding: 0.75rem;
    }
}

/* --- Print styles --- */
@media print {
    .edi-sticky-sidebar,
    .edi-mobile-fab,
    .edi-breadcrumb,
    .edi-audio-card,
    .edi-action-btn,
    #overlay {
        display: none !important;
    }

    .edi-content {
        color: #000;
    }
}
