@charset "UTF-8";

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition-duration: 0.3s;
}

html {
    min-height: 100%;
}

body {
    position: relative;
    min-height: 100svh;
    overflow-x: hidden;
    color: white;
    font-family: Arial, Helvetica, sans-serif;
    background-color: #111;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    background: linear-gradient(180deg, #00000026, #00000066);
    pointer-events: none;
}

ul,
ol {
    list-style: none;
}

a {
    text-decoration: none;
}

button,
input[type="submit"] {
    min-height: 40px;
    padding: 8px 14px;
    color: #222;
    font-size: clamp(14px, 1.4vw, 18px);
    font-weight: 700;
    background: white;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
}

button#background-refresh {
    position: fixed;
    top: max(16px, env(safe-area-inset-top));
    right: max(16px, env(safe-area-inset-right));
    z-index: 10;
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    color: white;
    font-size: 22px;
    line-height: 1;
    background: #0000003d;
    border: 1px solid #ffffff66;
    border-radius: 50%;
    text-shadow: 0 0 5px #00000066;
}

button#background-refresh:hover {
    background: #00000059;
}

.hidden {
    display: none !important;
}

.hero-text {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(92vw, 760px);
    min-height: 100svh;
    margin: 0 auto;
    padding: 86px 16px 42px;
    text-align: center;
    align-items: center;
    justify-content: center;
}

.grid-box {
    display: flex;
    width: 100%;
    min-height: min(680px, calc(100svh - 128px));
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(14px, 2.5vw, 24px);
}

h1#clock {
    width: 100%;
    color: white;
    font-size: clamp(56px, 12vw, 160px);
    line-height: 0.95;
    text-shadow: 0 0 10px #00000066;
}

#name-form,
#email-form,
#todo-form,
#logout-form {
    width: 100%;
}

#name-form input,
#email-form input,
#todo-form input {
    width: min(100%, 620px);
    padding: 12px 8px;
    color: white;
    font-size: clamp(20px, 4vw, 42px);
    text-align: center;
    text-shadow: 0 0 6px #00000070;
    background: #00000014;
    border: 0;
    border-bottom: 2px solid #ffffffb3;
    border-radius: 0;
    outline: 0;
}

#name-form input::placeholder,
#email-form input::placeholder,
#todo-form input::placeholder {
    color: #ffffffe6;
}

.weather {
    width: fit-content;
    max-width: 100%;
    padding: 10px 18px;
    color: white;
    font-size: clamp(15px, 2vw, 24px);
    line-height: 1.4;
    text-shadow: 0 0 5px #00000066;
    background: #00000040;
    border: 1px solid #ffffff2e;
    border-radius: 6px;
}

ul#todo-list {
    width: min(100%, 640px);
    max-height: min(34svh, 320px);
    overflow-y: auto;
    padding: 8px 0;
    color: white;
    font-size: clamp(16px, 2.4vw, 24px);
    text-shadow: 0 0 5px #00000066;
    background: #0000002e;
    border-radius: 8px;
}

ul#todo-list::-webkit-scrollbar {
    width: 6px;
    background-color: transparent;
}

ul#todo-list::-webkit-scrollbar-thumb {
    background: #ffffffc9;
    border-radius: 99px;
}

ul#todo-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-align: left;
}

ul#todo-list li p {
    min-width: 0;
    flex: 1;
    overflow-wrap: anywhere;
}

ul#todo-list li button {
    flex: 0 0 auto;
}

form#logout-form {
    padding-top: 4px;
}

form#logout-form input {
    min-width: 96px;
}

@media (max-width: 640px) {
    body {
        background-attachment: scroll;
    }

    button#background-refresh {
        width: 42px;
        height: 42px;
        min-height: 42px;
    }

    .hero-text {
        width: 100%;
        padding: 80px 18px 34px;
    }

    .grid-box {
        min-height: calc(100svh - 114px);
        gap: 16px;
    }

    h1#clock {
        font-size: clamp(48px, 18vw, 82px);
    }

    #name-form input,
    #email-form input,
    #todo-form input {
        font-size: clamp(18px, 6vw, 28px);
    }

    .weather {
        font-size: 15px;
    }

    ul#todo-list {
        max-height: 30svh;
    }

    ul#todo-list li {
        gap: 8px;
        padding: 9px 10px;
    }

    ul#todo-list li button,
    form#logout-form input {
        min-height: 36px;
        padding: 7px 10px;
        font-size: 13px;
    }
}
