*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: #111013;  /* very dark warm grey — pastels read better than pure black */
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* Hidden SVG filter */
#filters {
    position: absolute;
    width: 0; height: 0;
    pointer-events: none;
}

/* ─────────────────────────────────────────────
   METABALL WRAP
   blur(22px)     → feathers blobs into each other
   contrast(26)   → snaps merged blur to a hard edge
   The black background matters: contrast() pushes
   near-black pixels to pure black, making blob
   edges cut cleanly against the dark scene.
───────────────────────────────────────────── */
.metaball-wrap {
    position: fixed;
    inset: 0;
    /* Lower contrast (18 vs 26) removes the green fringe artifact.
       Softer blur (16px) keeps blobs pillowy without hard neon edges. */
    filter: blur(16px) contrast(18);
}

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

/* Glass sheen — very subtle on dark bg, just adds a tiny top highlight */
#glass-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(
        ellipse 80% 60% at 50% 0%,
        rgba(255,255,255,0.03) 0%,
        transparent 70%
    );
}

/* ─────────────────────────────────────────────
   CLOCK
   IM Fell English — a beautiful old-style serif
   with ligatures and italic cuts. Feels like an
   illuminated manuscript meets a luxury watch.

   text-shadow layering:
     - warm amber glow (the lava color)
     - mid diffuse glow
     - soft outer halo
   Together they make the text look like it's
   lit from within, floating in the dark.
───────────────────────────────────────────── */
#clock {
    position: fixed;
    top: 28px;
    right: 36px;
    z-index: 10;
    text-align: right;
    pointer-events: none;
}

#clock-time {
    font-family: 'IM Fell English', Georgia, serif;
    font-style: italic;
    font-size: clamp(2.2rem, 4.5vw, 3.8rem);
    font-weight: 400;
    letter-spacing: 0.04em;
    color: rgba(255, 230, 180, 0.95);
    line-height: 1;
    text-shadow:
        0 0 8px  rgba(255, 160,  60, 0.9),
        0 0 24px rgba(255, 120,  30, 0.5),
        0 0 60px rgba(255,  80,   0, 0.25),
        0 0 120px rgba(200, 60,   0, 0.12);
    transition: color 1.2s ease;
}

#clock-date {
    font-family: 'IM Fell English', Georgia, serif;
    font-style: italic;
    font-size: clamp(0.75rem, 1.4vw, 1.05rem);
    font-weight: 400;
    letter-spacing: 0.12em;
    color: rgba(255, 210, 140, 0.55);
    margin-top: 4px;
    text-shadow:
        0 0 12px rgba(255, 120, 30, 0.35),
        0 0 30px rgba(255,  80,  0, 0.15);
    transition: color 1.2s ease;
}

/* ─────────────────────────────────────────────
   MODE BUTTON PILL
   Dark glass — semi-transparent black with
   a white border highlight and inner shadow.
   On dark bg this reads as a frosted dark capsule.
───────────────────────────────────────────── */
#ui {
    position: fixed;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.ui-pill {
    display: flex;
    gap: 2px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 100px;
    padding: 5px 6px;
    backdrop-filter: blur(24px) saturate(1.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    box-shadow:
        0 8px 32px rgba(0,0,0,0.55),
        0 1px 0 rgba(255,255,255,0.12) inset;
}

.mode-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    border-radius: 100px;
    padding: 8px 16px;
    font-family: 'IM Fell English', Georgia, serif;
    font-style: italic;
    font-size: 13px;
    letter-spacing: 0.03em;
    color: rgba(255,255,255,0.45);
    cursor: pointer;
    transition: background 0.25s, color 0.25s, transform 0.12s;
    white-space: nowrap;
}

.mode-btn:hover {
    background: rgba(255,255,255,0.10);
    color: rgba(255,255,255,0.85);
    transform: scale(1.05);
}

.mode-btn.active {
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.92);
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.fire-dot     { background: radial-gradient(circle, #ffdd44, #ff3300); }
.pastel-dot   { background: conic-gradient(#ffb3d9, #b3d9ff, #d9ffb3, #ffb3d9); }
.electric-dot { background: radial-gradient(circle, #ffffff, #44aaff); }
.calm-dot     { background: radial-gradient(circle, #88ddff, #0044cc); }
.aurora-dot   { background: conic-gradient(#00ffcc, #aa00ff, #00ffcc); }

/* ─────────────────────────────────────────────
   MUSIC CONTROL — bottom right
───────────────────────────────────────────── */
#music-ui {
    position:fixed;
    bottom: 36px;
    right: 36px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 10px;
}

#music-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.75);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(24px) saturate(1.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    box-shadow: 0 8px 32px rgba(0,0,0,0.55), 0 1px 0 rgba(255,255,255,0.12) inset;
    transition: background 0.25s, color 0.25s, transform 0.12s;
    flex-shrink: 0;
}
/* mambo, oraichi mambo */
#music-btn:hover {
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.95);
    transform: scale(1.08);
}

#music-btn.playing {
    color: rgba(255, 200, 100, 0.95);
    box-shadow:
        0 8px 32px rgba(0,0,0,0.55),
        0 0 16px rgba(255,160,60,0.3),
        0 1px 0 rgba(255,255,255,0.12) inset;
}

/* slides in dari kanan */
#volume-slider-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 100px;
    padding: 8px 16px;
    backdrop-filter: blur(24px) saturate(1.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    box-shadow: 0 8px 32px rgba(0,0,0,0.55), 0 1px 0 rgba(255,255,255,0.12) inset;
/* anim geseran */
    overflow: hidden;
    max-width: 0;
    opacity: 0;
    padding-right: 0;
    transition: max-width 0.4s ease, opacity 0.3s ease, padding 0.4s ease;
    pointer-events: none;
}

#volume-slider-wrap.open {
    max-width: 200px;
    opacity: 1;
    padding: 8px 16px;
    pointer-events: all;
}

#volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 110px;
    height: 4px;
    border-radius: 99px;
    background: rgba(255,255,255,0.2);
    outline: none;
    cursor: pointer;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 210, 140, 0.95);
    box-shadow: 0 0 8px rgba(255,160,60,0.6);
    cursor: pointer;
    transition: transform 0.15s;
}

#volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.25);
}

#volume-label {
    font-family: 'IM Fell English', Georgia, serif;
    font-style: italic;
    font-size: 12px;
    color: rgba(255,210,140,0.7);
    min-width: 32px;
    text-align: right;
    white-space: nowrap;
}