﻿.pills-container {
    position: fixed;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 16px;
    z-index: 10;
    pointer-events: none;
}

.system-status {
    min-width: 180px;
    box-sizing: border-box;
    background: var(--btn-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 100px;
    padding: 10px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    opacity: 0;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    pointer-events: auto;
    cursor: none !important;
    position: relative;
    overflow: visible;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

    .system-status::before {
        content: '';
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        border-radius: 100px;
        background: linear-gradient(115deg, transparent 20%, rgba(186, 230, 253, 0.15) 50%, transparent 80%);
        background-size: 250% 100%;
        background-position: 150% 0;
        transition: background-position 0.6s ease;
        z-index: 1;
        pointer-events: none;
    }

    .system-status:hover {
        border-color: rgba(186, 230, 253, 0.2);
        background: rgba(30, 30, 35, 0.85);
        box-shadow: 0 15px 25px rgba(0,0,0,0.2);
    }

        .system-status:hover::before {
            background-position: -50% 0;
        }

.status-header {
    font-family: 'Inter', sans-serif;
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    white-space: nowrap;
    position: relative;
    z-index: 2;
    margin-left: 0;
    text-align: center;
    transition: color 0.3s ease;
}

.status-body {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 1.2rem;
    width: 100%;
    position: relative;
    z-index: 2;
}

.status-time {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-main);
    height: 1.2rem;
    line-height: 1.2rem;
    overflow: hidden;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    position: relative;
}

@keyframes pillReveal {
    0% {
        opacity: 0;
        transform: translateY(15px);
        filter: blur(8px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

body.is-initiated .pills-container .system-status:nth-child(1) {
    animation: pillReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) 2.5s forwards;
}

body.is-initiated .pills-container .system-status:nth-child(2) {
    animation: pillReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) 2.7s forwards;
}

/* --- Mechanical Odometer Styling --- */
.time-slot {
    display: inline-block;
    height: 1.2rem;
    min-width: 0.55rem;
    text-align: center;
    overflow: hidden;
    position: relative;
}

.time-track {
    display: flex;
    flex-direction: column;
    will-change: transform;
}

    .time-track.sliding {
        transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    }

.time-char {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 1.2rem;
    flex-shrink: 0;
}

/* --- Dynamic Sleep Indicator --- */
#localTime {
    margin-left: 0;
}

#sleepIndicator {
    position: absolute;
    top: -25px;
    right: 25px;
    display: flex;
    align-items: flex-end;
    gap: 2px;
    z-index: 10;
    pointer-events: none;
}

.sleep-z {
    font-family: 'Syne', sans-serif;
    color: var(--accent-glow);
    opacity: 0;
    animation: floatZ 3s infinite linear;
    text-transform: uppercase;
    font-weight: 700;
}

    .sleep-z:nth-child(1) {
        font-size: 0.6rem;
        animation-delay: 0s;
    }

    .sleep-z:nth-child(2) {
        font-size: 0.75rem;
        animation-delay: 1s;
    }

    .sleep-z:nth-child(3) {
        font-size: 0.9rem;
        animation-delay: 2s;
    }

@keyframes floatZ {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0.8);
    }

    20% {
        opacity: 1;
        text-shadow: 0 0 8px rgba(186, 230, 253, 0.8);
    }

    80% {
        opacity: 0.8;
    }

    100% {
        opacity: 0;
        transform: translate(6px, -12px) scale(1.2);
    }
}

/* ====================================================
   TOP CENTER QUOTE PILL
   ==================================================== */
.quote-pill {
    position: fixed;
    top: 2.5rem;
    left: 0;
    right: 0;
    margin: 0 auto;
    /* Forces the pill to dynamically expand with the text */
    width: max-content;
    min-width: 160px; /* Keeps a nice minimum width for the header when empty */
    max-width: 80vw;
    background: var(--btn-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 100px;
    padding: 10px 32px;
    /* Stacks the header and the quote vertically */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    z-index: 10;
    opacity: 0;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    pointer-events: none;
    overflow: hidden;
}

body.is-initiated .quote-pill {
    animation: pillReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) 2.9s forwards;
}

/* Matches the styling of the bottom pills perfectly */
.quote-header {
    font-family: 'Inter', sans-serif;
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    text-align: center;
    margin-left: 0.15em; /* Optically centers the tracking */
}

.quote-body {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-main); /* Pops slightly brighter than the header */
    letter-spacing: 0.03em;
    text-align: center;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 1.2rem; /* Prevents the pill from collapsing too thin when empty */
}

.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    background-color: var(--accent-glow);
    margin-left: 6px;
    margin-bottom: 1px;
    animation: blink 1s step-end infinite;
    box-shadow: 0 0 5px var(--accent-glow);
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}