* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Sans MS', 'Marker Felt', cursive, sans-serif;
    background: linear-gradient(135deg, #f5e6d3 0%, #ffe8d6 100%);
}

#game-container {
    width: 100%;
    height: calc(100vh - 80px);
    position: relative;
    margin-top: 80px;
}

.screen {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.screen.active {
    display: flex;
}

#game-canvas {
    display: block;
    background: transparent;
    cursor: crosshair;
}

#game-ui {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
    z-index: 10;
}

.doodle-button {
    background: #fff9e6;
    border: 3px solid #333;
    border-radius: 8px;
    padding: 12px 20px;
    font-family: 'Comic Sans MS', 'Marker Felt', cursive;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    box-shadow: 4px 4px 0px #333;
    transition: all 0.1s;
    position: relative;
}

.doodle-button:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #333;
}

.doodle-button:active {
    transform: translate(4px, 4px);
    box-shadow: 0px 0px 0px #333;
}

.doodle-title {
    font-size: 48px;
    color: #333;
    margin-bottom: 10px;
    text-align: left;
    text-shadow: 3px 3px 0px rgba(0,0,0,0.1);
}

.doodle-subtitle {
    font-size: 28px;
    color: #555;
    margin-bottom: 20px;
    text-align: center;
}

.doodle-text {
    font-size: 18px;
    color: #333;
    font-weight: bold;
}

#menu-screen {
    background: linear-gradient(135deg, #f5e6d3 0%, #ffe8d6 100%);
    flex-direction: row;
    justify-content: flex-start;
    align-items: stretch;
    padding: 60px 90px;
    gap: 60px;
}

#menu-sidebar {
    width: 360px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-self: stretch;
}

#menu-hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-block {
    background: rgba(255, 255, 255, 0.6);
    border: 3px solid #333;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 6px 6px 0px #333;
}

.mode-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mode-btn {
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.mode-btn:focus {
    outline: none;
}

.mode-btn:focus-visible {
    outline: 3px dashed #333;
    outline-offset: 4px;
}

.mode-btn:not(:hover):not(:active) {
    transform: translate(0, 0);
    box-shadow: 4px 4px 0px #333;
}

.hero-bowl {
    width: clamp(320px, 50vw, 520px);
    height: clamp(360px, 55vh, 540px);
    border: 4px dashed #333;
    border-radius: 40px;
    position: relative;
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 12px 12px 0px rgba(0,0,0,0.1);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 40px;
}

.hero-bowl-glow {
    position: absolute;
    inset: 20px;
    border-radius: 32px;
    background: radial-gradient(circle at top, rgba(255,255,255,0.8), transparent 70%);
    pointer-events: none;
}

.hero-note {
    position: relative;
    font-size: 20px;
    color: #5c4334;
    text-align: center;
    line-height: 1.4;
    z-index: 2;
}

.dropdown {
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dropdown .caret {
    font-size: 20px;
}

.dropdown-panel {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.25s ease, opacity 0.2s ease;
    margin-top: 0;
}

.dropdown.open .dropdown-panel {
    max-height: 600px;
    opacity: 1;
    margin-top: 16px;
}

.dropdown-label {
    font-size: 16px;
    margin-bottom: 12px;
    color: #5c4334;
}

.dropdown.compact {
    width: auto;
}

.dropdown.compact .dropdown-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: #fff9e6;
    border: 3px solid #333;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 6px 6px 0px #333;
    max-height: none;
    opacity: 0;
    pointer-events: none;
    min-width: 200px;
}

.dropdown.compact.open .dropdown-panel {
    opacity: 1;
    pointer-events: auto;
}

.mode-btn {
    font-size: 24px;
    padding: 18px 24px;
    min-width: 100%;
}

#pause-screen {
    background: rgba(245, 230, 211, 0.95);
    backdrop-filter: blur(5px);
}

#pause-screen .doodle-button {
    margin: 10px;
    min-width: 150px;
}

#gameover-screen {
    background: rgba(20, 16, 11, 0.65);
    backdrop-filter: blur(6px);
    color: #fff;
}

.gameover-card {
    background: #fff9e6;
    border: 4px solid #333;
    border-radius: 18px;
    padding: 40px 50px;
    box-shadow: 10px 10px 0px rgba(0, 0, 0, 0.35);
    text-align: center;
    max-width: 420px;
}

.gameover-card .doodle-title {
    text-align: center;
}

.gameover-actions {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

#level-indicator {
    background: #fff9e6;
    border: 3px solid #333;
    border-radius: 8px;
    padding: 10px 15px;
    box-shadow: 3px 3px 0px #333;
    transform: translateY(0);
    transition: transform 0.2s ease;
}

#current-level {
    color: #d97757;
    font-size: 20px;
}

#level-indicator.dropdown-buffer {
    transform: translateY(160px);
}

.doodle-button.ghost {
    background: #fff;
    box-shadow: 2px 2px 0px #333;
    width: 100%;
    font-size: 16px;
}

.doodle-button.ghost:hover {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0px #333;
}

@media screen and (max-width: 768px) {
    #menu-screen {
        flex-direction: column;
        padding: 30px 20px;
        gap: 30px;
    }
    
    #menu-sidebar {
        width: 100%;
    }
    
    .doodle-title {
        font-size: 32px;
    }
    
    #game-container {
        height: calc(100vh - 60px);
        margin-top: 60px;
    }
}

