/* CSS Variables */
:root {
    --primary-gold: #c4a84b;
    --primary-gold-dark: #9a8339;
    --bg-gradient-start: #1a2a3a;
    --bg-gradient-end: #0d1a2a;
    --panel-bg: rgba(30, 30, 30, 0.9);
    --panel-border: rgba(196, 168, 75, 0.3);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --cell-green: #4caf50;
    --cell-orange: #ff9800;
    --cell-red: #f44336;
    --input-bg: rgba(255, 255, 255, 0.1);
    --hover-bg: rgba(196, 168, 75, 0.2);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

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

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--panel-border);
    margin-bottom: 30px;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-gold);
    text-shadow: 0 0 20px rgba(196, 168, 75, 0.5);
    letter-spacing: 2px;
}

.logo .subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: block;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.icon-btn {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    color: var(--text-primary);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.icon-btn:hover {
    background: var(--hover-bg);
    border-color: var(--primary-gold);
    transform: scale(1.05);
}

.icon-btn:active {
    transform: scale(0.92);
    background: var(--hover-bg);
    border-color: var(--primary-gold);
}

/* Game Mode Tabs */
.game-modes {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.mode-btn {
    background: var(--panel-bg);
    border: 2px solid var(--panel-border);
    color: var(--text-secondary);
    padding: 15px 20px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    min-width: 80px;
    -webkit-tap-highlight-color: transparent;
}

.mode-btn:hover {
    border-color: var(--primary-gold);
    color: var(--text-primary);
    transform: translateY(-3px);
}

.mode-btn:active {
    transform: scale(0.95);
    border-color: var(--primary-gold);
}

.mode-btn.active {
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--primary-gold-dark) 100%);
    border-color: var(--primary-gold);
    color: #1a1a1a;
}

.mode-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mode-btn span {
    font-size: 0.8rem;
    font-weight: 500;
}

/* Link mode buttons */
a.mode-btn {
    text-decoration: none;
}

/* Clickable logo */
a.logo {
    text-decoration: none;
    color: inherit;
    display: block;
}

a.logo:hover h1 {
    text-shadow: 0 0 30px rgba(196, 168, 75, 0.8);
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 30px;
    padding: 15px;
    background: var(--panel-bg);
    border-radius: 12px;
    border: 1px solid var(--panel-border);
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-gold);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Game Panel */
.game-panel {
    background: var(--panel-bg);
    border-radius: 16px;
    border: 1px solid var(--panel-border);
    padding: 30px;
    margin-bottom: 30px;
}

/* Search Container */
.search-container {
    position: relative;
    margin-bottom: 30px;
}

.search-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.1rem;
    background: var(--input-bg);
    border: 2px solid var(--panel-border);
    border-radius: 12px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-input:focus {
    border-color: var(--primary-gold);
    box-shadow: 0 0 20px rgba(196, 168, 75, 0.3);
}

.search-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #2a2a2a;
    border: 1px solid var(--panel-border);
    border-radius: 0 0 12px 12px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.autocomplete-dropdown.active {
    display: block;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background: var(--hover-bg);
}

.autocomplete-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.autocomplete-item span {
    font-size: 1rem;
}

/* Result Headers */
.result-headers {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--panel-border);
}

.header-cell {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Results Container */
.results-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Results Scroll Wrapper for mobile horizontal scrolling */
.results-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.result-row {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    animation: slideIn 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateY(-30px);
    }
    60% {
        opacity: 0.8;
        transform: translateY(5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    min-height: 70px;
    transition: transform 0.3s ease;
    animation: flipIn 1.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.result-cell * {
    color: #ffffff !important;
}

.result-cell:nth-child(1) { animation-delay: 0s; }
.result-cell:nth-child(2) { animation-delay: 0.25s; }
.result-cell:nth-child(3) { animation-delay: 0.5s; }
.result-cell:nth-child(4) { animation-delay: 0.75s; }
.result-cell:nth-child(5) { animation-delay: 1s; }
.result-cell:nth-child(6) { animation-delay: 1.25s; }
.result-cell:nth-child(7) { animation-delay: 1.5s; }
.result-cell:nth-child(8) { animation-delay: 1.75s; }

@keyframes flipIn {
    0% {
        opacity: 0;
        transform: rotateX(90deg) scale(0.8);
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
        transform: rotateX(0) scale(1);
    }
}

.result-cell.cell-green {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: #ffffff !important;
}

.result-cell.cell-orange {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: #ffffff !important;
}

.result-cell.cell-red {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: #ffffff !important;
}

.result-cell img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 5px;
}

.result-cell .champion-name {
    font-weight: 600;
    font-size: 0.75rem;
}

.result-cell .arrow {
    font-size: 1.2rem;
    margin-top: 4px;
}

/* Victory Panel (splash page style) */
.victory-panel {
    display: none;
    background: linear-gradient(135deg, #1a5a3a 0%, #0d3d28 100%);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    border: 2px solid #2a7a4a;
    margin-top: 20px;
}

.victory-panel.active {
    display: block;
    animation: victoryAppear 0.5s ease, celebrate 2s ease-in-out infinite;
    animation-delay: 0s, 0.5s;
}

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

@keyframes celebrate {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.gg-text {
    font-size: 36px;
    color: #88ddaa;
    margin-bottom: 20px;
    font-style: italic;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(136, 221, 170, 0.3);
}

.champion-result {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.champion-result .champion-icon {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 2px solid #4a9d4a;
    object-fit: cover;
}

.result-text {
    text-align: left;
}

.result-text .label {
    display: block;
    font-size: 12px;
    color: #aaa;
    margin-bottom: 4px;
}

.result-text .champion-name {
    font-size: 24px;
    color: white;
    font-weight: bold;
}

.rank-text {
    color: #ccc;
    font-size: 14px;
    margin-bottom: 5px;
}

.rank-text .rank {
    color: #66cccc;
    font-weight: 600;
}

.tries-text {
    color: #ccc;
    font-size: 14px;
    margin-bottom: 15px;
}

.tries-count {
    color: #66cccc;
    font-weight: bold;
    font-size: 16px;
}

.victory-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.next-champion {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.next-champion p {
    color: #888;
    font-size: 12px;
    margin-bottom: 5px;
}

.countdown {
    color: var(--primary-gold);
    font-size: 2rem;
    font-weight: 700;
}

.share-btn {
    background: var(--primary-gold);
    color: #1a1a1a;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.share-btn:hover {
    background: var(--primary-gold-dark);
    transform: scale(1.05);
}

/* Legend */
.legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.legend-color.green {
    background: var(--cell-green);
}

.legend-color.orange {
    background: var(--cell-orange);
}

.legend-color.red {
    background: var(--cell-red);
}

.arrow-indicator {
    color: var(--primary-gold);
    font-size: 1.2rem;
}

/* Yesterday Section */
.yesterday-section {
    background: var(--panel-bg);
    border-radius: 12px;
    border: 1px solid var(--panel-border);
    padding: 20px;
    text-align: center;
    margin-bottom: 30px;
}

.yesterday-section h3 {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.yesterday-champion {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.yesterday-image {
    width: 60px;
    height: 60px;
    background: var(--input-bg);
    border-radius: 50%;
    overflow: hidden;
}

.yesterday-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yesterday-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-gold);
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid var(--panel-border);
}

.footer-content p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.footer-content .disclaimer {
    font-size: 0.75rem;
    opacity: 0.7;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.social-link {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.social-link:hover {
    color: var(--primary-gold);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-gradient-start);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

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

.modal-content h2 {
    color: var(--primary-gold);
    margin-bottom: 20px;
}

.modal-content ul {
    list-style: none;
    padding-left: 0;
}

.modal-content li {
    padding: 8px 0;
    border-bottom: 1px solid var(--panel-border);
}

.modal-content li:last-child {
    border-bottom: none;
}

/* Stats Modal Specific */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.stat-box {
    background: var(--panel-bg);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-gold);
}

.stat-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.guess-distribution {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.distribution-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.distribution-row span {
    width: 20px;
    text-align: center;
    color: var(--text-secondary);
}

.distribution-bar {
    height: 24px;
    background: var(--primary-gold);
    border-radius: 4px;
    min-width: 30px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1a1a1a;
}

/* Color indicator classes for inline text */
.cell-green {
    color: var(--cell-green);
    font-weight: 600;
}

.cell-orange {
    color: var(--cell-orange);
    font-weight: 600;
}

.cell-red {
    color: var(--cell-red);
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .header-actions {
        gap: 12px;
    }

    .icon-btn {
        width: 48px;
        height: 48px;
    }

    .logo h1 {
        font-size: 2rem;
    }

    .game-modes {
        gap: 8px;
    }

    .mode-btn {
        padding: 12px 16px;
        min-width: 56px;
        border-radius: 10px;
    }

    .mode-btn span {
        display: none;
    }

    .mode-icon {
        width: 32px;
        height: 32px;
    }

    .stats-bar {
        gap: 20px;
    }

    .game-panel {
        padding: 15px;
    }

    /* Keep horizontal layout with scrolling */
    .results-scroll-wrapper {
        margin: 0 -15px;
        padding: 0 15px;
    }

    .result-headers {
        min-width: 600px;
    }

    .result-row {
        min-width: 600px;
    }

    .result-cell {
        min-height: 60px;
        padding: 8px 4px;
        font-size: 0.7rem;
    }

    .result-cell img {
        width: 35px;
        height: 35px;
    }

    .legend {
        gap: 15px;
    }

    .legend-item {
        font-size: 0.75rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-content {
        padding: 20px;
        margin: 10px;
    }
}

@media (max-width: 480px) {
    .stat-item {
        flex: 1 0 40%;
    }

    .header-actions {
        gap: 8px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-gradient-end);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gold-dark);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-gold);
}

/* Loading Animation */
.loading {
    display: flex;
    justify-content: center;
    padding: 40px;
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid var(--panel-border);
    border-top-color: var(--primary-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mode Toggle Card Styles */
.mode-toggles {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 450px;
    margin: 0 auto 30px auto;
}

.toggle-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: linear-gradient(145deg, rgba(35, 45, 60, 0.95) 0%, rgba(25, 35, 50, 0.98) 100%);
    border: 2px solid var(--panel-border);
    border-radius: 16px;
    transition: all 0.3s ease;
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.toggle-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(196, 168, 75, 0.3), transparent);
}

.toggle-card:hover {
    border-color: var(--primary-gold);
    background: linear-gradient(145deg, rgba(45, 55, 70, 0.95) 0%, rgba(35, 45, 60, 0.98) 100%);
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(196, 168, 75, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.toggle-card-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.toggle-card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(76, 175, 80, 0.25) 0%, rgba(56, 142, 60, 0.15) 100%);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 12px;
    color: #4caf50;
    box-shadow:
        0 2px 8px rgba(76, 175, 80, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.toggle-card-icon.challenger-icon {
    background: linear-gradient(145deg, rgba(196, 168, 75, 0.25) 0%, rgba(154, 131, 57, 0.15) 100%);
    border: 1px solid rgba(196, 168, 75, 0.3);
    color: var(--primary-gold);
    box-shadow:
        0 2px 8px rgba(196, 168, 75, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.toggle-card-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toggle-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.3px;
}

.toggle-card-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* iOS-style Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 30px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, rgba(60, 60, 70, 0.9) 0%, rgba(40, 40, 50, 0.9) 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 30px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        0 1px 2px rgba(0, 0, 0, 0.2);
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 2px;
    bottom: 2px;
    background: linear-gradient(145deg, #ffffff 0%, #e8e8e8 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.3),
        0 1px 2px rgba(0, 0, 0, 0.2);
}

.switch input:checked + .switch-slider {
    background: linear-gradient(145deg, #4caf50 0%, #43a047 100%);
    border-color: rgba(76, 175, 80, 0.5);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        0 0 12px rgba(76, 175, 80, 0.4);
}

.switch input:checked + .switch-slider:before {
    transform: translateX(26px);
    background: linear-gradient(145deg, #ffffff 0%, #f0f0f0 100%);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.25),
        0 0 4px rgba(76, 175, 80, 0.3);
}

.switch:hover .switch-slider {
    border-color: rgba(196, 168, 75, 0.5);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        0 0 10px rgba(196, 168, 75, 0.2);
}

.switch input:checked:hover + .switch-slider {
    border-color: rgba(102, 187, 106, 0.6);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        0 0 15px rgba(76, 175, 80, 0.5);
}

/* Toggle card responsive */
@media (max-width: 480px) {
    .mode-toggles {
        max-width: 100%;
        padding: 0 10px;
    }

    .toggle-card {
        padding: 16px 18px;
    }

    .toggle-card-icon {
        width: 40px;
        height: 40px;
    }

    .toggle-card-icon svg {
        width: 20px;
        height: 20px;
    }

    .toggle-card-title {
        font-size: 0.9rem;
    }

    .toggle-card-desc {
        font-size: 0.75rem;
    }

    .switch {
        width: 50px;
        height: 26px;
    }

    .switch-slider:before {
        height: 18px;
        width: 18px;
    }

    .switch input:checked + .switch-slider:before {
        transform: translateX(24px);
    }
}

/* Endless Mode Styles */
.endless-stats-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 25px;
    padding: 20px 25px;
    background: linear-gradient(145deg, rgba(35, 45, 60, 0.95) 0%, rgba(25, 35, 50, 0.98) 100%);
    border-radius: 16px;
    border: 2px solid var(--panel-border);
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.endless-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.endless-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-gold);
    text-shadow: 0 0 10px rgba(196, 168, 75, 0.3);
}

.endless-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.endless-reset-btn {
    background: linear-gradient(145deg, #e53935 0%, #c62828 100%);
    color: #ffffff;
    border: 2px solid rgba(244, 67, 54, 0.3);
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 20px;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

.endless-reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.5);
    border-color: rgba(244, 67, 54, 0.5);
}

/* Found Champion Message (Endless Mode) */
.found-message {
    display: none;
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2) 0%, rgba(56, 142, 60, 0.2) 100%);
    border: 2px solid var(--cell-green);
    border-radius: 12px;
    margin-top: 20px;
    animation: celebrate 0.5s ease;
}

.found-message.active {
    display: block;
}

.found-message h2 {
    color: var(--cell-green);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.found-message p {
    margin-bottom: 15px;
    color: var(--text-primary);
}

.next-btn {
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--primary-gold-dark) 100%);
    color: #1a1a1a;
    border: none;
    padding: 14px 40px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.next-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(196, 168, 75, 0.5);
}

/* Endless Mode Responsive */
@media (max-width: 768px) {
    .endless-stats-bar {
        gap: 20px;
        padding: 18px;
        max-width: 100%;
    }

    .endless-stat-value {
        font-size: 1.5rem;
    }

    .endless-reset-btn {
        margin-left: 0;
        margin-top: 10px;
        width: auto;
        padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    .endless-stats-bar {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .endless-stat {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        padding: 8px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .endless-stat:last-of-type {
        border-bottom: none;
    }

    .endless-stat-value {
        font-size: 1.3rem;
    }

    .endless-stat-label {
        font-size: 0.7rem;
    }

    .endless-reset-btn {
        width: 100%;
        margin-top: 5px;
    }
}
