/* ===== 3D Flip Clock Theme ===== */

/* Toolbar */
.f3-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);
}

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

.f3-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;
}

.f3-switch:focus-visible {
    outline: 2px solid rgba(212, 175, 55, 0.6);
    outline-offset: 2px;
}

.f3-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;
}

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

.f3-switch[aria-pressed="true"] .f3-switch-thumb {
    transform: translateX(18px);
    background: #d4af37;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.7);
}

/* ===== Stage ===== */
.f3-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* ===== Clock ===== */
.f3-clock {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 18px 22px;
    background:
        linear-gradient(180deg, rgba(40, 30, 20, 0.4) 0%, rgba(20, 15, 10, 0.6) 100%);
    border-radius: 14px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 20px 40px -20px rgba(0, 0, 0, 0.6);
}

/* ===== Slot (one digit) ===== */
.f3-slot {
    position: relative;
    width: clamp(56px, 9vw, 84px);
    height: clamp(84px, 13vw, 124px);
    perspective: 600px;
    border-radius: 8px;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.06),
        0 4px 8px rgba(0, 0, 0, 0.4);
}

.f3-card {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.f3-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transform: rotateX(0);
    transition: transform 0.55s cubic-bezier(0.45, 0.05, 0.25, 1);
}

.f3-card-face {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Menlo", "Monaco", "Consolas", "Courier New", monospace;
    font-size: clamp(40px, 7vw, 64px);
    font-weight: 700;
    color: #f5f5f5;
    background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 50%, #161616 50%, #222222 100%);
    border-radius: 8px;
    backface-visibility: hidden;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}

.f3-card-face-back {
    transform: rotateX(180deg);
}

/* Gold split line in the middle of each card */
.f3-slot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 6%;
    right: 6%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #d4af37 15%, #f4cf68 50%, #d4af37 85%, transparent);
    transform: translateY(-50%);
    z-index: 5;
    pointer-events: none;
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.5);
}

/* ===== Separator (:) ===== */
.f3-sep {
    font-family: "Menlo", "Monaco", "Consolas", "Courier New", monospace;
    font-size: clamp(28px, 4.5vw, 44px);
    font-weight: 700;
    color: #d4af37;
    line-height: 1;
    padding-bottom: 0;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
    animation: f3-blink 1s steps(1) infinite;
}

@keyframes f3-blink {
    0%, 50% { opacity: 1; }
    50.01%, 100% { opacity: 0.25; }
}

/* Hide seconds when toggled off */
.f3-clock.no-seconds .f3-slot-seconds,
.f3-clock.no-seconds .f3-sep-seconds {
    display: none;
}

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