:root {
    --primary-color: #6366F1;
    --primary-hover: #4F46E5;
    --primary-light: #818CF8;
    --text-color: #1F2937;
    --text-secondary: #6B7280;
    --background-color: #F9FAFB;
    --surface-color: #FFFFFF;
    --border-color: #E5E7EB;
    --border-radius: 6px;
    --spacing-unit: 1rem;
    --gradient-start: #6366F1;
    --gradient-end: #4F46E5;
    --success-color: #10B981;
    --error-color: #EF4444;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: var(--spacing-unit);
    overflow-x: hidden;
}

header {
    text-align: center;
    margin-bottom: calc(var(--spacing-unit) * 2);
    padding-top: var(--spacing-unit);
    margin-left: auto;
    margin-right: auto;
}

/* Mobile button container */
.mobile-nav-buttons {
    display: none;
}

@media (max-width: 768px) {
    .mobile-nav-buttons {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 0.75rem;
    }
}

@media (min-width: 769px) {
    .help-button,
    .stats-button,
    .archive-button {
        position: fixed;
    }
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.logo-icon .material-icons {
    font-size: 24px;
}

.logo-text {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.game-container {
    background: white;
    padding: calc(var(--spacing-unit) * 1.5);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.audio-controls {
    position: relative;
    width: 100%;
    height: 40px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

#waveform {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    border-radius: 4px;
    overflow: hidden;
}

#playButton {
    position: relative;
    z-index: 2;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    border: none;
    cursor: pointer;
}

#playButton:hover {
    background: var(--primary-hover);
}

#playButton .material-icons {
    font-size: 20px;
    color: white;
}

.attempts-counter {
    text-align: center;
    margin-bottom: var(--spacing-unit);
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.attempts {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.attempt-dots {
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.15);
}

.dot.used {
    background: rgba(99, 102, 241, 0.5);
}

.dot.correct {
    background: var(--success-color);
}

.previous-guesses {
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 100%;
    width: 100%;
}

.previous-guess {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    background: rgba(99, 102, 241, 0.04);
    color: var(--text-color);
    font-size: 0.875rem;
    font-weight: 400;
    border: 1px solid rgba(99, 102, 241, 0.08);
}

.previous-guess.correct {
    background: rgba(16, 185, 129, 0.06);
    color: var(--success-color);
    border-color: rgba(16, 185, 129, 0.15);
    font-weight: 500;
}

.previous-guess.incorrect {
    background: rgba(239, 68, 68, 0.04);
    color: var(--error-color);
    border-color: rgba(239, 68, 68, 0.1);
}

.guess-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: var(--spacing-unit);
}

.guess-input {
    flex: 1;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.875rem;
    background: white;
    font-weight: 400;
}

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

.guess-input::placeholder {
    color: #9CA3AF;
}

.btn {
    padding: 0.625rem 1rem;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    background: transparent;
    color: var(--text-color);
}

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

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

.btn.secondary {
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary-color);
    border: 1px solid rgba(99, 102, 241, 0.12);
}

.btn.secondary:hover {
    background: rgba(99, 102, 241, 0.12);
}

.feedback {
    margin: 1rem 0;
    text-align: center;
    font-weight: 500;
    font-size: 0.875rem;
}

.feedback.correct {
    color: var(--success-color);
}

.feedback.wrong {
    color: var(--error-color);
}

.feedback.error {
    color: var(--error-color);
    margin-top: 0.5rem;
    font-size: 0.8125rem;
}

#answer {
    display: none;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-color);
    background: rgba(99, 102, 241, 0.04);
    border-radius: 4px;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.answer-share-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 1rem 0;
    padding: 0;
    background: none;
    border-radius: 0;
    border: none;
}

/* Hide container when both answer and button are empty/hidden */
.answer-share-container:not(:has(#answer:not(:empty))):not(:has(#shareButton:not([style*="display: none"]))) {
    display: none;
}

.answer-share-container #answer {
    margin: 0;
    padding: 0;
    flex: 0 1 auto;
    min-width: 0;
    background: none;
    border: none;
    border-radius: 0;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    box-shadow: none;
    letter-spacing: 0.01em;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.answer-share-container #answer .answer-label {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
}

.answer-share-container #answer .answer-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
}

.answer-share-container #answer:empty {
    display: none;
}

.answer-share-container #shareButton {
    flex-shrink: 0;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.625rem 1.125rem;
    border-radius: 4px;
    font-weight: 500;
    transition: background 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
}

.answer-share-container #shareButton:hover {
    background: var(--primary-hover);
}

.answer-share-container #shareButton .material-icons {
    font-size: 18px;
}

.game-over {
    text-align: center;
    margin: 1rem 0;
    color: var(--error-color);
    font-weight: 500;
    font-size: 0.9375rem;
}

.try-again {
    text-align: center;
    margin: 1rem 0;
    color: var(--success-color);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
}

.try-again:hover {
    opacity: 0.7;
}

.share-container {
    text-align: center;
}

.answer-reveal {
    text-align: center;
    margin-top: var(--spacing-unit);
    padding: 1rem;
    background: rgba(99, 102, 241, 0.04);
    border-radius: 4px;
    font-size: 0.875rem;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.answer-reveal .answer {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
}

footer {
    text-align: center;
    margin-top: calc(var(--spacing-unit) * 2);
    color: var(--secondary-color);
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    margin: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Smooth scrollbar styling for webkit browsers */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(99, 102, 241, 0.05);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.2);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.3);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
    border-radius: 8px 8px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
}

.close-modal {
    background: rgba(99, 102, 241, 0.06);
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.375rem;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.close-modal:hover {
    background: rgba(99, 102, 241, 0.12);
}

.close-modal .material-icons {
    font-size: 20px;
}

.modal-body {
    padding: 1.5rem;
}

.instruction-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.instruction-step:last-child {
    margin-bottom: 0;
}

.step-number {
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.instruction-step p {
    margin: 0;
    color: var(--text-color);
    line-height: 1.5;
    font-size: 0.875rem;
}

.instruction-step .material-icons {
    font-size: 1.125rem;
    vertical-align: middle;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    /* Hide desktop fixed buttons */
    .help-button:not(.mobile-nav-btn),
    .stats-button:not(.mobile-nav-btn),
    .archive-button:not(.mobile-nav-btn) {
        display: none !important;
    }
    
    /* Style mobile nav buttons */
    .mobile-nav-btn {
        border-radius: 50%;
        width: 38px;
        height: 38px;
    }
    
    .mobile-nav-btn .material-icons {
        font-size: 20px;
    }
    
    .modal {
        padding: 0.5rem;
    }
    
    .modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 95vh;
        border-radius: 8px;
    }
    
    .modal-header {
        padding: 1rem 1.25rem;
    }
    
    .modal-header h2 {
        font-size: 1.125rem;
    }
    
    .close-modal {
        width: 30px;
        height: 30px;
    }
    
    .modal-body {
        padding: 1.25rem;
    }

    .dot {
        width: 6px;
        height: 6px;
    }
    
    .previous-guess {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.625rem;
        margin-bottom: 1.5rem;
    }
    
    .stat-item {
        padding: 0.75rem 0.5rem;
    }
    
    .stat-value {
        font-size: 1.75rem;
    }
    
    .stat-label {
        font-size: 0.625rem;
        margin-top: 0.125rem;
    }
    
    .guess-distribution {
        margin-bottom: 1.5rem;
    }
    
    .guess-distribution h3 {
        font-size: 0.9375rem;
        margin-bottom: 0.75rem;
    }
    
    .distribution-bars {
        gap: 0.375rem;
    }
    
    .distribution-row {
        gap: 0.375rem;
    }
    
    .distribution-label {
        width: 1rem;
        font-size: 0.75rem;
    }
    
    .distribution-bar {
        height: 1.75rem;
    }
    
    .bar-count {
        font-size: 0.75rem;
    }
    
    .next-puzzle-container {
        padding: 1rem;
    }
    
    .next-puzzle-container h3 {
        font-size: 0.9375rem;
        margin-bottom: 0.5rem;
    }
    
    .countdown {
        font-size: 1.375rem;
    }
    
    .answer-share-container {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0;
        margin: 1rem 0;
    }
    
    .answer-share-container #answer {
        text-align: center;
        font-size: 0.9375rem;
        width: 100%;
        padding: 0;
    }
    
    .answer-share-container #answer .answer-text {
        font-size: 1.125rem;
    }
    
    .answer-share-container #shareButton {
        width: auto;
        padding: 0.625rem 1.25rem;
        justify-content: center;
        align-self: center;
    }
    
    .audio-controls {
        padding: 0;
    }
    
    .waveform-container {
        height: 60px;
    }
    
    .audio-buttons .btn {
        min-width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 0.5rem;
    }

    .game-container {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    header {
        margin-bottom: 1.25rem;
        padding-top: 0.5rem;
    }
    
    .logo {
        gap: 0.375rem;
        margin-bottom: 0.375rem;
    }

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

    .logo-icon .material-icons {
        font-size: 18px;
    }
    
    .logo-text {
        font-size: 1.75rem;
    }
    
    .subtitle {
        font-size: 0.8125rem;
    }
    
    .mobile-nav-buttons {
        gap: 0.375rem;
        margin-top: 0.625rem;
    }
    
    .mobile-nav-btn {
        width: 40px; /* Larger touch target */
        height: 40px;
    }
    
    .mobile-nav-btn .material-icons {
        font-size: 18px;
    }

    .audio-controls {
        height: 44px; /* Larger touch target */
        margin-bottom: 0.875rem;
    }
    
    #playButton {
        width: 44px; /* Larger touch target */
        height: 44px;
    }
    
    #playButton .material-icons {
        font-size: 22px;
    }

    .attempts {
        margin: 0.625rem 0;
    }
    
    .attempt-dots {
        gap: 0.375rem;
    }
    
    .dot {
        width: 8px; /* Larger for better visibility */
        height: 8px;
    }
    
    .previous-guesses {
        margin: 0.625rem 0;
        gap: 0.375rem;
    }
    
    .previous-guess {
        padding: 0.625rem 0.75rem; /* Better touch spacing */
        font-size: 0.875rem;
    }
    
    .input-container {
        margin: 0.625rem 0;
        gap: 0.5rem;
    }
    
    #userInput {
        padding: 0.75rem;
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 46px;
    }
    
    #submitButton {
        min-width: 46px; /* Better touch target */
        min-height: 46px;
        padding: 0.75rem;
    }
    
    #submitButton .material-icons {
        font-size: 20px;
    }
    
    .feedback {
        margin: 0.75rem 0;
        font-size: 0.875rem;
    }
    
    .answer-share-container {
        margin: 1rem 0;
        padding: 0;
    }
    
    .answer-share-container #answer {
        font-size: 0.875rem;
        padding: 0;
    }
    
    .answer-share-container #answer .answer-text {
        font-size: 1rem;
    }
    
    .answer-share-container #shareButton {
        min-height: 44px;
        padding: 0.625rem 1rem;
    }
    
    .modal {
        padding: 0.5rem;
    }
    
    .modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 95vh;
        border-radius: 6px;
    }
    
    .modal-header {
        padding: 0.875rem 1rem;
    }
    
    .modal-header h2 {
        font-size: 1.0625rem;
    }
    
    .close-modal {
        width: 28px;
        height: 28px;
        padding: 0.25rem;
    }
    
    .close-modal .material-icons {
        font-size: 18px;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .instruction-step {
        gap: 0.625rem;
        margin-bottom: 1rem;
    }
    
    .step-number {
        width: 22px;
        height: 22px;
        font-size: 0.6875rem;
    }
    
    .instruction-step p {
        font-size: 0.875rem;
        line-height: 1.5;
    }

    .stats-container {
        gap: 0.5rem;
        margin-bottom: 1.25rem;
    }
    
    .stat-item {
        padding: 0.75rem 0.5rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.625rem;
    }
    
    .guess-distribution {
        margin-bottom: 1.25rem;
    }
    
    .guess-distribution h3 {
        font-size: 0.9375rem;
        margin-bottom: 0.75rem;
    }
    
    .distribution-bars {
        gap: 0.375rem;
    }
    
    .distribution-row {
        gap: 0.375rem;
    }
    
    .distribution-label {
        width: 0.875rem;
        font-size: 0.75rem;
    }
    
    .distribution-bar {
        height: 1.5rem; /* Better visibility */
    }
    
    .bar-count {
        font-size: 0.75rem;
        padding-right: 0.375rem;
    }
    
    .next-puzzle-container {
        padding: 0.875rem;
    }
    
    .next-puzzle-container h3 {
        font-size: 0.9375rem;
        margin-bottom: 0.375rem;
    }
    
    .countdown {
        font-size: 1.25rem;
    }
    
    footer {
        margin-top: 1.25rem;
        font-size: 0.6875rem;
        padding-bottom: 0.75rem;
    }
    
    .icon-btn {
        width: 36px;
        height: 36px;
    }

    .icon-btn .material-icons {
        font-size: 18px;
    }

    [data-tooltip]:before,
    [data-tooltip]:after {
        display: none;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .logo-text {
        font-size: 1.5rem;
    }
    
    .mobile-nav-buttons {
        gap: 0.25rem;
    }
    
    .mobile-nav-btn {
        width: 36px;
        height: 36px;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.5625rem;
    }
}

/* Icon Buttons */
.icon-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    position: relative;
}

.icon-btn .material-icons {
    font-size: 20px;
    line-height: 1;
}

/* Tooltip */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    padding: 6px 12px;
    background: var(--secondary-color);
    color: white;
    font-size: 0.85rem;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

[data-tooltip]:after {
    content: '';
    position: absolute;
    bottom: calc(100% - 4px);
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--secondary-color);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
}

[data-tooltip]:hover:before,
[data-tooltip]:hover:after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Waveform Styles */
.waveform-container {
    width: 100%;
    height: 80px;
    background: rgba(108, 99, 255, 0.05);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    overflow: hidden;
    position: relative;
}

#waveform {
    width: 100%;
    height: 100%;
    display: block;
}

.audio-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.audio-buttons .btn {
    padding: 0.5rem;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#volumeSlider {
    flex: 1;
    height: 4px;
    appearance: none;
    -webkit-appearance: none;
    background: var(--primary-color);
    border-radius: 2px;
    outline: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}

#volumeSlider:hover {
    opacity: 1;
}

#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#volumeSlider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: none;
}

/* Top navigation buttons - desktop */
.help-button,
.stats-button,
.archive-button {
    z-index: 1000;
    background: rgba(99, 102, 241, 0.06);
    color: var(--primary-color);
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(99, 102, 241, 0.1);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.help-button:hover,
.stats-button:hover,
.archive-button:hover {
    background: rgba(99, 102, 241, 0.1);
}

.help-button .material-icons,
.stats-button .material-icons,
.archive-button .material-icons {
    font-size: 20px;
}

/* Desktop: Fixed positioning */
@media (min-width: 769px) {
    .help-button,
    .stats-button,
    .archive-button {
        position: fixed;
        top: 1rem;
    }
    
    .help-button {
        right: 1rem;
    }

    .stats-button {
        right: 4rem;
    }

    .archive-button {
        right: 7rem;
    }
    
    .mobile-nav-buttons {
        display: none !important;
    }
}

/* Mobile: In-header positioning */
@media (max-width: 768px) {
    /* Hide desktop fixed buttons */
    .help-button:not(.mobile-nav-btn),
    .stats-button:not(.mobile-nav-btn),
    .archive-button:not(.mobile-nav-btn) {
        display: none !important;
    }
    
    /* Style mobile nav buttons */
    .mobile-nav-btn {
        border-radius: 50%;
        width: 38px;
        height: 38px;
    }
    
    .mobile-nav-btn .material-icons {
        font-size: 20px;
    }
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-item {
    text-align: center;
    padding: 0.75rem;
    background: rgba(99, 102, 241, 0.03);
    border-radius: 4px;
    border: 1px solid rgba(99, 102, 241, 0.08);
}

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

.stat-label {
    font-size: 0.6875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-top: 0.25rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.guess-distribution {
    margin-bottom: 2rem;
}

.guess-distribution h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-weight: 600;
}

.distribution-bars {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.distribution-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.distribution-label {
    width: 1rem;
    text-align: center;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.8125rem;
}

.distribution-bar {
    flex: 1;
    background: rgba(99, 102, 241, 0.06);
    height: 1.5rem;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(99, 102, 241, 0.08);
}

.bar-fill {
    height: 100%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.5rem;
    min-width: 2rem;
}

.bar-count {
    color: white;
    font-size: 0.8125rem;
    font-weight: 600;
}

.next-puzzle-container {
    text-align: center;
    padding: 1rem;
    background: rgba(99, 102, 241, 0.03);
    border-radius: 4px;
    border: 1px solid rgba(99, 102, 241, 0.08);
}

.next-puzzle-container h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 600;
}

.countdown {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    font-variant-numeric: tabular-nums;
}

.input-container {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
    width: 100%;
}

#userInput {
    flex: 1;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.875rem;
    background: white;
    color: var(--text-color);
    font-weight: 400;
    min-height: 44px; /* Touch target size */
}

#userInput:focus {
    outline: none;
    border-color: var(--primary-color);
}

#userInput::placeholder {
    color: #9CA3AF;
}

#submitButton {
    min-width: 44px; /* Touch target size */
    min-height: 44px;
}

footer {
    text-align: center;
    margin-top: calc(var(--spacing-unit) * 2);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 400;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

footer a:hover {
    text-decoration: underline;
}