/* style.css - Veselé Vaření */
:root {
    --pink: #ff4081;
    --blue: #2196f3;
    --green: #4caf50;
    --yellow: #ffeb3b;
    --orange: #ff9800;
    --board: #d7ccc8;
    --pot-color: #455a64;
}

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

body, html {
    width: 100%; height: 100%; overflow: hidden; touch-action: none;
    font-family: 'Nunito', 'Arial Rounded MT Bold', sans-serif;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #333;
}

/* Hlavička .game-header a ikony jsou sdílené v game_utils.css */

/* === GAME AREA === */
#game-area {
    position: absolute; top: 100px; left: 0; right: 0; bottom: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}

.phase-container {
    width: 100%; height: 100%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    position: relative;
}

/* --- Phase 1: Recipe --- */
.recipe-cards {
    display: flex; gap: 30px; flex-wrap: wrap; justify-content: center;
}
.recipe-btn {
    width: 200px; height: 250px; border-radius: 30px; border: none;
    background: white; box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center;
    font-size: 2.5rem; font-weight: 900; color: var(--pink);
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: inherit;
}
.recipe-icon { font-size: 6rem; margin-bottom: 20px; }
.recipe-btn:active { transform: scale(0.95); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }

/* --- Phase 2: Chopping --- */
.chopping-board {
    width: 80%; max-width: 600px; height: 300px;
    background: var(--board); border-radius: 40px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.1), 0 10px 30px rgba(0,0,0,0.2);
    position: relative; border: 10px solid #a1887f;
    display: flex; align-items: center; justify-content: center;
    z-index: 10;
}
.ingredient-whole {
    font-size: 8rem; position: absolute; user-select: none;
    transition: opacity 0.2s, transform 0.2s;
}
.chopped-piece {
    font-size: 5rem; position: absolute; user-select: none;
}
#swipe-layer {
    position: absolute; top:0; left:0; width:100%; height:100%;
    z-index: 20; touch-action: none;
}

/* Kreslení čáry řezu */
.cut-line {
    position: absolute; background: white; height: 4px; z-index: 25;
    transform-origin: left center; pointer-events: none;
    box-shadow: 0 0 10px rgba(255,255,255,0.8);
    opacity: 0.8;
}

.hint-hand {
    position: absolute; font-size: 4rem; z-index: 30; opacity: 0;
    pointer-events: none;
}
@keyframes swipeHint {
    0% { transform: translate(0, 0); opacity: 0; }
    20% { opacity: 1; }
    80% { transform: translate(150px, 0); opacity: 1; }
    100% { transform: translate(150px, 0); opacity: 0; }
}

/* --- Phase 3: Cooking --- */
.station-container {
    display: flex; flex-direction: column; align-items: center; gap: 30px;
    width: 100%; max-width: 800px; height: 100%; padding: 20px;
}

.ingredients-tray {
    display: flex; gap: 15px; padding: 20px; background: rgba(255,255,255,0.5);
    border-radius: 30px; min-width: 300px; min-height: 120px;
    box-shadow: inset 0 5px 15px rgba(0,0,0,0.05);
}

.tray-item {
    font-size: 4rem; cursor: grab; user-select: none; touch-action: none;
    transition: transform 0.2s;
}
.tray-item:active { cursor: grabbing; transform: scale(1.1); }

.cooking-zone {
    display: flex; align-items: center; gap: 40px;
}

.pot {
    width: 250px; height: 200px; background: var(--pot-color);
    border-radius: 20px 20px 60px 60px; position: relative;
    box-shadow: 0 15px 30px rgba(0,0,0,0.3), inset -20px -20px 40px rgba(0,0,0,0.3);
}
.pot::before { /* Ucha hrnce */
    content: ''; position: absolute; top: 40px; left: -30px; right: -30px; height: 40px;
    border-radius: 20px; border: 10px solid var(--pot-color); z-index: -1;
}
.pot-inner {
    position: absolute; top:-10px; left: 10px; right: 10px; height: 60px;
    background: #e0e0e0; border-radius: 50%;
    box-shadow: inset 0 10px 20px rgba(0,0,0,0.2);
    overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.pot-water {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 80%;
    background: #ffcc80; /* barva vývaru */
    transition: background 0.5s;
}

.pot-ingredient {
    position: absolute; font-size: 3rem;
    animation: floatIng 3s infinite alternate ease-in-out;
}
@keyframes floatIng {
    0% { transform: translateY(0) rotate(0); }
    100% { transform: translateY(-10px) rotate(15deg); }
}

.seasoning-tools {
    display: flex; flex-direction: column; gap: 15px;
}
.tool-btn {
    width: 80px; height: 80px; border-radius: 50%; border: none;
    background: white; font-size: 2.5rem; cursor: pointer;
    box-shadow: 0 8px 15px rgba(0,0,0,0.1); transition: transform 0.1s;
}
.tool-btn:active { transform: scale(0.9); }

/* Bublinky a koření */
.bubble {
    position: absolute; background: rgba(255,255,255,0.6); border-radius: 50%;
    animation: rise 1.5s infinite ease-in; pointer-events: none;
}
@keyframes rise {
    0% { bottom: 0; transform: scale(0.5); opacity: 0; }
    50% { opacity: 1; }
    100% { bottom: 100%; transform: scale(1.2); opacity: 0; }
}

/* Modals */
.overlay-modal {
    position: fixed; inset: 0; background: rgba(255,255,255,0.97);
    z-index: 5000; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    pointer-events: auto;
}
.modal-content {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; text-align: center;
}

.btn-start {
    width: 180px; height: 180px; background: transparent; padding: 0;
    border: none; border-radius: 40px; overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.15s;
}
.btn-start img { width: 100%; height: 100%; object-fit: cover; border-radius: 40px; }
.btn-start:active { transform: scale(0.93); }

/* Confetti */
.confetti {
    position: absolute; pointer-events: none; z-index: 6000;
    border-radius: 50%; animation: confettiFly 1s ease-out forwards;
}
@keyframes confettiFly {
    0% { transform: translate(0,0) rotate(0); opacity: 1; }
    100% { transform: translate(var(--dx), var(--dy)) rotate(720deg); opacity: 0; }
}

@media (max-width: 600px), (max-height: 700px) {
    .recipe-btn { width: 150px; height: 200px; font-size: 2rem; }
    .recipe-icon { font-size: 4rem; }
    .chopping-board { height: 200px; }
    .ingredient-whole { font-size: 6rem; }
    .pot { width: 180px; height: 150px; }
    .btn-start { width: 140px; height: 140px; }
}
