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

:root {
    --primary-color: #111111;
    --secondary-color: #333333;
    --muted-color: #666666;
    --error-color: #B00020;
    --warning-color: #8A6B00;
    --text-primary: #111111;
    --text-secondary: #444444;
    --bg-light: #FFFFFF;
    --bg-white: #FFFFFF;
    --border-color: #E6E6E6;
}

body {
    font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    background: var(--bg-white);
    min-height: 100vh;
    color: var(--text-primary);
    padding: 1rem;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    padding: 2rem 0 1.5rem;
}

h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
    display: inline-block;
    position: relative;
}

h1::after {
    content: "";
    display: block;
    width: 100%;
    height: 4px; /* thin bar */
    margin-top: 8px;
    border-radius: 3px;
    background: linear-gradient(90deg, #009246 0% 33.33%, #FFFFFF 33.33% 66.66%, #CE2B37 66.66% 100%);
}

.subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* score display removed */

main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.game-card {
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.question-section {
    margin-bottom: 2rem;
}

#definition {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.hints-container {
    background: #FAFAFA;
    border-left: 4px solid var(--secondary-color);
    padding: 1.25rem;
    border-radius: 0.5rem;
    min-height: 80px;
    display: none;
}

#hints {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hint {
    font-size: 0.95rem;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    animation: slideIn 0.3s ease-out;
}

.hint::before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 2px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.options-section {
    margin-bottom: 1.5rem;
}

#options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.option {
    padding: 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: 0.75rem;
    background: var(--bg-white);
    cursor: pointer;
    transition: all 0.18s ease;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    color: var(--text-primary);
}

.option:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #F5F5F5;
    color: #999999;
    pointer-events: none;
}

.option.correct {
    border-color: var(--primary-color);
    background: rgba(0,0,0,0.06);
    color: var(--primary-color);
    font-weight: 700;
}

.option.incorrect {
    border-color: var(--error-color);
    background: rgba(176,0,32,0.06);
    color: var(--error-color);
}

footer {
    text-align: center;
    padding: 1rem 0;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: 1rem;
}

/* Mobile Optimization */
@media (max-width: 640px) {
    body {
        padding: 0.75rem;
    }

    .container {
        margin: 0 auto;
    }

    header {
        padding: 1.5rem 0 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    .game-card {
        padding: 1.5rem;
        border-radius: 0.875rem;
    }

    #definition {
        font-size: 1.1rem;
    }

    .hints-container {
        padding: 1rem;
    }

    #options {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .option {
        padding: 0.875rem;
        font-size: 0.95rem;
    }

    .next-button {
        padding: 0.875rem;
        font-size: 0.95rem;
    }

    footer {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .game-card {
        padding: 1.25rem;
    }

    #definition {
        font-size: 1rem;
    }
}

/* Celebration Modal */
.celebration-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.celebration-modal.show {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.celebration-content {
    background: white;
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
    animation: popUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

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

.celebration-emojis {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: bounce 0.6s ease-out;
}

@keyframes bounce {
    0% {
        transform: translateY(-20px);
        opacity: 0;
    }
    50% {
        transform: translateY(10px);
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.celebration-content h2 {
    font-size: 2rem;
    color: #111111;
    margin-bottom: 1rem;
}

.correct-word {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
}

.breakdown {
    font-size: 0.95rem;
    color: #666666;
    margin-bottom: 1.5rem;
}

.etymology-text {
    font-size: 1.05rem;
    color: #444444;
    line-height: 1.6;
    margin-bottom: 2rem;
    font-style: italic;
}

/* Mobile Modal */
@media (max-width: 640px) {
    .celebration-content {
        margin: 1rem;
        padding: 2rem 1.5rem;
    }

    .celebration-emojis {
        font-size: 2.5rem;
    }

    .celebration-content h2 {
        font-size: 1.75rem;
    }

    .etymology-text {
        font-size: 0.95rem;
    }
}

.hearts-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 2000;
}

.heart {
    position: absolute;
    bottom: -20px;
    font-size: 1.5rem;
    animation: floatUp 3s ease-in forwards;
    opacity: 0.9;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(0.8);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    100% {
        transform: translateY(-110vh) scale(1.4);
        opacity: 0;
    }
}