:root {
    --primary-color: #ff6b6b;
    --bg-color: #fce4ec;
    --game-bg: #e8f5e9;
    --text-color: #333;
    --letter-bg: #fff176;
}

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

body {
    font-family: 'Fredoka One', cursive;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

.app-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

header {
    text-align: center;
    background: white;
    padding: 20px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 0px #ffcccb;
}

#score {
    font-size: 1.8rem;
    color: #4caf50;
    margin-bottom: 10px;
}

.instructions {
    font-size: 1rem;
    color: #666;
    max-width: 600px;
}

#game-container {
    width: 800px;
    height: 600px;
    background-color: var(--game-bg);
    border: 8px solid white;
    border-radius: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.05), 0 15px 30px rgba(0,0,0,0.1);
    /* Adding a subtle grid pattern for grass */
    background-image: linear-gradient(rgba(255,255,255,0.3) 2px, transparent 2px),
    linear-gradient(90deg, rgba(255,255,255,0.3) 2px, transparent 2px);
    background-size: 40px 40px;
}

#unicorn {
    font-size: 50px;
    position: absolute;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: transform 0.1s;
    user-select: none;
    /* Move to center so top/left aligns better */
    transform-origin: center;
}

.letter {
    font-size: 40px;
    position: absolute;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--letter-bg);
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    font-weight: bold;
    color: #ff5722;
    border: 3px solid white;
    animation: bounce 2s infinite ease-in-out alternate;
    user-select: none;
    z-index: 5;
}

.letter.eaten {
    transform: scale(1.5) rotate(15deg);
    opacity: 0;
    transition: all 0.3s ease-out;
}

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