body {
    margin: 0;
    background: #050505;
    color: #f5f7fb;
    font-family: Inter, system-ui, sans-serif;
}

.app-shell {
    min-height: 100vh;
    padding: 1rem 1rem 6rem;
    background:
        radial-gradient(circle at top, rgba(64, 113, 255, 0.18), transparent 35%),
        radial-gradient(circle at bottom, rgba(255, 59, 48, 0.12), transparent 30%),
        #050505;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.eyebrow,
.cycle-label,
.section-title,
.analytics-label,
.side-kicker,
.phase-label {
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.eyebrow {
    color: #7d8696;
    font-size: 0.72rem;
    font-weight: 800;
}

h1 {
    margin: 0.25rem 0 0;
    font-size: clamp(2rem, 7vw, 3.6rem);
    line-height: 0.95;
}

.topbar-side {
    text-align: right;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 0.65rem 0.9rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 900;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.status-idle,
.status-loading {
    background: #151922;
    color: #b9c2d0;
}

.status-ready,
.status-break {
    background: rgba(64, 113, 255, 0.18);
    color: #90b1ff;
}

.status-active {
    background: rgba(48, 209, 88, 0.18);
    color: #71f5a0;
}

.status-overdue {
    background: rgba(255, 59, 48, 0.2);
    color: #ff8b84;
    animation: overduePulse 0.9s linear infinite;
}

@keyframes overduePulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.25);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(255, 59, 48, 0);
    }
}

.cycle-label {
    margin-top: 0.55rem;
    font-size: 0.72rem;
    color: #7d8696;
    font-weight: 700;
}

.hero-card,
.queue-card,
.analytics-card,
.side-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    background: rgba(10, 12, 18, 0.92);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

.hero-card {
    padding: 1rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
    gap: 1rem;
}

.hero-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 48vh;
    border-radius: 24px;
    padding: 1.2rem;
    background:
        linear-gradient(180deg, rgba(16, 22, 34, 0.98), rgba(8, 10, 14, 0.98));
    text-align: center;
}

.phase-label {
    font-size: 0.82rem;
    color: #8fa2c0;
    font-weight: 800;
}

.person-name {
    margin-top: 1rem;
    font-size: clamp(3rem, 12vw, 7rem);
    font-weight: 900;
    line-height: 0.95;
    text-transform: uppercase;
}

.countdown {
    margin-top: 1rem;
    font-size: clamp(3.2rem, 16vw, 9rem);
    font-weight: 900;
    line-height: 0.9;
    font-variant-numeric: tabular-nums;
}

.subline {
    margin-top: 1rem;
    font-size: clamp(1rem, 3vw, 1.6rem);
    font-weight: 700;
    color: #cbd3df;
}

.detail-line {
    margin-top: 0.65rem;
    color: #7d8696;
    font-size: 0.95rem;
}

.hero-side {
    display: grid;
    gap: 1rem;
}

.side-card {
    padding: 1.1rem;
}

.side-kicker {
    font-size: 0.72rem;
    color: #8390a4;
    font-weight: 800;
}

.side-time {
    margin-top: 0.6rem;
    font-size: clamp(1.4rem, 4vw, 2.2rem);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.side-note {
    margin-top: 0.45rem;
    color: #b9c2d0;
    font-size: 0.95rem;
}

.metric {
    margin-top: 0.6rem;
    color: #f5f7fb;
    font-size: 1rem;
    font-weight: 700;
}

.queue-card {
    margin-top: 1rem;
    padding: 1rem;
}

.section-title {
    color: #7d8696;
    font-size: 0.72rem;
    font-weight: 800;
}

.queue-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-top: 0.9rem;
}

.queue-item {
    padding: 0.9rem;
    border-radius: 18px;
    background: #111521;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.queue-item-name {
    font-size: 1.15rem;
    font-weight: 900;
}

.queue-item-note {
    margin-top: 0.35rem;
    color: #8a95a7;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.queue-item.is-current {
    border-color: rgba(64, 113, 255, 0.45);
    background: rgba(35, 57, 102, 0.45);
}

.queue-item.is-active {
    border-color: rgba(48, 209, 88, 0.5);
    background: rgba(20, 69, 38, 0.5);
}

.queue-item.is-done {
    opacity: 0.55;
}

.analytics-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}

.analytics-card {
    padding: 1rem;
}

.analytics-value {
    margin-top: 0.45rem;
    font-size: clamp(1.6rem, 4vw, 2.3rem);
    font-weight: 900;
}

.overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.72);
}

.overlay-card {
    width: min(620px, 100%);
    padding: 1.5rem;
    border-radius: 28px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #0d1119;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

.overlay-kicker {
    font-size: 0.82rem;
    font-weight: 900;
    color: #8fa2c0;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.overlay-name {
    margin-top: 0.75rem;
    font-size: clamp(2.8rem, 10vw, 5rem);
    font-weight: 900;
    text-transform: uppercase;
}

.overlay-message {
    margin-top: 0.75rem;
    font-size: 1.05rem;
    color: #cbd3df;
}

.overlay-overdue {
    margin-top: 0.85rem;
    font-size: clamp(1.2rem, 4vw, 2rem);
    font-weight: 900;
    color: #ff8b84;
    letter-spacing: 0.08em;
    font-variant-numeric: tabular-nums;
}

.overlay-action {
    margin-top: 1.2rem;
    width: 100%;
    padding: 1rem 1.25rem;
    border: none;
    border-radius: 18px;
    font: inherit;
    font-size: 1.25rem;
    font-weight: 900;
    cursor: pointer;
    background: #30d158;
    color: #041106;
}

.overlay-action.is-stop {
    background: #ff3b30;
    color: #fff;
}

.quick-menu {
    position: fixed;
    right: 0.75rem;
    bottom: 4rem;
    width: min(280px, calc(100vw - 1.5rem));
    background: rgba(10, 12, 18, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 0.9rem;
    z-index: 110;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
}

.quick-menu-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
}

.quick-menu-mode {
    margin-top: 0.25rem;
    font-size: 0.72rem;
    color: #98a5b3;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.quick-menu-section {
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.quick-menu-subtitle {
    margin-bottom: 0.55rem;
    font-size: 0.72rem;
    color: #98a5b3;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.quick-menu-link {
    width: 100%;
    display: block;
    margin-top: 0.45rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: #171c26;
    color: #fff;
    font: inherit;
    font-size: 0.92rem;
    text-align: left;
    cursor: pointer;
}

.quick-menu-link:first-child {
    margin-top: 0;
}

.quick-menu-link:hover {
    background: #1d2431;
}

.quick-shortcut {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0;
    font-size: 0.9rem;
    color: #d8e0e8;
}

.quick-shortcut span:first-child {
    display: inline-flex;
    min-width: 2.4rem;
    height: 1.8rem;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #111520;
    color: #00ff9c;
    font-weight: 800;
}

.controls {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    padding: 0.8rem;
    background: rgba(0, 0, 0, 0.92);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.controls-toggle {
    position: fixed;
    bottom: 0.5rem;
    right: 0.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(17, 21, 32, 0.92);
    color: #fff;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 120;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.ctrl-btn {
    border: none;
    border-radius: 12px;
    padding: 0.8rem 1rem;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
}

.ctrl-primary {
    background: #4071ff;
    color: #fff;
}

.ctrl-secondary {
    background: #30d158;
    color: #041106;
}

.ctrl-danger {
    background: #ff3b30;
    color: #fff;
}

.ctrl-warning {
    background: #ffd60a;
    color: #161300;
}

.ctrl-muted {
    background: #1a2231;
    color: #dce4f0;
}

.hidden {
    display: none !important;
}

@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-main {
        min-height: 38vh;
    }
}

@media (max-width: 640px) {
    .app-shell {
        padding: 0.85rem 0.85rem 7rem;
    }

    .quick-menu {
        right: 0.75rem;
        bottom: 4rem;
    }

    .topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .topbar-side {
        text-align: left;
    }

    .queue-list,
    .analytics-row {
        grid-template-columns: 1fr;
    }

    .controls {
        justify-content: stretch;
    }

    .ctrl-btn {
        flex: 1 1 calc(50% - 0.5rem);
    }
}