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

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

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    text-align: center;
    padding: 20px;
    background: rgba(0, 55, 145, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 55, 145, 0.3);
}

.header h1 {
    font-size: 2.5rem;
    font-weight: bold;
    color: #0070f3;
    text-shadow: 0 0 20px rgba(0, 112, 243, 0.5);
    margin-bottom: 10px;
}

.header p {
    font-size: 1.1rem;
    color: #a0a0a0;
    max-width: 600px;
    margin: 0 auto;
}

.main-content {
    flex: 1;
    display: flex;
    position: relative;
    min-height: 600px;
}

.control-panel {
    width: 280px;
    padding: 20px;
    background: rgba(20, 20, 40, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 55, 145, 0.2);
    overflow-y: auto;
    z-index: 10;
}

.control-panel.left {
    border-right: none;
}

.control-panel.right {
    border-left: none;
}

.scene-wrapper {
    flex: 1;
    position: relative;
    min-height: 600px;
}

#scene-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 26, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: opacity 0.5s ease;
}

.loading-content {
    text-align: center;
}

.ps-logo {
    font-size: 4rem;
    font-weight: bold;
    color: #0070f3;
    text-shadow: 0 0 30px rgba(0, 112, 243, 0.8);
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

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

.loading-text {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #ffffff;
}

.loading-subtext {
    font-size: 1rem;
    color: #a0a0a0;
    animation: fadeInOut 0.8s infinite alternate;
}

@keyframes fadeInOut {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

.panel {
    background: rgba(30, 30, 60, 0.6);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(0, 55, 145, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.panel h3 {
    color: #0070f3;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.label {
    color: #a0a0a0;
}

.control-help {
    font-size: 0.85rem;
    color: #a0a0a0;
    line-height: 1.6;
}

.control-help div {
    margin-bottom: 5px;
}

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

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

select, button {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(0, 55, 145, 0.4);
    border-radius: 6px;
    background: rgba(20, 20, 40, 0.8);
    color: #ffffff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

select:hover, button:hover {
    border-color: #0070f3;
    background: rgba(30, 30, 60, 0.9);
}

.power-button {
    position: relative;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    border: 2px solid #444;
    transition: all 0.3s ease;
}

.power-button:hover {
    border-color: #0070f3;
    box-shadow: 0 0 15px rgba(0, 112, 243, 0.3);
}

.power-button.powered-on {
    background: linear-gradient(135deg, #0a4a0a, #0a3a0a);
    border-color: #00aa00;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.4);
}

.power-led {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff0000;
    margin-right: 8px;
    transition: all 0.3s ease;
}

.power-led.active {
    background: #00ff00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.8);
    animation: ledPulse 2s infinite;
}

@keyframes ledPulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.action-button {
    background: linear-gradient(135deg, #003791, #002060);
    border: 1px solid #0070f3;
}

.action-button:hover {
    background: linear-gradient(135deg, #0050c0, #003080);
    box-shadow: 0 0 15px rgba(0, 112, 243, 0.4);
}

.view-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.view-btn {
    padding: 8px;
    font-size: 0.8rem;
    background: rgba(20, 20, 40, 0.8);
    border: 1px solid rgba(0, 55, 145, 0.3);
}

input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    accent-color: #0070f3;
}

.bottom-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 15px;
    background: rgba(20, 20, 40, 0.8);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 55, 145, 0.3);
}

.toolbar-btn {
    padding: 10px 20px;
    background: rgba(30, 30, 60, 0.8);
    border: 1px solid rgba(0, 55, 145, 0.4);
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.toolbar-btn:hover {
    background: rgba(50, 50, 100, 0.9);
    border-color: #0070f3;
}

.fps-counter {
    font-family: 'Courier New', monospace;
    color: #a0a0a0;
    font-size: 0.9rem;
    background: rgba(20, 20, 40, 0.8);
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid rgba(0, 55, 145, 0.3);
}

.footer {
    text-align: center;
    padding: 20px;
    background: rgba(10, 10, 26, 0.9);
    border-top: 1px solid rgba(0, 55, 145, 0.3);
    font-size: 0.9rem;
    color: #a0a0a0;
}

.footer a {
    color: #0070f3;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #40a0ff;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .control-panel {
        width: 100%;
        order: 2;
        max-height: 300px;
    }
    
    .scene-wrapper {
        order: 1;
        min-height: 400px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .bottom-toolbar {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .toolbar-btn {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .control-panel {
        padding: 15px;
    }
    
    .panel {
        padding: 15px;
    }
    
    .view-buttons {
        grid-template-columns: 1fr;
    }
    
    .header {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .header p {
        font-size: 1rem;
    }
}

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

::-webkit-scrollbar-track {
    background: rgba(20, 20, 40, 0.5);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 112, 243, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 112, 243, 0.7);
}