/* Darstellung des 3D-Zauberwuerfels inklusive Statuspanel und CSS-Raumkoerper. */
/* Die Klassen hier arbeiten eng mit `js/cube3d.js` zusammen. */
.cube3d-wrapper {
    margin-top: 20px;
}

/* Kopfpanel mit Timer, Status und Bedienhinweisen. */
.cube3d-panel {
    max-width: 760px;
    margin: 0 auto 24px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow);
    text-align: center;
    color: var(--text);
}

.cube3d-panel h2 {
    margin-bottom: 14px;
}

.cube3d-panel p {
    margin: 0 0 8px;
}

/* Oberflaechenwerte im Statuspanel. */
.cube3d-label {
    color: var(--text-soft);
    display: inline-block;
    min-width: 7ch;
}

.cube3d-timer {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--heading);
    text-shadow: 0 0 12px rgba(245, 255, 135, 0.16);
}

#move-count {
    color: var(--link);
    font-weight: bold;
}

#cube3d-status {
    font-weight: bold;
}

/* Aktionsbuttons fuer Scramble und Reset. */
.cube3d-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 16px 0 14px;
}

.cube3d-scramble-line {
    display: inline-block;
    max-width: 100%;
    word-break: break-word;
    font-family: monospace;
    color: var(--text-soft);
}

.cube3d-help {
    color: var(--text-soft);
    font-size: 0.95rem;
}

/* 3D-Buehne samt perspektivischer Mausinteraktion. */
.scene {
    width: 260px;
    height: 260px;
    margin: 60px auto;
    perspective: 800px;
    cursor: grab;
    user-select: none;
}

.scene:active {
    cursor: grabbing;
}

/* Der eigentliche 3D-Koerper, der per Transform rotiert wird. */
.cube {
    width: 180px;
    height: 180px;
    position: relative;
    margin: 40px auto;
    transform-style: preserve-3d;
    transform: rotateX(-25deg) rotateY(35deg);
}

/* Generische Seitenflaeche mit 3x3-Sticker-Raster. */
.face {
    position: absolute;
    width: 180px;
    height: 180px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 4px;
    box-sizing: border-box;
    background: rgba(4, 10, 8, 0.96);
    border: 2px solid rgba(143, 255, 208, 0.18);
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.28);
}

/* Einzelne Sticker und ihre sechs Grundfarben. */
.sticker {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    border: 1px solid rgba(4, 10, 8, 0.9);
    box-sizing: border-box;
}

.white { background: white; }
.yellow { background: yellow; }
.green { background: green; }
.blue { background: blue; }
.red { background: red; }
.orange { background: orange; }

/* Raumpositionen der sechs Flaechen relativ zum Wuerfelzentrum. */
.face-f { transform: translateZ(90px); }
.face-b { transform: rotateY(180deg) translateZ(90px); }
.face-r { transform: rotateY(90deg) translateZ(90px); }
.face-l { transform: rotateY(-90deg) translateZ(90px); }
.face-u { transform: rotateX(90deg) translateZ(90px); }
.face-d { transform: rotateX(-90deg) translateZ(90px); }

/* Technische und inhaltliche Projektbeschreibung unterhalb der Szene. */
.cube3d-description {
    max-width: 760px;
    margin: 24px auto 0;
    padding: 16px 18px;
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.18);
    box-shadow: var(--shadow);
    color: var(--text);
}

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

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