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

html, body {
    height: 100%;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #000;
    color: #f5f5f5;
}

.center {
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1rem;
}

.hidden {
    display: none;
}

h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

/* logo nad tytułem */
.logo {
    max-width: 250px;
    width: 40vw;
    height: auto;
    margin-bottom: 1.5rem;
}

/* podniesiony ekran ustawień */
#setup {
    justify-content: flex-start;
    padding-top: 3rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* większe etykiety */
label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-size: 1.5rem;
}

/* pola formularza – przezroczyste, białe cyfry, zaokrąglone obramowanie */
input[type="number"] {
    margin-top: 0.3rem;
    width: 9rem;
    padding: 0.6rem 0.9rem;
    font-size: 1.5rem;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    color: #ffffff;
    outline: none;
}

input[type="number"]::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

input[type="number"]:focus {
    border-color: #0f0;
}

/* przyciski główne i presetów – powiększone */
button {
    padding: 0.9rem 2.1rem;
    font-size: 1.65rem;
    font-weight: bold;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: #0f0;
    color: #000;
}

.preset-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    margin-top: 0.75rem;
}

.preset-btn {
    font-size: 1.4rem;
    padding: 0.75rem 1.5rem;
}

p {
    margin-top: 0.75rem;
    color: #aaa;
}

/* timer – font jak u TED, ogromny na desktopie */
#display {
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue",
                 Helvetica, Arial, sans-serif;
    font-variant-numeric: tabular-nums;
    font-size: clamp(4rem, 14vw, 11rem);
    font-weight: 800;
    letter-spacing: 0.1em;
    text-align: center;
}

/* Dużo większy timer na komputerach */
@media (min-width: 1024px) {
    #display {
        font-size: clamp(10rem, 24vw, 50rem);
        letter-spacing: 0.05em;
    }
}

body.time-up {
    background: #c00000;
    color: #ffffff;
}

/* Mniejszy napis po zakończeniu (TIME'S UP!) */
body.time-up #display {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-variant-numeric: normal;
    font-size: clamp(4rem, 10vw, 7rem);
    letter-spacing: 0.2em;
}

/* Timer w strefie ostrzegawczej (≤20% czasu) – pomarańczowy */
#display.warning {
    color: orange;
}

/* przyciski PAUZA + RESET na dole ekranu */
.bottom-controls {
    position: fixed;
    bottom: 0.8rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

/* bardzo dyskretne "ghost" przyciski, żeby nie odciągały wzroku od timera */
.bottom-controls .small-btn {
    background: transparent;                          /* brak „placka” koloru */
    color: rgba(255, 255, 255, 0.55);                 /* przygaszona biel */
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
    padding: 0.25rem 0.7rem;
    opacity: 0.7;
}

/* trochę bardziej widoczne dopiero gdy najedziesz myszką */
.bottom-controls .small-btn:hover {
    opacity: 1;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.7);
}


/* przycisk pełnego ekranu w prawym dolnym rogu */
.fs-btn {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 999;
    font-size: 1.2rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.15);
    color: #f5f5f5;
    backdrop-filter: blur(6px);
}

.fs-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}
