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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: none;
    font-family: 'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', sans-serif;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    z-index: 10;
}

.back-btn {
    background: white;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    color: #0ea5e9;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.back-btn:hover, .back-btn:active {
    transform: scale(1.05);
}

.score {
    background: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 1.8rem;
    font-weight: bold;
    color: #0ea5e9;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    width: 100%;
}

#game-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

#big-letter {
    font-size: clamp(8rem, 20vw, 16rem);
    font-weight: 900;
    line-height: 1;
    text-shadow: 4px 4px 12px rgba(0,0,0,0.15);
    user-select: none;
    transition: all 0.3s ease;
}

#big-emoji {
    font-size: clamp(5rem, 12vw, 10rem);
    line-height: 1;
    margin-top: 10px;
    text-shadow: 3px 3px 8px rgba(0,0,0,0.1);
    user-select: none;
    transition: all 0.3s ease;
}

.success #big-letter {
    transform: scale(1.3);
    animation: bounce 0.6s ease;
}

.success #big-emoji {
    transform: rotate(12deg) scale(1.1);
}

#instruction {
    position: absolute;
    bottom: 40px;
    font-size: 1.3rem;
    color: #0284c7;
    font-weight: 500;
    text-align: center;
    padding: 0 20px;
}

/* Confetti particles */
.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 5;
}

@keyframes bounce {
    0%, 100% { transform: scale(1.3) translateY(0); }
    50% { transform: scale(1.3) translateY(-30px); }
}

@keyframes explode {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--vx), var(--vy)) scale(0); opacity: 0; }
}

#game-area.shake {
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

.fullscreen-btn {
    font-size: 1.5rem;
    background: rgba(255,255,255,0.8);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: transform 0.2s;
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
}
.fullscreen-btn:active {
    transform: scale(0.9);
}