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

:root {
    --c1: #030712;
    --c2: #0f1535;
    --c3: #311c6e;
    --c4: #005e8c;
    --c5: #24d8ff;
    --c6: #fdd54f;
    --c7: #ff7cae;
    --text-primary: #f8fbff;
    --muted-border: rgba(248, 251, 255, 0.45);
    --gradient: linear-gradient(125deg, var(--c2) 0%, var(--c3) 25%, var(--c7) 45%, var(--c6) 65%, var(--c5) 85%, var(--c4) 100%);
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 3rem;
    background: var(--gradient);
    background-size: 220% 220%;
    animation: gradientShift 26s ease-in-out infinite;
    font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

body::before,
body::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(160px);
    opacity: 0.55;
    mix-blend-mode: screen;
    animation: orbit 18s ease-in-out infinite;
}

body::before {
    top: -220px;
    right: -160px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0));
    animation-delay: -4s;
}

body::after {
    bottom: -260px;
    left: -200px;
    background: radial-gradient(circle at 70% 70%, rgba(36, 216, 255, 0.7), rgba(36, 216, 255, 0));
    animation-delay: -10s;
}

.timer {
    text-align: center;
    padding: clamp(3rem, 6vw, 5rem) clamp(3.5rem, 9vw, 6.5rem);
    position: relative;
    z-index: 1;
}

#minutes {
    width: clamp(200px, 25vw, 280px);
    margin-bottom: 2.5rem;
    padding: 1rem 1.5rem;
    border: none;
    border-bottom: 2px solid var(--muted-border);
    background: transparent;
    color: var(--text-primary);
    font-size: 1.6rem;
    text-align: center;
    letter-spacing: 0.18em;
    outline: none;
    transition: transform 220ms ease, border-color 220ms ease;
}

#minutes:focus {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.85);
}

#minutes:disabled {
    opacity: 0.5;
    transform: none;
}

#minutes::placeholder {
    color: rgba(248, 251, 255, 0.55);
}

#display {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 3.6rem;
    border-radius: 38px;
    font-size: clamp(6rem, 18vw, 13rem);
    font-weight: 700;
    letter-spacing: clamp(0.12em, 2vw, 0.42em);
    margin-bottom: 0;
    line-height: 0.9;
    background: var(--gradient);
    background-size: 240% 240%;
    animation: gradientShift 26s ease-in-out infinite;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 0.045em rgba(255, 255, 255, 0.3);
    text-shadow: 0 38px 75px rgba(3, 7, 18, 0.68), 0 0 40px rgba(255, 255, 255, 0.42), 0 0 18px rgba(255, 255, 255, 0.55);
    filter: saturate(185%) drop-shadow(0 42px 86px rgba(3, 7, 18, 0.6));
    font-variant-numeric: tabular-nums;
    isolation: isolate;
}

#display::selection {
    background: rgba(255, 255, 255, 0.18);
    color: rgba(5, 8, 18, 0.75);
}

.display-shell {
    position: relative;
    width: clamp(280px, 42vw, 520px);
    aspect-ratio: 1;
    margin-bottom: 3.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 32px 65px rgba(3, 7, 18, 0.55));
}

.progress-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    filter: blur(0.4px);
}

.progress-ring__track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.12);
    stroke-width: 14px;
    stroke-linecap: round;
    opacity: 0.55;
    filter: blur(0.2px);
}

.progress-ring__indicator {
    fill: none;
    stroke: url(#progressGradient);
    stroke-width: 14px;
    stroke-linecap: round;
    stroke-dasharray: 678;
    stroke-dashoffset: 678;
    filter: drop-shadow(0 0 22px rgba(36, 216, 255, 0.6));
    transition: stroke-dashoffset 200ms ease, filter 260ms ease;
}

.display-shell::after {
    content: '';
    position: absolute;
    inset: 12%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0));
    opacity: 0.45;
    filter: blur(24px);
    mix-blend-mode: screen;
    pointer-events: none;
}

#display::before {
    content: '';
    position: absolute;
    inset: -25% -40% 52% -40%;
    background: linear-gradient(110deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));
    opacity: 0.62;
    mix-blend-mode: screen;
    filter: blur(24px);
    animation: glassSweep 18s ease-in-out infinite;
    pointer-events: none;
}

#display::after {
    content: '';
    position: absolute;
    inset: -10% -28% -46% -28%;
    background: radial-gradient(circle at 50% 5%, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0));
    opacity: 0.58;
    mix-blend-mode: screen;
    filter: blur(18px);
    animation: glassPulse 12s ease-in-out infinite;
    pointer-events: none;
}

.controls {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

button {
    position: relative;
    padding: 0.9rem 2.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-primary);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 46px rgba(3, 7, 18, 0.45);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    overflow: hidden;
    transition: transform 220ms ease, box-shadow 220ms ease, backdrop-filter 220ms ease;
}

button::after {
    content: '';
    position: absolute;
    inset: -40% -20% 70% -20%;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0));
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 220ms ease;
}

button#start {
    border-color: rgba(255, 107, 174, 0.65);
}

button#reset {
    border-color: rgba(54, 249, 246, 0.6);
}

button:hover {
    transform: translateY(-4px);
    box-shadow: 0 28px 60px rgba(3, 7, 18, 0.5);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

button:hover::after {
    opacity: 0.9;
}

button:active {
    transform: translateY(-1px) scale(0.99);
    box-shadow: 0 18px 36px rgba(3, 7, 18, 0.45);
}

button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

@keyframes gradientShift {
    0%,
    100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes orbit {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(40px, -30px, 0) scale(1.08);
    }
}

@keyframes glassSweep {
    0%,
    100% {
        transform: translateX(-12%) rotate(-6deg);
        opacity: 0.45;
    }
    50% {
        transform: translateX(14%) rotate(4deg);
        opacity: 0.8;
    }
}

@keyframes glassPulse {
    0%,
    100% {
        opacity: 0.35;
        transform: scale(0.95);
    }
    50% {
        opacity: 0.65;
        transform: scale(1.05);
    }
}

@media (max-width: 720px) {
    body {
        padding: 2rem;
    }

    .timer {
        padding: 2.75rem 2.25rem;
    }

    #display {
        font-size: clamp(4.8rem, 24vw, 8.5rem);
    }

    #minutes {
        width: 100%;
    }

    .controls {
        flex-direction: column;
        gap: 1rem;
    }

    button {
        width: 100%;
    }
}
