body {
    margin: 0;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #121212;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

.controls {
    margin-top: 40px;
    margin-bottom: 80px;
    background: #1e1e1e;
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    border: 1px solid #333;
}

.controls select {
    font-size: 16px;
    padding: 8px 12px;
    margin-left: 15px;
    background-color: #2c2c2c;
    color: white;
    border: 1px solid #444;
    border-radius: 6px;
    cursor: pointer;
    outline: none;
}

.controls select:hover {
    border-color: #666;
}

.scene {
    width: 500px;
    height: 500px;
    perspective: 1200px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.loader-container {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #121212;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.loader-container.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #333;
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.prism {
    position: relative;
    transform-style: preserve-3d;
    animation: rotatePrism 20s infinite linear;
}

.face {
    position: absolute;
    left: 50%;
    top: 50%;
    /* Prevents z-fighting and rendering artifacts */
    backface-visibility: hidden; 
}

.face canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Subtle shading to give the faces a bit of depth */
.face::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0.05), rgba(0,0,0,0.4));
    pointer-events: none;
}

@keyframes rotatePrism {
    0% {
        transform: rotateX(-15deg) rotateY(90deg);
    }
    100% {
        transform: rotateX(-15deg) rotateY(-270deg);
    }
}
