/* Quiz Grounds - Dark Theme Design for 50+ Audience */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Sophisticated dark theme with warm accents */
    --bg-primary: #1a1f2e;      /* Warm dark blue-gray */
    --bg-secondary: #232937;     /* Slightly lighter */
    --bg-card: #2d3445;          /* Card backgrounds */
    --bg-hover: #364052;         /* Hover state */
    
    --text-primary: #f7f8fa;     /* Almost white for main text */
    --text-secondary: #b8c0d0;   /* Muted blue-gray */
    --text-muted: #8892a7;       /* Even more muted */
    
    --accent-primary: #4a9eff;   /* Bright, friendly blue */
    --accent-warm: #ffa047;      /* Warm orange for CTAs */
    --accent-success: #52d3aa;   /* Soft teal green */
    --accent-danger: #ff6b6b;    /* Soft red */
    
    --border: rgba(255, 255, 255, 0.1);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.4);
}

/* Light mode option - can be toggled */
body.light-mode {
    --bg-primary: #fafaf9;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #f3f4f6;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --accent-primary: #2563eb;
    --accent-warm: #d97706;
    --border: rgba(0, 0, 0, 0.1);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 18px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Subtle gradient overlay for depth */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(74, 158, 255, 0.05), transparent 50%),
                radial-gradient(circle at bottom left, rgba(255, 160, 71, 0.05), transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* Content wrapper to sit above gradient */
.content-wrapper {
    position: relative;
    z-index: 2;
}

/* Header with frosted glass effect */
.header {
    background: rgba(29, 34, 45, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

body.light-mode .header {
    background: rgba(255, 255, 255, 0.95);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
    cursor: pointer;
}

.logo:hover {
    color: var(--accent-warm);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-warm));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
    position: relative;
    cursor: pointer;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-button {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-warm));
    color: white;
    padding: 0.625rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(74, 158, 255, 0.3);
    cursor: pointer;
    border: none;
}

.nav-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 158, 255, 0.4);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Subtle animated background pattern */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(74, 158, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255, 160, 71, 0.1) 0%, transparent 50%);
    animation: gentlePulse 10s ease-in-out infinite;
}

@keyframes gentlePulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

h1 {
    font-size: 2.75rem;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.6;
}

/* Trust Indicators - Glass morphism */
.trust-bar {
    background: rgba(45, 52, 69, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto 3rem;
    box-shadow: var(--shadow);
}

body.light-mode .trust-bar {
    background: rgba(255, 255, 255, 0.9);
}

.trust-item {
    text-align: center;
}

.trust-number {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-warm));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.25rem;
}

.trust-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* CTA Buttons */
.cta-container {
    margin-top: 2rem;
}

.cta-primary {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-warm), #ff8c28);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(255, 160, 71, 0.3);
}

.cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 30px rgba(255, 160, 71, 0.4);
}

.cta-secondary {
    display: inline-block;
    margin-left: 1rem;
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    padding: 1rem 1.5rem;
    transition: all 0.3s ease;
}

.cta-secondary:hover {
    color: var(--accent-warm);
    text-decoration: underline;
}

/* Benefits Section */
.benefits {
    padding: 4rem 2rem;
    background: var(--bg-secondary);
}

.benefits-content {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.25rem;
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.125rem;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.benefit-card {
    text-align: center;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.benefit-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-warm));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    box-shadow: 0 4px 20px rgba(74, 158, 255, 0.3);
}

.benefit-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.benefit-text {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Quiz Section */
.quiz-section {
    padding: 4rem 2rem;
    background: var(--bg-primary);
}

.quiz-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.category-tab {
    padding: 0.75rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1rem;
    cursor: pointer;
}

.category-tab:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

.category-tab.active {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-warm));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(74, 158, 255, 0.3);
}

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

.quiz-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.quiz-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.quiz-image {
    height: 200px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-warm));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    position: relative;
}

.quiz-difficulty {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.quiz-difficulty.easy {
    background: rgba(82, 211, 170, 0.2);
    border-color: var(--accent-success);
    color: var(--accent-success);
}

.quiz-difficulty.medium {
    background: rgba(74, 158, 255, 0.2);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.quiz-difficulty.hard {
    background: rgba(255, 107, 107, 0.2);
    border-color: var(--accent-danger);
    color: var(--accent-danger);
}

.quiz-content {
    padding: 1.5rem;
}

.quiz-category {
    color: var(--accent-warm);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.quiz-title {
    font-size: 1.25rem;
    line-height: 1.4;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.quiz-description {
    color: var(--text-secondary);
    font-size: 0.975rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.quiz-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.quiz-questions {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.quiz-time {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Admin Panel Styles */
.admin-login {
    max-width: 400px;
    margin: 4rem auto;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.admin-panel {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-section {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-warm));
    color: white;
}

.btn-success {
    background: var(--accent-success);
    color: white;
}

.btn-danger {
    background: var(--accent-danger);
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Quiz Player Styles */
.quiz-player {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.question-container {
    margin-bottom: 2rem;
}

.question-number {
    color: var(--accent-primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

.question-text {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.answer-option {
    display: block;
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
}

.answer-option:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
}

.answer-option.selected {
    background: rgba(74, 158, 255, 0.1);
    border-color: var(--accent-primary);
}

.answer-option.correct {
    background: rgba(82, 211, 170, 0.1);
    border-color: var(--accent-success);
}

.answer-option.incorrect {
    background: rgba(255, 107, 107, 0.1);
    border-color: var(--accent-danger);
}

.quiz-progress {
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-warm));
    transition: width 0.3s ease;
}

.quiz-results {
    text-align: center;
    padding: 2rem;
}

.score-display {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-warm));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

/* Testimonials */
.testimonials {
    padding: 4rem 2rem;
    background: var(--bg-secondary);
}

.testimonials-content {
    max-width: 1000px;
    margin: 0 auto;
}

.testimonial-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--accent-primary);
    box-shadow: var(--shadow);
}

.testimonial-text {
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.125rem;
    line-height: 1.6;
}

.testimonial-author {
    color: var(--text-secondary);
    font-weight: 600;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 3rem 2rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
    padding: 0.375rem 0;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Accessibility Controls - Fixed Panel */
.accessibility-panel {
    position: fixed;
    right: 20px;
    top: 100px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 100;
}

.accessibility-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.control-group {
    display: flex;
    gap: 0.5rem;
}

.control-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.theme-toggle {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-warm));
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 158, 255, 0.3);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-color: var(--accent-success);
    background: rgba(82, 211, 170, 0.1);
}

.toast.error {
    border-color: var(--accent-danger);
    background: rgba(255, 107, 107, 0.1);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.text-center { text-align: center; }

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .quiz-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .trust-bar {
        grid-template-columns: 1fr;
    }

    .accessibility-panel {
        right: 10px;
        top: 80px;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --accent-primary: #5eafff;
        --accent-warm: #ffb366;
        --text-primary: #ffffff;
        --bg-primary: #000000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}