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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    overflow-x: hidden;
}

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: rgba(0, 0, 0, 0.8);
    padding: 1rem 2rem;
    text-align: center;
    position: relative;
    border-bottom: 2px solid #00ffff;
}

.header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #00ffff, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    font-size: 1rem;
    color: #aaaaaa;
}

.info-tooltip {
    position: absolute;
    top: 1rem;
    right: 2rem;
    font-size: 1.5rem;
    cursor: help;
    color: #00ffff;
}

.main-container {
    display: flex;
    flex: 1;
    padding: 1rem;
    gap: 1rem;
}

#scene-container {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid #333;
    position: relative;
    overflow: hidden;
}

#scene-container canvas {
    border-radius: 10px;
}

.control-panel {
    width: 300px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    padding: 1.5rem;
    border: 1px solid #333;
    height: fit-content;
}

.control-section {
    margin-bottom: 2rem;
}

.control-section h3 {
    color: #00ffff;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    border-bottom: 1px solid #333;
    padding-bottom: 0.5rem;
}

.control-group {
    margin-bottom: 1rem;
}

.control-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #cccccc;
}

.control-group input[type="range"] {
    width: 100%;
    height: 6px;
    background: #333;
    outline: none;
    border-radius: 3px;
    -webkit-appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #00ffff;
    cursor: pointer;
    border-radius: 50%;
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #00ffff;
    cursor: pointer;
    border-radius: 50%;
    border: none;
}

.control-group select {
    width: 100%;
    padding: 0.5rem;
    background: #333;
    color: #fff;
    border: 1px solid #555;
    border-radius: 5px;
}

.control-group input[type="checkbox"] {
    margin-right: 0.5rem;
    accent-color: #00ffff;
}

.preset-btn {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #333, #555);
    color: #fff;
    border: 1px solid #666;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.preset-btn:hover {
    background: linear-gradient(45deg, #555, #777);
    border-color: #00ffff;
    transform: translateY(-2px);
}

.info-panel {
    background: rgba(0, 0, 0, 0.8);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-around;
    border-top: 1px solid #333;
    flex-wrap: wrap;
    gap: 1rem;
}

.metric {
    text-align: center;
}

.metric-label {
    display: block;
    font-size: 0.8rem;
    color: #aaaaaa;
    margin-bottom: 0.25rem;
}

.metric span:last-child {
    font-size: 1.2rem;
    font-weight: bold;
    color: #00ffff;
}

.footer {
    background: rgba(0, 0, 0, 0.8);
    padding: 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: #aaaaaa;
    border-top: 1px solid #333;
}

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

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

/* Responsive Design */
@media (max-width: 1024px) {
    .main-container {
        flex-direction: column;
    }
    
    .control-panel {
        width: 100%;
        order: -1;
    }
    
    .info-panel {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .metric {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .metric-label {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .control-panel {
        padding: 1rem;
    }
    
    .main-container {
        padding: 0.5rem;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Animations */
@keyframes glow {
    0%, 100% { text-shadow: 0 0 5px #00ffff; }
    50% { text-shadow: 0 0 20px #00ffff, 0 0 30px #00ffff; }
}

.header h1 {
    animation: glow 3s ease-in-out infinite;
}

/* Loading indicator */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #00ffff;
    font-size: 1.2rem;
}