/**
 * RoundCut Games - 80s Retro Arcade Theme
 * Neon glow, CRT scanlines, synthwave grid, pixel fonts
 */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

/* ===================== CSS VARIABLES ===================== */
:root {
    --neon-pink: #ff2d95;
    --neon-cyan: #00f0ff;
    --neon-purple: #b537f2;
    --neon-yellow: #ffe66d;
    --neon-green: #39ff14;
    --arcade-dark: #0a0a1a;
    --arcade-darker: #050510;
    --arcade-card: #111128;
    --arcade-border: #1a1a3e;
}

/* ===================== ARCADE HEADER ===================== */
.arcade-header {
    text-align: center;
    padding: 24px 0 20px;
    position: relative;
}

.arcade-title {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(18px, 4vw, 32px);
    color: var(--neon-cyan);
    text-shadow:
        0 0 10px var(--neon-cyan),
        0 0 30px var(--neon-cyan),
        0 0 60px rgba(0, 240, 255, 0.3);
    letter-spacing: 2px;
    margin: 0;
    line-height: 1.4;
}

.arcade-subtitle {
    font-family: 'VT323', monospace;
    font-size: clamp(14px, 2.5vw, 20px);
    color: var(--neon-purple);
    margin-top: 10px;
    text-shadow: 0 0 10px rgba(181, 55, 242, 0.5);
    letter-spacing: 1px;
}

/* ===================== MUSIC CONTROLS ===================== */
.arcade-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.arcade-btn {
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    padding: 10px 18px;
    background: transparent;
    border: 2px solid var(--neon-pink);
    color: var(--neon-pink);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.arcade-btn:hover {
    background: rgba(255, 45, 149, 0.15);
    box-shadow: 0 0 15px rgba(255, 45, 149, 0.4);
}

.arcade-btn.active {
    background: var(--neon-pink);
    color: #000;
    box-shadow: 0 0 20px rgba(255, 45, 149, 0.6);
}

/* ===================== GAME CABINET GRID ===================== */
.arcade-cabinets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 700px;
    margin: 0 auto 28px;
    padding: 0 16px;
}

.arcade-cabinet {
    background: var(--arcade-card);
    border: 2px solid var(--arcade-border);
    border-radius: 12px;
    padding: 20px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.arcade-cabinet::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 50%);
    border-radius: 10px;
    pointer-events: none;
}

.arcade-cabinet:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
    transform: translateY(-2px);
}

.arcade-cabinet.selected {
    border-color: var(--neon-pink);
    box-shadow:
        0 0 20px rgba(255, 45, 149, 0.3),
        inset 0 0 30px rgba(255, 45, 149, 0.05);
}

.cabinet-icon {
    font-size: 36px;
    margin-bottom: 10px;
    display: block;
    filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.5));
}

.cabinet-name {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(9px, 1.8vw, 12px);
    color: var(--neon-yellow);
    text-shadow: 0 0 8px rgba(255, 230, 109, 0.4);
    letter-spacing: 1px;
}

.cabinet-desc {
    font-family: 'VT323', monospace;
    font-size: 14px;
    color: #888;
    margin-top: 6px;
}

/* ===================== GAME SCREEN ===================== */
.arcade-screen {
    position: relative;
    max-width: 600px;
    margin: 0 auto 32px;
    padding: 0 16px;
}

.screen-frame {
    position: relative;
    border: 3px solid var(--neon-pink);
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        0 0 20px rgba(255, 45, 149, 0.3),
        inset 0 0 60px rgba(0, 0, 0, 0.5);
    background: #000;
}

.screen-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15) 0px,
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
    z-index: 2;
    opacity: 0.4;
}

.game-iframe {
    width: 100%;
    height: 70vh;
    max-height: 600px;
    border: none;
    display: block;
    background: #000;
}

.screen-label {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    color: var(--neon-green);
    text-shadow: 0 0 6px var(--neon-green);
    z-index: 3;
    letter-spacing: 2px;
    opacity: 0.7;
    pointer-events: none;
}

/* ===================== HOW TO PLAY ===================== */
.arcade-instructions {
    max-width: 700px;
    margin: 0 auto 32px;
    padding: 0 16px;
}

.instruction-card {
    background: var(--arcade-card);
    border: 1px solid var(--arcade-border);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
    display: none;
}

.instruction-card.active {
    display: block;
}

.instruction-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 12px;
    color: var(--neon-yellow);
    margin-bottom: 14px;
    text-shadow: 0 0 8px rgba(255, 230, 109, 0.3);
}

.instruction-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.instruction-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.instruction-key {
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 6px 8px;
    color: var(--neon-cyan);
    white-space: nowrap;
    min-width: 40px;
    text-align: center;
}

.instruction-text {
    font-family: 'VT323', monospace;
    font-size: 16px;
    color: #aaa;
}

/* ===================== FEATURES (80s styled) ===================== */
.arcade-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 700px;
    margin: 16px auto;
    padding: 0 16px;
}

.arcade-feature {
    background: var(--arcade-card);
    border: 1px solid var(--arcade-border);
    border-radius: 8px;
    padding: 20px 16px;
    text-align: center;
}

.feature-icon-80s {
    font-size: 28px;
    margin-bottom: 10px;
    display: block;
}

.feature-title-80s {
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    color: var(--neon-cyan);
    margin-bottom: 8px;
    text-shadow: 0 0 6px rgba(0, 240, 255, 0.3);
}

.feature-desc-80s {
    font-family: 'VT323', monospace;
    font-size: 16px;
    color: #888;
    line-height: 1.4;
}

/* ===================== FAQ (80s styled) ===================== */
.arcade-faq {
    max-width: 700px;
    margin: 16px auto;
    padding: 0 16px;
}

.arcade-faq details {
    background: var(--arcade-card);
    border: 1px solid var(--arcade-border);
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.arcade-faq summary {
    font-family: 'VT323', monospace;
    font-size: 18px;
    color: var(--neon-yellow);
    padding: 14px 18px;
    cursor: pointer;
    list-style: none;
    position: relative;
}

.arcade-faq summary::-webkit-details-marker {
    display: none;
}

.arcade-faq summary::after {
    content: '+';
    position: absolute;
    right: 18px;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    color: var(--neon-pink);
}

.arcade-faq details[open] summary::after {
    content: '-';
}

.arcade-faq details p {
    font-family: 'VT323', monospace;
    font-size: 16px;
    color: #888;
    padding: 0 18px 14px;
    line-height: 1.5;
}

/* ===================== SECTION HEADERS ===================== */
.section-title-80s {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(12px, 2.5vw, 16px);
    color: var(--neon-purple);
    text-align: center;
    margin: 32px 0 20px;
    text-shadow: 0 0 15px rgba(181, 55, 242, 0.4);
    letter-spacing: 2px;
}

/* ===================== SYNTHWAVE BACKGROUND ===================== */
.arcade-wrapper {
    position: relative;
    background: var(--arcade-dark);
    min-height: 100%;
    padding-bottom: 40px;
}

.arcade-wrapper::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(181, 55, 242, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 100%, rgba(255, 45, 149, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.arcade-wrapper > * {
    position: relative;
    z-index: 1;
}

/* Override global .tool-section styles inside arcade */
.arcade-wrapper .tool-section {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 8px 0;
    margin: 0;
}

/* Reduce gap between sections */
.arcade-wrapper .section-title-80s {
    margin: 24px 0 16px;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 540px) {
    .arcade-cabinets {
        gap: 10px;
        padding: 0 10px;
    }

    .arcade-cabinet {
        padding: 14px 8px;
    }

    .cabinet-icon {
        font-size: 28px;
    }

    .cabinet-desc {
        display: none;
    }

    .game-iframe {
        height: 65vh;
    }

    .instruction-grid {
        grid-template-columns: 1fr;
    }

    .arcade-controls {
        flex-wrap: wrap;
    }

    .arcade-btn {
        font-size: 9px;
        padding: 8px 12px;
    }

    .arcade-features {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 360px) {
    .arcade-title {
        font-size: 14px;
    }

    .cabinet-name {
        font-size: 8px;
    }
}
