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

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a2e 100%);
    color: #fff;
    overflow: hidden;
    height: 100vh;
}

#scene-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#three-canvas {
    display: block;
}

#control-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 280px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #ff8844;
    border-radius: 10px;
    padding: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(255, 136, 68, 0.3);
}

#info-panel {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 300px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #44ff88;
    border-radius: 10px;
    padding: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(68, 255, 136, 0.3);
    max-height: 80vh;
    overflow-y: auto;
}

h3 {
    color: #ffaa44;
    margin-bottom: 15px;
    font-size: 1.2em;
    text-shadow: 0 0 10px #ffaa44;
}

#info-panel h3 {
    color: #44ff88;
    text-shadow: 0 0 10px #44ff88;
}

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

label {
    display: block;
    margin-bottom: 5px;
    color: #ccc;
    font-size: 0.9em;
}

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

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #ff8844;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px #ff8844;
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #ff8844;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px #ff8844;
}

select {
    width: 100%;
    padding: 8px;
    background: #222;
    color: #fff;
    border: 1px solid #555;
    border-radius: 5px;
    font-family: inherit;
}

.meters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 15px 0;
}

.meter {
    background: #111;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    border: 1px solid #444;
}

.meter span {
    display: block;
    font-size: 0.8em;
    color: #aaa;
    margin-bottom: 5px;
}

.meter div {
    font-size: 1.1em;
    color: #44ff88;
    font-weight: bold;
    text-shadow: 0 0 5px #44ff88;
}

.view-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

button {
    padding: 8px 12px;
    background: #444;
    color: #fff;
    border: 1px solid #666;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9em;
    transition: all 0.3s;
}

button:hover {
    background: #555;
    border-color: #888;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.electron-indicator {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#flow-bar {
    flex: 1;
    height: 8px;
    background: #222;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #444;
}

#flow-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ffff, #0088ff);
    width: 45%;
    transition: width 0.3s;
    box-shadow: 0 0 10px #00ffff;
}

#tube-info p {
    margin-bottom: 8px;
    line-height: 1.4;
    font-size: 0.9em;
}

#tube-info strong {
    color: #ffaa44;
}

footer {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
    border: 1px solid #333;
}

footer p {
    margin: 0;
    font-size: 0.8em;
    color: #aaa;
}

footer a {
    color: #ff8844;
    text-decoration: none;
}

footer a:hover {
    text-shadow: 0 0 5px #ff8844;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    #control-panel, #info-panel {
        width: calc(100vw - 20px);
        max-width: 350px;
    }
    
    #control-panel {
        top: auto;
        bottom: 80px;
        right: 10px;
    }
    
    #info-panel {
        top: 10px;
        left: 10px;
        max-height: 40vh;
    }
    
    .meters {
        grid-template-columns: 1fr;
    }
    
    .view-controls {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    #control-panel, #info-panel {
        padding: 15px;
        font-size: 0.9em;
    }
    
    h3 {
        font-size: 1.1em;
    }
}

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

#info-panel::-webkit-scrollbar-track {
    background: #222;
    border-radius: 4px;
}

#info-panel::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

#info-panel::-webkit-scrollbar-thumb:hover {
    background: #777;
}