:root {
    color-scheme: dark;
    --bg: #16202d;
    --surface: #1a273a;
    --line: #134d6c;
    --heading: #22b9ab;
    --accent: #eab628;
    --text: #c4d1df;
    --muted: #8a9bb0;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100svh;
    padding: 48px 20px;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.6 Consolas, "Liberation Mono", monospace;
}

#container {
    width: min(100%, 900px);
    margin: 10vh auto 0;
}

h1 {
    margin: 0 0 28px;
    color: var(--heading);
    font-size: 32px;
    font-weight: 400;
    letter-spacing: -1px;
    text-transform: lowercase;
}

/* Login */
#container:has(#login-form) {
    max-width: 340px;
}

#login-form {
    display: grid;
    gap: 16px;
}

input,
button {
    min-height: 46px;
    border: 0;
    border-radius: 8px;
    font: inherit;
}

input {
    width: 100%;
    padding: 12px 16px;
    background: var(--surface);
    color: var(--text);
    caret-color: var(--accent);
}

/* Buttons */
button {
    padding: 10px 20px;
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    transition: color 150ms, background 150ms;
}

button:hover {
    color: var(--text);
}

button[type="submit"],
#time-btn {
    color: var(--accent);
}

button[type="submit"]:hover,
#time-btn:hover {
    background: var(--accent);
    color: var(--bg);
}

#time-btn {
    min-width: 110px;
}

#delete-btn,
#tags .del {
    min-height: 32px;
    padding: 5px 10px;
    color: #d58b8b;
    font-size: 13px;
}

#delete-btn {
    display: block;
    margin-left: auto;
}

#delete-btn:hover,
#tags .del:hover {
    color: #efaaaa;
}

#display-btn {
    margin-left: 8px;
    background: transparent;
}

#display-btn:hover {
    color: var(--heading);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

/* Timer */
#timer {
    margin: 0;
    padding: clamp(48px, 10vw, 100px) 0;
    color: var(--accent);
    font-size: clamp(16px, 5vw, 50px);
    font-weight: 400;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
}

/* Bericht */
#tags {
    margin: 0;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
    line-height: 2.4;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

#tags:empty {
    display: none;
}

.date-heading {
    display: block;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.total-number {
    color: var(--accent);
}

.time-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.time-entry > span {
    min-width: 0;
}

#tags .del {
    flex-shrink: 0;
    min-height: 24px;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 11px;
}

::selection {
    background: var(--accent);
    color: var(--bg);
}

@media (max-width: 480px) {
    #container {
        margin-top: 5vh;
    }

    #display-btn {
        margin-left: 0;
        padding-inline: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    button {
        transition: none;
    }
}
