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

body {
    font-family: 'Press Start 2P', 'Courier New', monospace;
    background-color: #1a1a2e;
    color: #eee;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

#app {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

h1 {
    color: #4ade80;
    text-shadow: 2px 2px 0 #166534;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

#menu-container {
    text-align: center;
    padding: 30px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    border: 2px solid #4ade80;
}

#menu-container.hidden {
    display: none;
}

#character-select,
#theme-select {
    margin: 20px 0;
}

#character-select h3,
#theme-select h3 {
    margin-bottom: 10px;
    color: #a78bfa;
}

.selection-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 10px 0;
}

.selection-item {
    padding: 15px 10px;
    border: 2px solid #555;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(0, 0, 0, 0.3);
}

.selection-item:hover {
    border-color: #4ade80;
    transform: scale(1.05);
}

.selection-item.selected {
    border-color: #4ade80;
    background: rgba(74, 222, 128, 0.2);
}

.selection-item .preview {
    width: 40px;
    height: 40px;
    margin: 0 auto 8px;
    border-radius: 50%;
}

.selection-item .preview-canvas {
    display: block;
    margin: 0 auto 8px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
}

.selection-item .name {
    font-size: 0.7rem;
}

.theme-grid {
    grid-template-columns: repeat(4, 1fr);
}

.theme-item {
    padding: 10px 8px;
}

.theme-item .preview-canvas {
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#game-canvas {
    border: 3px solid #4ade80;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.3);
}

#game-canvas.hidden {
    display: none;
}

#hud {
    display: flex;
    justify-content: space-between;
    width: 560px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 5px;
    font-size: 0.9rem;
}

#hud.hidden {
    display: none;
}

#hud span {
    color: #fbbf24;
}

button {
    padding: 15px 30px;
    font-size: 1rem;
    font-family: inherit;
    background: #4ade80;
    color: #1a1a2e;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 20px;
}

button:hover {
    background: #22c55e;
    transform: scale(1.05);
}

#game-over-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    padding: 40px;
    background: rgba(0, 0, 0, 0.9);
    border: 3px solid #ef4444;
    border-radius: 10px;
}

#game-over-screen.hidden {
    display: none;
}

#game-over-screen h2 {
    color: #ef4444;
    margin-bottom: 20px;
}

#game-over-screen p {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.hidden {
    display: none !important;
}

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

.hopping {
    animation: hop 0.15s ease-out;
}
