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

body {
    font-family: 'Courier New', monospace;
    background: #1a1a1a;
    color: #ffffff;
    overflow: hidden;
}

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

#header {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
    background: rgba(26, 26, 26, 0.9);
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #333;
    backdrop-filter: blur(10px);
}

#header h1 {
    font-size: 24px;
    margin-bottom: 5px;
    color: #00ff88;
}

#header p {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 10px;
}

.info-tooltip {
    display: inline-block;
    background: #333;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: help;
    font-size: 12px;
}

#controls {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 280px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    background: rgba(26, 26, 26, 0.95);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.control-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
}

.control-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.control-section h3 {
    color: #00ff88;
    margin-bottom: 15px;
    font-size: 16px;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
}

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

.control-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

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

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

.control-group select {
    width: 100%;
    padding: 8px;
    background: #333;
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
    font-family: inherit;
    font-size: 12px;
}

.control-group span {
    display: inline-block;
    margin-top: 5px;
    font-size: 11px;
    color: #00ff88;
    font-weight: bold;
}

.impedance-display {
    background: #222;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    border: 1px solid #00ff88;
}

.impedance-display strong {
    color: #00ff88;
    font-size: 18px;
}

button {
    background: #333;
    color: #fff;
    border: 1px solid #555;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    transition: all 0.2s;
}

button:hover {
    background: #444;
    border-color: #00ff88;
}

button.active {
    background: #00ff88;
    color: #000;
    border-color: #00ff88;
}

#play-pause {
    width: 100%;
    margin-bottom: 10px;
    font-size: 14px;
}

.toggle-group {
    display: flex;
    gap: 5px;
}

.toggle-group button {
    flex: 1;
    font-size: 10px;
}

.measurement {
    background: #222;
    padding: 8px;
    margin-bottom: 8px;
    border-radius: 4px;
    border-left: 3px solid #00ff88;
    font-size: 12px;
}

.measurement span {
    color: #00ff88;
    font-weight: bold;
}

#footer {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 100;
    background: rgba(26, 26, 26, 0.9);
    padding: 10px 15px;
    border-radius: 4px;
    border: 1px solid #333;
    backdrop-filter: blur(10px);
}

#footer p {
    font-size: 11px;
    color: #666;
}

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

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

/* Scrollbar styling */
#controls::-webkit-scrollbar {
    width: 6px;
}

#controls::-webkit-scrollbar-track {
    background: #222;
    border-radius: 3px;
}

#controls::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 3px;
}

#controls::-webkit-scrollbar-thumb:hover {
    background: #00ff88;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    #controls {
        width: calc(100vw - 40px);
        right: 20px;
        top: auto;
        bottom: 80px;
        max-height: 40vh;
    }
    
    #header {
        position: relative;
        width: calc(100vw - 40px);
        margin-bottom: 10px;
    }
    
    #header h1 {
        font-size: 20px;
    }
    
    .toggle-group {
        flex-direction: column;
        gap: 8px;
    }
}