:root {
    /* Vibrant Palette */
    --primary: #6366f1;
    /* Indigo 500 */
    --primary-hover: #4f46e5;
    /* Indigo 600 */
    --secondary: #0ea5e9;
    /* Sky 500 */
    --accent: #f59e0b;
    /* Amber 500 */
    --success: #22c55e;
    /* Green 500 */
    --danger: #ef4444;
    /* Red 500 */
    --warning: #eab308;
    /* Yellow 500 */
    --purple: #a855f7;
    /* Purple 500 */
    --pink: #ec4899;
    /* Pink 500 */

    --bg-light: #fdfbf7;
    /* Warm white */
    --bg-card: #ffffff;
    --bg-hero: linear-gradient(135deg, #4f46e5 0%, #9333ea 50%, #ec4899 100%);
    /* Vivid Gradient */

    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;

    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --gradient-secondary: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    --gradient-success: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
    --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.95) 100%);

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(99, 102, 241, 0.15);
    /* Tinted shadow */
    --shadow-lg: 0 10px 25px rgba(99, 102, 241, 0.2);
    /* Tinted shadow */

    --surface: #ffffff;
    --surface-hover: #f8fafc;
    --border: #e2e8f0;
    --text: #0f172a;
    --background: #fdfbf7;
}

[data-theme="dark"] {
    --bg-light: #0f172a;
    --bg-card: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    --bg-hero: linear-gradient(135deg, #312e81 0%, #581c87 50%, #831843 100%);

    --surface: #1e293b;
    --surface-hover: #334155;
    --border: #334155;
    --text: #f8fafc;
    --background: #0f172a;
    --gradient-card: linear-gradient(180deg, #1e293b 0%, #1e293b 100%);

    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
}

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

html {
    scroll-behavior: smooth
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(79, 70, 229, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(124, 58, 237, 0.08) 0%, transparent 50%);
    z-index: -1;
    animation: floatBg 20s ease-in-out infinite
}

@keyframes floatBg {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(2%, 2%) scale(1.02);
    }
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: background 0.3s ease
}

[data-theme="dark"] .header {
    background: rgba(30, 41, 59, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md)
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted)
}

.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px)
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px)
}

.nav-mobile {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-light);
    z-index: 999;
    padding: 100px 1.5rem 2rem;
    transform: translateX(100%);
    transition: transform 0.4s ease;
    overflow-y: auto
}

.nav-mobile.active {
    transform: translateX(0)
}

.nav-mobile ul {
    list-style: none
}

.nav-mobile li {
    margin-bottom: 0.5rem
}

.nav-mobile button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit
}

.nav-mobile button:hover {
    color: var(--primary);
    background: rgba(79, 70, 229, 0.1)
}

.nav-section-title {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 1.5rem 1.5rem 0.5rem;
    margin-top: 1rem
}

.main {
    padding-top: 90px;
    min-height: 100vh
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem
}

.hero {
    background: var(--bg-hero);
    color: white;
    text-align: center;
    padding: 4rem 1.5rem 3rem;
    margin-top: -90px;
    padding-top: calc(90px + 3rem);
    position: relative;
    overflow: hidden
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    color: white;
    margin-bottom: 1.5rem;
    position: relative
}

.hero h1 {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    margin-bottom: 1rem;
    position: relative;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2)
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    position: relative
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    position: relative
}

.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.15);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(10px)
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: white
}

.stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8)
}

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

.card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden
}

[data-theme="dark"] .card {
    border-color: rgba(255, 255, 255, 0.1);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.25);
    border-color: var(--primary);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-light);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.4s ease, background 0.4s ease, color 0.4s ease;
    border: 2px solid var(--border);
}

.card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

/* Colorful Card Accents */
.card:nth-child(4n+1) .card-icon {
    color: var(--primary);
    border-color: var(--primary);
}

.card:nth-child(4n+2) .card-icon {
    color: var(--secondary);
    border-color: var(--secondary);
}

.card:nth-child(4n+3) .card-icon {
    color: var(--purple);
    border-color: var(--purple);
}

.card:nth-child(4n+4) .card-icon {
    color: var(--pink);
    border-color: var(--pink);
}

.card:nth-child(4n+1):hover .card-icon {
    background: var(--gradient-primary);
}

.card:nth-child(4n+2):hover .card-icon {
    background: var(--gradient-secondary);
}

.card:nth-child(4n+3):hover .card-icon {
    background: linear-gradient(135deg, #a855f7 0%, #d946ef 100%);
}

.card:nth-child(4n+4):hover .card-icon {
    background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
}


.card-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600
}

.card-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06)
}

[data-theme="dark"] .card-meta {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.card-hours {
    color: var(--text-muted);
    font-size: 0.85rem
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-family: inherit;
    position: relative;
    overflow: hidden
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3)
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.5)
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid rgba(0, 0, 0, 0.15)
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: inherit;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

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

.content-section.active {
    display: block
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.section-header h2 {
    font-size: clamp(1.4rem, 4vw, 2rem);
    margin-bottom: 0.5rem;
    color: var(--text-primary)
}

.content-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: var(--shadow-sm)
}

[data-theme="dark"] .content-card {
    border-color: rgba(255, 255, 255, 0.1);
}

.content-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem
}

.content-card ul {
    list-style: none;
    margin: 0.5rem 0
}

.content-card li {
    padding: 0.4rem 0 0.4rem 1.5rem;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.95rem
}

.content-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold
}

.info-box {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(124, 58, 237, 0.1));
    border-left: 4px solid var(--primary);
    padding: 1rem 1.5rem;
    border-radius: 0 12px 12px 0;
    margin: 1.5rem 0
}

.info-box.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(234, 88, 12, 0.1));
    border-color: var(--warning)
}

.question-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: var(--shadow-md)
}

.question-text {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
    color: var(--text-primary)
}

.option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-light);
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0.75rem
}

.option:hover {
    background: rgba(79, 70, 229, 0.08);
    border-color: var(--primary)
}

.option.selected {
    background: rgba(79, 70, 229, 0.1);
    border-color: var(--primary)
}

.option.correct {
    background: rgba(5, 150, 105, 0.15);
    border-color: var(--success)
}

.option.incorrect {
    background: rgba(220, 38, 38, 0.15);
    border-color: var(--danger)
}

.footer {
    background: var(--bg-card);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding: 2rem 1.5rem;
    text-align: center;
    margin-top: 4rem
}

[data-theme="dark"] .footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.footer-logo {
    font-size: 1.2rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem
}

.footer-info {
    color: var(--text-muted);
    font-size: 0.9rem
}

.text-center {
    text-align: center
}

.hidden {
    display: none !important
}

@media (max-width: 768px) {
    .hero {
        padding: 3rem 1rem 2rem
    }

    .section-grid {
        grid-template-columns: 1fr
    }
}

/* Certificate */
.certificate-container {
    padding: 2rem;
    border: 10px double var(--primary);
    background: #fff;
    color: #000;
    text-align: center;
    position: relative;
}

.cert-header {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 2rem;
    color: var(--primary);
}

.cert-name {
    font-size: 2.5rem;
    font-family: serif;
    border-bottom: 2px solid #000;
    display: inline-block;
    padding: 0 2rem;
    margin: 1rem 0;
}

.cert-course {
    color: var(--text);
    margin: 1rem 0;
}

.cert-details {
    display: flex;
    justify-content: space-between;
    margin: 3rem 0;
    font-weight: bold;
}

.cert-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.cert-stamp {
    margin-top: 2rem;
    color: var(--secondary);
    font-size: 0.9rem;
}

@media print {
    body * {
        visibility: hidden;
    }

    #printableCertificate,
    #printableCertificate * {
        visibility: visible;
    }

    .modal-overlay {
        position: absolute;
        left: 0;
        top: 0;
        background: white;
    }

    .modal-content {
        box-shadow: none;
        width: 100%;
        max-width: 100%;
        border: none;
    }

    .btn,
    .btn-close {
        display: none;
    }

    #printableCertificate {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        border: 5px solid #000;
    }
}

/* ========== MODALS & NEW FEATURES ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--surface);
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface-hover);
}

.modal-header h3 {
    margin: 0;
    color: var(--primary);
}

.btn-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

/* Glossary */
.glossary-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

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

.glossary-item strong {
    color: var(--primary);
    display: block;
    margin-bottom: 0.25rem;
}

/* Search */
.search-input {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    background: var(--background);
    color: var(--text);
    margin-bottom: 1rem;
}

.search-hit {
    padding: 0.75rem;
    background: var(--surface-hover);
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.search-hit:hover {
    transform: translateX(5px);
    background: var(--border);
}

.hit-type {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--secondary);
    font-weight: bold;
}

.hit-title {
    font-weight: bold;
    margin: 0.2rem 0;
}

.hit-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Medals */
.medals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.medal-card {
    text-align: center;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--surface-hover);
    opacity: 0.5;
    filter: grayscale(1);
}

.medal-card.unlocked {
    opacity: 1;
    filter: grayscale(0);
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.1);
}

.medal-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.medal-title {
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.medal-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Stats */
.stats-container {
    text-align: center;
}

.stat-big {
    margin-bottom: 1.5rem;
    transform: scale(1.1);
}

.stat-row {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1.5rem;
}

.prog-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.prog-row span:first-child {
    width: 50px;
    font-weight: bold;
}

.prog-bar-bg {
    flex: 1;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    margin: 0 10px;
    overflow: hidden;
}

.prog-bar-fill {
    height: 100%;
    background: var(--success);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ==================== CHATBOT STYLES ==================== */
.chatbot-container {
    display: flex;
    flex-direction: column;
    height: 400px;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    background: var(--bg-light);
}

.chat-message {
    max-width: 80%;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.4;
    animation: fadeIn 0.3s ease;
}

.chat-message.bot {
    align-self: flex-start;
    background: var(--surface);
    border: 1px solid var(--border);
    border-bottom-left-radius: 2px;
    color: var(--text-primary);
}

.chat-message.user {
    align-self: flex-end;
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 2px;
}

.chat-input-area {
    padding: 1rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.5rem;
}

.chat-input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-light);
    color: var(--text-primary);
    font-family: inherit;
    resize: none;
    height: 45px;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary);
}

.chat-send-btn {
    width: 45px;
    height: 45px;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chat-send-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

.chat-suggestions {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--surface);
    overflow-x: auto;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.chat-suggestion {
    padding: 0.4rem 0.8rem;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.chat-suggestion:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ==================== TTS & ACCESSIBILITY ==================== */
.tts-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface);
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-top: 1rem;
}

.tts-btn {
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-light);
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: all 0.2s;
}

.tts-btn:hover {
    background: var(--surface-hover);
}

.tts-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(79, 70, 229, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
    }
}

.tts-btn {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.tts-btn:hover {
    background: rgba(79, 70, 229, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tts-btn.active {
    background: var(--primary);
    color: white;
    animation: pulse 2s infinite;
}

.tts-btn.paused {
    background: var(--warning);
    border-color: var(--warning);
    color: white;
    animation: none;
}

/* ==================== GAMIFICATION STYLES ==================== */
.duel-setup {
    text-align: center;
    padding: 2rem;
}

.duel-avatar-select {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.avatar-option {
    font-size: 2.5rem;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.avatar-option.selected {
    border-color: var(--primary);
    background: var(--surface-hover);
    transform: scale(1.1);
}

.duel-arena {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.duel-player {
    text-align: center;
}

.player-avatar {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.5rem;
}

.player-name {
    font-weight: bold;
    display: block;
}

.player-score {
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: bold;
}

.vs-badge {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--danger);
}

.speed-test-timer {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--warning);
    text-align: center;
    margin-bottom: 1rem;
    font-family: monospace;
}

.daily-challenge-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}