body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

#loadingScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#loadingScreen::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 30px;
    width: 200px;
    height: 80px;
    background-image: url('../assets/eureka3dxr_logo.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.9;
}

.loading-content {
    text-align: center;
    color: white;
    position: relative;
    z-index: 1;
}

#canvasZone {
    position: relative;
    width: 100%;
    height: 100vh;
    background: #001f3f;
}

#canvasZone::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    width: 180px;
    height: 70px;
    background-image: url('../assets/eureka3dxr_logo.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.6;
    pointer-events: none;
    z-index: 10;
}

#canvasZone canvas {
    position: relative;
    z-index: 1;
}

.spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-content p {
    font-size: 18px;
    margin: 0;
    font-weight: 300;
    letter-spacing: 1px;
}

#zipLoaderControls {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
    padding: 15px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#zipLoaderControls input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

#zipLoaderControls button {
    padding: 8px 16px;
    margin-left: 10px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

#zipLoaderControls button:hover {
    background: #5568d3;
}

#canvasZone {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Viewer Controls (Background & Lighting) */
#viewerControls {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.15);
    z-index: 1000;
    display: none;
    min-width: 280px;
    pointer-events: auto; /* Important: Allow mouse interaction */
}

.control-group {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-group label {
    font-size: 13px;
    color: #666;
    min-width: 100px;
}

.control-group input[type="color"] {
    width: 40px;
    height: 30px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.control-group input[type="checkbox"] {
    margin: 0 5px 0 0;
}

.control-group input[type="range"] {
    flex: 1;
    cursor: pointer;
}

.control-group span {
    font-size: 12px;
    color: #666;
    min-width: 30px;
    text-align: right;
}

/* Animation Controls */
#controls {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 8px;
    z-index: 100;
}

#controls > div:first-child {
    display: flex;
    gap: 10px;
    align-items: center;
}

#controls select {
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #444;
    background: #2a2a2a;
    color: white;
    font-size: 14px;
}

#controls button {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    background: #007acc;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

#controls button:hover {
    background: #005a9e;
}

/* Info button - special styling */
#infoBtn {
    background: #17a2b8;
    font-size: 16px;
    padding: 6px 12px;
    min-width: 40px;
}

#infoBtn:hover {
    background: #138496;
}

.control-group {
    display: flex;
    gap: 10px;
    align-items: center;
}
#timeDisplay {
    color: white;
    font-family: monospace;
    font-size: 14px;
}

#speedSlider {
    cursor: pointer;
}

#speedValue {
    color: white;
    font-family: monospace;
    font-size: 14px;
}

/* Scene Description (Cases 4 & 5) - Now shown on button click */
.scene-description {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
    z-index: 2000;
    max-width: 600px;
    max-height: 70vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.description-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.description-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.description-header button {
    background: transparent;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.description-header button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.description-content {
    padding: 20px;
    overflow-y: auto;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
}

.description-content p {
    margin: 0 0 12px 0;
}

.description-content p:last-child {
    margin-bottom: 0;
}
