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

/* Header Styles */
.header {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #000;
    color: #fff;
    overflow: hidden;
}

#container {
    position: relative;
    width: 100vw;
    height: calc(100vh - 80px); /* Account for header height */
    margin-top: 80px; /* Add margin for header */
}

#webgl-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Controls Panel */
#controls-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 350px;
    max-height: calc(100vh - 120px); /* Account for header */
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #333;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    z-index: 10;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #333;
}

.panel-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.connection-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    background: #666;
    color: #fff;
}

.connection-status.connected {
    background: #00ff88;
    color: #000;
}

.connection-status.disconnected {
    background: #ff8800;
    color: #000;
}

.connection-status.error {
    background: #ff4444;
    color: #fff;
}

/* Control Sections */
.control-section {
    padding: 20px;
    border-bottom: 1px solid #333;
}

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

.control-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #fff;
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.view-btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn.active {
    background: #007bff;
    border-color: #007bff;
    color: #fff;
}

.view-btn:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.view-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Calibration Metrics */
.metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.metric-row:last-child {
    border-bottom: none;
}

.metric-label {
    font-weight: 500;
    color: #ccc;
    font-size: 14px;
}

.metric-value {
    font-weight: 600;
    color: #fff;
    font-size: 14px;
}

.performance-chart {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.performance-chart h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #fff;
}

.chart-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chart-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bar-fill {
    height: 8px;
    background: linear-gradient(90deg, #00ff88, #00ccff);
    border-radius: 4px;
    transition: width 0.5s ease;
    min-width: 0;
}

.bar-label {
    font-size: 12px;
    color: #ccc;
    min-width: 60px;
}

/* Coming Soon Banner */
#coming-soon-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.coming-soon-content {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 3rem;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.coming-soon-content h2 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #ffffff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.coming-soon-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
}

.coming-soon-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.feature {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.feature:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.coming-soon-status {
    font-size: 1.5rem;
    font-weight: bold;
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    animation: pulse 2s infinite;
}

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

@media (max-width: 768px) {
    .coming-soon-content {
        padding: 2rem;
    }
    
    .coming-soon-content h2 {
        font-size: 2rem;
    }
    
    .coming-soon-features {
        grid-template-columns: 1fr;
    }
}

.control-section h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
    color: #ccc;
}

/* Control Groups */
.control-group {
    margin-bottom: 15px;
}

.control-group label {
    display: block;
    font-size: 14px;
    color: #ccc;
    margin-bottom: 5px;
}

.control-group select,
.control-group input[type="range"] {
    width: 100%;
    padding: 8px 12px;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
}

.control-group select:focus,
.control-group input[type="range"]:focus {
    outline: none;
    border-color: #00aaff;
    box-shadow: 0 0 0 2px rgba(0, 170, 255, 0.2);
}

.control-group input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

/* Buttons */
.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    display: inline-block;
}

.btn-primary {
    background: #0066cc;
    color: #fff;
}

.btn-primary:hover {
    background: #0052a3;
}

.btn-secondary {
    background: #444;
    color: #fff;
}

.btn-secondary:hover {
    background: #555;
}

.btn-secondary:disabled {
    background: #222;
    color: #666;
    cursor: not-allowed;
}

.btn-success {
    background: #00aa44;
    color: #fff;
}

.btn-success:hover {
    background: #008833;
}

.btn-danger {
    background: #cc4444;
    color: #fff;
}

.btn-danger:hover {
    background: #aa3333;
}

/* Playback Controls */
.playback-buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.playback-buttons .btn {
    padding: 8px 4px;
    font-size: 16px;
    min-width: 40px;
}

/* Timeline Slider */
.timeline-slider {
    margin-bottom: 15px;
}

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

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

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

.timeline-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

/* Surface Information */
#surface-info p,
.surface-dimensions p {
    font-size: 13px;
    margin-bottom: 5px;
    color: #ccc;
}

#surface-info strong,
.surface-dimensions strong {
    color: #fff;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-content {
    text-align: center;
    color: #fff;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #333;
    border-top: 4px solid #00aaff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

#controls-panel::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 3px;
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    #controls-panel {
        width: 300px;
        right: 10px;
        top: 10px;
    }
    
    .panel-header {
        padding: 15px;
    }
    
    .control-section {
        padding: 15px;
    }
}

/* Price Chart */
.price-chart {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 500px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    z-index: 10;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.price-chart.minimized {
    height: 50px;
    overflow: hidden;
}

.price-chart.minimized #price-canvas,
.price-chart.minimized #volatility-canvas,
.price-chart.minimized #vol-of-vol-canvas {
    display: none;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #333;
}

.chart-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.chart-controls {
    display: flex;
    gap: 8px;
}

.chart-controls .btn {
    padding: 4px 8px;
    font-size: 12px;
}

#price-canvas,
#volatility-canvas,
#vol-of-vol-canvas {
    display: block;
    width: 100%;
    height: 120px;
    background: transparent;
    border-radius: 0;
}

#price-canvas {
    border-radius: 0;
}

#volatility-canvas {
    border-radius: 0;
}

#vol-of-vol-canvas {
    border-radius: 0 0 12px 12px;
}

/* Hide loading overlay by default */
.loading-overlay {
    display: none;
}

.loading-overlay.show {
    display: flex;
} 