/* ═══════════════════════════════════════════════
   KITCHEN MASTER — Styles
   ═══════════════════════════════════════════════ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow: hidden;
    background: #0d0d1a;
    font-family: 'Outfit', sans-serif;
    color: #fff;
    user-select: none;
}

#game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
}

#game-container canvas {
    display: block;
}

/* ─── HUD ────────────────────────────── */

#hud {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 10;
}

#hud > * {
    pointer-events: auto;
}

/* ─── Top Bar ────────────────────────── */

#top-bar {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: none;
}

#stage-info {
    background: rgba(15, 15, 30, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px 22px;
}

#stage-label {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #ffd580;
}

#recipe-progress {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.step-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.35);
    transition: all 0.4s ease;
}

.step-dot.active {
    background: rgba(255, 170, 0, 0.25);
    border-color: #ffaa00;
    color: #ffdd66;
    box-shadow: 0 0 12px rgba(255, 170, 0, 0.3);
    animation: pulse-dot 1.5s ease-in-out infinite;
}

.step-dot.done {
    background: rgba(80, 200, 120, 0.3);
    border-color: #50c878;
    color: #88eea8;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 8px rgba(255, 170, 0, 0.2); }
    50% { box-shadow: 0 0 18px rgba(255, 170, 0, 0.5); }
}

#stats {
    display: flex;
    gap: 12px;
}

#timer, #score {
    background: rgba(15, 15, 30, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 18px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

#timer { color: #88ccff; }
#score { color: #ffdd66; }

/* ─── Progress Bar ───────────────────── */

#progress-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    transition: opacity 0.3s;
}

#progress-container.hidden {
    opacity: 0;
    pointer-events: none;
}

#progress-label {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #ffd580;
    text-shadow: 0 0 10px rgba(255, 200, 100, 0.4);
}

#progress-bar-track {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff8844, #ffcc44);
    border-radius: 5px;
    transition: width 0.15s ease;
    box-shadow: 0 0 8px rgba(255, 180, 80, 0.4);
}

/* ─── Instruction Panel ──────────────── */

#instruction-panel {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 15, 30, 0.8);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 14px 32px;
    max-width: 600px;
    text-align: center;
}

#instruction-text {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
}

#instruction-text kbd {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    padding: 2px 8px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 13px;
    color: #ffdd88;
    margin: 0 2px;
}

/* ─── Title Screen ───────────────────── */

#title-screen {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 25, 0.6);
    backdrop-filter: blur(4px);
    transition: opacity 0.6s ease;
}

#title-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.title-content {
    text-align: center;
}

.title-content h1 {
    font-size: 56px;
    font-weight: 800;
    background: linear-gradient(135deg, #ffcc44, #ff7744);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    text-shadow: none;
}

.title-content .subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 300;
    margin-bottom: 32px;
}

.recipe-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    max-width: 380px;
    margin: 0 auto 36px;
}

.recipe-step {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
}

.start-hint {
    font-size: 18px;
    font-weight: 600;
    color: #ffcc44;
    animation: fade-pulse 2s ease-in-out infinite;
}

.controls-hint {
    margin-top: 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
}

.start-hint kbd {
    display: inline-block;
    background: rgba(255, 204, 68, 0.15);
    border: 1px solid rgba(255, 204, 68, 0.3);
    border-radius: 5px;
    padding: 3px 12px;
    font-family: 'Outfit', sans-serif;
}

@keyframes fade-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* ─── Complete Screen ────────────────── */

#complete-screen {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 25, 0.7);
    backdrop-filter: blur(6px);
    transition: opacity 0.6s ease;
}

#complete-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.complete-content {
    text-align: center;
}

.complete-content h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    color: #ffcc44;
}

#final-stars {
    font-size: 42px;
    margin-bottom: 16px;
    letter-spacing: 6px;
}

#final-time, #final-score {
    font-size: 20px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.restart-hint {
    margin-top: 24px;
    font-size: 16px;
    color: #ffcc44;
    animation: fade-pulse 2s ease-in-out infinite;
}

.restart-hint kbd {
    display: inline-block;
    background: rgba(255, 204, 68, 0.15);
    border: 1px solid rgba(255, 204, 68, 0.3);
    border-radius: 5px;
    padding: 2px 10px;
    font-family: 'Outfit', sans-serif;
}

/* ─── Float Message ──────────────────── */

#float-message {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    font-weight: 700;
    color: #ffcc44;
    text-shadow: 0 0 20px rgba(255, 200, 60, 0.5);
    transition: opacity 0.4s;
    pointer-events: none;
}

#float-message.hidden {
    opacity: 0;
}

#float-message.visible {
    opacity: 1;
    animation: float-up 1.2s ease-out forwards;
}

@keyframes float-up {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
    30% { transform: translate(-50%, -55%) scale(1.1); opacity: 1; }
    100% { transform: translate(-50%, -80%) scale(1); opacity: 0; }
}

/* ─── Responsive ─────────────────────── */

@media (max-width: 640px) {
    .title-content h1 { font-size: 36px; }
    .recipe-preview { grid-template-columns: 1fr; max-width: 220px; }
    #instruction-panel { max-width: 90vw; padding: 10px 16px; }
    #stage-info { padding: 10px 14px; }
    .step-dot { width: 24px; height: 24px; font-size: 10px; }
}
