:root { --bg: #fff9f0; --pink: #ff4081; --blue: #b3e5fc; --yellow: #ffeb3b; --green: #4caf50; }
        
body { 
    margin: 0; padding: 0; overflow: hidden; 
    font-family: 'Arial Rounded MT Bold', sans-serif; 
    background: var(--bg); touch-action: none; user-select: none; 
}

/* Obří Tlačítko Zpět pro děti */
.btn-home {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 4000;
    background: white;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    border: 4px solid var(--blue);
    font-size: 3rem;
}

.btn-home:active {
    background: #f0f0f0;
    transform: scale(0.9);
}

/* Horní lišta */
#ui-layer {
    position: fixed; top: 0; width: 100%; height: 250px;
    background: white; display: flex; flex-direction: column;
    align-items: center; justify-content: flex-start;
    padding: 15px 20px; box-sizing: border-box; z-index: 1000; 
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    border-bottom: 5px solid var(--pink);
}

#instruction-text { 
    font-size: 2.2rem; font-weight: bold; color: #333; 
    margin-top: 10px; margin-bottom: 20px; text-align: center;
    height: 2.2em; display: flex; align-items: center;
}

#start-nest {
    width: 120px; height: 120px; background: #f9f9f9;
    border-radius: 50%; border: 6px dashed #ccc;
    display: flex; align-items: center; justify-content: center;
}

.ui-btn { 
    position: absolute; width: 100px; height: 100px; border-radius: 50%; 
    border: none; font-size: 3rem; cursor: pointer; display: flex; 
    align-items: center; justify-content: center; box-shadow: 0 8px 0 rgba(0,0,0,0.15); 
}
.ui-btn:active {
    transform: translateY(8px);
    box-shadow: 0 0 0 rgba(0,0,0,0);
}
#btn-restart { left: 40px; top: 120px; background: var(--yellow); }
#btn-repeat { right: 140px; top: 120px; background: var(--blue); width: 110px; height: 110px; }

#stats { position: absolute; right: 20px; top: 130px; text-align: right; font-weight: bold; color: #666; }
#score-val { color: #ff9800; font-size: 2.8rem; display: block; }

/* Herní plocha */
#game-area { 
    position: relative; width: 100vw; height: 100vh; 
    display: flex; justify-content: center; align-items: center; 
    padding-top: 250px; box-sizing: border-box; 
}

/* Hlavní objekt uprostřed - nyní STÁLÝ, jen při vstupu poskočí */
#anchor-object { 
    font-size: 240px; z-index: 100; position: relative; pointer-events: none; 
    filter: drop-shadow(0 15px 15px rgba(0,0,0,0.1));
}

.jump-animation { animation: jump 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes jump {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* Aktivní zvířátko */
#active-item {
    position: absolute; width: 120px; height: 120px;
    z-index: 1500; cursor: pointer; display: flex;
    align-items: center; justify-content: center;
    touch-action: none; left: 50%; top: 155px; transform: translate(-50%, -50%);
    font-size: 100px;
    filter: drop-shadow(0 10px 10px rgba(0,0,0,0.2));
}

.shake { animation: shake 0.5s ease-in-out; }
@keyframes shake {
    0%, 100% { transform: translate(-50%, -50%) translateX(0); }
    20%, 60% { transform: translate(-50%, -50%) translateX(-15px); }
    40%, 80% { transform: translate(-50%, -50%) translateX(15px); }
}

/* Konfety */
.confetti {
    position: absolute; pointer-events: none; z-index: 3000;
    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(360deg); opacity: 0; }
}

#feedback { position: fixed; inset: 0; pointer-events: none; z-index: 2000; transition: 0.3s; }
.success-bg { background: rgba(76, 175, 80, 0.2) !important; }

.screen { 
    position: fixed; inset: 0; background: white; z-index: 3000; 
    display: flex; flex-direction: column; justify-content: center; 
    align-items: center; text-align: center; 
}
.btn-start { 
    padding: 30px 80px; font-size: 3rem; background: var(--pink); 
    color: white; border: none; border-radius: 100px; cursor: pointer; 
    box-shadow: 0 10px 0 #ad1457; 
}

/* FIX PRO V2 VYGENEROVANÉ OBRÁZKY (Zaoblené čtverce namísto kruhů) */
.btn-home { border-radius: 20px !important; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important; border: 4px solid var(--blue, #2196f3) !important; }
.btn-home img { width: 100%; height: 100%; object-fit: cover !important; border-radius: 16px !important; }
#btn-restart { width: 90px; height: 90px; background: transparent !important; padding: 0; border: none; box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important; border-radius: 20px !important; overflow: hidden; }
#btn-restart img { width: 100%; height: 100%; object-fit: cover !important; border-radius: 20px !important; }
.btn-start { width: 200px; height: 200px; background: transparent !important; padding: 0 !important; box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important; display: flex; align-items: center; justify-content: center; margin: 0 auto; border-radius: 40px !important; overflow: hidden; }
.btn-start img { width: 100%; height: 100%; object-fit: cover !important; border-radius: 40px !important; }

/* OPRAVA CENTROVÁNÍ MODÁLNÍCH OKEN START/KONEC */
.overlay-modal { position: fixed; inset: 0; background: rgba(255,255,255,0.95); 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; gap: 20px; text-align: center; }

/* --- UNIFIED GAME HEADER V2 --- */
.game-header { position: absolute; top: 0; left: 0; width: 100%; height: 120px; display: flex; align-items: center; justify-content: space-between; padding: 15px 40px; box-sizing: border-box; z-index: 4000; pointer-events: none; }
.game-header > * { pointer-events: auto; }
.game-header .score-display, .game-header #stats { font-size: 3rem; font-weight: bold; color: #ff9800; text-shadow: 2px 2px 4px rgba(0,0,0,0.2); text-align: center; flex-grow: 1; margin: 0; padding: 0; position: static !important; }
.game-header .btn-home { margin-right: auto; position: static !important; }
.game-header .btn-restart { margin-left: auto; position: static !important; top: auto; left: auto; right: auto; bottom: auto; margin-top:0 !important; }
