/* Reset a základní styly */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

body {
    font-family: 'Courier New', monospace;
    background: #000000;
    color: white;
    user-select: none;
    position: relative;
}

#gameContainer {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
}



#gameCanvas {
    position: fixed;
    top: 0;
    left: 0;
    background: linear-gradient(180deg, #87CEEB 0%, #87CEEB 15%, #DAA520 15%, #B8860B 100%);
    z-index: 1;
}

#controls {
    display: none; /* Skryto ve výchozím stavu - zobrazí se pouze na mobilních zařízeních */
    gap: 30vw;
    position: fixed;
    bottom: 3vh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.control-btn {
    width: clamp(60px, 10vw, 110px);
    height: clamp(60px, 10vw, 110px);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    background: linear-gradient(145deg, #3498db, #2980b9);
    color: white;
    font-size: clamp(1.4rem, 4vw, 2.8rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 
        0 8px 25px rgba(52, 152, 219, 0.4),
        0 4px 10px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.3),
        inset 0 -1px 0 rgba(0,0,0,0.2);
    touch-action: manipulation;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

/* Přidání blikavého efektu při stisknutí */
.control-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s ease-out;
    pointer-events: none;
}

.control-btn:active::before {
    width: 100%;
    height: 100%;
    transition: all 0.1s ease-out;
}

/* Jemný glow efekt */
.control-btn::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: linear-gradient(45deg, #3498db, #2980b9, #5dade2);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.control-btn:hover::after {
    opacity: 0.7;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.05); opacity: 0.9; }
}

.control-btn:hover {
    transform: translateY(-5px) scale(1.05);
    background: linear-gradient(145deg, #5dade2, #3498db);
    border: 2px solid rgba(255,255,255,0.5);
    box-shadow: 
        0 12px 35px rgba(52, 152, 219, 0.6),
        0 6px 15px rgba(0,0,0,0.4),
        inset 0 2px 0 rgba(255,255,255,0.4),
        inset 0 -2px 0 rgba(0,0,0,0.3);
}

.control-btn:active {
    transform: translateY(-2px) scale(0.98);
    background: linear-gradient(145deg, #2980b9, #1f4e79);
    border: 2px solid rgba(255,255,255,0.2);
    box-shadow: 
        0 5px 15px rgba(52, 152, 219, 0.3),
        0 2px 8px rgba(0,0,0,0.5),
        inset 0 2px 5px rgba(0,0,0,0.3),
        inset 0 -1px 0 rgba(255,255,255,0.1);
}



.hidden {
    display: none !important;
}

/* Responsivní design pro mobilní zařízení */
@media (max-width: 768px) {
    #controls {
        gap: 40vw;
        bottom: 2vh;
    }
    
    .control-btn {
        width: clamp(70px, 18vw, 110px);
        height: clamp(70px, 18vw, 110px);
        font-size: clamp(1.4rem, 6vw, 2.8rem);
        box-shadow: 
            0 6px 20px rgba(52, 152, 219, 0.4),
            0 3px 8px rgba(0,0,0,0.3),
            inset 0 1px 0 rgba(255,255,255,0.3);
    }
}

@media (orientation: landscape) and (max-height: 500px) {
    #controls {
        bottom: 1vh;
        gap: 35vw;
    }
    
    .control-btn {
        width: clamp(55px, 14vw, 85px);
        height: clamp(55px, 14vw, 85px);
        font-size: clamp(1.2rem, 4vw, 2.2rem);
        box-shadow: 
            0 4px 15px rgba(52, 152, 219, 0.3),
            0 2px 6px rgba(0,0,0,0.3);
    }
}