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

:root {
    --bg-color: #f5f3ee;
    --primary-color: #2d5016;
    --secondary-color: #4a7c59;
    --accent-color: #6b8e5a;
    --text-color: #2d5016;
    --dark-green: #2d5016;
    --correct-color: #4a7c59;
    --incorrect-color: #a85555;
    --hint-color: #6b8e9f;
    --card-bg: #fefcf8;
    --info-bar-bg: #f5f1e8;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
    --border-color: #e5e5e5;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: var(--bg-color);
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(0, 0, 0, 0.015) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 0, 0, 0.015) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(0, 0, 0, 0.01) 0%, transparent 50%);
    background-size: 100% 100%, 100% 100%, 100% 100%;
    color: var(--text-color);
    min-height: 100vh;
    padding: 20px;
    margin: 0;
    line-height: 1.7;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 1px,
            rgba(0, 0, 0, 0.015) 1px,
            rgba(0, 0, 0, 0.015) 2px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 1px,
            rgba(0, 0, 0, 0.015) 1px,
            rgba(0, 0, 0, 0.015) 2px
        );
    pointer-events: none;
    z-index: 0;
    opacity: 0.1;
}

.game-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
    background: var(--card-bg);
    background-image: 
        radial-gradient(circle at 0.5px 0.5px, rgba(0, 0, 0, 0.04) 0.5px, transparent 0),
        radial-gradient(circle at 0.5px 0.5px, rgba(0, 0, 0, 0.025) 0.5px, transparent 0);
    background-size: 4px 4px, 8px 8px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    position: relative;
    z-index: 1;
}

/* Motto and Menu Wrapper */
.motto-menu-wrapper {
    position: relative;
    padding: 0 25px 10px;
    margin-top: -3px;
}

/* Title Header Wrapper */
.title-header-wrapper {
    position: absolute;
    top: -20px;
    right: 25px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.hamburger-menu {
    background: transparent;
    border: none;
    color: var(--dark-green);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px 10px;
    transition: opacity 0.2s ease;
    font-family: inherit;
}

.hamburger-menu:hover {
    opacity: 0.7;
}

/* Menu Dropdown */
.menu-dropdown {
    position: absolute;
    top: 100%;
    right: 25px;
    margin-top: 5px;
    background: var(--card-bg);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 1000;
    overflow: hidden;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.menu-item .menu-kofi-icon {
    height: 16px;
    width: auto;
    display: inline-block;
}

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

.menu-item:hover {
    background: #f5f5f5;
}

/* Game Title Section */
.game-title-section {
    padding: 20px 25px 8px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    position: relative;
}

/* Newspaper Date - Top Left Corner */
.newspaper-date {
    position: absolute;
    top: 18px;
    left: 25px;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-color);
    opacity: 0.7;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1.2;
    z-index: 10;
}

/* Streak Indicator - Top Right Corner */
.streak-indicator {
    position: absolute;
    top: 18px;
    right: 25px;
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 0.7rem;
    color: var(--text-color);
    opacity: 0.7;
    z-index: 10;
    text-align: right;
}

.streak-label {
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0.5px;
}

.streak-value {
    font-weight: 600;
    font-style: normal;
}

.streak-coming-soon {
    font-size: 0.65rem;
    opacity: 0.6;
    font-style: italic;
}

.masthead-line {
    flex: 1;
    height: 1px;
    background: var(--text-color);
    opacity: 0.3;
    align-self: center;
    margin-top: 0.9rem; /* Adjust to center with the stacked title */
}

.game-title-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    line-height: 1;
    margin: 0;
    padding: 0;
    align-self: center;
    position: relative;
    cursor: pointer;
    text-decoration: none;
}

.game-title-wrapper * {
    text-decoration: none;
    color: inherit;
}

.game-title-small {
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 3px;
    font-family: 'Georgia', 'Times New Roman', serif;
    color: var(--dark-green);
    text-transform: uppercase;
    opacity: 0.8;
    line-height: 1;
}

.game-title {
    font-size: 2.5rem;
    font-weight: 400;
    margin: 0;
    letter-spacing: 2px;
    font-family: 'Georgia', 'Times New Roman', serif;
    color: var(--dark-green);
    white-space: nowrap;
    line-height: 1;
}

/* Game Motto */
.game-motto {
    text-align: center;
    padding: 0;
    margin: 0;
    width: 100%;
}

.motto-text {
    font-size: 0.8rem;
    font-style: italic;
    color: var(--dark-green);
    margin: 0;
    font-weight: 400;
    letter-spacing: 1px;
    opacity: 0.75;
    font-family: 'Georgia', 'Times New Roman', serif;
    text-transform: none;
}

/* Daily Info Bar */
.daily-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f5f1e8;
    padding: 12px 25px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-family: 'Georgia', 'Times New Roman', serif;
}

.info-bar-left {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: nowrap;
}

.daily-info-bar span {
    flex: 0 0 auto;
    white-space: nowrap;
}

#puzzle-number {
    color: var(--dark-green);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.5px;
    font-family: 'Georgia', 'Times New Roman', serif;
}

#daily-date {
    color: var(--dark-green);
    font-weight: 400;
    font-size: 0.8rem;
    opacity: 0.7;
    font-style: italic;
    letter-spacing: 0.8px;
    font-family: 'Georgia', 'Times New Roman', serif;
}


#mistakes-left {
    text-align: right;
    color: var(--dark-green);
    font-weight: 400;
    font-size: 0.8rem;
    opacity: 0.7;
    font-style: italic;
    letter-spacing: 0.8px;
    font-family: 'Georgia', 'Times New Roman', serif;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pencil-icons-container {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 4px;
}

.pencil-icon {
    flex-shrink: 0;
    color: var(--dark-green);
    opacity: 0.7;
    vertical-align: middle;
    transition: opacity 0.3s ease;
}

.pencil-icon.bounce {
    animation: pencilBounce 0.5s ease;
}

.pencil-icon.faded {
    opacity: 0.3;
}

@keyframes pencilBounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    25% {
        transform: translateY(-8px) scale(1.1);
    }
    50% {
        transform: translateY(0) scale(1);
    }
    75% {
        transform: translateY(-4px) scale(1.05);
    }
}

#mistakes-left-text {
    display: inline-block;
}

/* Footer */
.game-footer {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 0 25px;
}

.wikipedia-attribution {
    font-size: 0.85rem;
    color: var(--dark-green);
    margin: 0;
    padding: 0;
    opacity: 0.7;
    line-height: 1.5;
}

.wikipedia-attribution p {
    margin: 0;
    padding: 0;
}

.wikipedia-attribution a {
    color: var(--primary-color);
    text-decoration: none;
}

.wikipedia-attribution a:hover {
    text-decoration: underline;
}

.donation-section {
    flex-shrink: 0;
}

.donate-btn {
    background: transparent;
    color: var(--dark-green);
    border: 1px solid var(--dark-green);
    padding: 8px 16px;
    border-radius: 0;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    text-transform: none;
    letter-spacing: 0.3px;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 8px;
}

.donate-btn .kofi-icon {
    height: 20px;
    width: auto;
    display: inline-block;
}

.donate-btn:hover {
    background: var(--dark-green);
    color: white;
    opacity: 1;
}

/* Completion Modal */
.completion-modal,
.archive-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.completion-modal .modal-content,
.archive-modal .modal-content {
    position: relative;
    background: var(--card-bg);
    background-image: 
        radial-gradient(circle at 0.5px 0.5px, rgba(0, 0, 0, 0.08) 0.5px, transparent 0),
        radial-gradient(circle at 0.5px 0.5px, rgba(0, 0, 0, 0.05) 0.5px, transparent 0);
    background-size: 4px 4px, 8px 8px;
    padding: 25px 40px 35px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.08);
    max-width: 580px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    animation: slideUp 0.3s ease;
    z-index: 2001;
}

.completion-modal .modal-content {
    position: relative;
}

.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: var(--dark-green);
    font-size: 3.5rem;
    line-height: 1;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-family: inherit;
    z-index: 2002;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.close-modal-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.checkmark-animation {
    text-align: center;
    font-size: 3.5rem;
    color: var(--dark-green);
    margin: 0 auto 8px;
    transform: scale(0);
    animation: checkmarkPop 0.6s ease 0.3s forwards;
    display: block;
    width: 100%;
}

@keyframes checkmarkPop {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.completion-modal .modal-content h2,
.archive-modal .modal-content h2 {
    font-size: 2.2rem;
    color: var(--dark-green);
    margin: 0 0 25px 0;
    text-align: center;
    font-weight: 700;
    font-family: 'Georgia', 'Times New Roman', serif;
    letter-spacing: 0.5px;
}

.completion-details {
    margin-bottom: 30px;
}

.completion-timer {
    font-size: 1.05rem;
    color: var(--text-color);
    margin: 15px 0 25px 0;
    text-align: center;
    letter-spacing: 0.5px;
}

.completion-timer .timer-label {
    color: var(--text-color);
    opacity: 0.65;
    font-weight: 400;
    font-style: italic;
    font-size: 0.95rem;
}

.completion-timer .timer-value {
    color: var(--dark-green);
    font-weight: 700;
    font-size: 1.15rem;
    font-style: normal;
    margin-left: 6px;
    letter-spacing: 0.5px;
}

.completion-message {
    font-size: 1.1rem;
    color: var(--dark-green);
    margin-bottom: 25px;
    line-height: 1.7;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.completion-message .typo-word {
    background: #dc3545;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    display: inline-block;
    animation: wordPopIn 0.5s ease-out 0.4s both;
}

.completion-message .correct-word {
    background: var(--correct-color);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    display: inline-block;
    animation: wordPopIn 0.5s ease-out 0.6s both;
}

@keyframes wordPopIn {
    0% {
        transform: scale(0.8) translateY(10px);
        opacity: 0;
    }
    60% {
        transform: scale(1.05) translateY(-2px);
        opacity: 1;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.wikipedia-link-section {
    margin-top: 20px;
    text-align: center;
}

.wikipedia-text {
    font-size: 0.9rem;
    color: var(--dark-green);
    line-height: 1.6;
    opacity: 0.8;
    margin: 0;
}

.wikipedia-text a {
    color: var(--dark-green);
    text-decoration: none;
    transition: opacity 0.2s ease;
    opacity: 0.85;
    border-bottom: 1px solid transparent;
}

.wikipedia-text a:hover {
    opacity: 1;
    border-bottom-color: var(--dark-green);
}

.wikipedia-link {
    font-weight: 500;
}

/* Archive Modal */
.archive-content {
    max-width: 500px;
}

.archive-list {
    max-height: 350px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.archive-item {
    padding: 10px 12px;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: background 0.15s ease;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
}

.archive-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

.archive-item.completed {
    opacity: 0.7;
}

.archive-number {
    font-weight: 600;
    color: var(--dark-green);
    font-size: 0.9rem;
    min-width: 40px;
}

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

.archive-date {
    color: #666;
    font-size: 0.8rem;
    text-align: right;
    white-space: nowrap;
}

/* Remove old header styles - no longer needed */

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Game Buttons */
.game-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    background: var(--secondary-color);
    color: var(--text-color);
    white-space: nowrap;
}

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

.game-btn.primary,
.game-btn.secondary,
.game-btn.share-btn {
    background: var(--card-bg);
    color: var(--dark-green);
    border: 1.5px solid var(--dark-green);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.game-btn.primary:hover,
.game-btn.secondary:hover,
.game-btn.share-btn:hover {
    background: var(--dark-green);
    color: white;
}

.share-icon {
    flex-shrink: 0;
}

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

.game-btn.active:hover {
    background: var(--accent-color);
}

/* Loading */
.loading {
    text-align: center;
    padding: 80px 20px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

/* Welcome Screen */
.welcome-screen {
    text-align: center;
    padding: 30px 40px 40px;
    background: var(--card-bg);
    background-image: 
        radial-gradient(circle at 0.5px 0.5px, rgba(0, 0, 0, 0.08) 0.5px, transparent 0),
        radial-gradient(circle at 0.5px 0.5px, rgba(0, 0, 0, 0.05) 0.5px, transparent 0);
    background-size: 4px 4px, 8px 8px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    animation: fadeIn 0.5s ease-in;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.welcome-content {
    max-width: 520px;
    margin: 0 auto;
}

.welcome-icon {
    color: var(--primary-color);
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
    animation: fadeIn 0.6s ease-in;
    opacity: 0.9;
}

.welcome-icon svg {
    width: 48px;
    height: 48px;
}

.welcome-title-wrapper {
    margin-bottom: 16px;
}

.welcome-title {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 8px;
    font-family: 'Georgia', 'Times New Roman', serif;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.welcome-tutorial {
    margin-bottom: 22px;
    padding: 16px 20px;
    background: var(--bg-color);
    background-image: 
        radial-gradient(circle at 0.5px 0.5px, rgba(0, 0, 0, 0.03) 0.5px, transparent 0);
    background-size: 4px 4px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.tutorial-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.4;
}

.tutorial-typo-highlight {
    background: var(--dark-green);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    display: inline-block;
}

.tutorial-subtext {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.75;
    line-height: 1.5;
    font-family: 'Georgia', 'Times New Roman', serif;
}

.start-game-btn {
    padding: 14px 40px;
    font-size: 0.95rem;
    font-weight: 700;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Georgia', 'Times New Roman', serif;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    overflow: hidden;
}

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

.start-game-btn:hover::before {
    left: 100%;
}

.start-game-btn:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.start-game-btn:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.welcome-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.welcome-action-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    background: transparent;
    color: var(--text-color);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Georgia', 'Times New Roman', serif;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.8;
}

.welcome-action-btn svg {
    flex-shrink: 0;
}

.welcome-action-btn:hover {
    background: var(--bg-color);
    border-color: var(--dark-green);
    opacity: 1;
    transform: translateY(-1px);
}

.welcome-action-btn:active {
    transform: translateY(0);
}

.spinner {
    border: 5px solid var(--secondary-color);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    font-size: 1.3rem;
    color: var(--text-color);
}

/* Game Content */
.game-content {
    animation: fadeIn 0.5s ease-in;
    position: relative;
    z-index: 1;
}

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

/* Article Wrapper */
.article-wrapper {
    background: transparent;
    padding: 20px 25px;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
}

.article-wrapper.shake {
    animation: shakeWrapper 0.5s ease;
}

@keyframes shakeWrapper {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
    20%, 40%, 60%, 80% { transform: translateX(8px); }
}

.article-header {
    margin-bottom: 15px;
}

.title-section {
    margin-bottom: 12px;
}

.article-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-green);
    margin: 0 0 5px 0;
    line-height: 1.3;
}

.article-source {
    font-size: 0.95rem;
    color: var(--dark-green);
    font-style: italic;
    margin: 0;
    font-weight: 400;
    opacity: 0.8;
}

.top-message-bar {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    margin: -8px 0 10px 0;
    width: 100%;
}

.left-messages {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}

.special-day-message {
    font-size: 0.8rem;
    color: var(--dark-green);
    font-weight: 400;
    font-style: italic;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.5;
    opacity: 0.75;
    font-family: 'Georgia', 'Times New Roman', serif;
    letter-spacing: 0.3px;
}

.special-day-icon {
    flex-shrink: 0;
    color: var(--dark-green);
    opacity: 0.8;
    width: 14px;
    height: 14px;
    animation: starBlink 2s ease-in-out;
}

@keyframes starBlink {
    0% {
        color: var(--dark-green);
        opacity: 0.8;
        transform: translateY(0);
    }
    15% {
        color: #4ade80;
        opacity: 1;
        transform: translateY(-4px);
    }
    30% {
        color: var(--dark-green);
        opacity: 0.8;
        transform: translateY(0);
    }
    45% {
        color: #4ade80;
        opacity: 1;
        transform: translateY(-4px);
    }
    60% {
        color: var(--dark-green);
        opacity: 0.8;
        transform: translateY(0);
    }
    75% {
        color: #4ade80;
        opacity: 1;
        transform: translateY(-3px);
    }
    100% {
        color: var(--dark-green);
        opacity: 0.8;
        transform: translateY(0);
    }
}

.special-day-text {
    display: inline;
}

/* Game Instruction */
.game-instruction {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    margin: 0;
    padding: 0;
    text-align: left;
    flex: 0 0 auto;
}

.instruction-icon {
    flex-shrink: 0;
    color: var(--dark-green);
    opacity: 0.65;
}

.game-instruction span {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 0.85rem;
    color: var(--dark-green);
    font-style: italic;
    margin: 0;
    opacity: 0.65;
    letter-spacing: 0.3px;
    font-weight: 400;
}

/* Submit Buttons - appears below article when text is selected */
.submit-buttons-wrapper {
    clear: both;
    margin-top: 20px;
    margin-bottom: 0;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Post-Game Message */
.post-game-message {
    clear: both;
    margin-top: 5px;
    padding: 30px 40px 40px;
    background: var(--card-bg);
    background-image: 
        radial-gradient(circle at 0.5px 0.5px, rgba(0, 0, 0, 0.08) 0.5px, transparent 0),
        radial-gradient(circle at 0.5px 0.5px, rgba(0, 0, 0, 0.05) 0.5px, transparent 0);
    background-size: 4px 4px, 8px 8px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    animation: fadeIn 0.5s ease-in;
    border: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center;
}

.post-game-content {
    max-width: 520px;
    margin: 0 auto;
}

.post-game-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 22px 0;
    line-height: 1.4;
    font-family: 'Georgia', 'Times New Roman', serif;
}

.countdown-section {
    margin: 22px 0;
    padding: 16px 20px;
    background: var(--bg-color);
    background-image: 
        radial-gradient(circle at 0.5px 0.5px, rgba(0, 0, 0, 0.03) 0.5px, transparent 0);
    background-size: 4px 4px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.countdown-label {
    font-size: 0.9rem;
    color: var(--text-color);
    margin: 0 0 8px 0;
    font-weight: 500;
    opacity: 0.75;
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.5;
}

.countdown-timer {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-color);
    font-family: 'Georgia', 'Times New Roman', serif;
    letter-spacing: 2px;
    margin: 0;
    opacity: 0.9;
}

.post-game-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.post-game-actions .game-btn.secondary {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    background: transparent;
    color: var(--text-color);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    opacity: 0.8;
    font-family: 'Georgia', 'Times New Roman', serif;
}

.post-game-actions .game-btn.secondary:hover {
    background: var(--bg-color);
    border-color: var(--dark-green);
    opacity: 1;
    transform: translateY(-1px);
}

.submit-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.submit-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Georgia', 'Times New Roman', serif;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.submit-btn.primary {
    background: var(--card-bg);
    color: var(--dark-green);
    font-weight: 600;
    letter-spacing: 1px;
    border: 1.5px solid var(--dark-green);
    text-transform: uppercase;
}

.submit-btn.primary:hover {
    background: var(--dark-green);
    color: white;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.submit-btn.clear {
    background: var(--card-bg);
    color: var(--dark-green);
    border: 1.5px solid var(--dark-green);
    padding: 10px 16px;
}

.submit-btn.clear:hover {
    background: var(--dark-green);
    color: white;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

/* Article Content */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--dark-green);
    user-select: none;
    -webkit-user-select: none;
    padding: 5px 0;
    margin-bottom: 10px;
}

.article-content::after {
    content: "";
    display: table;
    clear: both;
}

.article-content p {
    margin-bottom: 12px;
}

.article-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.article-content a:hover {
    color: var(--accent-color);
}

/* Clickable Words */
.article-content .word-clickable {
    cursor: pointer;
    padding: 0;
    margin: 0;
    border-radius: 3px;
    transition: background-color 0.2s ease;
    display: inline;
    position: relative;
    /* Reserve space for highlight to prevent shifting */
    padding: 2px 2px;
    margin: 0;
}

.article-content .word-clickable:hover {
    background: #d0d0d0;
}

.article-content .word-clickable.word-selected {
    background: var(--dark-green) !important;
    color: white !important;
    /* Keep same padding to prevent layout shift */
    padding: 2px 4px !important;
    border-radius: 2px;
    font-weight: 600;
    box-shadow: none;
    margin: 0 !important;
}

.article-content .word-clickable.word-selected:hover {
    background: var(--secondary-color) !important;
    color: white !important;
}

.article-content .word-clickable.word-wrong {
    background: #dc3545 !important;
    color: white !important;
    border-radius: 4px;
    padding: 2px 4px;
    animation: wrongPulse 0.5s ease;
    box-shadow: 0 0 8px rgba(220, 53, 69, 0.4);
}

.article-content .word-clickable.word-correct {
    background: #28a745 !important;
    color: white !important;
    border-radius: 4px;
    padding: 2px 4px;
    font-weight: 600;
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.4);
    animation: correctPulse 0.5s ease;
}

@keyframes wrongPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(220, 53, 69, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 12px rgba(220, 53, 69, 0.6);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 8px rgba(220, 53, 69, 0.4);
    }
}

@keyframes correctPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(40, 167, 69, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 12px rgba(40, 167, 69, 0.6);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 8px rgba(40, 167, 69, 0.4);
    }
}


/* Article Thumbnail */
.article-thumbnail {
    float: right;
    margin: -40px 0 15px 20px;
    max-width: 300px;
    max-height: 250px;
}

.article-thumbnail img {
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--dark-green);
    max-width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
    display: block;
}

.article-thumbnail-caption {
    font-size: 0.75rem;
    line-height: 1.3;
    color: var(--text-color);
    margin-top: 6px;
    font-style: italic;
    text-align: left;
}


.feedback {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-weight: 600;
    text-align: center;
    font-size: 1rem;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback:empty {
    display: none;
    min-height: 0;
    padding: 0;
    margin: 0;
}

.feedback.correct {
    background: #d4edda;
    color: var(--correct-color);
    border: 3px solid var(--correct-color);
}

.feedback.incorrect {
    background: #f8d7da;
    color: var(--incorrect-color);
    border: 3px solid var(--incorrect-color);
}

.feedback.hint {
    background: #d1ecf1;
    color: var(--hint-color);
    border: 3px solid var(--hint-color);
}

.modal-content {
    background: var(--card-bg);
    background-image: 
        radial-gradient(circle at 0.5px 0.5px, rgba(0, 0, 0, 0.08) 0.5px, transparent 0),
        radial-gradient(circle at 0.5px 0.5px, rgba(0, 0, 0, 0.05) 0.5px, transparent 0);
    background-size: 4px 4px, 8px 8px;
    padding: 50px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    width: 90%;
    text-align: center;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.modal-content p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    color: var(--text-color);
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
}

/* Tutorial Section */
.tutorial-section {
    padding: 0;
    margin-bottom: 0;
    background: var(--info-bar-bg);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.tutorial-header {
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.tutorial-header:hover {
    background: rgba(0, 0, 0, 0.02);
}

.tutorial-header h3 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: #3a3a3a;
    opacity: 0.9;
}

.tutorial-toggle {
    font-size: 0.8rem;
    color: #3a3a3a;
    transition: transform 0.3s ease;
    opacity: 0.7;
    display: inline-block;
}

.tutorial-section.collapsed .tutorial-toggle {
    transform: rotate(0deg);
}

.tutorial-section:not(.collapsed) .tutorial-toggle {
    transform: rotate(90deg);
}

.tutorial-content {
    background: var(--info-bar-bg);
    padding: 20px 25px 25px 25px;
    border: none;
    box-shadow: none;
    max-height: 600px;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.tutorial-section.collapsed .tutorial-content {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

.tutorial-section:not(.collapsed) .tutorial-content {
    max-height: 600px;
    padding: 20px 25px 25px 25px;
}

.tutorial-section-content {
    margin-bottom: 20px;
}

.tutorial-section-content:last-child {
    margin-bottom: 0;
}

.tutorial-section-content h4 {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2a2a2a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Georgia', 'Times New Roman', serif;
}

.tutorial-list {
    margin: 0;
    padding-left: 20px;
    list-style: none;
}

.tutorial-list li {
    margin-bottom: 8px;
    font-size: 0.85rem;
    line-height: 1.7;
    color: #4a4a4a;
    opacity: 0.9;
    position: relative;
    padding-left: 18px;
}

.tutorial-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #6a6a6a;
    opacity: 0.6;
    font-weight: bold;
}

.tutorial-list li:last-child {
    margin-bottom: 0;
}

.tutorial-list strong {
    color: #2a2a2a;
    font-weight: 600;
    opacity: 1;
}

.tutorial-content p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.7;
    color: #4a4a4a;
    opacity: 0.9;
}

.tutorial-content a {
    color: var(--dark-green);
    text-decoration: underline;
    text-decoration-color: rgba(45, 80, 22, 0.4);
    transition: all 0.2s ease;
}

.tutorial-content a:hover {
    color: var(--primary-color);
    text-decoration-color: var(--dark-green);
}

.tutorial-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
    margin: 20px 0;
    border: none;
}

/* Hide body scrollbar */
body {
    overflow-x: hidden;
}

html {
    overflow-x: hidden;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .game-wrapper {
        margin: 0;
        max-width: 100%;
    }
    
    .game-title-section {
        padding: 8px 15px 6px;
        gap: 10px;
    }
    
    .newspaper-date {
        display: none;
    }
    
    .streak-indicator {
        display: none;
    }
    
    .streak-coming-soon {
        font-size: 0.6rem;
    }
    
    .game-title {
        font-size: 1.8rem;
    }
    
    .game-title-small {
        font-size: 0.75rem;
    }
    
    .motto-menu-wrapper {
        padding: 0 15px 6px;
        position: relative;
    }
    
    .game-motto {
        width: 100%;
        text-align: center;
    }
    
    .title-header-wrapper {
        position: absolute;
        top: -18px;
        right: 15px;
        justify-content: flex-end;
    }
    
    .motto-text {
        font-size: 0.7rem;
    }
    
    .daily-info-bar {
        padding: 10px 15px;
        font-size: 0.8rem;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .info-bar-left {
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .info-bar-left > * {
        white-space: nowrap;
    }
    
    #puzzle-number {
        font-size: 0.9rem;
    }
    
    #daily-date {
        font-size: 0.75rem;
    }
    
    #mistakes-left {
        font-size: 0.75rem;
        gap: 5px;
    }
    
    .pencil-icons-container {
        gap: 3px;
        margin-right: 3px;
    }
    
    .pencil-icon {
        width: 12px;
        height: 12px;
    }
    
    .article-wrapper {
        padding: 15px;
    }
    
    .article-title {
        font-size: 1.6rem;
    }
    
    .article-source {
        font-size: 0.85rem;
    }
    
    .game-instruction {
        margin: 0 0 12px 0;
        gap: 5px;
    }
    
    .instruction-icon {
        width: 12px;
        height: 12px;
    }
    
    .game-instruction span {
        font-size: 0.75rem;
    }
    
    .article-content {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .article-thumbnail {
        float: none;
        max-width: 100%;
        margin: 15px 0;
        text-align: center;
    }
    
    .article-thumbnail img {
        max-width: 100%;
        max-height: 250px;
    }
    
    .article-thumbnail-caption {
        text-align: center;
        margin-top: 6px;
    }
    
    .submit-buttons-wrapper {
        margin-top: 15px;
        padding-top: 12px;
    }
    
    .submit-btn {
        padding: 12px 18px;
        font-size: 0.9rem;
        min-height: 44px; /* Touch target size */
    }
    
    .post-game-message {
        padding: 20px 15px;
        margin-top: 20px;
    }
    
    .post-game-text {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }
    
    .post-game-actions {
        flex-direction: column;
    }
    
    .post-game-actions .game-btn {
        width: 100%;
        min-height: 44px;
    }
    
    .completion-modal .modal-content,
    .archive-modal .modal-content {
        padding: 25px 20px;
        width: 95%;
        max-width: 95%;
        margin: 10px;
    }
    
    .completion-modal .modal-content h2,
    .archive-modal .modal-content h2 {
        font-size: 1.8rem;
    }
    
    .close-modal-btn {
        width: 50px;
        height: 50px;
        top: 10px;
        right: 10px;
        font-size: 3.5rem;
        opacity: 0.9;
    }
    
    .archive-item {
        grid-template-columns: auto 1fr;
        gap: 8px;
    }
    
    .archive-date {
        grid-column: 1 / -1;
        font-size: 0.75rem;
        text-align: left;
        margin-top: 2px;
    }
    
    .checkmark-animation {
        font-size: 3rem;
        margin-bottom: 10px;
    }
    
    .completion-message {
        font-size: 1rem;
        padding-bottom: 15px;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-actions .game-btn {
        width: 100%;
        min-height: 44px;
    }
    
    .game-footer {
        margin-top: 30px;
        padding: 15px 0;
    }
    
    .footer-content {
        padding: 0 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .wikipedia-attribution {
        width: 100%;
    }
    
    .donation-section {
        width: 100%;
    }
    
    .donate-btn {
        width: 100%;
        padding: 12px;
        min-height: 44px;
    }
    
    .tutorial-header {
        padding: 12px 15px;
    }
    
    .tutorial-content {
        padding: 0 15px 15px 15px;
    }
    
    .tutorial-section:not(.collapsed) .tutorial-content {
        padding: 0 15px 15px 15px;
    }
    
    .hamburger-menu {
        font-size: 1.3rem;
        padding: 8px;
        min-width: 44px;
        min-height: 44px;
    }
    
    .menu-dropdown {
        right: 15px;
        min-width: 180px;
    }
    
    .menu-item {
        padding: 14px 18px;
        font-size: 0.9rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}
