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

:root {
    --bg: #0e0f10;
    --card-bg: #1a1d1e;
    --card-border: #2a2d2e;
    --green: #53fc18;
    --green-dim: #3dbd12;
    --red: #ef4444;
    --text: #e5e7eb;
    --muted: #6b7280;
    --white: #ffffff;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--card-bg);
    border-bottom: 1px solid var(--card-border);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--white);
}

.beta-badge {
    font-size: 0.6rem;
    font-weight: 700;
    background: var(--green);
    color: #000;
    padding: 2px 6px;
    border-radius: 4px;
    vertical-align: super;
    letter-spacing: 0.05em;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--green);
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

/* Main */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.screen {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.screen.screen-wide {
    max-width: 700px;
}

/* Card */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    text-align: center;
}

/* Login */
.login-card {
    padding: 3rem 2rem;
}

.kick-logo-large {
    margin-bottom: 1.5rem;
}

.login-card h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: var(--white);
}

.login-subtitle {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.btn-login {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--green);
    color: #000;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
}

.btn-login:hover {
    background: var(--green-dim);
    transform: translateY(-1px);
}

.btn-login:active {
    transform: translateY(0);
}

/* No Drop */
.no-drop-icon {
    margin-bottom: 1rem;
    opacity: 0.5;
}

.card h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.muted {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Tracker */
.tracker-card {
    padding: 1.5rem 2rem 2rem;
}

/* Live status */
.live-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.live-status.live {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red);
}

.live-status.offline {
    background: rgba(107, 114, 128, 0.15);
    color: var(--muted);
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.live-status.live .live-dot {
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* Streamer name */
.streamer-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--green);
    margin-bottom: 1.25rem;
}

/* Milestones row */
.milestones-row {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    width: 100%;
    margin-bottom: 1.25rem;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.ms-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    transition: opacity 0.3s, transform 0.3s;
}

.ms-circle-wrap {
    position: relative;
    width: 120px;
    height: 120px;
}

.ms-ring {
    display: block;
}

/* Item image centered in circle */
.ms-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ms-item-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.ms-icon-locked {
    opacity: 0.3;
    filter: grayscale(1);
}

/* Check badge (small green circle with checkmark, bottom-right of circle) */
.ms-check-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    background: var(--green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Time label below circle */
.ms-time-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    text-align: center;
    margin-top: 0.15rem;
}

.ms-time-done {
    color: var(--green);
}

/* Item name below time */
.ms-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Connector line between milestones */
.ms-connector {
    width: 24px;
    height: 2px;
    background: var(--card-border);
    flex-shrink: 0;
    align-self: center;
    margin-top: -30px;
}

.ms-connector-done {
    background: var(--green);
}

/* States */
.ms-completed .ms-label {
    color: var(--green);
}

.ms-active .ms-label {
    color: var(--white);
}

.ms-locked {
    opacity: 0.4;
}

.ms-locked .ms-label {
    color: var(--muted);
}

/* End time */
.drop-end-time {
    font-size: 0.8rem;
    color: var(--muted);
}

/* Error message */
.error-message {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: #fca5a5;
    font-size: 0.85rem;
    line-height: 1.5;
}

.error-message a {
    color: var(--green);
    text-decoration: underline;
}

/* Footer hint */
.footer-hint {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--muted);
    text-align: center;
    max-width: 300px;
}

/* Loading */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--card-border);
    border-top: 3px solid var(--green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 480px) {
    header {
        padding: 0.75rem 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    .ms-circle-wrap {
        width: 96px;
        height: 96px;
    }

    .ms-ring {
        width: 96px;
        height: 96px;
    }

    .ms-item-img {
        width: 44px;
        height: 44px;
    }

    .ms-label {
        max-width: 96px;
        font-size: 0.68rem;
    }

    .ms-time-label {
        font-size: 0.65rem;
    }

    .ms-connector {
        width: 16px;
        margin-top: -24px;
    }
}
