/* ==========================================================================
   ISLAND HOPPER - Clean Game Styling
   ========================================================================== */

:root {
    --bg-dark: #0a0c1a;
    --panel-bg: #111428;
    --border-color: #2a2f55;
    --accent: #ff7700;
    --yellow: #ffee00;
    --orange: #ff7700;
    --red: #ff2244;
    --green: #00ff66;
    --blue: #00ccff;
    --font-arcade: 'Press Start 2P', monospace;
    --font-vt: 'VT323', monospace;
}

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

body {
    background-color: var(--bg-dark);
    color: #ffffff;
    font-family: var(--font-arcade);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    background-image: radial-gradient(circle at 50% 30%, #15162a 0%, #030408 85%);
}

/* Main Container */
.arcade-container {
    width: 100%;
    max-width: 680px;
    margin: 10px auto;
    padding: 12px;
    background: var(--panel-bg);
    border: 3px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Title Header */
.game-header {
    width: 100%;
    text-align: center;
    padding: 8px;
    margin-bottom: 8px;
    background: #0d0f1a;
    border: 2px solid var(--orange);
    border-radius: 8px;
}

.game-title-bar {
    font-size: 1.4rem;
    letter-spacing: 3px;
    text-shadow: 0 0 8px currentColor;
}

.title-orange { color: var(--orange); text-shadow: 0 0 8px var(--orange); }
.title-yellow { color: var(--yellow); text-shadow: 0 0 8px var(--yellow); }
.text-red { color: var(--red); }
.highlight { color: var(--green); text-shadow: 0 0 8px var(--green); }

/* Game Screen - Simple bordered box */
.game-screen-outer {
    width: 100%;
    max-width: 640px;
    padding: 8px;
    background: #0d0f1a;
    border: 3px solid var(--border-color);
    border-radius: 10px;
}

.game-screen-inner {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    background-color: #000000;
    border: 2px solid #1a1d30;
    border-radius: 6px;
    overflow: hidden;
}

.canvas-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#gameCanvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* UI Overlay Screens */
.ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 6, 12, 0.9);
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.ui-overlay.hidden {
    display: none;
}

.overlay-box {
    width: 90%;
    max-width: 420px;
    background: rgba(15, 17, 30, 0.95);
    border: 2px solid var(--orange);
    border-radius: 10px;
    padding: 20px 16px;
    text-align: center;
}

.game-title {
    font-size: 1.2rem;
    margin-bottom: 6px;
    letter-spacing: 2px;
}

.tagline {
    font-size: 0.55rem;
    color: var(--blue);
    margin-bottom: 14px;
    letter-spacing: 2px;
}

.instructions-card, .controls-card {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #282b45;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 10px;
    text-align: left;
}

.instructions-card h3 {
    font-size: 0.65rem;
    color: var(--yellow);
    margin-bottom: 6px;
    text-align: center;
}

.instructions-card ul {
    list-style: none;
    font-size: 0.5rem;
    line-height: 1.8;
}

.instructions-card li {
    margin-bottom: 4px;
}

.controls-card {
    font-size: 0.5rem;
    text-align: center;
}

.control-row {
    margin-bottom: 4px;
}

.key {
    background: #2b304c;
    color: #fff;
    padding: 2px 5px;
    border-radius: 3px;
    border-bottom: 2px solid #111;
    font-size: 0.5rem;
}

.play-btn {
    font-family: var(--font-arcade);
    font-size: 0.65rem;
    padding: 10px 16px;
    border: 2px solid var(--yellow);
    border-radius: 8px;
    cursor: pointer;
    background: linear-gradient(180deg, #ff6600 0%, #cc2200 100%);
    color: #ffffff;
    box-shadow: 0 3px 0 #881100, 0 0 10px rgba(255, 102, 0, 0.5);
    width: 80%;
    margin: 6px 0;
    transition: transform 0.1s ease;
}

.play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #881100, 0 0 15px rgba(255, 102, 0, 0.7);
}

.play-btn:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #881100;
}

.options-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
}

.option-btn {
    font-family: var(--font-arcade);
    font-size: 0.5rem;
    padding: 6px 10px;
    border: 1px solid var(--blue);
    border-radius: 6px;
    cursor: pointer;
    background: #202338;
    color: var(--blue);
    transition: background 0.15s;
}

.option-btn:hover {
    background: #303554;
}

.btn-group {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.stats-card {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    padding: 12px;
    margin: 12px 0;
    font-size: 0.6rem;
    line-height: 1.8;
}

.touch-controls {
    width: 100%;
    max-width: 640px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 8px 2px 8px;
    margin-top: 6px;
    background: rgba(10, 11, 18, 0.85);
    border: 1px solid #1a1d30;
    border-radius: 8px;
}

.dpad-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dpad-middle {
    display: flex;
    align-items: center;
}

.dpad-btn {
    width: 42px;
    height: 42px;
    background: #202438;
    color: #fff;
    border: 2px solid #3b4263;
    border-radius: 6px;
    font-size: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    touch-action: manipulation;
    box-shadow: 0 3px 0 #0d0f1a;
}

.dpad-btn:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #0d0f1a;
    background: #ff6600;
    color: #000;
}

.dpad-center {
    width: 38px;
    height: 38px;
    background: #121422;
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.action-btn {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: 3px solid #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    touch-action: manipulation;
    font-family: var(--font-arcade);
    transition: transform 0.1s ease;
}

.action-btn span {
    font-size: 0.6rem;
    font-weight: bold;
}

.action-btn small {
    font-size: 0.4rem;
    opacity: 0.8;
    margin-top: 2px;
}

.btn-shoot {
    background: linear-gradient(180deg, #ff3300 0%, #aa0000 100%);
    color: #fff;
    border-color: #ffaa99;
    box-shadow: 0 4px 0 #660000, 0 0 10px rgba(255, 51, 0, 0.3);
}

.btn-shoot:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #660000;
}

.btn-roll {
    background: linear-gradient(180deg, #00bbff 0%, #0044aa 100%);
    color: #fff;
    border-color: #99eeff;
    box-shadow: 0 4px 0 #002266, 0 0 10px rgba(0, 187, 255, 0.3);
}

.btn-roll:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #002266;
}

.game-footer {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid #1a1d30;
    font-size: 0.5rem;
}

.back-link {
    color: var(--green);
    text-decoration: none;
}

.back-link:hover {
    color: #fff;
}

.copyright {
    color: #50587d;
}

@media (max-width: 600px) {
    .arcade-container {
        padding: 6px;
        border-radius: 0;
        border: none;
    }
    
    .game-title-bar {
        font-size: 1rem;
    }
}
