/* fuga.css */

body.game-active {
    overflow: hidden;
}

.game-container {
    position: relative;
    width: 100%;
    height: 100vh;
    background: #05020c;
    overflow: hidden;
    font-family: 'Oswald', sans-serif;
}

.game-layer {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.game-layer.active {
    opacity: 1;
    pointer-events: auto;
}

/* INTRO SCREEN */
#game-intro {
    background: linear-gradient(135deg, rgba(10,5,24,0.9), rgba(50,10,40,0.9)), url('vice-city-bg.jpg') center/cover;
    padding-top: 60px; /* Header space */
}

.intro-content {
    background: rgba(13, 7, 28, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 46, 136, 0.3);
    padding: 3rem;
    border-radius: 20px;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}

.game-badge {
    display: inline-block;
    background: #FF2E88;
    color: #fff;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 0.8rem;
    font-family: 'Manrope', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.game-title {
    font-family: 'Anton', sans-serif;
    font-size: 4rem;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(255, 46, 136, 0.5);
    letter-spacing: 0.05em;
}

.game-story {
    font-family: 'Manrope', sans-serif;
    color: rgba(255,255,255,0.8);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.game-controls {
    background: rgba(0,0,0,0.5);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.game-controls h3 {
    color: #21D9FF;
    font-size: 1rem;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.controls-grid {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
}

.ctrl-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

kbd {
    background: #fff;
    color: #000;
    padding: 6px 12px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 0 4px 0 #ccc;
}

.ctrl-item span {
    font-family: 'Manrope', sans-serif;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
}

.play-btn {
    background: #FF2E88;
    color: #fff;
    border: none;
    padding: 1rem 3rem;
    border-radius: 99px;
    font-family: 'Anton', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 0 20px rgba(255, 46, 136, 0.4);
}

.play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 46, 136, 0.8);
}

/* GAME UI */
#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 1;
}

.hud-top {
    position: absolute;
    top: 80px; /* Below global header */
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    z-index: 10;
}

.score-box {
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 10px 20px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}

.score-box.highlight {
    border-color: rgba(33, 217, 255, 0.5);
    box-shadow: 0 0 15px rgba(33, 217, 255, 0.2);
}

.score-label {
    font-family: 'Manrope', sans-serif;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.score-val {
    font-family: 'Anton', sans-serif;
    font-size: 2rem;
    color: #fff;
    line-height: 1;
}

.score-box.highlight .score-val {
    color: #21D9FF;
}

/* GAME OVER */
.game-over-screen {
    position: absolute;
    inset: 0;
    background: rgba(200, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.game-over-screen.active {
    opacity: 1;
    pointer-events: auto;
}

.game-over-screen h2 {
    font-family: 'Anton', sans-serif;
    font-size: 8rem;
    color: #fff;
    text-shadow: 0 0 30px #ff0000;
    margin: 0;
    line-height: 1;
    letter-spacing: 0.05em;
}

.game-over-screen p {
    font-family: 'Manrope', sans-serif;
    font-size: 1.2rem;
    color: #fff;
    margin: 1rem 0 2rem;
}

.final-score {
    background: rgba(0,0,0,0.8);
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.5rem !important;
    font-family: 'Oswald', sans-serif !important;
    color: #21D9FF !important;
}

@media (max-width: 768px) {
    .intro-content { padding: 2rem; margin: 1rem; }
    .game-title { font-size: 3rem; }
    .game-over-screen h2 { font-size: 5rem; }
    .controls-grid { flex-direction: column; }
}
