/* ===== Daily Challenge Styles - Orange & Amber Theme ===== */

:root {
    /* Primary Orange & Amber Colors */
    --primary-orange: #FF9800;
    --primary-amber: #FFC107;
    --dark-orange: #F57C00;
    --light-orange: #FFB74D;
    --amber-dark: #FFA000;
    
    /* Secondary Colors */
    --success: #4CAF50;
    --error: #F44336;
    --warning: #FF5722;
    --info: #2196F3;
    
    /* Neutral Colors */
    --white: #ffffff;
    --light: #f8f9fa;
    --medium: #999da3;
    --dark: #5f6368;
    --darker: #3c4043;
    --black: #000000;
    
    /* Spacing & Typography */
    --font-main: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    
    /* Effects */
    --transition: 0.3s ease;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: 1px solid rgba(255, 255, 255, 0.18);
}

.dark-mode {
    --glass-bg: rgba(0, 0, 0, 0.6);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background:
        radial-gradient(1200px 600px at 10% -20%, rgba(255, 183, 77, 0.35), transparent 60%),
        radial-gradient(900px 500px at 90% 0%, rgba(255, 224, 178, 0.45), transparent 55%),
        linear-gradient(135deg, #fff6e5 0%, #ffe0b2 60%, #ffd29a 100%);
    color: var(--darker);
    line-height: 1.5;
    overflow-x: hidden;
}

body.dark-mode {
    background:
        radial-gradient(900px 500px at 15% -10%, rgba(255, 152, 0, 0.18), transparent 60%),
        radial-gradient(700px 400px at 85% 0%, rgba(255, 193, 7, 0.12), transparent 55%),
        linear-gradient(135deg, #150f0c 0%, #23160f 55%, #2c1b12 100%);
    color: #e8eaed;
}

/* ===== Loading Screen ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 152, 0, 0.2);
    border-top: 4px solid var(--primary-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    color: var(--primary-orange);
    font-weight: 600;
}

/* ===== Floating Background ===== */
.floating-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.float-icon {
    position: absolute;
    opacity: 0.1;
    color: var(--primary-orange);
    animation: float 6s ease-in-out infinite;
}

.float-emoji {
    position: absolute;
    opacity: 0.08;
    font-size: 3rem;
    animation: float 12s ease-in-out infinite;
    will-change: transform;
}

.float-emoji:nth-child(4) { bottom: 0; left: 10%; animation-delay: 0s; }
.float-emoji:nth-child(6) { bottom: 0; right: 15%; animation-delay: 0.3s; }
.float-emoji:nth-child(8) { bottom: 0; left: 5%; animation-delay: 0.6s; }
.float-emoji:nth-child(10) { bottom: 0; right: 10%; animation-delay: 0.9s; }
.float-emoji:nth-child(12) { bottom: 0; left: 20%; animation-delay: 1.2s; }
.float-emoji:nth-child(14) { bottom: 0; right: 25%; animation-delay: 1.5s; }
.float-emoji:nth-child(16) { bottom: 0; left: 35%; animation-delay: 1.8s; }
.float-emoji:nth-child(18) { bottom: 0; right: 5%; animation-delay: 2.1s; }
.float-emoji:nth-child(20) { bottom: 0; left: 50%; animation-delay: 2.4s; }
.float-emoji:nth-child(22) { bottom: 0; right: 35%; animation-delay: 2.7s; }
.float-emoji:nth-child(24) { bottom: 0; left: 65%; animation-delay: 3s; }
.float-emoji:nth-child(26) { bottom: 0; right: 45%; animation-delay: 3.3s; }
.float-emoji:nth-child(28) { bottom: 0; left: 15%; animation-delay: 3.6s; }
.float-emoji:nth-child(30) { bottom: 0; right: 20%; animation-delay: 3.9s; }
.float-emoji:nth-child(32) { bottom: 0; left: 40%; animation-delay: 4.2s; }
.float-emoji:nth-child(34) { bottom: 0; right: 30%; animation-delay: 4.5s; }
.float-emoji:nth-child(36) { bottom: 0; left: 25%; animation-delay: 4.8s; }
.float-emoji:nth-child(38) { bottom: 0; right: 60%; animation-delay: 5.1s; }
.float-emoji:nth-child(40) { bottom: 0; left: 55%; animation-delay: 5.4s; }
.float-emoji:nth-child(42) { bottom: 0; right: 40%; animation-delay: 5.7s; }
.float-emoji:nth-child(44) { bottom: 0; left: 8%; animation-delay: 0.1s; }
.float-emoji:nth-child(46) { bottom: 0; right: 8%; animation-delay: 0.4s; }

@keyframes float {
    0% {
        transform: translateY(100px);
        opacity: 0.00;
    }
    50% {
        opacity: 0.08;
    }
    100% {
        transform: translateY(-100vh);
        opacity: 0.04;
    }
}

/* ===== Main Layout ===== */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.app-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    width: 100vw; /* full viewport width */
    margin-left: calc(50% - 50vw); /* full-bleed inside centered container */
    margin-right: calc(50% - 50vw);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(14px);
    padding: var(--space-md) var(--space-lg);
    box-shadow: 0 10px 30px rgba(255, 152, 0, 0.18), 0 1px 2px rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(255, 152, 0, 0.15);
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 152, 0, 0.0), rgba(255, 152, 0, 0.45), rgba(255, 193, 7, 0.0));
    pointer-events: none;
}

.header-left h1 {
    font-size: 1.25rem;
    margin-bottom: var(--space-xs);
    background: linear-gradient(90deg, 
        var(--primary-orange) 0%, 
        var(--primary-orange) 30%, 
        var(--primary-amber) 70%, 
        #FF6F00 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientFlow 3s ease-in-out infinite;
    font-weight: 700;
}

.header-left p {
    font-size: 0.875rem;
    color: #8a5a20;
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.icon-btn {
    background: none;
    border: none;
    color: var(--primary-orange);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    padding: 0;
}

.icon-btn:hover {
    background: rgba(255, 152, 0, 0.1);
    transform: scale(1.05);
}

.btn {
    padding: var(--space-sm) var(--space-md);
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
}

.btn.small {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.75;
    font-size: 1rem;
}

.btn.small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn.primary {
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-amber));
    color: white;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 152, 0, 0.4);
}

.btn.secondary {
    background: rgba(255, 152, 0, 0.1);
    color: var(--primary-orange);
    border: 2px solid var(--primary-orange);
}

.btn.secondary:hover {
    background: var(--primary-orange);
    color: white;
}

/* ===== Main Content ===== */
.app-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-lg);
    flex: 1;
    width: 100%;
}

.screen {
    display: block;
    animation: fadeIn 0.4s ease;
}

.screen.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Cards & Glass Effect ===== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--blur-effect);
    -webkit-backdrop-filter: var(--blur-effect);
    border-radius: 12px;
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: var(--space-lg);
    transition: var(--transition-normal);
    margin-bottom: var(--space-md);
    width: 100%;
}

.glass-card:hover {
    box-shadow: 0 12px 32px rgba(255, 152, 0, 0.12);
    transform: translateY(-1px);
}

body.dark-mode .glass-card {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ===== Welcome Section ===== */
.welcome-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding: var(--space-lg);
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.08), rgba(255, 193, 7, 0.08));
    border-radius: 12px;
    border: 1px solid rgba(255, 152, 0, 0.15);
}

.welcome-text h1 {
    font-size: 2rem;
    color: var(--primary-orange);
    margin-bottom: 0.5rem;
}

.welcome-text p {
    font-size: 1.1rem;
    color: var(--dark);
}

.challenge-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-amber));
    color: white;
    padding: 1.5rem;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(255, 152, 0, 0.3);
}

.badge-icon {
    font-size: 2rem;
}

.badge-text {
    font-size: 0.9rem;
}

/* ===== Section Headers ===== */
.section-header {
    margin-bottom: var(--space-lg);
}

.section-header h2 {
    font-size: 1.5rem;
    color: var(--darker);
    margin-bottom: var(--space-xs);
    font-weight: 700;
}

.section-subtitle {
    color: var(--medium);
    font-size: 0.95rem;
}

/* ===== Info Cards ===== */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-card {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.05), rgba(255, 193, 7, 0.05));
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid rgba(255, 152, 0, 0.1);
    text-align: center;
    transition: all var(--transition);
}

.info-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-orange);
    box-shadow: 0 8px 20px rgba(255, 152, 0, 0.15);
}

.info-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.info-card h4 {
    color: var(--primary-orange);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.info-card p {
    color: var(--medium);
    font-size: 0.9rem;
}

/* ===== Search Box ===== */
.search-container {
    margin-bottom: 2rem;
}

.search-box {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid var(--primary-orange);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: all var(--transition);
}

.search-box:focus-within {
    border-color: var(--primary-amber);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.2);
}

.search-box i {
    color: var(--primary-orange);
    margin-right: 0.75rem;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--darker);
}

.search-box input::placeholder {
    color: var(--medium);
}

/* ===== Courses Grid ===== */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.course-card {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.08), rgba(255, 193, 7, 0.08));
    border: 2px solid rgba(255, 152, 0, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.course-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary-orange);
    box-shadow: 0 12px 28px rgba(255, 152, 0, 0.25);
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.15), rgba(255, 193, 7, 0.15));
}

/* Selected course state for multi-select */
.course-card.selected {
    border-color: var(--primary-orange);
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.18), rgba(255, 193, 7, 0.18));
    box-shadow: 0 12px 28px rgba(255, 152, 0, 0.25);
}

.course-icon {
    font-size: 2.5rem;
}

.course-name {
    font-weight: 700;
    color: var(--primary-orange);
    font-size: 1.1rem;
}

.course-description {
    font-size: 0.85rem;
    color: var(--medium);
}

/* ===== Auto Select Card ===== */
.auto-select-card {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.12), rgba(255, 193, 7, 0.12));
    border: 2.5px solid rgba(255, 152, 0, 0.5);
    border-radius: 12px;
    margin-top: 30px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    display: flex !important;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    grid-column: 1 / -1;
    max-width: 200px;
    justify-self: start;
    box-shadow: 0 0 20px rgba(255, 152, 0, 0.4), inset 0 0 20px rgba(255, 152, 0, 0.1);
}

.auto-select-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--primary-orange);
    box-shadow: 0 0 30px rgba(255, 152, 0, 0.7), 0 12px 40px rgba(255, 152, 0, 0.4), inset 0 0 30px rgba(255, 152, 0, 0.15);
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.18), rgba(255, 193, 7, 0.18));
}

.auto-select-icon {
    font-size: 2.5rem;
    animation: pulse 2s ease-in-out infinite, glow 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.9; }
}

@keyframes glow {
    0%, 100% { text-shadow: 0 0 10px rgba(255, 152, 0, 0.5); }
    50% { text-shadow: 0 0 20px rgba(255, 152, 0, 0.8), 0 0 30px rgba(255, 152, 0, 0.6); }
}

.auto-select-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.auto-select-header h3 {
    font-weight: 800;
    color: var(--primary-orange);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auto-select-subtitle {
    font-size: 0.75rem;
    color: var(--medium);
    font-style: italic;
}

.auto-select-courses {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.85rem;
    min-height: 2rem;
}

.auto-select-course-item {
    color: var(--darker);
    padding: 0.3rem 0;
    word-break: break-word;
    font-weight: 600;
}

.auto-select-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--primary-orange);
    font-size: 0.95rem;
    padding-top: 0.5rem;
    border-top: 2px solid rgba(255, 152, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.course-stats {
    display: flex;
    justify-content: space-around;
    font-size: 0.85rem;
    color: var(--dark);
}

/* ===== Stats Section ===== */
.stats-section {
    margin-top: 2rem;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.05), rgba(255, 193, 7, 0.05));
    border: 2px solid rgba(255, 152, 0, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all var(--transition);
}

.stat-card:hover {
    border-color: var(--primary-orange);
    box-shadow: 0 8px 20px rgba(255, 152, 0, 0.15);
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-content {
    flex: 1;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--medium);
    margin-bottom: 0.25rem;
}

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-orange);
}

/* ===== Challenge Interface ===== */
.challenge-card {
    max-width: 900px;
    margin: 0 auto;
}

.challenge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid rgba(255, 152, 0, 0.2);
}

.challenge-info {
    flex: 1;
}

.course-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-orange);
    margin-bottom: 0.5rem;
}

.challenge-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar-mini {
    width: 150px;
    height: 6px;
    background: rgba(255, 152, 0, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill-mini {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-orange), var(--primary-amber));
    transition: width 0.3s ease;
}

.timer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-orange);
    background: rgba(255, 152, 0, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
}

.timer.warning {
    color: #FF5722;
    background: rgba(255, 87, 34, 0.1);
}

/* ===== Question Container ===== */
.question-container {
    background: rgba(255, 152, 0, 0.02);
    border: 2px solid rgba(255, 152, 0, 0.1);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.question-number {
    font-size: 0.9rem;
    color: var(--medium);
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.question-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--darker);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* ===== Options ===== */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid rgba(255, 152, 0, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition);
    background: white;
}

.option:hover {
    border-color: var(--primary-orange);
    background: rgba(255, 152, 0, 0.05);
    transform: translateX(4px);
}

.option.selected {
    border-color: var(--primary-orange);
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1), rgba(255, 193, 7, 0.1));
    font-weight: 600;
}

.option.correct {
    border-color: var(--success);
    background: rgba(76, 175, 80, 0.1);
}

.option.incorrect {
    border-color: var(--error);
    background: rgba(244, 67, 54, 0.1);
}

.option-radio {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-orange);
    border-radius: 50%;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.option.selected .option-radio {
    background: var(--primary-orange);
}

.option-radio::after {
    content: '';
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    opacity: 0;
}

.option.selected .option-radio::after {
    opacity: 1;
}

.option-text {
    flex: 1;
}

/* ===== Navigation ===== */
.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    width: 100%;
}

.nav-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary-orange);
    background: white;
    color: var(--primary-orange);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn:hover:not(:disabled) {
    background: var(--primary-orange);
    color: white;
    transform: translateY(-2px);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.question-indicators {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.indicator {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 152, 0, 0.1);
    border: 2px solid rgba(255, 152, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.indicator:hover {
    border-color: var(--primary-orange);
}

.indicator.active {
    background: var(--primary-orange);
    color: white;
    border-color: var(--primary-orange);
}

.indicator.answered {
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-amber));
    color: white;
    border-color: var(--primary-orange);
}

/* ===== Buttons ===== */
.submit-btn {
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-amber));
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 152, 0, 0.4);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== Results Interface ===== */
.results-card {
    max-width: 900px;
    margin: 0 auto;
}

.results-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1), rgba(255, 193, 7, 0.1));
    border-radius: 12px;
}

.results-header h2 {
    font-size: 2rem;
    color: var(--primary-orange);
    margin-bottom: 0.5rem;
}

.results-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.score-display {
    text-align: center;
}

.score-circle {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-amber));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 24px rgba(255, 152, 0, 0.3);
    color: white;
}

.score-value {
    font-size: 3rem;
    font-weight: 700;
}

.score-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.score-feedback {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-orange);
}

/* ===== Results Table ===== */
.results-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.results-table thead {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1), rgba(255, 193, 7, 0.1));
    border-bottom: 2px solid var(--primary-orange);
}

.results-table th {
    padding: 1rem;
    text-align: left;
    color: var(--primary-orange);
    font-weight: 700;
}

.results-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 152, 0, 0.1);
}

.results-table tbody tr {
    cursor: pointer;
}

.results-table tr:hover {
    background: rgba(255, 152, 0, 0.05);
}

.result-correct {
    color: var(--success);
    font-weight: 600;
}

.result-incorrect {
    color: var(--error);
    font-weight: 600;
}

/* ===== Results Actions ===== */
.results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Text Center ===== */
.text-center {
    text-align: center;
}

/* ===== Footer ===== */
footer {
    background:
        radial-gradient(600px 200px at 50% -40%, rgba(255, 255, 255, 0.35), transparent 60%),
        linear-gradient(135deg, #ff9800 0%, #ffb300 45%, #ffc107 100%);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    font-weight: 500;
    width: 100vw; /* full viewport width */
    margin-left: calc(50% - 50vw); /* full-bleed inside centered container */
    margin-right: calc(50% - 50vw);
    box-shadow: 0 -8px 20px rgba(255, 152, 0, 0.25), 0 -1px 3px rgba(0, 0, 0, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
}

footer div {
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .header-left h1 {
        font-size: 1.4rem;
    }

    .header-right {
        justify-content: center;
    }

    .app-main {
        padding: 1rem;
    }

    .welcome-section {
        flex-direction: column;
        text-align: center;
    }

    .welcome-text h1 {
        font-size: 1.5rem;
    }

    .glass-card {
        padding: 1.5rem;
    }

    .info-cards {
        grid-template-columns: 1fr;
    }

    .courses-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .challenge-header {
        flex-direction: column;
        gap: 1rem;
    }

    .navigation {
        flex-direction: column;
    }

    .nav-btn {
        width: 100%;
        justify-content: center;
    }

    .results-actions {
        flex-direction: column;
    }

    .results-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .app-header {
        padding: 1rem;
    }

    .header-left h1 {
        font-size: 1.2rem;
    }

    .header-right {
        gap: 0.5rem;
    }

    .btn.small {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .welcome-text h1 {
        font-size: 1.2rem;
    }

    .welcome-section {
        padding: 1rem;
    }

    .challenge-badge {
        width: 90px;
        height: 90px;
        font-size: 0.8rem;
    }

    .section-header h2 {
        font-size: 1.4rem;
    }

    .courses-grid {
        grid-template-columns: 1fr;
    }

    .stats-container {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-icon {
        font-size: 2rem;
    }

    .stat-value {
        font-size: 1.4rem;
    }

    .question-container {
        padding: 1rem;
    }

    .question-text {
        font-size: 1rem;
    }

    .option {
        padding: 0.75rem;
    }

    .option-radio {
        width: 18px;
        height: 18px;
    }

    .question-indicators {
        gap: 0.3rem;
    }

    .indicator {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }

    .score-circle {
        width: 140px;
        height: 140px;
    }

    .score-value {
        font-size: 2rem;
    }

    .results-table {
        font-size: 0.85rem;
    }

    .results-table th,
    .results-table td {
        padding: 0.75rem 0.5rem;
    }
}

/* Dark Mode Adjustments */
body.dark-mode {
    --darker: #e8eaed;
    --dark: #b8bcc4;
}

body.dark-mode .glass-card {
    background: rgba(0, 0, 0, 0.4);
}

body.dark-mode .option {
    background: rgba(255, 152, 0, 0.05);
    color: #e8eaed;
}

body.dark-mode .question-text {
    color: #e8eaed;
}

body.dark-mode footer {
    background:
        radial-gradient(600px 200px at 50% -40%, rgba(255, 193, 7, 0.2), transparent 60%),
        linear-gradient(135deg, rgba(0, 0, 0, 0.65), rgba(255, 143, 0, 0.25));
    border-top-color: rgba(255, 193, 7, 0.2);
}

body.dark-mode .app-header {
    background: rgba(15, 12, 8, 0.7);
    border-bottom: 1px solid rgba(255, 193, 7, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.2);
}

body.dark-mode .header-left p {
    color: rgba(255, 223, 186, 0.85);
}

/* ===== Configure Challenge Modal Styles ===== */
.config-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    z-index: 1001;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.config-modal.hidden {
    pointer-events: none;
    opacity: 0;
}

.config-modal-content {
    background: var(--glass-bg);
    border-left: var(--glass-border);
    border-radius: 0;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 450px;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    animation: slideInSidePanel 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.config-modal.hidden .config-modal-content {
    transform: translateX(100%);
}

.config-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    border-bottom: 1px solid rgba(255, 152, 0, 0.1);
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.05), rgba(255, 193, 7, 0.05));
    flex-shrink: 0;
}

.config-modal-header h2 {
    font-size: 1.5rem;
    color: var(--darker);
    margin: 0;
}

.close-config-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
    transition: color 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-config-btn:hover {
    color: var(--primary-orange);
}

.config-modal-body {
    padding: var(--space-lg);
    flex: 1;
    overflow-y: auto;
}

.config-section {
    margin-bottom: var(--space-lg);
}

.search-results {
    background: white;
    border: 2px solid rgba(255, 152, 0, 0.2);
    border-radius: 8px;
}

.search-result-item {
    padding: var(--space-md);
    border-bottom: 1px solid rgba(255, 152, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-result-item:hover {
    background: rgba(255, 152, 0, 0.05);
}

.search-result-item:last-child {
    border-bottom: none;
}

.selected-courses-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.course-tag {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1), rgba(255, 193, 7, 0.1));
    border: 2px solid rgba(255, 152, 0, 0.2);
    border-radius: 8px;
    padding: var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--darker);
    font-weight: 500;
}

.course-tag button {
    background: none;
    border: none;
    color: #F44336;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.course-tag button:hover {
    transform: scale(1.2);
}

.config-modal-footer {
    padding: var(--space-lg);
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.05), rgba(255, 193, 7, 0.05));
    border-top: 1px solid rgba(255, 152, 0, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-md);
    flex-shrink: 0;
}

/* Dark Mode for Config Modal */
body.dark-mode .config-modal-content {
    background: rgba(0, 0, 0, 0.8);
    color: #e8eaed;
}

body.dark-mode .config-modal-header {
    border-bottom-color: rgba(255, 152, 0, 0.2);
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1), rgba(255, 193, 7, 0.1));
}

body.dark-mode .config-modal-header h2 {
    color: #e8eaed;
}

body.dark-mode .close-config-btn {
    color: #b8bcc4;
}

body.dark-mode .course-tag {
    background: rgba(255, 152, 0, 0.1);
    border-color: rgba(255, 152, 0, 0.2);
    color: #e8eaed;
}

/* ===== Profile Modal Styles ===== */

.profile-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.profile-modal.hidden {
    pointer-events: none;
    opacity: 0;
}

.profile-modal.hidden .profile-modal-content {
    transform: translateX(100%);
}

.profile-modal-content {
    background: var(--glass-bg);
    border-left: var(--glass-border);
    border-radius: 0;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 450px;
    height: 100vh;
    overflow-y: auto;
    animation: slideInSidePanel 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
}

@keyframes slideInSidePanel {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.profile-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    border-bottom: 1px solid rgba(255, 152, 0, 0.1);
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.05), rgba(255, 193, 7, 0.05));
    flex-shrink: 0;
}

.profile-modal-header h2 {
    font-size: 1.5rem;
    color: var(--darker);
    margin: 0;
}

.close-profile-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.close-profile-btn:hover {
    color: var(--primary-orange);
}

/* Profile Header Section */
.profile-header-section {
    padding: var(--space-lg);
    display: flex;
    gap: var(--space-lg);
    align-items: flex-start;
    border-bottom: 1px solid rgba(255, 152, 0, 0.1);
    flex-shrink: 0;
}

.profile-picture-container {
    flex-shrink: 0;
}

.profile-picture-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-amber));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.profile-info {
    flex: 1;
}

#profileName {
    font-size: 1.25rem;
    color: var(--darker);
    margin: 0 0 var(--space-sm) 0;
    font-weight: 600;
}

.profile-email {
    color: var(--dark);
    font-size: 0.9rem;
    margin: 0 0 var(--space-md) 0;
}

.motivational-quote {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: rgba(255, 152, 0, 0.05);
    border-left: 3px solid var(--primary-orange);
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--dark);
    font-style: italic;
}

.motivational-quote i {
    color: var(--primary-orange);
    font-size: 1.1rem;
}

/* Profile Metrics Section */
.profile-metrics-section {
    padding: var(--space-lg);
    border-bottom: 1px solid rgba(255, 152, 0, 0.1);
    flex-shrink: 0;
}

.profile-metrics-section h3 {
    font-size: 1.1rem;
    color: var(--darker);
    margin: 0 0 var(--space-md) 0;
    font-weight: 600;
}

.metric-card {
    background: rgba(255, 152, 0, 0.03);
    border: 1px solid rgba(255, 152, 0, 0.1);
    border-radius: 12px;
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

.metric-card.small {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: transparent;
    border: none;
    padding: var(--space-md) 0;
}

.metric-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    color: var(--primary-orange);
    font-weight: 600;
}

.metric-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 152, 0, 0.12);
    font-size: 1.2rem;
}

.metric-label {
    font-size: 0.95rem;
    color: var(--darker);
}

.progress-container {
    margin: var(--space-md) 0;
}

.progress-bar {
    height: 8px;
    background: linear-gradient(90deg, #c9cdd3, #c9cdd3); /* base gray */
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-orange), var(--primary-amber));
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 6px;
    transition: width 0.6s ease, box-shadow 0.4s ease, background 0.4s ease;
}

/* Metric level styles (gray → amber progression) */
.progress-fill.level-0 {
    background: #9aa0a6; /* solid gray */
}

.progress-fill.level-20 {
    background: linear-gradient(90deg, #9aa0a6 0%, #fff59d 80%); /* gray → pale yellow */
}

.progress-fill.level-40 {
    background: linear-gradient(90deg, #9aa0a6 0%, #ffc107 35%, #ffb74d 100%); /* hint amber toward end */
}

.progress-fill.level-50 {
    background: linear-gradient(90deg, #9aa0a6 0%, #ffa000 50%, #ffc107 100%); /* balanced gray/amber */
}

.progress-fill.level-60 {
    background: linear-gradient(90deg, #ffe082 0%, #ffa000 60%, #ffc107 100%); /* mostly amber with soft start */
}

.progress-fill.level-80 {
    background: linear-gradient(90deg, #ffe082 0%, #ff9800 40%, #ffc107 100%);
}

.progress-fill.level-100 {
    background: linear-gradient(90deg, var(--primary-orange), var(--primary-amber));
    box-shadow: 0 0 8px rgba(255, 152, 0, 0.4), 0 0 16px rgba(255, 193, 7, 0.35);
}

.progress-text {
    font-size: 0.7rem;
    color: white;
    font-weight: bold;
    white-space: nowrap;
}

.metric-subtext {
    font-size: 0.85rem;
    color: var(--dark);
    margin: var(--space-sm) 0 0 0;
}

.metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.metric-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-orange);
    margin: var(--space-xs) 0;
}

.metric-card.small .metric-label {
    font-size: 0.85rem;
    color: var(--dark);
}

.metric-card.small .metric-subtext {
    font-size: 0.75rem;
    color: var(--medium);
    margin: 0;
}

/* Challenge History Section */
.challenge-history-section {
    padding: var(--space-lg);
    border-bottom: 1px solid rgba(255, 152, 0, 0.1);
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: visible;
    min-height: 50%;
}

.challenge-history-section h3 {
    font-size: 1.1rem;
    color: var(--darker);
    margin: 0 0 var(--space-md) 0;
    font-weight: 600;
    flex-shrink: 0;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.history-item {
    background: rgba(255, 152, 0, 0.03);
    border-left: 3px solid var(--primary-orange);
    border-radius: 6px;
    padding: var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-item-info h4 {
    margin: 0 0 var(--space-xs) 0;
    color: var(--darker);
    font-size: 0.95rem;
}

.history-item-date {
    font-size: 0.85rem;
    color: var(--dark);
    margin: 0;
}

.history-item-score {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-xs);
}

.history-score {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-orange);
}

.history-total {
    font-size: 0.8rem;
    color: var(--dark);
}

.empty-message {
    text-align: center;
    color: var(--dark);
    padding: var(--space-lg) 0;
    font-style: italic;
}

/* Profile Modal Footer */
.profile-modal-footer {
    padding: var(--space-lg);
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.05), rgba(255, 193, 7, 0.05));
    border-top: 1px solid rgba(255, 152, 0, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-md);
    flex-shrink: 0;
}

/* ===== Question Detail Modal ===== */
.question-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.question-detail-modal.hidden {
    pointer-events: none;
    opacity: 0;
}

.question-detail-modal.hidden .question-detail-content {
    transform: translateX(100%);
}

.question-detail-content {
    background: var(--glass-bg);
    border-left: var(--glass-border);
    border-radius: 0;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 520px;
    height: 100vh;
    overflow-y: auto;
    animation: slideInSidePanel 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
}

.question-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    border-bottom: 1px solid rgba(255, 152, 0, 0.1);
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.05), rgba(255, 193, 7, 0.05));
    flex-shrink: 0;
}

.question-detail-header h2 {
    font-size: 1.5rem;
    color: var(--darker);
    margin: 0;
}

.close-question-detail {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.close-question-detail:hover {
    color: var(--primary-orange);
}

.question-detail-body {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.detail-block {
    background: rgba(255, 152, 0, 0.06);
    border: 1px solid rgba(255, 152, 0, 0.12);
    border-radius: 12px;
    padding: 0.9rem 1rem;
}

.detail-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--dark);
    margin-bottom: 0.4rem;
}

.detail-value {
    color: var(--darker);
    line-height: 1.6;
    word-wrap: break-word;
}

.detail-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-option {
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 152, 0, 0.15);
    color: var(--darker);
}

.detail-option.chosen {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.12);
}

.detail-option.correct {
    border-color: var(--success);
    background: rgba(76, 175, 80, 0.08);
}

.detail-option.correct.chosen {
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.15);
}

.question-detail-footer {
    padding: var(--space-lg);
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.05), rgba(255, 193, 7, 0.05));
    border-top: 1px solid rgba(255, 152, 0, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-md);
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .profile-modal-content {
        max-width: 100%;
        width: 100%;
    }

    .question-detail-content {
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 600px) {
    .profile-modal-content {
        width: 100%;
        max-width: 100%;
    }

    .profile-header-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-picture-large {
        width: 70px;
        height: 70px;
        font-size: 1.75rem;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .history-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .history-item-score {
        align-items: flex-start;
    }

    .question-detail-header h2 {
        font-size: 1.25rem;
    }

    .profile-modal-header h2 {
        font-size: 1.25rem;
    }
}

/* Dark Mode */
body.dark-mode .profile-modal-content {
    background: rgba(0, 0, 0, 0.7);
    color: #e8eaed;
}

body.dark-mode .profile-modal-header {
    border-bottom-color: rgba(255, 152, 0, 0.2);
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1), rgba(255, 193, 7, 0.1));
}

body.dark-mode .profile-modal-header h2 {
    color: #e8eaed;
}

body.dark-mode .close-profile-btn {
    color: #b8bcc4;
}

body.dark-mode #profileName {
    color: #e8eaed;
}

body.dark-mode .profile-email {
    color: #b8bcc4;
}

body.dark-mode .motivational-quote {
    background: rgba(255, 152, 0, 0.1);
    border-left-color: var(--primary-orange);
    color: #b8bcc4;
}

body.dark-mode .metric-label {
    color: #e8eaed;
}

body.dark-mode .metric-card {
    background: rgba(255, 152, 0, 0.05);
    border-color: rgba(255, 152, 0, 0.15);
}

body.dark-mode .history-item {
    background: rgba(255, 152, 0, 0.05);
}

body.dark-mode .history-item-info h4 {
    color: #e8eaed;
}

body.dark-mode .profile-modal-footer {
    border-top-color: rgba(255, 152, 0, 0.2);
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1), rgba(255, 193, 7, 0.1));
}

body.dark-mode .question-detail-content {
    background: rgba(0, 0, 0, 0.7);
    color: #e8eaed;
}

body.dark-mode .question-detail-header {
    border-bottom-color: rgba(255, 152, 0, 0.2);
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1), rgba(255, 193, 7, 0.1));
}

body.dark-mode .question-detail-header h2 {
    color: #e8eaed;
}

body.dark-mode .close-question-detail {
    color: #b8bcc4;
}

body.dark-mode .detail-block {
    background: rgba(255, 152, 0, 0.08);
    border-color: rgba(255, 152, 0, 0.18);
}

body.dark-mode .detail-label {
    color: #b8bcc4;
}

body.dark-mode .detail-value {
    color: #e8eaed;
}

body.dark-mode .detail-option {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 152, 0, 0.2);
    color: #e8eaed;
}

body.dark-mode .question-detail-footer {
    border-top-color: rgba(255, 152, 0, 0.2);
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1), rgba(255, 193, 7, 0.1));
}

/* ===== HELP BUTTON STYLES ===== */

/* Help Button */
.help-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--info);
    color: white;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s ease;
}

.help-button:hover {
    transform: scale(1.1);
    background-color: #1976d2;
}

.help-button svg {
    width: 24px;
    height: 24px;
}

/* Help Dialog */
.help-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.help-dialog-content {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    padding: var(--space-lg);
    position: relative;
}

.close-help {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
    transition: all 0.2s ease;
}

.close-help:hover {
    transform: scale(1.2);
    color: var(--primary-orange);
}

.help-dialog-content h3 {
    color: var(--primary-orange);
    margin-bottom: var(--space-md);
    font-size: 1.5rem;
}

.help-dialog-content p {
    color: var(--dark);
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

.developer-info {
    margin-top: var(--space-md);
    padding: var(--space-md);
    background-color: rgba(255, 152, 0, 0.05);
    border-radius: 8px;
    border-left: 3px solid var(--primary-orange);
}

.developer-info p {
    margin-bottom: var(--space-sm);
    color: var(--darker);
}

.developer-info a {
    display: block;
    color: var(--info);
    text-decoration: none;
    transition: all 0.2s ease;
    margin-top: var(--space-sm);
    font-weight: 500;
}

.developer-info a:hover {
    color: var(--primary-orange);
    text-decoration: underline;
}

body.dark-mode .help-dialog-content {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
}

body.dark-mode .close-help {
    color: #e8eaed;
}

body.dark-mode .close-help:hover {
    color: var(--primary-orange);
}

body.dark-mode .help-dialog-content h3 {
    color: var(--primary-orange);
}

body.dark-mode .help-dialog-content p {
    color: #e8eaed;
}

body.dark-mode .developer-info {
    background-color: rgba(255, 152, 0, 0.08);
    border-left-color: var(--primary-orange);
}

body.dark-mode .developer-info p {
    color: #e8eaed;
}

body.dark-mode .developer-info a {
    color: #64b5f6;
}

body.dark-mode .developer-info a:hover {
    color: var(--primary-orange);
}

.help-dialog.hidden {
    display: none;
}

@media (max-width: 768px) {
    .help-button {
        bottom: 100px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .help-dialog-content {
        width: 95%;
        max-width: 90vw;
        padding: 1.5rem 1rem;
    }
}

/* ===== App Switcher ===== */
.wiggle {
    animation: wiggle 2s ease-in-out infinite;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    10%, 30%, 50%, 70%, 90% { transform: rotate(-10deg); }
    20%, 40%, 60%, 80% { transform: rotate(10deg); }
}

.app-switcher-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.app-switcher-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

.dark-mode .app-switcher-content {
    background: var(--glass-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.app-switcher-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.app-switcher-header h3 {
    font-size: 1.5rem;
    color: var(--darker);
    margin: 0;
}

.dark-mode .app-switcher-header h3 {
    color: var(--white);
}

.close-dialog {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.2s ease, color 0.2s ease;
}

.close-dialog:hover {
    transform: scale(1.1);
    color: var(--primary-orange);
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.app-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    text-decoration: none;
    color: var(--darker);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.dark-mode .app-card {
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
}

.app-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.app-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: white;
}

.app-icon.blue-gradient {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.app-icon.amber-gradient {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.app-icon.purple-gradient {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}

.app-card h4 {
    font-size: 1.2rem;
    margin: 0 0 0.5rem 0;
}

.app-card p {
    font-size: 0.9rem;
    color: var(--dark);
    margin: 0;
}

.dark-mode .app-card p {
    color: var(--medium);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .app-switcher-content {
        padding: 1.5rem;
    }

    .app-grid {
        grid-template-columns: 1fr;
    }

    .wiggle {
        animation: wiggle 1.5s ease-in-out infinite;
    }
}