/* CRT EFFECT STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'VT323', monospace;
    background: #050510;
    color: #00ffcc;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* RETRO WAVE BACKGROUND */
#game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: linear-gradient(135deg, #0a0a2a 0%, #1a0a2a 50%, #2a0a2a 100%);
    overflow: hidden;
}

/* CRT SCANLINES */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0),
        rgba(255,255,255,0) 50%,
        rgba(0,0,0,0.2) 50%,
        rgba(0,0,0,0.2)
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 999;
    animation: scanlineMove 0.2s linear infinite;
}

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

/* GLOW OVERLAY */
.glow-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0,255,204,0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: 998;
}

/* UI LAYER */
#ui-layer {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* CORNER LOGIN LINKS */
.corner-links {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 500;
}

.corner-btn {
    font-size: 24px;
    color: #555;
    text-decoration: none;
    background: rgba(0,0,0,0.7);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    border: 1px solid #333;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.corner-btn:hover {
    color: #00ffcc;
    border-color: #00ffcc;
    box-shadow: 0 0 15px rgba(0,255,204,0.4);
    transform: scale(1.1);
}

/* HEADER */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #ff00cc;
    position: relative;
}

.title {
    font-family: 'Press Start 2P', cursive;
    font-size: 24px;
    color: #ff00cc;
    text-shadow: 3px 3px 0 #00ffcc, 0 0 20px #ff00cc;
    animation: titlePulse 2s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% { text-shadow: 3px 3px 0 #00ffcc, 0 0 20px #ff00cc; }
    50% { text-shadow: 5px 5px 0 #00ffcc, 0 0 30px #ff00cc; }
}

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

/* BUTTONS */
.btn {
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    padding: 15px 25px;
    border: 3px solid #00ffcc;
    background: rgba(0,0,0,0.8);
    color: #00ffcc;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(0,255,204,0.3);
}

.btn:hover {
    background: rgba(0,255,204,0.2);
    box-shadow: 0 0 20px rgba(0,255,204,0.6);
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 0 5px rgba(0,255,204,0.8);
}

.btn-nav {
    border-color: #ff00cc;
    color: #ff00cc;
    box-shadow: 0 0 10px rgba(255,0,204,0.3);
}

.btn-nav:hover {
    background: rgba(255,0,204,0.2);
    box-shadow: 0 0 20px rgba(255,0,204,0.6);
}

/* SECTIONS */
.section {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* HERO SECTION */
.hero {
    text-align: center;
    padding: 20px 20px 60px;
    position: relative;
}

.hero-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 32px;
    color: #00ffcc;
    text-shadow: 4px 4px 0 #ff00cc, 0 0 30px #00ffcc;
    margin-bottom: 30px;
    line-height: 1.5;
}

.hero-subtitle {
    font-size: 24px;
    color: #ff00cc;
    text-shadow: 0 0 10px #ff00cc;
    margin-bottom: 40px;
}

/* SECTION SUBTITLE */
.section-subtitle {
    font-family: 'Press Start 2P', cursive;
    font-size: 20px;
    color: #00ffcc;
    text-align: center;
    margin: 30px 0 20px;
    text-shadow: 2px 2px 0 #ff00cc;
}

/* POPULAR GAMES LIST */
.popular-games {
    margin: 40px 0;
    padding: 20px;
    background: rgba(0,0,0,0.7);
    border: 2px solid #00ffcc;
    border-radius: 10px;
}

.games-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.game-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 20px;
    background: rgba(0,255,204,0.1);
    border: 2px solid #00ffcc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 200px;
}

.game-item:hover {
    background: rgba(0,255,204,0.2);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0,255,204,0.4);
}

.game-icon {
    font-size: 32px;
}

.game-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.game-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 16px;
    color: #00ffcc;
}

.game-difficulty {
    font-size: 14px;
    color: #ffcc00;
}

/* ACHIEVEMENTS */
.achievements {
    margin: 40px 0;
    padding: 20px;
    background: rgba(0,0,0,0.7);
    border: 2px solid #ff00cc;
    border-radius: 10px;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.achievement {
    background: rgba(255,0,204,0.1);
    border: 2px solid #ff00cc;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    transition: all 0.2s;
}

.achievement:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255,0,204,0.4);
}

.ach-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 10px;
}

.ach-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    color: #ff00cc;
    margin-bottom: 5px;
}

.ach-desc {
    font-size: 14px;
    color: #ccc;
}

/* GAMES GRID */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.game-card {
    background: rgba(0,0,0,0.9);
    border: 3px solid #00ffcc;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.game-card:hover {
    transform: scale(1.05);
    border-color: #ff00cc;
    box-shadow: 0 0 25px rgba(255,0,204,0.5);
}

.game-preview {
    font-family: 'Press Start 2P', cursive;
    font-size: 40px;
    color: #00ffcc;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.game-name {
    font-family: 'Press Start 2P', cursive;
    font-size: 20px;
    color: #ff00cc;
    margin-bottom: 10px;
}

.game-desc {
    font-size: 18px;
    color: #ccc;
}

/* GAME CANVAS CONTAINER */
.game-canvas-container {
    background: rgba(0,0,0,0.95);
    border: 4px solid #ff00cc;
    padding: 20px;
    text-align: center;
    margin-top: 30px;
    position: relative;
}

#gameCanvas {
    background: #000;
    border: 3px solid #00ffcc;
    box-shadow: 0 0 20px rgba(0,255,204,0.3);
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
}

.game-controls {
    margin-top: 20px;
}

.hidden {
    display: none !important;
}

/* RADIO SECTION */
.radio-container {
    background: rgba(0,0,0,0.9);
    border: 3px solid #00ffcc;
    padding: 40px;
    text-align: center;
    position: relative;
}

.radio-wave {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin-bottom: 30px;
}

.wave-animation {
    display: flex;
    align-items: center;
    gap: 5px;
}

.wave-bar {
    width: 10px;
    background: linear-gradient(to top, #00ffcc, #ff00cc);
    border-radius: 2px;
    animation: waveAnim 1s ease-in-out infinite;
}

.wave-bar:nth-child(1) { animation-delay: 0.1s; }
.wave-bar:nth-child(2) { animation-delay: 0.2s; }
.wave-bar:nth-child(3) { animation-delay: 0.3s; }
.wave-bar:nth-child(4) { animation-delay: 0.4s; }
.wave-bar:nth-child(5) { animation-delay: 0.5s; }
.wave-bar:nth-child(6) { animation-delay: 0.6s; }
.wave-bar:nth-child(7) { animation-delay: 0.7s; }
.wave-bar:nth-child(8) { animation-delay: 0.8s; }
.wave-bar:nth-child(9) { animation-delay: 0.9s; }
.wave-bar:nth-child(10) { animation-delay: 1.0s; }

@keyframes waveAnim {
    0%, 100% { height: 30%; }
    50% { height: 100%; }
}

.station-name {
    font-size: 24px;
    color: #00ffcc;
    margin-bottom: 15px;
}

.station-status {
    font-size: 20px;
    color: #00ff00;
    margin-bottom: 20px;
    animation: blink 2s infinite;
}

.frequency-display {
    font-family: 'Press Start 2P', cursive;
    font-size: 36px;
    color: #ff00cc;
    text-shadow: 0 0 10px #ff00cc;
    margin-bottom: 30px;
}

.freq-value {
    margin-right: 10px;
}

.freq-unit {
    font-size: 20px;
    color: #ccc;
}

/* RADIO CONTROLS */
.radio-controls {
    margin-bottom: 30px;
}

.btn-radio {
    padding: 20px 40px;
    font-size: 16px;
}

.btn-preset, .btn-stream {
    padding: 15px 25px;
    font-size: 14px;
    margin: 5px;
    border-color: #00ccff;
    color: #00ccff;
}

/* PRESETS & STREAMS */
.radio-presets, .radio-streams {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.presets-title, .streams-title {
    font-size: 16px;
    color: #aaa;
    margin: 10px 0 5px 0;
}

/* SETTINGS SECTION */
.settings-container {
    background: rgba(0,0,0,0.9);
    border: 3px solid #00ffcc;
    padding: 40px;
    max-width: 500px;
    margin: 0 auto;
}

.setting-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0,255,204,0.3);
}

.setting-label {
    font-size: 20px;
    color: #00ffcc;
}

/* TOGGLE SWITCH */
.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #333;
    transition: 0.3s;
    border-radius: 15px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 3px;
    bottom: 3px;
    background: #00ffcc;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ffcc;
}

input:checked + .toggle-slider {
    background: #ff00cc;
}

input:checked + .toggle-slider:before {
    transform: translateX(30px);
    background: #ff00cc;
    box-shadow: 0 0 10px #ff00cc;
}

/* VOLUME SLIDER */
.volume-slider {
    width: 200px;
    height: 8px;
    -webkit-appearance: none;
    background: #333;
    border-radius: 5px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #ff00cc;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 15px #ff00cc;
}

.volume-value {
    font-size: 20px;
    color: #ff00cc;
    min-width: 60px;
    text-align: center;
}

/* SELECT BOX */
.select-box {
    padding: 10px 20px;
    font-family: 'VT323', monospace;
    font-size: 20px;
    background: #000;
    color: #00ffcc;
    border: 2px solid #00ffcc;
    cursor: pointer;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .title { font-size: 16px; }
    .nav { flex-direction: column; }
    .hero-title { font-size: 20px; }
    .games-grid { grid-template-columns: 1fr; }
    .corner-links { top: 10px; right: 10px; }
    .corner-btn { width: 40px; height: 40px; font-size: 20px; }
    .game-item { min-width: 150px; padding: 8px 15px; }
    .game-icon { font-size: 24px; }
    .section-subtitle { font-size: 16px; }
}

/* VIBRANT GLITCH EFFECT */
@keyframes glitch {
    0% { clip-path: inset(0 0 0 0); }
    1% { clip-path: inset(10% 0 80% 0); transform: translateX(-5px); }
    2% { clip-path: inset(80% 0 10% 0); transform: translateX(5px); }
    3% { clip-path: inset(40% 0 50% 0); }
    100% { clip-path: inset(0 0 0 0); }
}

.glitch-text {
    animation: glitch 2s infinite;
}

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