@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Inter:wght@400;600;700&family=Roboto+Mono&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    overflow-x: hidden;
}

#scene-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(10,10,10,0.95) 0%, rgba(10,10,10,0.7) 100%);
    padding: 20px;
    z-index: 10;
    text-align: center;
    border-bottom: 2px solid #00ffff;
}

.title {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.5rem;
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 1rem;
    color: #ffffff;
    margin-bottom: 15px;
}

#stats-bar {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.stat-item {
    font-family: 'Roboto Mono', monospace;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid #00ffff;
    padding: 8px 16px;
    border-radius: 4px;
}

.stat-label {
    color: #00ffff;
    margin-right: 8px;
}

.stat-value {
    color: #ffffff;
    font-weight: 700;
}

#control-panel {
    position: fixed;
    right: 20px;
    top: 180px;
    width: 320px;
    background: rgba(10, 10, 10, 0.9);
    border: 2px solid #0080ff;
    border-radius: 8px;
    padding: 20px;
    z-index: 10;
    box-shadow: 0 0 20px rgba(0, 128, 255, 0.3);
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.arcade-button {
    width: 100%;
    padding: 15px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    color: #000000;
    background: linear-gradient(180deg, #00ffff 0%, #0080ff 100%);
    border: 3px solid #ffffff;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 4px 0 #004080, 0 8px 20px rgba(0, 255, 255, 0.4);
    transition: all 0.1s;
    margin-bottom: 20px;
}

.arcade-button:hover {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #004080, 0 4px 15px rgba(0, 255, 255, 0.4);
}

.arcade-button:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 #004080, 0 2px 10px rgba(0, 255, 255, 0.4);
}

.control-group {
    margin-bottom: 20px;
}

.control-group label {
    display: block;
    color: #00ffff;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.slider-label {
    font-size: 0.8rem;
    color: #aaaaaa;
    white-space: nowrap;
}

input[type="range"] {
    flex: 1;
    height: 6px;
    background: linear-gradient(90deg, #0080ff 0%, #00ffff 100%);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #00ffff;
    border: 2px solid #ffffff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #00ffff;
    border: 2px solid #ffffff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

.value-display {
    display: block;
    text-align: center;
    font-family: 'Roboto Mono', monospace;
    color: #00ffff;
    font-size: 1.2rem;
    margin-top: 5px;
}

.arcade-select {
    width: 100%;
    padding: 10px;
    background: rgba(0, 128, 255, 0.2);
    border: 2px solid #0080ff;
    border-radius: 4px;
    color: #ffffff;
    font-size: 0.9rem;
    cursor: pointer;
}

.arcade-select option {
    background: #1a1a1a;
    color: #ffffff;
}

input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.control-group label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    cursor: pointer;
}

#info-panel {
    background: rgba(0, 128, 255, 0.1);
    border: 1px solid #0080ff;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

#info-panel h3 {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    color: #00ffff;
    margin-bottom: 12px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.85rem;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-row:last-child {
    border-bottom: none;
}

#tutorial {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #444444;
    border-radius: 4px;
    padding: 15px;
    font-size: 0.85rem;
    line-height: 1.6;
}

#tutorial h4 {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    color: #00ffff;
    margin-bottom: 10px;
}

#tutorial p {
    margin-bottom: 8px;
}

.easter-egg {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-style: italic;
    color: #aaaaaa;
    font-size: 0.75rem;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
    border: 3px solid #00ffff;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.6);
    max-width: 500px;
}

.modal-content h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.2rem;
    color: #00ffff;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #00ffff;
}

.modal-content p {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.1rem;
    margin: 15px 0;
    color: #ffffff;
}

.modal-content button {
    margin: 10px;
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, rgba(10,10,10,0.95) 0%, rgba(10,10,10,0.7) 100%);
    padding: 15px;
    text-align: center;
    font-size: 0.85rem;
    z-index: 10;
    border-top: 1px solid #00ffff;
}

footer a {
    color: #00ffff;
    text-decoration: none;
    font-weight: 600;
}

footer a:hover {
    text-decoration: underline;
}

.retro-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.5rem;
    color: #888888;
    margin-top: 8px;
}

/* Scrollbar styling */
#control-panel::-webkit-scrollbar {
    width: 8px;
}

#control-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

#control-panel::-webkit-scrollbar-thumb {
    background: #0080ff;
    border-radius: 4px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .title {
        font-size: 0.8rem;
    }
    
    .subtitle {
        font-size: 0.8rem;
    }
    
    #stats-bar {
        gap: 10px;
    }
    
    .stat-item {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    #control-panel {
        position: fixed;
        bottom: 80px;
        top: auto;
        left: 10px;
        right: 10px;
        width: auto;
        max-height: 40vh;
    }
    
    .arcade-button {
        padding: 12px;
        font-size: 0.6rem;
    }
    
    footer {
        font-size: 0.7rem;
    }
    
    .retro-text {
        display: none;
    }
}

/* Glow effects */
@keyframes glow {
    0%, 100% { text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff; }
    50% { text-shadow: 0 0 20px #00ffff, 0 0 40px #00ffff; }
}

.title {
    animation: glow 2s ease-in-out infinite;
}