/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0f1225;
    --card: #171b33;
    --card-2: #1e2445;
    --text: #eef1ff;
    --muted: #9aa1c4;
    --accent: #7c6cff;
    --accent-2: #2ad2c8;
    --border: #2a315c;
    --radius: 18px;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

body.dark {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: radial-gradient(1200px 800px at 20% 10%, #1a2040, var(--bg) 60%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    -webkit-font-smoothing: antialiased;
}

.wrap {
    width: 100%;
    max-width: 900px;
}

.card {
    background: linear-gradient(160deg, var(--card), var(--card-2));
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: var(--shadow);
}

h1 {
    font-family: 'Inter', sans-serif;
    font-size: 2.1rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.subtitle {
    color: var(--muted);
    font-size: 1.05rem;
    margin-bottom: 36px;
}

/* ===== Kontrolki ===== */
.controls {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 24px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field span {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--muted);
}

input[type="datetime-local"] {
    background: #0e1228;
    border: 1px solid var(--border);
    color: var(--text);
    font-family: inherit;
    font-size: 1.05rem;
    padding: 14px 16px;
    border-radius: 12px;
    color-scheme: dark;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="datetime-local"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(124, 108, 255, 0.18);
}

.btn {
    background: linear-gradient(135deg, var(--accent), #5a4cf0);
    color: #fff;
    border: none;
    font-family: inherit;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 14px 28px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 8px 20px rgba(124, 108, 255, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(124, 108, 255, 0.4);
}

.status {
    font-size: 0.98rem;
    margin-bottom: 24px;
    min-height: 1.4em;
    color: var(--muted);
}

.status.error {
    color: #ff7a7a;
}

/* ===== Licznik ===== */
.counter {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

.unit {
    background: #0e1228;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px 10px;
    text-align: center;
    transition: transform 0.2s ease;
}

.unit:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
}

.value {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    line-height: 1;
    letter-spacing: -1px;
    color: var(--text);
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
}

/* ===== Responsywność ===== */
@media (max-width: 900px) {
    .counter {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 560px) {
    .card {
        padding: 32px 22px;
    }

    h1 {
        font-size: 1.6rem;
    }

    .counter {
        grid-template-columns: repeat(2, 1fr);
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
    }
}
