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

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

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

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #00ffff, #ff4400);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    font-size: 1.2em;
    color: #cccccc;
}

.container {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    height: calc(100vh - 120px);
    gap: 10px;
    padding: 10px;
}

.sidebar {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #333;
    border-radius: 10px;
    padding: 15px;
    overflow-y: auto;
}

.sidebar.left {
    border-left: 3px solid #00ffff;
}

.sidebar.right {
    border-right: 3px solid #ff4400;
}

.main-area {
    position: relative;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    border-radius: 10px;
    overflow: hidden;
}

#scene-container {
    width: 100%;
    height: calc(100% - 60px);
}

.preset-buttons {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.preset-btn {
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #666;
    border-radius: 5px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

.preset-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: #00ffff;
}

.preset-btn.active {
    background: rgba(0, 255, 255, 0.3);
    border-color: #00ffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.panel {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.panel h3 {
    color: #00ffff;
    margin-bottom: 15px;
    font-size: 1.1em;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
}

.calculation-grid {
    display: grid;
    gap: 8px;
}

.calc-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}

.label {
    font-size: 0.9em;
    color: #cccccc;
}

.value {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #00ff00;
}

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

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

.checkbox-label {
    display: flex !important;
    align-items: center;
    cursor: pointer;
}

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

input[type="range"] {
    width: 100%;
    height: 6px;
    background: #333;
    border-radius: 3px;
    outline: none;
    margin: 5px 0;
}

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

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

select {
    width: 100%;
    padding: 8px;
    background: #222;
    border: 1px solid #666;
    border-radius: 4px;
    color: #ffffff;
    font-size: 0.9em;
}

.value-display {
    display: inline-block;
    margin-top: 5px;
    font-family: 'Courier New', monospace;
    color: #00ffff;
    font-size: 0.9em;
}

.fun-fact {
    font-style: italic;
    color: #ffaa00;
    line-height: 1.4;
    padding: 10px;
    background: rgba(255, 170, 0, 0.1);
    border-radius: 5px;
    border-left: 3px solid #ffaa00;
}

.achievement {
    display: flex;
    align-items: center;
    padding: 8px;
    margin: 5px 0;
    border-radius: 5px;
    border: 1px solid #333;
    transition: all 0.3s ease;
}

.achievement span {
    margin-right: 10px;
    font-size: 1.2em;
}

.achievement.locked {
    opacity: 0.4;
    color: #666;
}

.achievement.unlocked {
    background: rgba(0, 255, 0, 0.2);
    border-color: #00ff00;
    color: #00ff00;
}

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

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

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

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

/* Responsive design */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: 250px 1fr 250px;
    }
    
    .sidebar {
        padding: 10px;
    }
    
    .panel {
        padding: 10px;
    }
}

@media (max-width: 900px) {
    .container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr;
        height: auto;
    }
    
    .sidebar {
        height: auto;
        max-height: 300px;
    }
    
    .main-area {
        height: 500px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .preset-buttons {
        position: static;
        transform: none;
        justify-content: center;
        margin: 10px 0;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 5px;
        gap: 5px;
    }
    
    .sidebar {
        padding: 8px;
    }
    
    .panel {
        padding: 8px;
        margin-bottom: 10px;
    }
    
    .preset-buttons {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .preset-btn {
        padding: 6px 12px;
        font-size: 0.8em;
    }
    
    .header h1 {
        font-size: 1.5em;
    }
    
    .header p {
        font-size: 1em;
    }
}

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

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

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

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