* {
    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, #1e293b 0%, #0f172a 100%);
    cursor: pointer;
}

body {
    display: flex;
    flex-direction: column;
    position: relative;
}

header {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 20;
    padding: 20px 30px;
}

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

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

#game-area {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.emoji-item {
    position: absolute;
    font-size: clamp(4rem, 10vw, 7rem);
    user-select: none;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 5;
    animation: popAndFade 1s forwards ease-out;
}

#instruction {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.3rem;
    color: #94a3b8;
    font-weight: 500;
    text-align: center;
    pointer-events: none;
    padding: 0 20px;
}

@keyframes popAndFade {
    0% { 
        transform: translate(-50%, -50%) scale(0); 
        opacity: 0; 
    }
    20% { 
        transform: translate(-50%, -50%) scale(1.2); 
        opacity: 1; 
    }
    80% { 
        transform: translate(-50%, -50%) scale(1); 
        opacity: 1; 
    }
    100% { 
        transform: translate(-50%, -50%) scale(0.5); 
        opacity: 0; 
    }
}

.ring-effect {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.8);
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: ringExpand 0.6s ease-out forwards;
    z-index: 50;
}

@keyframes ringExpand {
    0% { width: 20px; height: 20px; opacity: 1; border-width: 4px; }
    100% { width: 120px; height: 120px; opacity: 0; border-width: 1px; }
}

.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);
}