/* =====================
   Reset & Base
   ===================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --clr-primary:    #4f46e5;
    --clr-primary-2:  #7c3aed;
    --clr-bg-from:    #ede9fe;
    --clr-bg-to:      #dbeafe;
    --clr-card:       #ffffff;
    --clr-text:       #1e1b4b;
    --clr-muted:      #6b7280;
    --clr-border:     #e5e7eb;
    --clr-track:      #e5e7eb;
    --radius-card:    20px;
    --shadow-card:    0 24px 64px rgba(79, 70, 229, .14);
    --transition:     .2s ease;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--clr-bg-from) 0%, var(--clr-bg-to) 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    padding: 1rem;
}

/* =====================
   Card
   ===================== */
.container {
    width: 100%;
    max-width: 520px;
}

.card {
    background: var(--clr-card);
    border-radius: var(--radius-card);
    padding: 2.75rem 2.25rem;
    text-align: center;
    box-shadow: var(--shadow-card);
}

/* =====================
   Spinner
   ===================== */
.spinner-ring {
    display: inline-block;
    position: relative;
    width: 64px;
    height: 64px;
    margin-bottom: 1.75rem;
}

.spinner-ring div {
    box-sizing: border-box;
    display: block;
    position: absolute;
    width: 52px;
    height: 52px;
    margin: 6px;
    border: 5px solid transparent;
    border-top-color: var(--clr-primary);
    border-radius: 50%;
    animation: spinRing 1s cubic-bezier(.5, 0, .5, 1) infinite;
}

.spinner-ring div:nth-child(1) { animation-delay: -.375s; }
.spinner-ring div:nth-child(2) { animation-delay: -.25s;  }
.spinner-ring div:nth-child(3) { animation-delay: -.125s; }

@keyframes spinRing {
    from { transform: rotate(0deg);   }
    to   { transform: rotate(360deg); }
}

/* =====================
   Typography
   ===================== */
.title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--clr-text);
    letter-spacing: -.02em;
    margin-bottom: .5rem;
}

.subtitle {
    font-size: .9375rem;
    color: var(--clr-muted);
    line-height: 1.6;
    margin-bottom: 1.75rem;
}

/* =====================
   URL Box
   ===================== */
.url-box {
    background: #f9fafb;
    border: 1px solid var(--clr-border);
    border-radius: 10px;
    padding: .75rem 1rem;
    text-align: left;
    margin-bottom: 1.5rem;
}

.url-label {
    display: block;
    font-size: .6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #9ca3af;
    margin-bottom: .3rem;
}

.url-link {
    font-size: .875rem;
    color: var(--clr-primary);
    text-decoration: none;
    word-break: break-all;
    transition: color var(--transition);
}

.url-link:hover { color: var(--clr-primary-2); text-decoration: underline; }

/* =====================
   Progress Bar
   ===================== */
.progress-track {
    height: 6px;
    background: var(--clr-track);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: .875rem;
}

.progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--clr-primary), var(--clr-primary-2));
    border-radius: 99px;
}

@keyframes fillProgress {
    from { width: 0%;   }
    to   { width: 100%; }
}

/* =====================
   Countdown
   ===================== */
.countdown {
    font-size: .875rem;
    color: var(--clr-muted);
    margin-bottom: 1.75rem;
}

.countdown span {
    font-weight: 700;
    color: var(--clr-primary);
    font-variant-numeric: tabular-nums;
}

/* =====================
   Button
   ===================== */
.btn {
    display: inline-block;
    padding: .625rem 1.875rem;
    background: linear-gradient(135deg, var(--clr-primary), var(--clr-primary-2));
    color: #fff;
    font-size: .9375rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 4px 14px rgba(79, 70, 229, .35);
}

.btn:hover {
    opacity: .92;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, .4);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(79, 70, 229, .3);
}

/* =====================
   Responsive
   ===================== */
@media (max-width: 480px) {
    .card  { padding: 2rem 1.25rem; }
    .title { font-size: 1.5rem; }
}
