/* ===== Chalkboard Clock Theme ===== */

.cb-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);
}

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

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

.cb-switch:focus-visible {
    outline: 2px solid rgba(245, 245, 235, 0.6);
    outline-offset: 2px;
}

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

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

.cb-switch[aria-pressed="true"] .cb-switch-thumb {
    transform: translateX(18px);
    background: #f5f5eb;
    box-shadow: 0 0 8px rgba(245, 245, 235, 0.7);
}

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

.cb-frame {
    position: relative;
    width: min(720px, 94vw);
    padding: 18px;
    border-radius: 6px;
    background:
        repeating-linear-gradient(
            90deg,
            #6b4423 0px,
            #8b5a2b 12px,
            #5a3818 24px,
            #6b4423 36px
        ),
        linear-gradient(180deg, #4a2e15 0%, #3a2510 100%);
    box-shadow:
        0 30px 60px -22px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -2px 0 rgba(0, 0, 0, 0.4);
}

.cb-board {
    position: relative;
    aspect-ratio: 600 / 320;
    border-radius: 4px;
    background:
        radial-gradient(ellipse at center,
            #2c4636 0%,
            #1f3329 60%,
            #142019 100%);
    box-shadow:
        inset 0 0 30px rgba(0, 0, 0, 0.45),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
    color: #f5f5eb;
    font-family: "Bradley Hand", "Marker Felt", "Comic Sans MS", "Segoe Print", cursive, sans-serif;
}

/* Subtle texture noise on the board */
.cb-board::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(1px 1px at 10% 20%, rgba(255, 255, 255, 0.06), transparent),
        radial-gradient(1px 1px at 30% 70%, rgba(255, 255, 255, 0.05), transparent),
        radial-gradient(1px 1px at 60% 30%, rgba(255, 255, 255, 0.04), transparent),
        radial-gradient(1px 1px at 80% 80%, rgba(255, 255, 255, 0.05), transparent);
    opacity: 0.7;
}

/* SVG layer with decorations */
.cb-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Content */
.cb-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    text-align: center;
}

.cb-class-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: clamp(11px, 1.3vw, 14px);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(245, 245, 235, 0.65);
    margin-bottom: 8px;
}

.cb-class-divider {
    opacity: 0.5;
}

.cb-class-title {
    font-weight: 700;
}

.cb-time {
    font-size: clamp(64px, 14vw, 132px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.04em;
    color: #f5f5eb;
    text-shadow:
        0 0 1px rgba(245, 245, 235, 0.4),
        1px 1px 0 rgba(0, 0, 0, 0.35);
    font-variant-numeric: tabular-nums;
    margin: 6px 0;
}

.cb-date {
    font-size: clamp(14px, 1.6vw, 18px);
    letter-spacing: 0.12em;
    color: rgba(245, 245, 235, 0.85);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.cb-tagline {
    font-size: clamp(11px, 1.3vw, 14px);
    color: rgba(245, 245, 235, 0.55);
    font-style: italic;
    letter-spacing: 0.05em;
}

.cb-tagline em {
    color: rgba(245, 245, 235, 0.85);
    font-style: italic;
}

.cb-tagline-bracket {
    opacity: 0.5;
    margin: 0 4px;
}

/* Erased effect — chalk text gets faint and smudged */
.cb-board.erased .cb-content {
    opacity: 0.12;
    filter: blur(1px);
    transition: opacity 0.5s ease, filter 0.5s ease;
}
.cb-board.erased .cb-svg {
    opacity: 0.08;
    transition: opacity 0.5s ease;
}

/* Wooden tray at the bottom */
.cb-tray {
    margin-top: 10px;
    padding: 0 12px;
    height: 22px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.cb-chalk {
    width: 80px;
    height: 8px;
    border-radius: 2px;
    background: linear-gradient(180deg, #f5f5eb 0%, #d8d8c8 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 1px 2px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 0, 0, 0.25);
}

.cb-eraser {
    width: 60px;
    height: 14px;
    border-radius: 2px;
    background: linear-gradient(180deg, #4a3725 0%, #2d1f12 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 2px rgba(0, 0, 0, 0.4);
}

@media (max-width: 640px) {
    .cb-frame { padding: 12px; }
    .cb-board { aspect-ratio: 600 / 360; }
    .cb-toolbar { gap: 6px 12px; padding: 5px 10px; }
    .cb-toggle-label { font-size: 11px; }
}