/* Premium White Minimalist Responsive UI Design - Platform of Teacher Muhanna Al-Rahimi */
:root {
    --bg-primary: #f8fafc;
    --bg-secondary: rgba(255, 255, 255, 0.7);
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(124, 58, 237, 0.08);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent: #7c3aed;
    --accent-hover: #6d28d9;
    --accent-glow: rgba(124, 58, 237, 0.08);
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.08);
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.08);
    --warning: #f59e0b;
    --card-shadow: 0 12px 30px -8px rgba(15, 23, 42, 0.04);
    --font-ar: 'Readex Pro', 'Alexandria', 'Cairo', sans-serif;
    --font-en: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-ar), var(--font-en);
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #f8fafc;
    background-image: 
        linear-gradient(rgba(124, 58, 237, 0.02) 1px, transparent 1px), 
        linear-gradient(90deg, rgba(124, 58, 237, 0.02) 1px, transparent 1px),
        radial-gradient(at 0% 0%, rgba(124, 58, 237, 0.06) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(59, 130, 246, 0.04) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(236, 72, 153, 0.02) 0px, transparent 50%);
    background-size: 24px 24px, 24px 24px, 100% 100%, 100% 100%, 100% 100%;
    background-attachment: fixed;
    color: var(--text-primary);
    direction: rtl;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Header & Glassmorphism */
header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(124, 58, 237, 0.08);
    padding: 1.2rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 30px rgba(124, 58, 237, 0.02);
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent) 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    cursor: pointer;
    letter-spacing: -0.5px;
}

.user-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.icon-btn {
    background: rgba(124, 58, 237, 0.02);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.6rem 1.1rem;
    border-radius: 0.75rem;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.icon-btn:hover {
    background: rgba(124, 58, 237, 0.06);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.05);
}

/* App Container */
#app {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    max-width: 1320px; /* Spacious, premium desktop width */
    width: 100%;
    margin: 0 auto;
}

/* View Wrapper (Transition) */
.view {
    display: none;
    animation: fadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.view.active {
    display: flex;
    flex-direction: column;
}

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

/* Hero Section (تصميم بسيط هدير جميل ناعم أنيق) */
.hero-section {
    text-align: center;
    padding: 3.2rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    border-radius: 2rem;
    margin-bottom: 2.5rem;
    position: relative;
    background: linear-gradient(135deg, #f5f3ff 0%, #eff6ff 100%);
    box-shadow: 0 12px 30px -8px rgba(124, 58, 237, 0.03);
    overflow: hidden;
    color: var(--text-primary);
    border: 1px solid rgba(124, 58, 237, 0.08);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(124, 58, 237, 0.015) 1px, transparent 1px), 
        linear-gradient(90deg, rgba(124, 58, 237, 0.015) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.85;
    pointer-events: none;
    z-index: 1;
}

.hero-badge {
    background: rgba(124, 58, 237, 0.06);
    border: 1px solid rgba(124, 58, 237, 0.12);
    color: var(--accent);
    padding: 0.4rem 1.25rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2;
}

.hero-section h1 {
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1.4;
    background: linear-gradient(135deg, #6d28d9 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    z-index: 2;
}

.hero-section p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 580px;
    line-height: 1.7;
    font-weight: 500;
    z-index: 2;
}

/* Category Grid & Cards */
.categories-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.category-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 1.5rem 1.35rem; /* Shrunk padding to make card more compact */
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.65rem; /* Shrunk gap */
    position: relative;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--card-shadow);
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(to bottom, var(--accent), #3b82f6);
    transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-card:hover {
    transform: translateY(-5px) scale(1.01);
    background: white;
}

.category-icon-wrapper {
    width: 44px; /* Shrunk size */
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem; /* Shrunk font size */
    margin-bottom: 0.15rem;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-card:hover .category-icon-wrapper {
    transform: scale(1.15) rotate(8deg);
}

/* Category Colorful SaaS Themes */
/* 1. Blue Theme */
.category-card.theme-blue::before {
    background: linear-gradient(to bottom, #2563eb, #60a5fa);
}
.category-card.theme-blue .category-icon-wrapper {
    background: rgba(59, 130, 246, 0.08);
    color: #2563eb;
}
.category-card.theme-blue:hover {
    border-color: rgba(59, 130, 246, 0.25);
    box-shadow: 0 20px 40px -15px rgba(59, 130, 246, 0.12);
}

/* 2. Orange Theme */
.category-card.theme-orange::before {
    background: linear-gradient(to bottom, #d97706, #fbbf24);
}
.category-card.theme-orange .category-icon-wrapper {
    background: rgba(245, 158, 11, 0.08);
    color: #d97706;
}
.category-card.theme-orange:hover {
    border-color: rgba(245, 158, 11, 0.25);
    box-shadow: 0 20px 40px -15px rgba(245, 158, 11, 0.12);
}

/* 3. Emerald Theme */
.category-card.theme-emerald::before {
    background: linear-gradient(to bottom, #059669, #34d399);
}
.category-card.theme-emerald .category-icon-wrapper {
    background: rgba(16, 185, 129, 0.08);
    color: #059669;
}
.category-card.theme-emerald:hover {
    border-color: rgba(16, 185, 129, 0.25);
    box-shadow: 0 20px 40px -15px rgba(16, 185, 129, 0.12);
}

/* 4. Purple Theme */
.category-card.theme-purple::before {
    background: linear-gradient(to bottom, #7c3aed, #a78bfa);
}
.category-card.theme-purple .category-icon-wrapper {
    background: rgba(139, 92, 246, 0.08);
    color: #7c3aed;
}
.category-card.theme-purple:hover {
    border-color: rgba(139, 92, 246, 0.25);
    box-shadow: 0 20px 40px -15px rgba(139, 92, 246, 0.12);
}

/* 5. Rose Theme */
.category-card.theme-rose::before {
    background: linear-gradient(to bottom, #db2777, #f472b6);
}
.category-card.theme-rose .category-icon-wrapper {
    background: rgba(236, 72, 153, 0.08);
    color: #db2777;
}
.category-card.theme-rose:hover {
    border-color: rgba(236, 72, 153, 0.25);
    box-shadow: 0 20px 40px -15px rgba(236, 72, 153, 0.12);
}

.category-card h3 {
    font-size: 1.15rem; /* Shrunk title font size */
    font-weight: 700;
}

.category-card p {
    font-size: 0.85rem; /* Shrunk description font size */
    color: var(--text-secondary);
    line-height: 1.4;
    font-weight: 500;
}

.category-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
    margin-top: 0.85rem;
}

.stat-box {
    background: rgba(0, 0, 0, 0.015);
    border: 1px solid rgba(0, 0, 0, 0.03);
    border-radius: 0.85rem;
    padding: 0.75rem 0.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-card:hover .stat-box {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.04);
}

.stat-num {
    font-size: 1.15rem;
    font-weight: 800;
}

.stat-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
}

/* Individual Colorful Theme Numbers */
.theme-blue .stat-num { color: #2563eb; }
.theme-orange .stat-num { color: #d97706; }
.theme-emerald .stat-num { color: #059669; }
.theme-purple .stat-num { color: #7c3aed; }
.theme-rose .stat-num { color: #db2777; }

/* Quiz List (Tests list) */
.quiz-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.25rem;
}

.quiz-card {
    background: #ffffff;
    border: 1px solid rgba(124, 58, 237, 0.06);
    border-radius: 1.5rem !important; /* smooth and rounded */
    padding: 1.5rem 1.8rem;
    padding-right: 2.2rem; /* elegant spacing to clear side color stripe */
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 30px -8px rgba(15, 23, 42, 0.03);
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1.25rem;
}

/* Beautiful Elegant Accent Stripe - occupying first 10% on the right (RTL start) */
.quiz-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 8px; /* Elegant 8px solid/gradient stripe */
    height: 100%;
    transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.quiz-card:hover::before {
    width: 12px; /* Expands slightly on hover for gorgeous feedback */
}

/* Category Themes for Stretched Accent Side Stripes & Variables */
.quiz-card.theme-blue {
    --theme-color: #2563eb;
    --theme-badge-bg: rgba(37, 99, 235, 0.05);
    --theme-glow: rgba(37, 99, 235, 0.25);
}
.quiz-card.theme-blue::before {
    background: linear-gradient(to bottom, #2563eb, #60a5fa);
}

.quiz-card.theme-orange {
    --theme-color: #d97706;
    --theme-badge-bg: rgba(217, 119, 6, 0.05);
    --theme-glow: rgba(217, 119, 6, 0.25);
}
.quiz-card.theme-orange::before {
    background: linear-gradient(to bottom, #d97706, #fbbf24);
}

.quiz-card.theme-emerald {
    --theme-color: #059669;
    --theme-badge-bg: rgba(5, 150, 105, 0.05);
    --theme-glow: rgba(5, 150, 105, 0.25);
}
.quiz-card.theme-emerald::before {
    background: linear-gradient(to bottom, #059669, #34d399);
}

.quiz-card.theme-purple {
    --theme-color: #7c3aed;
    --theme-badge-bg: rgba(124, 58, 237, 0.05);
    --theme-glow: rgba(124, 58, 237, 0.25);
}
.quiz-card.theme-purple::before {
    background: linear-gradient(to bottom, #7c3aed, #a78bfa);
}

.quiz-card.theme-rose {
    --theme-color: #db2777;
    --theme-badge-bg: rgba(219, 39, 119, 0.05);
    --theme-glow: rgba(219, 39, 119, 0.25);
}
.quiz-card.theme-rose::before {
    background: linear-gradient(to bottom, #db2777, #f472b6);
}

.quiz-card:hover {
    border-color: var(--theme-color, rgba(124, 58, 237, 0.15));
    transform: translateY(-4px);
    box-shadow: 0 15px 30px -10px var(--theme-glow, rgba(124, 58, 237, 0.08));
}

.quiz-card-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.quiz-card-icon-badge {
    width: 50px;
    height: 50px;
    border-radius: 1rem;
    background: var(--theme-badge-bg, rgba(124, 58, 237, 0.05));
    color: var(--theme-color, var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(124, 58, 237, 0.04);
}

.quiz-card:hover .quiz-card-icon-badge {
    background: var(--theme-color, var(--accent));
    color: #ffffff;
    transform: scale(1.08) rotate(-5deg);
    box-shadow: 0 8px 18px -4px var(--theme-glow, rgba(124, 58, 237, 0.35));
}

.quiz-card-info {
    flex: 1;
    text-align: right;
}

.quiz-card-info h4 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--text-primary);
}

.card-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.65rem;
    justify-content: flex-start;
    align-items: center;
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.45rem;
    border-radius: 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid rgba(0, 0, 0, 0.03);
    white-space: nowrap;
    transition: all 0.25s ease;
}

.meta-pill i {
    font-size: 0.75rem;
}

.meta-pill.accent {
    color: var(--theme-color, var(--accent));
    background: var(--theme-badge-bg, rgba(124, 58, 237, 0.05));
    border-color: rgba(124, 58, 237, 0.03);
}

.meta-pill.success {
    color: #059669;
    background: rgba(5, 150, 105, 0.05);
    border-color: rgba(5, 150, 105, 0.03);
}

.meta-pill.warning {
    color: #d97706;
    background: rgba(217, 119, 6, 0.05);
    border-color: rgba(217, 119, 6, 0.03);
}

.quiz-card-action {
    background: rgba(124, 58, 237, 0.05);
    color: var(--accent);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    box-shadow: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.quiz-card:hover .quiz-card-action {
    background: linear-gradient(135deg, var(--accent) 0%, #3b82f6 100%);
    color: #ffffff;
    transform: translateX(-4px);
    box-shadow: 0 4px 10px rgba(124, 58, 237, 0.2);
}

.back-btn {
    align-self: flex-start;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    cursor: pointer;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s;
}

.back-btn:hover {
    color: var(--text-primary);
}

/* Interactive Quiz Engine View */
.quiz-header {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.92rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timer-pill {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: var(--danger);
    padding: 0.25rem 0.65rem;
    border-radius: 0.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-variant-numeric: tabular-nums;
}

.timer-pill.warning {
    animation: flash 1s infinite alternate;
}

@keyframes flash {
    from { opacity: 0.5; }
    to { opacity: 1; background-color: rgba(239, 68, 68, 0.15); }
}

.progress-container {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(to left, var(--accent), #3b82f6);
    transition: width 0.3s ease-out;
}

/* Split Pane Layout for Reading Comprehension */
.comprehension-split {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.passage-panel {
    background: #ffffff;
    border: 1px solid rgba(124, 58, 237, 0.1);
    border-right: 4px solid var(--accent);
    border-radius: 1.25rem;
    padding: 1.5rem 1.75rem;
    line-height: 1.95;
    max-height: 250px;
    overflow-y: auto;
    font-size: 1.05rem;
    font-weight: 500;
    color: #334155;
    white-space: pre-line;
    box-shadow: 0 10px 25px -8px rgba(124, 58, 237, 0.04);
    position: relative;
    transition: all 0.3s ease;
}

.passage-panel:hover {
    box-shadow: 0 12px 30px -5px rgba(124, 58, 237, 0.08);
    border-color: rgba(124, 58, 237, 0.2);
}

/* Beautiful Custom Scrollbar for Passage Panel */
.passage-panel::-webkit-scrollbar {
    width: 6px;
}
.passage-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 3px;
}
.passage-panel::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.2);
    border-radius: 3px;
}
.passage-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 58, 237, 0.4);
}

.passage-panel h4 {
    font-weight: 800;
    font-size: 1.18rem;
    margin-bottom: 1rem;
    color: var(--accent);
    border-bottom: 1px solid rgba(124, 58, 237, 0.08);
    padding-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Question Card & Interactive Elements */
.question-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1.25rem;
    padding: 1.75rem;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: relative;
}

.question-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.75rem;
}

.question-meta h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.report-trigger {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.report-trigger:hover {
    color: var(--warning);
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option-btn {
    width: 100%;
    background: rgba(0, 0, 0, 0.01);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 1.1rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.98rem;
    text-align: right;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.option-btn:hover:not(:disabled) {
    background: white;
    border-color: var(--accent);
    transform: scale(1.005);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.03);
}

.option-btn:disabled {
    cursor: default;
}

/* Option feedback classes */
.option-btn.correct {
    background: var(--success-glow) !important;
    border-color: var(--success) !important;
    color: #065f46 !important;
    font-weight: 700;
}

.option-btn.incorrect {
    background: var(--danger-glow) !important;
    border-color: var(--danger) !important;
    color: #991b1b !important;
    animation: shake 0.2s 2;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* Explanation Sliding Card */
.explanation-card {
    background: rgba(245, 158, 11, 0.04);
    border: 1px dashed rgba(245, 158, 11, 0.2);
    border-radius: 0.75rem;
    padding: 1.1rem 1.25rem;
    margin-top: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
    animation: slideDown 0.3s ease-out forwards;
}

@keyframes slideDown {
    from { opacity: 0; max-height: 0; overflow: hidden; padding-top: 0; padding-bottom: 0; }
    to { opacity: 1; max-height: 500px; }
}

.explanation-card strong {
    color: #9a3412;
}

.next-action-container {
    margin-top: 1rem;
    align-self: flex-end;
}

.action-btn {
    background: linear-gradient(135deg, var(--accent) 0%, #3b82f6 100%);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 0.5rem;
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.25);
}

/* Score Screen (Interactive Card) */
.score-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 2.5rem 1.5rem;
    text-align: center;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.score-badge {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.05) 0%, transparent 70%);
    border: 3px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent);
    box-shadow: 0 0 20px 0 rgba(124, 58, 237, 0.05);
}

.score-summary {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.summary-item {
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
}

.summary-item .num {
    font-size: 1.5rem;
    font-weight: 700;
}

.summary-item .label {
    color: var(--text-secondary);
}

.score-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 340px;
    margin-top: 1rem;
}

.secondary-btn {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.8rem;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.secondary-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: var(--accent);
}

/* Modals & Forms */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 1000;
}

.modal-content {
    background: white;
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    max-width: 420px;
    width: 100%;
    padding: 2.25rem;
    position: relative;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.close-modal {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.close-modal:hover {
    color: var(--text-primary);
}

/* Form Styles */
.form-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--accent);
    background: white;
}

.btn {
    width: 100%;
    background: linear-gradient(135deg, var(--accent) 0%, #3b82f6 100%);
    color: white;
    border: none;
    padding: 0.85rem;
    border-radius: 0.6rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.25);
    background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Spinner Loader */
.spinner {
    border: 4px solid rgba(0, 0, 0, 0.05);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border-left-color: var(--accent);
    animation: spin 1s linear infinite;
    margin: 3rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive splits */
@media (min-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.75rem;
    }
    
    .quiz-list-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .comprehension-split {
        flex-direction: row;
        align-items: stretch;
    }
    
    .passage-panel {
        flex: 1;
        max-height: 520px;
        overflow-y: auto;
    }
    
    .question-card-wrapper {
        flex: 1.25;
    }
    
    #app {
        padding: 3rem 1.5rem;
    }
}

@media (min-width: 992px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    .quiz-list-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.75rem;
    }
}

/* Maintenance Bypass Bar */
.maintenance-bypass-bar {
    background: linear-gradient(135deg, #7c3aed 0%, #3b82f6 100%);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.15);
    z-index: 1000;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.maintenance-bypass-bar .bypass-content {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    line-height: 1.5;
}

.maintenance-bypass-bar .bypass-content i {
    font-size: 1.1rem;
    animation: wrench-wiggle 3s infinite ease-in-out;
}

.maintenance-bypass-bar .bypass-admin-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 0.4rem 0.9rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.maintenance-bypass-bar .bypass-admin-btn:hover {
    background: #ffffff;
    color: #7c3aed;
    border-color: #ffffff;
    transform: translateY(-1px);
}

@keyframes wrench-wiggle {
    0%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(-12deg); }
    20%, 40% { transform: rotate(12deg); }
    50% { transform: rotate(0deg); }
}

@media (max-width: 767px) {
    .maintenance-bypass-bar {
        flex-direction: column;
        text-align: center;
        padding: 0.9rem 1rem;
    }
    .maintenance-bypass-bar .bypass-content {
        flex-direction: column;
        gap: 0.4rem;
    }
}

/* Transition Animations for Automatic Question Switching */
@keyframes slideOutLeft {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(-80px); opacity: 0; }
}
@keyframes slideInRight {
    from { transform: translateX(80px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
.slide-out-left {
    animation: slideOutLeft 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}
.slide-in-right {
    animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

/* Student Dashboard & Analytics Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.dashboard-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: var(--card-shadow);
}

.main-stats-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    text-align: center;
}

/* Circular SVG Progress Ring */
.progress-ring-container {
    position: relative;
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-ring-bar {
    transition: stroke-dashoffset 0.6s ease-in-out;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.progress-ring-text {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.progress-ring-text .pct {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    font-family: var(--font-en);
    line-height: 1;
}

.progress-ring-text .lbl {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-top: 0.2rem;
}

.simple-progress-details {
    width: 100%;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 1rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.detail-row strong {
    color: var(--text-primary);
    font-family: var(--font-en);
}

/* Mini Cards Grid */
.dashboard-secondary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stat-mini-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-mini-card:hover {
    transform: translateY(-3px);
    background: white;
    box-shadow: 0 15px 35px -10px rgba(15, 23, 42, 0.08);
}

.stat-mini-card .icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 1rem;
    font-size: 1.4rem;
    transition: transform 0.25s ease;
}

.stat-mini-card:hover .icon {
    transform: scale(1.1) rotate(5deg);
}

.stat-mini-card .icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 0.9rem;
    font-size: 1.25rem;
}

.stat-mini-card .info {
    display: flex;
    flex-direction: column;
}

.stat-mini-card .info .value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    font-family: var(--font-en);
    line-height: 1.1;
}

.stat-mini-card .info .label {
    font-size: 0.76rem;
    color: var(--text-secondary);
    font-weight: 700;
    margin-top: 0.15rem;
}

/* Vertical learning timeline */
.timeline-section {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 1.5rem;
    padding: 2.25rem 2rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 0;
}

.timeline-wrapper {
    position: relative;
    padding-right: 2rem;
    border-right: 3px solid rgba(124, 58, 237, 0.1);
    margin-right: 0.5rem;
}

.timeline-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: -3px;
    width: 3px;
    background: linear-gradient(to bottom, var(--accent) 0%, #3b82f6 100%);
    opacity: 0.35;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    right: -2.4rem;
    top: 0.15rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 3px solid var(--accent);
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.4);
    z-index: 5;
    transition: all 0.25s ease;
}

.timeline-item:hover .timeline-dot {
    background: var(--accent);
    transform: scale(1.2);
}

.timeline-content {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--glass-border);
    padding: 1.25rem;
    border-radius: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    transition: all 0.25s ease;
}

.timeline-content:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: var(--accent);
}

.timeline-info h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.timeline-info .date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-family: var(--font-en);
}

.timeline-info .cat-badge {
    background: var(--accent-glow);
    color: var(--accent);
    border: 1px solid rgba(124, 58, 237, 0.15);
    padding: 0.15rem 0.6rem;
    border-radius: 2rem;
    font-size: 0.72rem;
    font-weight: 700;
    margin-right: 0.5rem;
}

.timeline-score {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.timeline-score .score-pct {
    font-size: 1.25rem;
    font-weight: 800;
    font-family: var(--font-en);
}

.timeline-score .score-raw {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 700;
    font-family: var(--font-en);
    background: rgba(0, 0, 0, 0.03);
    padding: 0.2rem 0.5rem;
    border-radius: 0.5rem;
}

.timeline-score .review-icon-btn {
    background: rgba(124, 58, 237, 0.05) !important;
    border: 1px solid rgba(124, 58, 237, 0.1) !important;
    color: var(--accent) !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    padding: 0.35rem 0.65rem !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.timeline-score .review-icon-btn:hover {
    background: var(--accent) !important;
    color: #ffffff !important;
    border-color: var(--accent) !important;
    transform: translateY(-1.5px) !important;
}

/* Quiz Review Mode (Review answers & explanations) */
.review-filters {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--glass-border);
    padding: 0.4rem;
    border-radius: 1rem;
    display: inline-flex;
    margin: 0 auto;
}

.filter-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.filter-btn.active {
    background: #ffffff;
    color: var(--accent);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.review-questions-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.review-q-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 1.75rem;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: fadeIn 0.4s ease forwards;
}

.review-q-card.hidden {
    display: none !important;
}

.review-q-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.75rem;
}

.review-q-meta .status-pill {
    padding: 0.25rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.78rem;
    font-weight: 700;
}

.review-q-meta .status-pill.correct {
    background: var(--success-glow);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.review-q-meta .status-pill.incorrect {
    background: var(--danger-glow);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Responsive Splits for Dashboard */
@media (min-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1.5fr;
        gap: 2rem;
    }
    
    .dashboard-secondary-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

/* Premium Auth Methods Tabs */
.auth-tabs {
    display: flex;
    background: rgba(15, 23, 42, 0.05);
    border-radius: 0.75rem;
    padding: 0.35rem;
    gap: 0.25rem;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.auth-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.65rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.auth-tab-btn:hover {
    color: var(--text-primary);
}

.auth-tab-btn.active {
    background: white;
    color: var(--accent);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

/* Google Sign-in Custom styling */
.google-login-section, .google-register-section {
    width: 100%;
}

.auth-divider span {
    font-weight: 600;
}

/* Glassmorphic Verification Warning Banner */
.glass-banner {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px 0 rgba(245, 158, 11, 0.06);
    animation: slideInDown 0.4s ease-out forwards;
}

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

.banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.banner-content .warning-icon {
    font-size: 1.8rem;
    color: var(--warning);
}

.banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    line-height: 1.5;
}

.banner-text strong {
    font-size: 0.98rem;
    color: #78350f;
}

.banner-text span {
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.banner-action-btn {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    color: white;
    border: none;
    padding: 0.55rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
    transition: all 0.2s;
    white-space: nowrap;
}

.banner-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.3);
}

@media (max-width: 576px) {
    .banner-content {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .banner-action-btn {
        width: 100%;
        text-align: center;
    }
}

/* Smart Study Planner Styles */
.planner-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.planner-opt-card {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 1.25rem;
    padding: 1.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.planner-opt-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    transition: background-color 0.2s;
}

.planner-opt-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    background: white;
    box-shadow: 0 20px 40px -15px rgba(124, 58, 237, 0.15);
}

.planner-opt-card:hover::after {
    background: linear-gradient(to right, var(--accent), #3b82f6);
}

.planner-opt-card .plan-icon {
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
}

.planner-opt-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.planner-opt-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

/* Day Cards Grid */
.calendar-days-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.planner-day-card {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 1.25rem;
    padding: 1.75rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    box-shadow: var(--glass-shadow);
}

.planner-day-card.active-day {
    border: 2px solid var(--accent);
    background: white;
    box-shadow: 0 15px 35px -10px rgba(124, 58, 237, 0.08);
}

.planner-day-card.completed-day {
    border-color: rgba(16, 185, 129, 0.25);
    background: rgba(16, 185, 129, 0.02);
}

.day-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 700;
}

/* Planner Quiz Items */
.planner-quiz-item {
    background: white;
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    padding: 0.9rem 1.25rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.planner-quiz-item:last-child {
    margin-bottom: 0;
}

.planner-quiz-item:hover {
    border-color: var(--accent);
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.planner-quiz-item.solved {
    background: rgba(16, 185, 129, 0.02);
    border-color: rgba(16, 185, 129, 0.1);
}

.planner-quiz-item.solved:hover {
    border-color: var(--success);
}

.badge-cat-mini {
    font-size: 0.72rem;
    background: rgba(124, 58, 237, 0.06);
    color: var(--accent);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    margin-right: 0.5rem;
    font-weight: 700;
}

.retake-plan-quiz-btn {
    background: rgba(124, 58, 237, 0.08) !important;
    color: var(--accent) !important;
    border: 1px solid rgba(124, 58, 237, 0.2) !important;
    padding: 0.3rem 0.75rem !important;
    border-radius: 6px !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.3rem !important;
}

.retake-plan-quiz-btn:hover {
    background: var(--accent) !important;
    color: white !important;
    border-color: var(--accent) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 10px rgba(124, 58, 237, 0.2) !important;
}

.btn-outline-pink {
    color: #ec4899 !important;
    border-color: rgba(236, 72, 153, 0.3) !important;
}

.btn-outline-pink:hover {
    background: rgba(236, 72, 153, 0.08) !important;
    border-color: #ec4899 !important;
}

/* Premium Soft Designed Tip Banner */
.premium-tip-banner {
    background: #ffffff;
    border: 1px solid rgba(124, 58, 237, 0.08);
    border-right: 5px solid var(--accent) !important;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.premium-tip-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -10px rgba(124, 58, 237, 0.08) !important;
}

/* Custom Flex Layout that is 100% robust and clean in RTL */
.tip-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.75rem;
    gap: 1.5rem;
}

.tip-banner-text-side {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-grow: 1;
}

.tip-icon-glow {
    width: 48px;
    height: 48px;
    background: rgba(245, 158, 11, 0.08);
    color: #f59e0b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.08);
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% { transform: scale(0.98); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.2); }
    70% { transform: scale(1.02); box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
    100% { transform: scale(0.98); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.tip-banner-text-wrapper {
    text-align: right;
}

.tip-banner-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.tip-banner-desc {
    font-size: 0.92rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 0;
}

.tip-banner-button-side {
    flex-shrink: 0;
}

.btn-premium-action {
    background: linear-gradient(135deg, var(--accent) 0%, #3b82f6 100%);
    color: #ffffff !important;
    border: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.btn-premium-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -5px rgba(124, 58, 237, 0.35);
}

/* Responsive adjustment for Mobile screens */
@media (max-width: 768px) {
    .tip-banner-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.5rem;
        gap: 1.25rem;
    }
    
    .tip-banner-text-side {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }
    
    .tip-banner-text-wrapper {
        text-align: center;
    }
    
    .tip-banner-button-side {
        width: 100%;
    }
    
    .tip-banner-button-side .btn {
        width: 100%;
        display: block;
    }
}

/* ==========================================================================
   💎 PREMIUM QUIZ ENGINE REDESIGN (Duolingo & Masterclass Inspired)
   ========================================================================== */

/* Dynamic Color Themes for active quiz page */
#quiz-engine-view.theme-blue {
    --theme-color: #0284c7;
    --theme-glow: rgba(2, 132, 199, 0.05);
    --theme-gradient: linear-gradient(135deg, #0284c7 0%, #3b82f6 100%);
    --theme-badge-bg: rgba(2, 132, 199, 0.06);
}

#quiz-engine-view.theme-orange {
    --theme-color: #ea580c;
    --theme-glow: rgba(234, 88, 12, 0.05);
    --theme-gradient: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
    --theme-badge-bg: rgba(234, 88, 12, 0.06);
}

#quiz-engine-view.theme-emerald {
    --theme-color: #059669;
    --theme-glow: rgba(5, 150, 105, 0.05);
    --theme-gradient: linear-gradient(135deg, #059669 0%, #10b981 100%);
    --theme-badge-bg: rgba(5, 150, 105, 0.06);
}

#quiz-engine-view.theme-purple {
    --theme-color: #7c3aed;
    --theme-glow: rgba(124, 58, 237, 0.05);
    --theme-gradient: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
    --theme-badge-bg: rgba(124, 58, 237, 0.06);
}

#quiz-engine-view.theme-rose {
    --theme-color: #db2777;
    --theme-glow: rgba(219, 39, 119, 0.05);
    --theme-gradient: linear-gradient(135deg, #db2777 0%, #f43f5e 100%);
    --theme-badge-bg: rgba(219, 39, 119, 0.06);
}

/* Glassmorphic Active Quiz Header */
#quiz-engine-view .quiz-header {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(124, 58, 237, 0.08) !important;
    box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.04) !important;
    border-radius: 1.25rem !important;
    transition: all 0.3s ease;
}

.quiz-header-icon {
    background: var(--theme-badge-bg, rgba(124, 58, 237, 0.06)) !important;
    color: var(--theme-color, var(--accent)) !important;
}

/* Dynamic Progress Notches */
.progress-notches {
    display: flex;
    gap: 5px;
    width: 100%;
    margin-bottom: 1.75rem;
    align-items: center;
}

.notch {
    flex: 1;
    height: 7px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 99px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notch.active {
    background: var(--theme-color, var(--accent)) !important;
    box-shadow: 0 0 12px var(--theme-glow, rgba(124, 58, 237, 0.4));
    flex: 1.6; /* beautiful responsive width expansion! */
}

.notch.correct {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

.notch.incorrect {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.2);
}

/* Glowing Countdown Timer */
.timer-pill {
    font-family: var(--font-en);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 2rem !important;
    padding: 0.5rem 1.1rem !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.03) !important;
}

.timer-pill.warning {
    background: rgba(245, 158, 11, 0.08) !important;
    color: var(--warning) !important;
    border-color: rgba(245, 158, 11, 0.2) !important;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.1) !important;
}

.timer-pill.danger {
    background: rgba(239, 68, 68, 0.1) !important;
    color: var(--danger) !important;
    border-color: rgba(239, 68, 68, 0.2) !important;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.2) !important;
    animation: timerPulse 0.8s infinite alternate !important;
}

@keyframes timerPulse {
    from { transform: scale(1); }
    to { transform: scale(1.05); }
}

/* Volume Toggle Button */
.audio-toggle-btn {
    transition: all 0.2s ease;
}

.audio-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.08) !important;
    transform: scale(1.08);
}

/* Frosted Glass Question Card */
.question-card {
    background: #ffffff !important;
    border: 1px solid rgba(124, 58, 237, 0.07) !important;
    border-radius: 1.75rem !important;
    padding: 2.5rem !important;
    box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.035) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.question-card:hover {
    border-color: var(--theme-color, rgba(124, 58, 237, 0.12)) !important;
    box-shadow: 0 25px 50px -12px var(--theme-glow, rgba(124, 58, 237, 0.06)) !important;
}

/* Clean corner report button */
.report-btn {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.15);
    color: #d97706;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    z-index: 10;
}

.report-btn:hover {
    background: #d97706;
    color: #ffffff;
    border-color: #d97706;
    transform: rotate(15deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.2);
}

/* Premium Soft Option Buttons */
.option-btn {
    width: 100%;
    background: #ffffff !important;
    border: 1px solid rgba(124, 58, 237, 0.08) !important;
    color: var(--text-primary) !important;
    padding: 1.15rem 1.4rem !important;
    border-radius: 1.15rem !important;
    font-size: 1.05rem !important;
    font-weight: 500 !important;
    text-align: right !important;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 18px -4px rgba(15, 23, 42, 0.03) !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    outline: none;
    position: relative;
    overflow: hidden;
}

.option-btn:hover:not(:disabled) {
    background: #ffffff !important;
    border-color: var(--theme-color, var(--accent)) !important;
    transform: translateY(-2px) scale(1.01) !important;
    box-shadow: 0 12px 24px -10px var(--theme-glow, rgba(124, 58, 237, 0.12)) !important;
}

.option-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.98) !important;
    box-shadow: 0 4px 10px -4px var(--theme-glow, rgba(124, 58, 237, 0.05)) !important;
}

.option-btn:focus,
.option-btn:focus-visible {
    outline: none !important;
    box-shadow: 0 4px 18px -4px rgba(15, 23, 42, 0.03) !important;
    border-color: rgba(124, 58, 237, 0.1) !important;
}

/* Elegant Alphabet badges (أ، ب، ج، د) */
.option-badge {
    width: 36px;
    height: 36px;
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.option-btn:hover:not(:disabled) .option-badge {
    background: var(--theme-badge-bg, rgba(124, 58, 237, 0.08));
    color: var(--theme-color, var(--accent));
    border-color: var(--theme-color, var(--accent));
    transform: scale(1.08);
}

.option-text {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Gamified Incorrect and Correct Answer States */
.option-btn.correct {
    background: #f0fdf4 !important;
    border-color: #10b981 !important;
    color: #14532d !important;
    box-shadow: 0 10px 20px -8px rgba(16, 185, 129, 0.2) !important;
}

.option-btn.correct .option-badge {
    background: #10b981 !important;
    color: #ffffff !important;
    border-color: #10b981 !important;
}

.option-btn.incorrect {
    background: #fef2f2 !important;
    border-color: #ef4444 !important;
    color: #7f1d1d !important;
    box-shadow: 0 10px 20px -8px rgba(239, 68, 68, 0.2) !important;
    animation: shakeOption 0.3s cubic-bezier(.36,.07,.19,.97) both !important;
}

.option-btn.incorrect .option-badge {
    background: #ef4444 !important;
    color: #ffffff !important;
    border-color: #ef4444 !important;
}

@keyframes shakeOption {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* Clean Action/Next Pill Button */
.action-btn {
    background: var(--theme-gradient, linear-gradient(135deg, var(--accent) 0%, #3b82f6 100%)) !important;
    font-family: var(--font-ar);
    color: #ffffff !important;
    font-weight: 700 !important;
    padding: 0.95rem 2.8rem !important;
    border-radius: 99px !important;
    font-size: 1.05rem !important;
    border: none !important;
    box-shadow: 0 10px 25px -5px var(--theme-glow, rgba(124, 58, 237, 0.35)) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer;
}

.action-btn:hover {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 15px 30px -5px var(--theme-glow, rgba(124, 58, 237, 0.5)) !important;
}

.action-btn:active {
    transform: translateY(0) scale(0.98) !important;
}

/* Option feedback icon indicators */
.indicator {
    display: none !important; /* Hide completely by default */
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    width: 28px;
    height: 28px;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: scale(0.5);
}

.option-btn.correct .indicator {
    display: flex !important; /* Show on correct */
    opacity: 1;
    transform: scale(1);
    color: var(--success) !important;
}

.option-btn.incorrect .indicator {
    display: flex !important; /* Show on incorrect */
    opacity: 1;
    transform: scale(1);
    color: var(--danger) !important;
}

/* Premium Explanation Lightbulb Card */
.explanation-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.03) 0%, rgba(245, 158, 11, 0.06) 100%) !important;
    border: 1px solid rgba(245, 158, 11, 0.12) !important;
    border-right: 4px solid #f59e0b !important;
    border-radius: 1.25rem !important;
    padding: 1.5rem 1.75rem !important;
    color: #451a03 !important;
    box-shadow: 0 10px 30px -10px rgba(245, 158, 11, 0.08) !important;
    margin-top: 1.75rem !important;
    animation: slideUpExplanation 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

/* Responsive adjustment for Mobile screens for Option Buttons grid */
@media (max-width: 576px) {
    .question-card {
        padding: 1.5rem !important;
        border-radius: 1.25rem !important;
    }
    
    .option-btn {
        padding: 1rem 1.15rem !important;
        font-size: 0.98rem !important;
    }
    
    .option-badge {
        width: 32px;
        height: 32px;
    }
}

/* ==========================================================================
   PREMIUM GAMIFICATION & INTERACTIVE STYLES
   ========================================================================== */

/* Floating Streak Reward Badge (3x or 4x correct streak) */
.streak-reward-badge {
    position: fixed;
    top: 15%;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    background: linear-gradient(135deg, #7c3aed 0%, #3b82f6 100%);
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 1.25rem;
    padding: 1.1rem 2.2rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    box-shadow: 0 25px 50px -12px rgba(124, 58, 237, 0.45);
    z-index: 10000;
    color: #ffffff;
    direction: rtl;
    text-align: right;
    min-width: 300px;
    backdrop-filter: blur(10px);
}

.streak-emoji {
    font-size: 2.5rem;
    animation: bounceEmoji 0.6s infinite alternate cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.streak-details {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.streak-details strong {
    font-family: var(--font-ar);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.streak-details span {
    font-family: var(--font-ar);
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.95;
}

/* Motivational Short Toast for Mistakes */
.motivational-toast {
    position: fixed;
    bottom: 12%;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 99px;
    padding: 0.85rem 1.85rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.4);
    z-index: 10000;
    color: #ffffff;
    direction: rtl;
    text-align: right;
    white-space: nowrap;
}

.motivational-emoji {
    font-size: 1.5rem;
}

.motivational-text {
    font-family: var(--font-ar);
    font-size: 0.95rem;
    font-weight: 700;
}

/* Animations for Streak and Toast overlays */
.animate-streak {
    animation: slideDownIn 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.animate-motivational {
    animation: slideUpIn 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.fade-out {
    opacity: 0 !important;
    transform: translateX(-50%) translateY(-25px) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

@keyframes slideDownIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-60px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes slideUpIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes bounceEmoji {
    from { transform: scale(1); }
    to { transform: scale(1.2); }
}

/* Localized Emoji Burst Particles */
.emoji-particle {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    font-size: 1.65rem;
    animation: explodeParticle 1.1s cubic-bezier(0.1, 0.8, 0.25, 1) forwards;
}

@keyframes explodeParticle {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--x-dist), var(--y-dist)) scale(0.2);
        opacity: 0;
    }
}

/* ==========================================
   Premium Responsive Student Dashboard Styling
   ========================================== */

/* Glassmorphism Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(124, 58, 237, 0.08) !important;
    box-shadow: 0 10px 30px -8px rgba(15, 23, 42, 0.04) !important;
}

/* Category Performance Analysis Styles */
.performance-section {
    background: #ffffff;
    border: 1px solid rgba(124, 58, 237, 0.06);
    border-radius: 1.5rem;
    padding: 1.8rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px -8px rgba(15, 23, 42, 0.03);
}

.perf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.perf-card {
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.03);
    border-radius: 1.25rem;
    padding: 1.25rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.perf-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: var(--theme-color, var(--accent));
}

.perf-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px -6px rgba(15, 23, 42, 0.06);
    background: #ffffff;
}

.perf-card.theme-blue { --theme-color: #2563eb; --theme-bg: rgba(37, 99, 235, 0.05); }
.perf-card.theme-orange { --theme-color: #d97706; --theme-bg: rgba(217, 119, 6, 0.05); }
.perf-card.theme-emerald { --theme-color: #059669; --theme-bg: rgba(5, 150, 105, 0.05); }
.perf-card.theme-purple { --theme-color: #7c3aed; --theme-bg: rgba(124, 58, 237, 0.05); }
.perf-card.theme-rose { --theme-color: #db2777; --theme-bg: rgba(219, 39, 119, 0.05); }

.perf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.perf-header h5 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.perf-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--theme-bg);
    color: var(--theme-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.perf-stats {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 0.2rem;
}

.perf-solved-label {
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.perf-score-val {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--theme-color);
    font-variant-numeric: tabular-nums;
}

.perf-progress-wrapper {
    margin-top: 0.4rem;
}

.perf-progress-bg {
    height: 6px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
    display: flex;
}

.perf-progress-fill {
    height: 100%;
    background: var(--theme-color);
    border-radius: 99px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.perf-footer-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    font-weight: 700;
    color: #64748b;
    margin-top: 0.15rem;
}

/* Enhanced Planner Day Card Styling */
.planner-day-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 1.25rem;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px -3px rgba(15, 23, 42, 0.01);
}

.planner-day-card.active-day {
    border-color: rgba(124, 58, 237, 0.3) !important;
    background: linear-gradient(to left, rgba(124, 58, 237, 0.01), #ffffff) !important;
    box-shadow: 0 10px 25px -5px rgba(124, 58, 237, 0.06), 0 0 0 1px rgba(124, 58, 237, 0.05) !important;
    position: relative;
}

.planner-day-card.active-day::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 100%;
    background: var(--accent);
    border-top-right-radius: 1.25rem;
    border-bottom-right-radius: 1.25rem;
}

.planner-day-card.completed-day {
    border-color: rgba(16, 185, 129, 0.15) !important;
    background: linear-gradient(to left, rgba(16, 185, 129, 0.015), #ffffff) !important;
}

.planner-quiz-item {
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.planner-quiz-item:hover {
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
    border-color: var(--accent) !important;
}

.planner-quiz-item.solved:hover {
    border-color: rgba(16, 185, 129, 0.3) !important;
}

.retake-plan-quiz-btn {
    background: transparent;
    border: 1px solid rgba(124, 58, 237, 0.15);
    color: var(--accent);
    padding: 0.25rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.retake-plan-quiz-btn:hover {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

/* Enhanced Study Plan Wizard Card Option */
.planner-opt-card:hover, .custom-plan-card:hover {
    border-color: var(--accent) !important;
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -8px rgba(124, 58, 237, 0.1);
}

/* ==========================================
   Premium Horizon Slider Study Planner CSS
   ========================================== */

.planner-days-slider-container {
    display: flex;
    align-items: center;
    position: relative;
    padding: 0.5rem 2.2rem;
    background: rgba(248, 250, 252, 0.6);
    border: 1px solid rgba(124, 58, 237, 0.05);
    border-radius: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.02);
}

.planner-days-slider {
    display: flex;
    gap: 2.2rem;
    align-items: center;
    overflow-x: auto;
    padding: 1.5rem 1rem;
    width: 100%;
    scroll-behavior: smooth;
    -ms-overflow-style: none !important;  /* IE and Edge */
    scrollbar-width: none !important;  /* Firefox */
    position: relative;
}

.planner-days-slider::-webkit-scrollbar {
    display: none !important; /* Chrome, Safari and Opera */
}

/* Beautiful Connecting Roadmap Line */
.planner-days-slider::before {
    content: '';
    position: absolute;
    top: calc(50% - 13px);
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, rgba(124, 58, 237, 0.03) 0%, rgba(124, 58, 237, 0.18) 50%, rgba(124, 58, 237, 0.03) 100%);
    border-radius: 2px;
    z-index: 0;
}

/* Elegant Floating Navigation Arrows */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #ffffff !important;
    border: 1.5px solid rgba(124, 58, 237, 0.18) !important;
    color: var(--accent) !important;
    width: 38px;
    height: 38px;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px -4px rgba(124, 58, 237, 0.2) !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    z-index: 10;
}

.slider-arrow:hover {
    background: var(--accent) !important;
    color: #ffffff !important;
    border-color: var(--accent) !important;
    transform: translateY(-50%) scale(1.12) !important;
    box-shadow: 0 8px 24px -4px rgba(124, 58, 237, 0.4) !important;
}

.prev-arrow {
    right: 10px;
}

.next-arrow {
    left: 10px;
}

/* Day Node Design (Gamified Duolingo Bubble) */
.planner-day-node {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1; /* Keep bubble on top of the roadmap line */
    position: relative;
    user-select: none;
}

.planner-day-node .node-circle {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 3.5px solid #e2e8f0;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: 800;
    color: #64748b;
    box-shadow: 0 6px 15px -3px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.planner-day-node .node-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    white-space: nowrap;
    transition: all 0.3s ease;
}

/* States */
/* 1. Completed State */
.planner-day-node.completed .node-circle {
    border-color: #10b981;
    background: #ecfdf5;
    color: #059669;
}
.planner-day-node.completed .node-label {
    color: #059669;
}

/* 2. Active/Today State */
.planner-day-node.active-today .node-circle {
    border-color: #f59e0b;
    background: #fffbeb;
    color: #d97706;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15), 0 8px 20px -4px rgba(245, 158, 11, 0.25);
    animation: pulseActiveDayNode 2s infinite ease-in-out;
}
.planner-day-node.active-today .node-label {
    color: #d97706;
    font-weight: 800;
}

@keyframes pulseActiveDayNode {
    0% { box-shadow: 0 0 0 0px rgba(245, 158, 11, 0.25), 0 8px 20px -4px rgba(245, 158, 11, 0.25); }
    70% { box-shadow: 0 0 0 7px rgba(245, 158, 11, 0), 0 8px 20px -4px rgba(245, 158, 11, 0.25); }
    100% { box-shadow: 0 0 0 0px rgba(245, 158, 11, 0), 0 8px 20px -4px rgba(245, 158, 11, 0.25); }
}

/* 3. Selected/Clicked State */
.planner-day-node.selected {
    transform: scale(1.1);
}
.planner-day-node.selected .node-circle {
    border-color: var(--accent);
    background: #f5f3ff;
    color: var(--accent);
    box-shadow: 0 10px 25px -6px rgba(124, 58, 237, 0.25);
}
.planner-day-node.selected .node-label {
    color: var(--accent);
    font-weight: 800;
}

/* Details Card Animation and UI */
.planner-day-details-card {
    background: #ffffff;
    border: 1px solid rgba(124, 58, 237, 0.08);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 10px 30px -8px rgba(15, 23, 42, 0.04);
    animation: plannerDetailsSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Study Planner Setup Wizard styles */
.planner-speed-card, .planner-shuffle-card {
    position: relative; /* Anchor for CSS checkmark badge */
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 1.25rem !important;
}

/* Sibling dimming to draw attention to selection */
.planner-speed-card:not(.active), .planner-shuffle-card:not(.active) {
    opacity: 0.75;
    box-shadow: none !important;
}

.planner-speed-card:not(.active):hover, .planner-shuffle-card:not(.active):hover {
    opacity: 1;
    border-color: rgba(124, 58, 237, 0.25) !important;
    transform: translateY(-4px);
    box-shadow: 0 10px 20px -8px rgba(0, 0, 0, 0.06) !important;
}

/* Glowing selection visual design */
.planner-speed-card.active, .planner-shuffle-card.active {
    border: 2px solid var(--accent) !important;
    background: linear-gradient(185deg, #ffffff 0%, rgba(124, 58, 237, 0.03) 100%) !important;
    box-shadow: 0 15px 30px -8px rgba(124, 58, 237, 0.22) !important;
    transform: translateY(-4px) !important;
    opacity: 1 !important;
}

/* Beautiful CSS Checkmark Badge */
.planner-speed-card.active::after, .planner-shuffle-card.active::after {
    content: "\f00c"; /* FontAwesome Check character */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 12px;
    left: 12px; /* Top left corner in RTL */
    width: 22px;
    height: 22px;
    background: var(--accent);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    z-index: 3;
    box-shadow: 0 4px 10px rgba(124, 58, 237, 0.35);
    animation: badgePop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes badgePop {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.planner-speed-card input#custom-quizzes-val {
    border-radius: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-weight: 700;
}

/* Countdown Timer Styles & Premium Redesign */
.planner-countdown-card {
    transition: all 0.3s ease;
    animation: borderGlowPulse 4s infinite alternate ease-in-out;
}

@keyframes borderGlowPulse {
    0% {
        border-color: rgba(124, 58, 237, 0.15) !important;
        box-shadow: 0 10px 25px -5px rgba(124, 58, 237, 0.06);
    }
    100% {
        border-color: rgba(236, 72, 153, 0.25) !important;
        box-shadow: 0 10px 30px -3px rgba(236, 72, 153, 0.1);
    }
}

.achievements-countdown-card-dynamic {
    transition: all 0.3s ease;
    animation: borderGlowPulseAchievements 5s infinite alternate ease-in-out;
}

@keyframes borderGlowPulseAchievements {
    0% {
        border-color: rgba(124, 58, 237, 0.2) !important;
        box-shadow: 0 10px 30px -5px rgba(124, 58, 237, 0.08), inset 0 0 16px rgba(124, 58, 237, 0.02);
    }
    100% {
        border-color: rgba(59, 130, 246, 0.3) !important;
        box-shadow: 0 12px 35px -3px rgba(59, 130, 246, 0.12), inset 0 0 20px rgba(59, 130, 246, 0.03);
    }
}

.countdown-unit-box {
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s ease;
    border-radius: 14px !important;
    position: relative;
    overflow: hidden;
}

.countdown-unit-box:hover {
    transform: translateY(-3px) scale(1.03);
}

/* Elegant Soft Minimalist Countdown box designs */
.countdown-box-days {
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-top: 3.5px solid #f97316 !important;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.04) !important;
}
.countdown-box-days:hover {
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.08) !important;
}

.countdown-box-hours {
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-top: 3.5px solid #8b5cf6 !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.04) !important;
}
.countdown-box-hours:hover {
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.08) !important;
}

.countdown-box-minutes {
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-top: 3.5px solid #3b82f6 !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.04) !important;
}
.countdown-box-minutes:hover {
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.08) !important;
}

.countdown-box-seconds {
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-top: 3.5px solid #ec4899 !important;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.04) !important;
    animation: countdownSoftBreathing 1.8s infinite alternate ease-in-out;
}
.countdown-box-seconds:hover {
    box-shadow: 0 8px 22px rgba(236, 72, 153, 0.12) !important;
}

@keyframes countdownSoftBreathing {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(236, 72, 153, 0.03) !important;
        border-top-color: rgba(236, 72, 153, 0.8) !important;
    }
    100% {
        transform: scale(1.03);
        box-shadow: 0 6px 18px rgba(236, 72, 153, 0.1) !important;
        border-top-color: rgba(236, 72, 153, 1) !important;
    }
}

/* Highly premium custom reset button */
.btn-countdown-reset {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    width: auto !important;
    background: rgba(239, 68, 68, 0.08) !important;
    color: #dc2626 !important;
    border: 1px solid rgba(239, 68, 68, 0.18) !important;
    padding: 0.35rem 0.85rem !important;
    border-radius: 20px !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    box-shadow: none !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    text-decoration: none !important;
    height: auto !important;
    line-height: 1 !important;
}

.btn-countdown-reset:hover {
    background: #dc2626 !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
    transform: translateY(-1.5px) !important;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25) !important;
}

.btn-countdown-reset:active {
    transform: translateY(0) !important;
}

/* CSS reset specifically for btn-link and other leakages */
.btn-link {
    width: auto !important;
    background: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    display: inline-flex !important;
    color: inherit !important;
}
.btn-link:hover {
    background: none !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Floating Support Button & Modal Styling */
#floating-support-btn {
    position: fixed;
    bottom: 25px;
    left: 25px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
    cursor: pointer;
    z-index: 1050; /* slightly higher to overlay other absolute layouts */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#floating-support-btn:hover {
    transform: scale(1.1) rotate(8deg);
    box-shadow: 0 15px 30px -5px rgba(37, 99, 235, 0.6);
}

.support-badge-pulse {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background-color: #10b981;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: supportPulse 2s infinite;
}

@keyframes supportPulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Chat timeline styling in support ticket history */
.ticket-card-item {
    background: rgba(248, 250, 252, 0.85);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    position: relative;
    transition: all 0.25s ease;
}

.ticket-card-item:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.02);
}

.ticket-status-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 0.72rem;
    font-weight: 700;
}

.ticket-timestamp {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
    font-family: 'Outfit', sans-serif;
}

.ticket-message-text {
    font-size: 0.92rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.6;
    white-space: pre-line;
}

.ticket-reply-box {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px dashed rgba(226, 232, 240, 0.8);
    background: rgba(239, 246, 255, 0.6);
    border-radius: 8px;
    padding: 0.85rem;
}

.ticket-reply-box .reply-header {
    font-size: 0.75rem;
    font-weight: 800;
    color: #2563eb;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.ticket-reply-box .reply-text {
    font-size: 0.88rem;
    font-weight: 500;
    color: #334155;
    line-height: 1.5;
    white-space: pre-line;
}

/* ==========================================================================
   MODAL LAYERING & Z-INDEX FIXES
   ========================================================================== */

/* Ensure the fixed header is layered below the modal backdrops */
header, .navbar.sticky-top {
    z-index: 1000 !important;
}

/* Ensure all modals sit cleanly on top of the header and backdrops */
.modal {
    z-index: 1060 !important;
}

/* Ensure Bootstrap modal backdrops dim the header correctly */
.modal-backdrop {
    z-index: 1050 !important;
}

/* Position floating support button below the modal backdrops so it gets dimmed */
#floating-support-btn {
    z-index: 999 !important; /* Higher than content but below header and modal backdrop */
}

/* ==========================================================================
   PREMIUM THREADED SUPPORT CHAT SYSTEM STYLES
   ========================================================================== */

/* Active support grid structure */
#dashboard-support-tab {
    animation: fadeIn 0.35s ease;
}

/* Thread Item Card */
.db-ticket-item {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(124, 58, 237, 0.06);
    border-radius: 14px;
    padding: 1.1rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-align: right;
}

.db-ticket-item:hover {
    transform: translateY(-2px);
    background: #ffffff;
    box-shadow: 0 10px 20px -5px rgba(15, 23, 42, 0.05);
    border-color: rgba(124, 58, 237, 0.2);
}

.db-ticket-item.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.04) 0%, rgba(124, 58, 237, 0.04) 100%);
    border-color: var(--accent) !important;
    box-shadow: 0 8px 16px -4px rgba(124, 58, 237, 0.1);
}

.db-ticket-item::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: transparent;
    transition: all 0.25s;
}

.db-ticket-item.active::before {
    background: var(--accent);
}

/* Chat bubble aesthetics */
.db-chat-msg-wrapper {
    display: flex;
    flex-direction: column;
    max-width: 75%;
    margin-bottom: 0.25rem;
}

.db-chat-msg-wrapper.student {
    align-self: flex-start; /* Student is right-aligned in RTL */
}

.db-chat-msg-wrapper.admin {
    align-self: flex-end; /* Admin is left-aligned in RTL */
}

.db-chat-bubble {
    padding: 0.95rem 1.25rem;
    border-radius: 18px;
    font-size: 0.92rem;
    font-weight: 550;
    line-height: 1.5;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    text-align: right;
    white-space: pre-wrap;
}

/* Student bubble (Right side/blue/indigo theme) */
.db-chat-msg-wrapper.student .db-chat-bubble {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-top-right-radius: 4px;
}

/* Admin bubble (Left side/violet/purple theme) */
.db-chat-msg-wrapper.admin .db-chat-bubble {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    color: #1e1b4b;
    border-top-left-radius: 4px;
    border: 1px solid rgba(124, 58, 237, 0.08);
}

.db-chat-meta {
    font-size: 0.68rem;
    color: #94a3b8;
    margin-top: 0.35rem;
    font-family: 'Outfit', sans-serif;
}

.db-chat-msg-wrapper.student .db-chat-meta {
    text-align: right;
}

.db-chat-msg-wrapper.admin .db-chat-meta {
    text-align: left;
}

/* Scrollbar customization */
.overflow-y-auto::-webkit-scrollbar {
    width: 6px;
}

.overflow-y-auto::-webkit-scrollbar-track {
    background: transparent;
}

.overflow-y-auto::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Premium Segmented Dashboard Tabs Grid Layout */
.dashboard-tabs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    width: 100%;
    max-width: 960px;
    margin: 0 auto 2.5rem auto;
    direction: rtl;
}

@media (min-width: 576px) {
    .dashboard-tabs-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.65rem;
    }
}

@media (min-width: 992px) {
    .dashboard-tabs-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 0.65rem;
    }
}

.dashboard-tab-btn {
    border: 1px solid rgba(15, 23, 42, 0.05) !important;
    background: rgba(15, 23, 42, 0.03) !important;
    color: #64748b !important; /* slate-500 */
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    padding: 0.75rem 1rem !important;
    border-radius: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    outline: none !important;
    width: 100% !important;
    white-space: nowrap !important;
    box-shadow: none !important;
    transform: none !important;
}

.dashboard-tab-btn:hover {
    color: #1e293b !important;
    background: rgba(255, 255, 255, 0.8) !important;
    border-color: rgba(124, 58, 237, 0.15) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05) !important;
}

.dashboard-tab-btn.active {
    color: #4f46e5 !important; /* elegant indigo */
    background: #ffffff !important;
    border-color: rgba(124, 58, 237, 0.2) !important;
    box-shadow: 0 8px 16px -4px rgba(124, 58, 237, 0.12), 0 2px 4px -1px rgba(124, 58, 237, 0.04) !important;
    transform: translateY(-2px) !important;
}

/* RTL Specific typography */
[dir="rtl"] .dashboard-tab-btn {
    font-family: inherit;
}

/* Premium Notification Center Styles */
.notif-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0.5rem 0.25rem;
    direction: rtl;
}

@media (min-width: 768px) {
    .notif-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.notif-card {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.02), 0 2px 6px -1px rgba(15, 23, 42, 0.01);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px;
    overflow: hidden;
}

/* Beautiful unread glow and side accent */
.notif-card.unread {
    background: linear-gradient(135deg, #ffffff 0%, rgba(99, 102, 241, 0.02) 100%);
    border-color: rgba(99, 102, 241, 0.15);
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.05), 0 4px 12px -2px rgba(99, 102, 241, 0.02);
}

.notif-card.unread::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(to bottom, #6366f1, #4f46e5);
}

/* Card hover animation */
.notif-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 35px -10px rgba(99, 102, 241, 0.12), 0 5px 15px rgba(0, 0, 0, 0.02);
    border-color: rgba(99, 102, 241, 0.3);
}

/* Card Header styles */
.notif-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.notif-card-title-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.notif-card-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #1e293b; /* slate-800 */
    line-height: 1.35;
    margin: 0;
    text-align: right !important;
}

/* Icon wrapper inside card header */
.notif-card-icon-wrapper {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.notif-card.unread .notif-card-icon-wrapper {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(124, 58, 237, 0.12) 100%);
    color: #4f46e5;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.15);
}

.notif-card.read .notif-card-icon-wrapper {
    background: #f8fafc;
    color: #94a3b8;
    border: 1px solid #f1f5f9;
}

/* Body / message text styling */
.notif-card-body {
    flex-grow: 1;
    margin-bottom: 1.25rem;
}

.notif-card-message {
    font-size: 0.82rem;
    line-height: 1.6;
    color: #475569; /* slate-600 */
    font-weight: 550;
    margin: 0;
    text-align: right !important;
}

/* Footer / metadata bar */
.notif-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed #f1f5f9;
    padding-top: 0.85rem;
    margin-top: auto;
}

.notif-card-date {
    font-size: 0.68rem;
    font-weight: 700;
    color: #64748b; /* slate-500 */
    background: #f8fafc;
    padding: 0.25rem 0.65rem;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
    font-family: 'Outfit', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.notif-card.unread .notif-card-date {
    background: rgba(99, 102, 241, 0.03);
    color: #6366f1;
    border-color: rgba(99, 102, 241, 0.08);
}

/* Premium check button */
.notif-card-btn-action {
    font-size: 0.72rem;
    font-weight: 800;
    color: #6366f1;
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.1);
    padding: 0.35rem 0.8rem;
    border-radius: 10px;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    text-decoration: none;
}

.notif-card-btn-action:hover {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
    transform: translateY(-1px);
}

/* Premium Tags */
.notif-tag {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    line-height: 1;
}

.notif-tag-challenge {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(217, 119, 6, 0.12) 100%);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.15);
}

.notif-tag-points {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.12) 100%);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.notif-tag-alert {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(220, 38, 38, 0.12) 100%);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.notif-tag-general {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(37, 99, 235, 0.12) 100%);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

/* Mark All as Read Button */
.btn-notif-mark-all {
    font-size: 0.78rem !important;
    font-weight: 750 !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%) !important;
    border: none !important;
    padding: 0.55rem 1.25rem !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2) !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
}

.btn-notif-mark-all:hover {
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.35) !important;
    transform: translateY(-2px) !important;
    background: linear-gradient(135deg, #4338ca 0%, #2563eb 100%) !important;
}

/* Animated Empty State Notification Bell */
.empty-notif-bell-container {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0 auto 1.2rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-notif-bell-glow {
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, rgba(99, 102, 241, 0) 70%);
    animation: pulseGlow 3s infinite ease-in-out;
}

.empty-notif-bell-icon {
    font-size: 2.6rem;
    color: #6366f1;
    animation: gentleSwing 4.5s infinite ease-in-out;
    transform-origin: top center;
    text-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.3); opacity: 1; }
}

@keyframes gentleSwing {
    0%, 100% { transform: rotate(0deg); }
    20% { transform: rotate(15deg); }
    40% { transform: rotate(-12deg); }
    60% { transform: rotate(8deg); }
    80% { transform: rotate(-5deg); }
}

/* Distraction-Free Fullscreen Quiz Mode */
body.challenge-fullscreen-mode header,
body.challenge-fullscreen-mode footer,
body.challenge-fullscreen-mode .announcement-banner,
body.challenge-fullscreen-mode #verification-warning-banner,
body.challenge-fullscreen-mode #quiz-engine-view .back-btn,
body.challenge-fullscreen-mode #achievements-dashboard-card,
body.challenge-fullscreen-mode .notif-center-widget,
body.challenge-fullscreen-mode #auth-header-container,
body.challenge-fullscreen-mode .user-controls,
body.challenge-fullscreen-mode #floating-support-btn {
    display: none !important;
}

body.challenge-fullscreen-mode #main-content-area {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* ==========================================================================
   SOCIAL CHALLENGES & GAMIFICATION HUB PREMIUM STYLES
   ========================================================================== */

/* Active Friends online indicator pulse glow */
.friend-online-dot {
    width: 10px;
    height: 10px;
    background-color: #10b981;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: friendPulseGlow 1.8s infinite;
}

@keyframes friendPulseGlow {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.friend-offline-dot {
    width: 10px;
    height: 10px;
    background-color: #94a3b8;
    border-radius: 50%;
    display: inline-block;
}

/* Glassmorphic Live Invite Overlay Panel */
.invite-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000 !important;
    animation: inviteFadeIn 0.3s ease;
}

.invite-panel-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    padding: 2.5rem;
    max-width: 480px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 40px rgba(99, 102, 241, 0.15);
    transform: scale(0.9);
    animation: inviteCardPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes inviteFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes inviteCardPop {
    to {
        transform: scale(1);
    }
}

/* Floating Quick Chat Bubbles in challenges */
.chat-bubble-popup {
    position: absolute;
    bottom: 50px;
    right: 15px;
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    color: white;
    padding: 0.6rem 1.1rem;
    border-radius: 20px;
    border-bottom-right-radius: 2px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.25);
    z-index: 100;
    pointer-events: none;
    transform: translateY(20px) scale(0.8);
    opacity: 0;
    animation: chatBubblePop 3.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes chatBubblePop {
    0% {
        transform: translateY(20px) scale(0.8);
        opacity: 0;
    }
    10% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    90% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-20px) scale(0.8);
        opacity: 0;
    }
}

/* Premium dynamic mute switch button styles */
.audio-mute-toggle-btn {
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    background: rgba(255, 255, 255, 0.8) !important;
    color: #475569 !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    padding: 0.4rem 0.8rem !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
}
.audio-mute-toggle-btn:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

/* Predefined Educational Avatar buttons */
.avatar-option-btn {
    border-radius: 14px !important;
    padding: 0.6rem 0.75rem !important;
    font-size: 1.6rem !important;
    background: #ffffff !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    min-width: 70px !important;
    border: 2px solid #e2e8f0 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
}
.avatar-option-btn:hover {
    transform: translateY(-2px) !important;
    border-color: var(--accent) !important;
    background: rgba(99, 102, 241, 0.04) !important;
}
.avatar-option-btn.selected {
    border-color: var(--accent) !important;
    background: rgba(99, 102, 241, 0.08) !important;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.2) !important;
    transform: translateY(-2px) scale(1.03) !important;
}

/* Predefined Educational Avatar preview and custom toggles */
.avatar-preview-container {
    width: 100px;
    height: 100px;
    position: relative;
    margin: 0 auto;
}
.avatar-preview-circle {
    width: 100%;
    height: 100%;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 2.8rem !important;
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.25) !important;
    border: 4px solid #ffffff !important;
    position: relative;
    z-index: 2;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.avatar-preview-glow {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
    filter: blur(10px);
    opacity: 0.45;
    border-radius: 50%;
    z-index: 1;
    animation: settingsGlowPulse 3s infinite alternate;
}
@keyframes settingsGlowPulse {
    0% { transform: scale(0.98); opacity: 0.35; }
    100% { transform: scale(1.05); opacity: 0.55; }
}

.glass-settings-card {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.05) !important;
    border-radius: 24px !important;
    transition: all 0.3s ease !important;
}

.avatar-option-btn {
    border-radius: 16px !important;
    padding: 0.8rem 0.5rem !important;
    font-size: 1.8rem !important;
    background: #ffffff !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    min-width: 80px !important;
    border: 2px solid #e2e8f0 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.01) !important;
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
}

.avatar-option-btn:hover {
    transform: translateY(-4px) !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
    background: rgba(99, 102, 241, 0.02) !important;
    box-shadow: 0 6px 15px rgba(99, 102, 241, 0.08) !important;
}

.avatar-option-btn.selected {
    border-color: #6366f1 !important;
    background: rgba(99, 102, 241, 0.06) !important;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.15) !important;
    transform: translateY(-4px) scale(1.05) !important;
}

.avatar-option-btn span {
    font-size: 0.65rem !important;
    font-weight: 800 !important;
    color: #64748b !important;
    transition: color 0.25s ease !important;
}

.avatar-option-btn.selected span {
    color: #4f46e5 !important;
}

.privacy-option-card {
    border: 2px solid #f1f5f9 !important;
    background: #ffffff !important;
    border-radius: 20px !important;
    padding: 1.25rem !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.01) !important;
}

.privacy-option-card:hover {
    border-color: rgba(99, 102, 241, 0.25) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.04) !important;
}

/* Beautiful live active option glow */
.privacy-option-card:has(.form-check-input:checked) {
    background: linear-gradient(135deg, #ffffff 0%, rgba(99, 102, 241, 0.02) 100%) !important;
    border-color: rgba(99, 102, 241, 0.35) !important;
    box-shadow: 0 12px 25px rgba(99, 102, 241, 0.06) !important;
}

/* Custom premium switch button overrides */
.form-check-input:checked {
    background-color: #6366f1 !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4) !important;
}

.custom-settings-input {
    border-radius: 14px !important;
    font-family: 'Cairo' !important;
    padding: 0.8rem 1.2rem !important;
    border: 2px solid #e2e8f0 !important;
    background: #ffffff !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    transition: all 0.25s ease !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.01) !important;
}

.custom-settings-input:focus {
    border-color: #6366f1 !important;
    background: #ffffff !important;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.08) !important;
    outline: none !important;
}

/* Floating label/icon styling */
.settings-label {
    font-family: 'Cairo' !important;
    font-weight: 800 !important;
    color: #334155 !important;
    font-size: 0.88rem !important;
    margin-bottom: 0.5rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

.settings-btn-primary {
    background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%) !important;
    border: none !important;
    color: white !important;
    font-family: 'Cairo' !important;
    font-weight: 800 !important;
    padding: 0.85rem 2.5rem !important;
    border-radius: 50px !important;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.25) !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.settings-btn-primary:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.4) !important;
}


/* Segmented Control Mode Switcher on Homepage */
.segmented-control {
    background: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border: 1px solid rgba(124, 58, 237, 0.15) !important;
    border-radius: 60px !important;
    padding: 5px !important;
    position: relative !important;
    width: max-content !important;
    max-width: 100% !important;
    display: inline-flex !important;
    box-shadow: 0 10px 30px -5px rgba(124, 58, 237, 0.08) !important;
    transition: all 0.3s ease !important;
}

.segmented-control:hover {
    border-color: rgba(124, 58, 237, 0.25) !important;
    box-shadow: 0 12px 35px -5px rgba(124, 58, 237, 0.12) !important;
}

@media (max-width: 768px) {
    .segmented-control {
        min-width: 100% !important;
        flex-direction: column !important;
        border-radius: 24px !important;
        padding: 8px !important;
    }
    .segmented-indicator {
        display: none !important;
    }
    .segmented-btn {
        width: 100% !important;
        margin-bottom: 4px !important;
    }
}



.segmented-btn {
    border: none !important;
    border-radius: 50px !important;
    font-family: 'Cairo', sans-serif !important;
    font-weight: 800 !important;
    font-size: 0.92rem !important;
    padding: 0.75rem 2rem !important;
    color: #4b5563 !important;
    background: transparent !important;
    transition: all 0.25s ease !important;
    z-index: 2 !important;
    flex: 1 1 0% !important;
    text-align: center !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    white-space: nowrap !important;
}

.segmented-btn:hover:not(.active) {
    color: var(--accent, #7c3aed) !important;
    transform: scale(1.02) !important;
}

.segmented-btn i {
    font-size: 1.05rem !important;
    transition: transform 0.25s ease !important;
}

.segmented-btn:hover i {
    transform: scale(1.15) !important;
}

.segmented-btn.active {
    background: linear-gradient(135deg, var(--accent, #7c3aed) 0%, #3b82f6 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.3) !important;
}

/* Landing Mode Smooth Transition Panels */
.landing-mode-content {
    display: none !important;
    transition: opacity 0.35s ease, transform 0.35s ease !important;
    opacity: 0;
    transform: translateY(10px);
}

.landing-mode-content.active-mode {
    display: block !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Premium Gold Themes and Leaks Card Styles */
.quiz-card.theme-gold {
    --theme-color: #d97706;
    --theme-badge-bg: rgba(245, 158, 11, 0.06);
    --theme-glow: rgba(245, 158, 11, 0.25);
    border: 1.5px solid rgba(245, 158, 11, 0.2) !important;
    background: linear-gradient(135deg, #ffffff 0%, #fefcf6 100%) !important;
}
.quiz-card.theme-gold::before {
    background: linear-gradient(to bottom, #facc15, #d97706) !important;
}
.quiz-card.theme-gold:hover {
    border-color: #facc15 !important;
    box-shadow: 0 15px 30px -10px rgba(245, 158, 11, 0.3) !important;
}

/* Golden Segmented Button Active State */
.segmented-btn.active#btn-mode-leaks {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.35) !important;
    color: #ffffff !important;
}

/* Today's Leak Hero styles */
.premium-locked-hero {
    border: 2px solid rgba(245, 158, 11, 0.35) !important;
    background: linear-gradient(135deg, #ffffff 0%, #fefcf3 100%) !important;
}
.premium-unlocked-hero {
    border: 2px solid #10b981 !important;
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%) !important;
}
.text-gradient-gold {
    background: linear-gradient(135deg, #b45309 0%, #d97706 50%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.premium-badge {
    box-shadow: 0 2px 8px rgba(234, 179, 8, 0.15);
    border-radius: 50px;
    padding: 0.25rem 0.65rem !important;
    font-size: 0.75rem;
}

