/* style.css - Authentic Pixel-Art Styling & Responsive Viewport */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #080c14;
    color: #ffffff;
    font-family: 'Courier New', Courier, monospace;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#gameContainer {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #111827 0%, #030712 100%);
}

#gameCanvas {
    display: block;
    background: #000;
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-crisp-edges;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(233, 69, 96, 0.3);
    border: 2px solid #1f2937;
    border-radius: 4px;
    max-width: 100%;
    max-height: 100%;
}

/* Header bar (subtle) */
#topBar {
    position: absolute;
    top: 8px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    z-index: 10;
}

.title-pill {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid #ff69b4;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    color: #ffd166;
    letter-spacing: 1px;
    font-weight: bold;
    backdrop-filter: blur(4px);
}

.top-controls {
    pointer-events: auto;
    display: flex;
    gap: 8px;
}

.top-btn {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid #ffd166;
    color: #fff;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    transition: all 0.15s ease;
}

.top-btn:hover {
    background: #e63946;
    border-color: #fff;
}

/* Touch Gamepad Overlay (Appears on Mobile / Touch Screens) */
#mobileControls {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    height: 110px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 16px;
    pointer-events: none;
    z-index: 20;
}

.touch-cluster {
    display: flex;
    gap: 12px;
    pointer-events: auto;
}

.touch-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(30, 41, 59, 0.85);
    border: 2px solid #ffd166;
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    touch-action: manipulation;
    user-select: none;
    cursor: pointer;
}

.touch-btn:active {
    background: #e63946;
    transform: scale(0.92);
}

.touch-btn.punch {
    background: rgba(230, 57, 70, 0.85);
    border-color: #ff99a8;
}

.touch-btn.kick {
    background: rgba(244, 162, 97, 0.85);
    border-color: #ffe3c7;
}

.touch-btn.jump {
    background: rgba(42, 157, 143, 0.85);
    border-color: #a7f3d0;
}

.touch-btn.action {
    width: 60px;
    height: 60px;
    background: rgba(186, 85, 211, 0.85);
    border-color: #fbcfe8;
}

/* Only show mobile touch controls when touched or on touch devices */
@media (hover: hover) and (pointer: fine) {
    #mobileControls {
        opacity: 0.3;
        transition: opacity 0.2s ease;
    }
    #mobileControls:hover {
        opacity: 0.9;
    }
}
