/* Full-page rainbow stripes and centered UI */
:root {
    --bg-alpha: 0.95;
    --grey: 0;
}

html,
body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    background: repeating-linear-gradient(90deg,
            #E40303 0 14.2857%,
            #FF8C00 14.2857% 28.5714%,
            #FFED00 28.5714% 42.8571%,
            #008026 42.8571% 57.1428%,
            #004DFF 57.1428% 71.4285%,
            #750787 71.4285% 85.7142%,
            #9b59b6 85.7142% 100%);
    background-size: cover;
    position: relative;
}

/* Grey overlay that fades in as loading progresses. Controlled via CSS var `--grey` (0..1) */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: #d6d6d6;
    opacity: var(--grey);
    pointer-events: none;
    transition: opacity 120ms linear;
    z-index: 0;
}

.center {
    width: 90%;
    max-width: 480px;
    text-align: center;
    padding: 28px;
    border-radius: 12px;
    position: relative;
    z-index: 2;
}

.start {
    appearance: none;
    border: 0;
    padding: 12px 20px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.95);
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    font-size: 1.05rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.start:disabled {
    opacity: 0.6;
    cursor: wait;
}

.progress {
    margin-top: 18px;
    position: relative;
    height: 36px;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.8));
    transition: width 150ms linear;
}

.progress-label {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    color: #111;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

@media (prefers-reduced-motion: reduce) {
    .progress-fill {
        transition: none;
    }
}