/* ===== Steampunk Clock Theme ===== */

/* Toolbar */
.st-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(6px);
}

.st-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--muted, #6b7280);
    letter-spacing: 0.02em;
    user-select: none;
}

.st-switch {
    position: relative;
    width: 38px;
    height: 20px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.st-switch:focus-visible {
    outline: 2px solid rgba(212, 165, 116, 0.6);
    outline-offset: 2px;
}

.st-switch-thumb {
    position: absolute;
    top: 1px;
    left: 1px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #94a3b8;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.25s ease,
                box-shadow 0.25s ease;
}

.st-switch[aria-pressed="true"] {
    background: rgba(212, 165, 116, 0.18);
    border-color: rgba(212, 165, 116, 0.45);
    box-shadow: 0 0 12px rgba(212, 165, 116, 0.25);
}

.st-switch[aria-pressed="true"] .st-switch-thumb {
    transform: translateX(18px);
    background: #d4a574;
    box-shadow: 0 0 8px rgba(212, 165, 116, 0.7);
}

/* ===== Stage ===== */
body:has(.st-stage) { background: #0a0603; }

.st-stage {
    position: fixed;
    inset: var(--header-height, 80px) 0 0 0;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse at center, #2a1a0a 0%, #1a0f05 60%, #0a0603 100%);
    overflow: hidden;
}

.st-machine {
    position: relative;
    width: clamp(320px, 60vmin, 500px);
    height: clamp(320px, 60vmin, 500px);
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.6));
}

.st-svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Rotor (the part that spins) */
.st-rotor {
    transform-origin: center;
    transform-box: fill-box;
}

.st-rotor-1 { animation: st-rotate-cw  60s linear infinite; }
.st-rotor-2 { animation: st-rotate-ccw 18s linear infinite; }
.st-rotor-3 { animation: st-rotate-cw  6s  linear infinite; }
.st-rotor-4 { animation: st-rotate-ccw 12s linear infinite; }

@keyframes st-rotate-cw {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
@keyframes st-rotate-ccw {
    from { transform: rotate(0deg); }
    to   { transform: rotate(-360deg); }
}

/* ===== Readout (center brass plate with digital time) ===== */
.st-readout {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(130px, 22vmin, 180px);
    height: clamp(130px, 22vmin, 180px);
    border-radius: 50%;
    background:
        radial-gradient(ellipse at center, #1a1208 0%, #0a0603 100%);
    border: 3px solid #b8860b;
    box-shadow:
        inset 0 0 24px rgba(0, 0, 0, 0.85),
        inset 0 0 0 4px #5c3a0a,
        inset 0 0 0 6px #d4a574,
        0 0 18px rgba(184, 134, 11, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.st-readout-inner {
    text-align: center;
    width: 100%;
    padding: 0 8px;
}

.st-time {
    font-family: "Menlo", "Monaco", "Consolas", "Courier New", monospace;
    font-size: clamp(16px, 2.6vw, 24px);
    font-weight: 700;
    color: #f4cf86;
    letter-spacing: 0.05em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    text-shadow:
        0 0 6px rgba(244, 207, 134, 0.6),
        0 0 14px rgba(212, 165, 116, 0.3);
}

.st-date {
    margin-top: 4px;
    font-family: "Menlo", "Monaco", "Consolas", "Courier New", monospace;
    font-size: clamp(8px, 1vw, 10px);
    color: #b8860b;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.75;
}

@media (max-width: 640px) {
    .st-toolbar { gap: 6px 12px; padding: 5px 10px; }
    .st-toggle-label { font-size: 11px; }
}
