/* =======================================
   RESET & BASE STYLES — 高级感 Edition
======================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary neutral tones */
    --primary-color: #2E2E2E;
    /* Charcoal black – main tone */
    --secondary-color: #B08BBB;
    /* Dusty lilac accent */
    --accent-color: #C7B8EA;
    /* Pale lavender accent */

    /* Neutrals and surfaces */
    --text-dark: #1A1A1A;
    /* Deep text */
    --text-light: #6B6B6B;
    /* Muted gray for paragraphs */
    --bg-white: #FFFFFF;
    --bg-light: #F8F7F5;
    /* Warm white */
    --bg-cream: #F3F0E6;
    /* Ivory beige */
    --border-color: #E2E0DD;

    /* Semantic colors (muted) */
    --success-color: #4E9A77;
    --warning-color: #C8A44B;
    --danger-color: #B66161;

    /* Optional dark anchor tone */
    --navy: #222222;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    background: var(--bg-white);
    padding-top: 80px;
    /* Account for fixed navbar */
}

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

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 1001;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Mobile hamburger menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    /* Changed from white */
    margin: 5px 0;
    transition: 0.3s;
    border-radius: 2px;
}

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

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

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

/* Mobile menu close button */
.mobile-menu-close {
    display: none;
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    z-index: 1001;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    background: var(--bg-light);
    transform: scale(1.1);
}

.game-link {
    background: var(--navy);
    color: white !important;
    padding: 0.5rem 1.2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s;
    border: 1px solid var(--navy);
}

.game-link:hover {
    background: transparent;
    color: var(--navy) !important;
    transform: none;
}

/* Hero Section */
.hero {
    background: var(--bg-cream);
    background-image: url('background_image4.png');
    background-size: contain;
    background-position: right 10% center;
    background-repeat: no-repeat;
    color: var(--navy);
    padding: 5rem 0 6rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.hero-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    text-align: left;
    max-width: 60%;
    background: rgba(250, 248, 245, 0.93);
    padding: 2rem;
    border-radius: 1rem;
    backdrop-filter: blur(5px);
}

.hero-visual {
    display: none;
}

.hero-chart {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 0;
    background: transparent;
    padding: 0;
    box-shadow: none;
    object-fit: contain;
    opacity: 0.95;
    mix-blend-mode: multiply;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--navy);
}

.subtitle {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    color: var(--text-light);
    font-weight: 400;
    line-height: 1.6;
}

.description {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 0 2.5rem;
    color: var(--text-light);
    line-height: 1.8;
}

/* Word flipping animation */
.flip-words {
    display: inline-block;
    position: relative;
    min-width: 280px;
    width: 280px;
    height: 1.2em;
    vertical-align: text-bottom;
    text-align: left;
    margin-right: 0.5em;
}

.flip-word {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    animation: flipWord 4s infinite;
    white-space: nowrap;
}

.flip-word:nth-child(1) {
    animation-delay: 0s;
}

.flip-word:nth-child(2) {
    animation-delay: 2s;
}

@keyframes flipWord {

    0%,
    45% {
        opacity: 1;
        transform: translateY(0);
    }

    55%,
    100% {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--navy);
    color: white;
    border: 1px solid var(--navy);
}

.btn-primary:hover {
    background: transparent;
    color: var(--navy);
    transform: none;
}

.btn-secondary {
    background: transparent;
    color: var(--navy);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--navy);
}

/* Sections */
.section {
    padding: 5rem 0;
}

.section-gray {
    background: var(--bg-light);
}

/* Featured Game Section */
.section-featured {
    padding: 0;
    background: var(--navy);
    color: white;
}

.featured-game {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 5rem 0;
}

.featured-game-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white;
}

.featured-game-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
}

.featured-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.featured-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

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

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-game-featured {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    color: var(--navy);
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s;
    border: 2px solid white;
}

.btn-game-featured:hover {
    background: transparent;
    color: white;
    transform: translateY(-2px);
}

.game-preview {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    padding: 2.5rem;
    text-align: center;
}

.preview-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.preview-text {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-style: italic;
    color: white;
}

.preview-cues {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.preview-cue {
    padding: 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.preview-cue.lexical {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.preview-cue.acoustic {
    background: rgba(251, 191, 36, 0.2);
    border: 1px solid rgba(251, 191, 36, 0.4);
}

.preview-question {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
    color: var(--text-dark);
}

.section-description {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Cards */
.experiment-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.card p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--accent-color);
    color: white;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Leaderboard */
.leaderboard-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group,
.search-group {
    flex: 1;
    min-width: 200px;
}

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

.filter-group select,
.search-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.filter-group select:focus,
.search-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.table-container {
    overflow-x: auto;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1200px;
}

.leaderboard-table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.leaderboard-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.leaderboard-table th.sortable:hover {
    background: rgba(255, 255, 255, 0.1);
}

.leaderboard-table th.active {
    background: rgba(255, 255, 255, 0.2);
}

.leaderboard-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.leaderboard-table tbody tr:hover {
    background: var(--bg-light);
}

.leaderboard-table tbody tr:last-child td {
    border-bottom: none;
}

.baseline-row {
    background: #fafafa;
    border-top: 2px solid var(--border-color);
}

.baseline-label {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--text-light);
    color: white;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 700;
    color: white;
}

.rank-1 {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: var(--text-dark);
}

.rank-2 {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    color: var(--text-dark);
}

.rank-3 {
    background: linear-gradient(135deg, #cd7f32, #e6a85c);
    color: white;
}

.rank-other {
    background: var(--text-light);
}

.model-name {
    font-weight: 600;
    color: var(--text-dark);
}

.model-type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.type-proprietary {
    background: #dbeafe;
    color: #1e40af;
}

.type-opensource {
    background: #dcfce7;
    color: #166534;
}

.score {
    font-weight: 600;
}

.score-high {
    color: var(--success-color);
}

.score-medium {
    color: var(--warning-color);
}

.score-low {
    color: var(--danger-color);
}

.score-na {
    color: var(--text-light);
    font-style: italic;
}

.leaderboard-notes {
    margin-top: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary-color);
}

.leaderboard-notes h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.leaderboard-notes ul {
    list-style-position: inside;
    color: var(--text-light);
}

.leaderboard-notes li {
    margin-bottom: 0.5rem;
}

/* Visualizations */
.visualization-single {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.viz-card-large {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 900px;
}

.viz-image-large {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.viz-caption {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.8;
    text-align: left;
}

/* Examples */
.examples-container {
    display: grid;
    gap: 2rem;
    margin-top: 3rem;
}

.example-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.example-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.example-header {
    padding: 1.5rem 2rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.example-header.neutral-text {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.example-header.emotion-matched {
    background: linear-gradient(135deg, #10b981, #059669);
}

.example-header.emotion-mismatched {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.example-header.paralinguistic {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.example-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.2rem;
}

.example-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.example-content {
    padding: 2rem;
}

.example-field {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.example-field strong {
    color: var(--text-dark);
    display: block;
    margin-bottom: 0.5rem;
}

.example-field em {
    color: var(--text-light);
    font-style: italic;
}

.example-field code {
    background: var(--bg-light);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.example-choices {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.highlight-answer {
    background: #fef3c7;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 600;
}

.example-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.result-item {
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: 0.5rem;
}

.result-item strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.badge-neutral,
.badge-frustration,
.badge-excitement,
.badge-anger,
.badge-correct,
.badge-incorrect,
.badge-warning {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.badge-neutral {
    background: #e5e7eb;
    color: #374151;
}

.badge-frustration {
    background: #fef3c7;
    color: #92400e;
}

.badge-excitement {
    background: #dbeafe;
    color: #1e40af;
}

.badge-anger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-correct {
    background: #d1fae5;
    color: #065f46;
}

.badge-incorrect {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.example-note {
    padding: 1rem;
    background: #eff6ff;
    border-left: 4px solid var(--primary-color);
    border-radius: 0.25rem;
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Experiment Details */
.experiment-details {
    display: grid;
    gap: 2rem;
    margin-top: 3rem;
}

.detail-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.detail-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.exp-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    font-weight: 700;
}

.detail-card p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.detail-card ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.detail-card code {
    background: var(--bg-light);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
}

/* Citation */
.citation-box {
    position: relative;
    background: var(--text-dark);
    color: #f8fafc;
    padding: 2rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
}

.citation-box pre {
    overflow-x: auto;
    margin: 0;
}

.citation-box code {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.copy-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.copy-btn:hover {
    background: var(--secondary-color);
}

/* Footer */
footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

footer a {
    color: white;
    text-decoration: none;
    margin: 0 1rem;
    transition: opacity 0.3s;
}

footer a:hover {
    opacity: 0.8;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    /* Force mobile navigation to work */
    .mobile-menu-toggle {
        display: block !important;
        background: var(--primary-color) !important;
        border-radius: 4px !important;
        padding: 8px !important;
        position: relative !important;
        z-index: 1001 !important;
    }

    .nav-links {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        width: 100% !important;
        height: 100vh !important;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 2rem !important;
        transition: left 0.3s ease, opacity 0.3s ease, visibility 0.3s ease !important;
        z-index: 1000 !important;
        display: flex !important;
        opacity: 0 !important;
        visibility: hidden !important;
    }

    .nav-links.active {
        left: 0 !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .mobile-menu-close {
        display: block !important;
    }

    .nav-links a {
        font-size: 1.2rem;
        padding: 1rem 2rem;
        text-align: center;
        width: auto;
        border-radius: 0.5rem;
        transition: all 0.3s ease;
    }

    .nav-links a:hover {
        background: var(--bg-light);
        transform: translateY(-2px);
    }

    .game-link {
        background: var(--navy);
        color: white !important;
        padding: 1rem 2rem;
        border-radius: 0.5rem;
        font-weight: 600;
        transition: all 0.3s ease;
        margin: 0;
        width: auto;
    }

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

    /* Hero section fixes */
    .hero {
        padding: 3rem 0 4rem;
        background-size: cover;
        background-position: center;
    }

    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .hero-content {
        max-width: 100%;
        padding: 1.5rem;
        background: rgba(250, 248, 245, 0.95);
    }

    .hero h1 {
        font-size: 2rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }

    .flip-words {
        min-width: 150px;
        width: 150px;
    }

    .subtitle {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }

    .description {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    /* Featured game section */
    .featured-game {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 3rem 0;
    }

    .featured-stats {
        gap: 1rem;
        flex-direction: column;
    }

    /* Fix section spacing to prevent overlap */
    .section {
        padding: 4rem 0;
        margin-top: 3rem;
    }

    .section-featured {
        padding: 4rem 0;
        margin-top: 3rem;
    }

    .question-content {
        padding: 1.5rem;
        min-height: 120px;
        overflow-wrap: break-word;
    }

    .question-text {
        font-size: 1.1rem;
        line-height: 1.5;
        word-wrap: break-word;
    }

    .emotion-options {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        max-height: 350px;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .emotion-btn {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
        word-wrap: break-word;
    }

    .audio-control {
        max-width: 100%;
    }

    .feedback-content {
        padding: 1.5rem;
    }

    .ai-results-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .perf-bar {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        text-align: center;
    }

    .perf-percent {
        text-align: center;
    }

    /* Leaderboard responsive */
    .leaderboard-controls {
        flex-direction: column;
        gap: 1rem;
    }

    .filter-group,
    .search-group {
        min-width: auto;
    }

    .table-container {
        margin: 0 -1rem;
        border-radius: 0;
    }

    .leaderboard-table {
        min-width: 800px;
        font-size: 0.85rem;
    }

    .leaderboard-table th,
    .leaderboard-table td {
        padding: 0.75rem 0.5rem;
    }

    /* Cards responsive */
    .experiment-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .card {
        padding: 1.5rem;
    }

    /* Examples responsive */
    .example-content {
        padding: 1.5rem;
    }

    .example-results {
        grid-template-columns: 1fr;
    }

    /* Section spacing */
    .section {
        padding: 3rem 0;
    }

    .section h2 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .section-description {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    /* Additional mobile fixes */
    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
    }

    /* Ensure navigation doesn't wrap horizontally */
    /* Ensure navigation doesn't wrap horizontally */
    .navbar {
        position: fixed;
        /* Changed from relative */
        z-index: 1000;
        /* Changed from 100 */
    }

    /* Fix text overflow */
    .model-name {
        word-wrap: break-word;
        max-width: 150px;
    }

    /* Better button spacing */
    .btn-next-round,
    .btn-restart,
    .btn-view-full {
        width: 100%;
        max-width: 280px;
        margin: 0.5rem auto;
    }

    /* Fix results actions */
    .results-actions {
        flex-direction: column;
        align-items: center;
    }

    /* Better trophy display */
    .trophy-display {
        width: 80px;
        height: 80px;
    }

    .trophy-display i {
        font-size: 2rem;
    }
}

/* Additional mobile-specific fixes */
@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    /* Navigation fixes for small screens */
    .nav-links {
        gap: 1.5rem !important;
    }

    .nav-links a {
        font-size: 1.1rem;
        padding: 0.8rem 1.5rem;
    }

    .game-link {
        font-size: 1.1rem;
        padding: 0.8rem 1.5rem;
    }

    /* Adjust body padding for smaller navbar */
    body {
        padding-top: 70px;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .flip-words {
        min-width: 120px;
        width: 120px;
    }

    .hero-content {
        padding: 1rem;
    }


    .question-content {
        padding: 1rem;
        min-height: 100px;
        overflow-wrap: break-word;
    }

    .question-text {
        font-size: 1rem;
        word-wrap: break-word;
    }

    .emotion-options {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        max-height: 300px;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .emotion-btn {
        padding: 0.75rem;
        font-size: 0.9rem;
        word-wrap: break-word;
    }

    .audio-control {
        max-width: 100%;
    }

    .feedback-content {
        padding: 1rem;
    }

    .ai-results-grid {
        grid-template-columns: 1fr;
    }

    .perf-bar {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .perf-percent {
        text-align: center;
    }

    .leaderboard-table {
        min-width: 600px;
        font-size: 0.8rem;
    }

    .leaderboard-table th,
    .leaderboard-table td {
        padding: 0.5rem 0.25rem;
    }

    .card {
        padding: 1rem;
    }

    .example-content {
        padding: 1rem;
    }

    .section {
        padding: 2rem 0;
    }

    .section h2 {
        font-size: 1.75rem;
    }
}

/* Game Section Mobile Fixes */
@media (max-width: 768px) {
    .emotion-options {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
        max-height: 350px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding: 0.5rem !important;
        margin: -0.5rem !important;
    }

    .emotion-btn {
        width: 100% !important;
        min-height: 50px !important;
        height: auto !important;
        white-space: normal !important;
    }

    .flip-card-container {
        min-height: auto !important;
    }

    .flip-card {
        min-height: auto !important;
    }
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {

    0%,
    20% {
        content: '.';
    }

    40% {
        content: '..';
    }

    60%,
    100% {
        content: '...';
    }
}