:root {
    --primary-color: #7558a4;
    --secondary-color: #f4599d;
    --accent-color-1: #eda92d;
    --accent-color-2: #f5df95;
    --dark-color: #120c18;
    --light-color: #ffffff;
    --scanline-bg: rgba(0, 0, 0, 0.1);
}

body {
    background-color: var(--dark-color);
    color: var(--light-color);
    font-family: 'VT323', monospace;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.hero-header {
    background: linear-gradient(135deg, var(--primary-color), #2c1a4d);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 10px solid var(--secondary-color);
}

.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        var(--scanline-bg),
        var(--scanline-bg) 2px,
        transparent 2px,
        transparent 4px
    );
    animation: scan 10s linear infinite;
    pointer-events: none;
}

@keyframes scan {
    0% { background-position: 0 0; }
    100% { background-position: 0 100px; }
}

.header-content {
    z-index: 1;
}

.main-title {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(2.5rem, 10vw, 6rem);
    color: var(--light-color);
    text-shadow: 0 0 10px var(--light-color),
                 0 0 20px var(--secondary-color),
                 0 0 40px var(--secondary-color),
                 0 0 80px var(--secondary-color);
    animation: flicker 1.5s infinite alternate;
}

@keyframes flicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% {
        text-shadow:
            0 0 4px #fff,
            0 0 11px #fff,
            0 0 19px #fff,
            0 0 40px var(--secondary-color),
            0 0 80px var(--secondary-color),
            0 0 90px var(--secondary-color),
            0 0 100px var(--secondary-color),
            0 0 150px var(--secondary-color);
    }
    20%, 24%, 55% {
        text-shadow: none;
    }
}

.subtitle {
    font-size: clamp(1rem, 4vw, 1.5rem);
    color: var(--accent-color-2);
    margin-top: 1rem;
    letter-spacing: 2px;
}

.main-nav {
    background-color: var(--accent-color-1);
    padding: 1rem;
    text-align: center;
    border-bottom: 5px solid var(--dark-color);
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav ul li {
    display: inline-block;
    margin: 0 2rem;
}

.main-nav ul li a {
    color: var(--dark-color);
    text-decoration: none;
    font-family: 'Press Start 2P', cursive;
    font-size: 1.5rem;
    transition: color 0.3s, text-shadow 0.3s;
}

.main-nav ul li a:hover {
    color: var(--secondary-color);
    text-shadow: 0 0 5px var(--secondary-color);
}

.main-content {
    padding: 4rem 2rem;
    background-color: #1a1224;
}

.section-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 2.5rem;
    color: var(--accent-color-2);
    text-align: center;
    margin-bottom: 4rem;
}

.arcade-floor {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4rem;
    perspective: 1500px;
}

.arcade-cabinet {
    width: 300px;
    height: 480px;
    background: #2a2a2a;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.7), inset -10px 0 15px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    position: relative;
    transform: rotateY(-5deg);
    transition: transform 0.5s, box-shadow 0.5s;
    cursor: pointer;
}

.arcade-cabinet:hover {
    transform: rotateY(0) scale(1.05);
    box-shadow: 0 20px 50px rgba(0,0,0,0.9), 0 0 30px var(--secondary-color), inset -10px 0 15px rgba(0,0,0,0.5);
}

.marquee {
    width: 110%;
    background: #111;
    color: var(--light-color);
    padding: 10px;
    text-align: center;
    border-radius: 10px 10px 0 0;
    margin-bottom: 15px;
    border: 3px solid #444;
    transition: box-shadow 0.3s, background-color 0.3s;
}

.arcade-cabinet:hover .marquee {
    background-color: var(--accent-color-2);
    box-shadow: 0 0 20px var(--accent-color-2);
}

.game-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 1rem;
    color: #111;
    margin: 0;
    transition: color 0.3s;
}

.arcade-cabinet:hover .game-title {
    color: var(--dark-color);
    animation: marquee-flicker 0.5s infinite;
}

@keyframes marquee-flicker {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

.screen-area {
    width: 260px;
    height: 200px;
    background: #000;
    border: 15px solid #1c1c1c;
    border-top-width: 25px;
    border-bottom-width: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    position: relative;
    box-shadow: inset 0 0 10px #000;
    transition: box-shadow 0.3s;
}

.screen-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(rgba(255,255,255,0.05) 0, rgba(255,255,255,0.05) 1px, transparent 1px, transparent 2px);
    opacity: 0;
    transition: opacity 0.5s;
}

.arcade-cabinet:hover .screen-area::before {
    opacity: 1;
}

.arcade-cabinet:hover .screen-area {
    box-shadow: inset 0 0 15px #000, 0 0 20px var(--accent-color-1);
}

.control-panel {
    background: #333;
    width: 110%;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    box-shadow: inset 0 5px 10px rgba(0,0,0,0.5);
}

.joystick {
    width: 50px;
    height: 50px;
    background: #c0c0c0;
    border-radius: 50%;
    border: 5px solid #555;
    position: relative;
}

.joystick::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    background: #f44336;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px #f44336;
}

.buttons {
    display: flex;
    gap: 15px;
}

.button {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 3px solid #222;
    transition: box-shadow 0.3s, transform 0.1s;
}

.button.blue { background-color: #2196F3; }
.button.green { background-color: #4CAF50; }

.arcade-cabinet:hover .button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--light-color);
}

.side-art {
    position: absolute;
    top: 100px;
    left: -20px;
    width: 20px;
    height: 300px;
    background: linear-gradient(var(--secondary-color), var(--accent-color-1));
    border-radius: 5px 0 0 5px;
}

.about-section {
    padding: 4rem 2rem;
    background-color: var(--dark-color);
    border-top: 10px solid var(--accent-color-1);
    text-align: center;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.2rem;
    line-height: 1.6;
}

.main-footer {
    background-color: #111;
    color: var(--accent-color-1);
    text-align: center;
    padding: 2rem;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    background-color: #000;
    margin: 5% auto;
    padding: 20px;
    border: 8px solid var(--secondary-color);
    border-radius: 10px;
    width: 85%;
    height: 85%;
    position: relative;
    box-shadow: 0 0 50px var(--secondary-color);
}

.close-button {
    color: var(--secondary-color);
    position: absolute;
    top: -15px;
    right: 5px;
    font-size: 4rem;
    font-weight: bold;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    transition: color 0.3s;
}

.close-button:hover,
.close-button:focus {
    color: var(--light-color);
}