@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Courier+Prime&display=swap');

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

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    font-family: 'Courier Prime', monospace;
    color: #00d4ff;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(0, 212, 255, 0.1);
    border: 2px solid #00d4ff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.title {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 900;
    color: #00d4ff;
    text-shadow: 0 0 10px #00d4ff;
    margin-bottom: 10px;
    letter-spacing: 3px;
}

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

.chip-info {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 176, 0, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #ffb000;
}

.frequency {
    color: #ffb000;
    font-weight: bold;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background: #00ff00;
    border-radius: 50%;
    animation: pulse 1s infinite;
    box-shadow: 0 0 5px #00ff00;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.main-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.viewport-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.scene-container {
    position: relative;
    width: 100%;
    height: 500px;
    border: 3px solid #00d4ff;
    border-radius: 10px;
    overflow: hidden;
    background: #0a0a1a;
    box-shadow: inset 0 0 20px rgba(0, 212, 255, 0.2);
}

.scene-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 212, 255, 0.03) 2px,
        rgba(0, 212, 255, 0.03) 4px
    );
    pointer-events: none;
    z-index: 1;
}

.fps-counter, .resolution-info {
    position: absolute;
    top: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #00ff00;
    padding: 5px 10px;
    border-radius: 5px;
    font-family: 'Courier Prime', monospace;
    font-size: 0.9rem;
    z-index: 2;
}

.fps-counter {
    left: 10px;
}

.resolution-info {
    right: 10px;
}

.demo-controls {
    background: rgba(0, 212, 255, 0.1);
    border: 2px solid #00d4ff;
    border-radius: 10px;
    padding: 20px;
}

.demo-controls h3 {
    color: #00d4ff;
    margin-bottom: 15px;
    font-family: 'Orbitron', monospace;
}

.demo-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.demo-btn {
    background: rgba(255, 176, 0, 0.2);
    color: #ffb000;
    border: 2px solid #ffb000;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Courier Prime', monospace;
    font-size: 0.9rem;
}

.demo-btn:hover {
    background: rgba(255, 176, 0, 0.4);
    box-shadow: 0 0 10px rgba(255, 176, 0, 0.5);
}

.demo-btn.active {
    background: #ffb000;
    color: #1a1a2e;
    box-shadow: 0 0 15px rgba(255, 176, 0, 0.7);
}

.control-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-section, .performance-section, .info-section {
    background: rgba(0, 212, 255, 0.1);
    border: 2px solid #00d4ff;
    border-radius: 10px;
    padding: 20px;
}

.settings-section h3, .performance-section h3, .info-section h3 {
    color: #00d4ff;
    margin-bottom: 15px;
    font-family: 'Orbitron', monospace;
}

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

.control-group label {
    display: block;
    color: #ffb000;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.control-group input[type="range"] {
    width: 100%;
    background: transparent;
    outline: none;
    -webkit-appearance: none;
}

.control-group input[type="range"]::-webkit-slider-track {
    background: rgba(0, 212, 255, 0.3);
    height: 6px;
    border-radius: 3px;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    background: #00d4ff;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 212, 255, 0.5);
}

.control-group input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #00d4ff;
}

.meter-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

.meter label {
    color: #ffb000;
    font-size: 0.9rem;
}

.meter-bar {
    background: rgba(0, 0, 0, 0.5);
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #00d4ff;
}

.meter-fill {
    background: linear-gradient(90deg, #00ff00 0%, #ffb000 50%, #ff4444 100%);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.info-text {
    color: #ffffff;
    line-height: 1.6;
}

.info-text p {
    margin-bottom: 10px;
}

.info-text ul {
    margin-left: 20px;
    margin-bottom: 10px;
}

.info-text li {
    margin-bottom: 5px;
}

.info-text strong {
    color: #00d4ff;
}

.easter-egg {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.easter-egg.active {
    opacity: 1;
    animation: barrelRoll 2s ease-in-out;
}

.barrel-roll-text {
    background: rgba(255, 176, 0, 0.9);
    color: #1a1a2e;
    padding: 20px 40px;
    border-radius: 10px;
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    border: 3px solid #ffb000;
    box-shadow: 0 0 30px rgba(255, 176, 0, 0.8);
}

@keyframes barrelRoll {
    0% { transform: translate(-50%, -50%) rotate(0deg) scale(0.5); }
    50% { transform: translate(-50%, -50%) rotate(180deg) scale(1.2); }
    100% { transform: translate(-50%, -50%) rotate(360deg) scale(1); }
}

.footer {
    text-align: center;
    padding: 20px;
    background: rgba(0, 212, 255, 0.1);
    border: 2px solid #00d4ff;
    border-radius: 10px;
    margin-top: 30px;
}

.footer a {
    color: #00d4ff;
    text-decoration: none;
}

.footer a:hover {
    text-shadow: 0 0 5px #00d4ff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .title {
        font-size: 1.8rem;
    }
    
    .demo-buttons {
        justify-content: center;
    }
    
    .demo-btn {
        font-size: 0.8rem;
        padding: 8px 12px;
    }
    
    .scene-container {
        height: 400px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .title {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .scene-container {
        height: 300px;
    }
    
    .demo-buttons {
        flex-direction: column;
    }
    
    .demo-btn {
        width: 100%;
    }
}