* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    font-family: system-ui, sans-serif;
    background: #248067;
    color: #eee;
}

.days-left-link {
    text-decoration: none;
}

.days-left {
    position: fixed;
    bottom: 20px;
    left: 20px;
    font-size: 28px;
    font-family: 'Great Vibes', cursive;
    color: #edc3ae;
}

.quote-top {
    position: fixed;
    top: 20px;
    left: 20px;
    font-size: 28px;
    font-family: 'Great Vibes', cursive;
    color: #edc3ae;
}

.github-link {
    position: fixed;
    bottom: 20px;
    right: 20px;
    color: #edc3ae;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.github-link:hover {
    opacity: 1;
}

.timer {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timer__frame {
    position: relative;
    width: 660px;
    height: 620px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timer__border {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.timer__face {
    position: relative;
    width: 420px;
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timer__progress {
    position: absolute;
    inset: 0;
}

.timer__track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.15);
    stroke-width: 4;
}

.timer__ring {
    fill: none;
    stroke: #edc3ae;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 565.48;
    stroke-dashoffset: 0;
    transform: rotate(-90deg);
    transform-origin: center;
    transition: stroke-dashoffset 0.5s linear;
}

.timer__info {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.timer__label {
    margin-bottom: 4px;
    font-size: 13px;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    letter-spacing: 0.15em;
    opacity: 0.7;
}

.timer__time {
    font-size: 48px;
    font-weight: 600;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.timer__option {
    position: absolute;
    width: 72px;
    height: 72px;
    border-radius: 50%;

    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
    color: #ccc;

    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.timer__option:hover {
    border-color: #edc3ae;
    color: #fff;
}

.timer__option--active {
    background: #edc3ae;
    border-color: #edc3ae;
    color: #fff;
}

.timer__option:nth-child(3) {
    left: 32%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.timer__option:nth-child(4) {
    left: 50%;
    top: 72%;
    transform: translate(-50%, -50%);
}

.timer__option:nth-child(5) {
    left: 68%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.timer__button {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 36px;

    border: 0;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.12);
    color: #eee;

    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.timer__button:hover {
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 700px) {
    body {
        min-height: 100dvh;
        height: 100dvh;
        padding:
            env(safe-area-inset-top)
            env(safe-area-inset-right)
            env(safe-area-inset-bottom)
            env(safe-area-inset-left);
        overflow: hidden;
    }

    .timer {
        width: 100%;
        height: 100%;
        justify-content: center;
    }

    .quote-top {
        font-size: 18px;
        top: 10px;
        left: 10px;
    }

    .days-left {
        font-size: 18px;
        bottom: 10px;
        left: 10px;
    }

    .timer__frame {
        width: min(320px, calc(100vw - 24px), calc(84dvh - 20px));
        height: auto;
        aspect-ratio: 16 / 19;
        flex: 0 0 auto;
        container-type: inline-size;
    }

    .timer__face {
        width: 62.5%;
        height: auto;
        aspect-ratio: 1;
    }

    .timer__info {
        top: 15%;
    }

    .timer__label {
        font-size: clamp(8px, 3.125cqw, 10px);
    }

    .timer__time {
        font-size: clamp(22px, 8.75cqw, 28px);
    }

    .timer__option {
        width: 22%;
        height: auto;
        aspect-ratio: 1;
        font-size: clamp(9px, 3.4cqw, 11px);
    }

    .timer__button {
        bottom: 3.7%;
        padding: clamp(6px, 2.5cqw, 8px) clamp(18px, 7.5cqw, 24px);
        font-size: clamp(11px, 4cqw, 13px);
    }
}
