/* Out Run Game Styling */

:root {
    --primary-color: #ff4757;
    --secondary-color: #00ffff;
    --accent-color: #ff007f;
    --bg-dark: #0a0b10;
    --cabinet-border: #1e202c;
    --text-light: #f5f6fa;
}

body {
    font-family: 'Outfit', sans-serif;
    background: radial-gradient(circle at center, #1b1e2e 0%, #08090d 100%);
    color: var(--text-light);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.game-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 800px;
    padding: 15px;
    box-sizing: border-box;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.back-btn {
    text-decoration: none;
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.08);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.back-btn:hover {
    background: var(--primary-color);
    box-shadow: 0 0 15px rgba(255, 71, 87, 0.6);
    transform: translateX(-3px);
}

.title-container {
    text-align: center;
}

.game-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 2.2rem;
    margin: 0;
    background: linear-gradient(180deg, #ffe066 0%, #ff5e62 50%, #ff007f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 8px rgba(255, 0, 127, 0.5));
    letter-spacing: -2px;
}

.sub-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    color: var(--secondary-color);
    letter-spacing: 2px;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
    display: block;
    margin-top: 4px;
}

.control-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-light);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.control-btn:hover {
    background: var(--secondary-color);
    color: #000;
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.5);
}

.font-press {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.65rem;
}

/* Arcade Cabinet Styling */
.arcade-cabinet {
    position: relative;
    background: var(--cabinet-border);
    border: 12px solid #2f3542;
    border-radius: 20px;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.6),
        inset 0 0 20px rgba(0, 0, 0, 0.8),
        0 0 40px rgba(255, 71, 87, 0.15);
    overflow: hidden;
    margin-bottom: 15px;
}

.screen-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background-color: #000;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

/* Overlay Styling */
.screen-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 11, 16, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
}

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

.overlay-content {
    text-align: center;
    width: 90%;
    max-width: 500px;
    padding: 20px;
    box-sizing: border-box;
}

.neon-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.9rem;
    color: var(--secondary-color);
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.7);
    margin-bottom: 15px;
}

.logo-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 3.5rem;
    margin: 0 0 25px 0;
    background: linear-gradient(180deg, #ffffff 0%, #ff4757 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(255, 71, 87, 0.6));
    letter-spacing: -4px;
    animation: textGlow 2s infinite alternate;
}

.blink {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.65rem;
    color: #ffe066;
    margin-bottom: 25px;
    animation: blinker 1.2s linear infinite;
}

/* Music Selector */
.music-selector {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.music-selector h3 {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--text-light);
}

.radio-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    transition: all 0.2s ease;
    color: #a4b0be;
}

.radio-btn input {
    display: none;
}

.radio-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.radio-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.4);
}

/* Instructions */
.instructions {
    font-size: 0.8rem;
    color: #a4b0be;
    line-height: 1.5;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
}

.instructions p {
    margin: 5px 0;
}

/* Game Over / Win overlays */
.game-over-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 3rem;
    color: #ff4757;
    text-shadow: 0 0 15px rgba(255, 71, 87, 0.7);
    margin-bottom: 20px;
    animation: shake 0.5s infinite;
}

.win-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 2.2rem;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.stage-finish-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 1rem;
    color: var(--secondary-color);
    margin-bottom: 30px;
}

.score-display {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 30px;
}

.game-footer {
    text-align: center;
    font-size: 0.8rem;
    color: #57606f;
    margin-top: 5px;
}

/* Animations */
@keyframes blinker {
    50% { opacity: 0; }
}

@keyframes textGlow {
    from { filter: drop-shadow(0 0 10px rgba(255, 71, 87, 0.5)); }
    to { filter: drop-shadow(0 0 20px rgba(255, 71, 87, 0.9)); }
}

@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(0px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(2px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(2px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}

@keyframes animate-rainbow {
    0% { color: #ff3838; }
    15% { color: #ff9f1a; }
    30% { color: #fff200; }
    45% { color: #32ff7e; }
    60% { color: #7efff5; }
    75% { color: #18dcff; }
    90% { color: #7d5fff; }
    100% { color: #ff3838; }
}

.animate-rainbow {
    animation: animate-rainbow 4s linear infinite;
}

.animate-pulse {
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .game-title { font-size: 1.5rem; }
    .logo-text { font-size: 2.2rem; }
    .game-over-title { font-size: 1.8rem; }
    .win-title { font-size: 1.4rem; }
    .back-btn { padding: 6px 12px; font-size: 0.8rem; }
}
