/* games/had/style.css */
:root {
    --pink: #ff4081;
    --blue: #40c4ff;
    --yellow: #ffd740;
    --green: #4caf50;
    --bg-gradient: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    touch-action: none; /* Zakázat defaultní gesto zoomu/scrollování pro plynulé hraní */
}

body {
    font-family: 'Nunito', sans-serif;
    background: var(--bg-gradient);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.stars-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.8) 0%, rgba(235,237,238,0.5) 100%);
}

.game-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 100px; /* Sníženo pro lepší vycentrování čtverce */
    position: relative;
    width: 100%;
}

#gameCanvas {
    background: white;
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    max-width: 95vw;
    max-height: 60vh;
    border: 8px solid white;
}

/* Dotykové ovládání */
.touch-controls {
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 10;
    pointer-events: none; /* Propouštět kliky tam, kde nejsou tlačítka */
}

.ctrl-btn {
    pointer-events: auto;
    width: 150px;
    height: 150px;
    border-radius: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    font-size: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: transform 0.1s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    border-bottom: 8px solid rgba(0,0,0,0.1);
}

.ctrl-btn:active {
    transform: scale(0.9) translateY(4px);
    border-bottom-width: 2px;
}

.ctrl-btn img {
    width: 70%;
    height: 70%;
    object-fit: contain;
}

.ctrl-btn.left { background-color: var(--pink); color: white; }
.ctrl-btn.right { background-color: var(--blue); color: white; }

@media (max-height: 700px) {
    .ctrl-btn { width: 120px; height: 120px; font-size: 4rem; }
    .touch-controls { bottom: 20px; padding: 0 20px; }
}
