* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    padding: 24px;

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

    background-color: #f5f7fa;
    color: #1e293b;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.container {
    width: 100%;
    max-width: 680px;
    padding: 48px;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;

    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

/* Current count */

h1 {
    margin: 0 0 12px;
    color: #0f172a;
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 650;
    letter-spacing: -1.5px;
    text-align: center;
}

/* Counter buttons */

.counter-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
}

button {
    padding: 10px 20px;

    border: 1px solid #cbd5e1;
    border-radius: 8px;

    background-color: #ffffff;
    color: #334155;

    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;

    cursor: pointer;
    transition: background-color 0.15s ease,
                border-color 0.15s ease,
                transform 0.15s ease;
}

button:hover {
    background-color: #f1f5f9;
    border-color: #94a3b8;
}

button:active {
    transform: scale(0.97);
}

/* Set count form */

form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

form label {
    color: #475569;
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
}

input[type="number"] {
    width: 180px;
    padding: 10px 12px;

    border: 1px solid #cbd5e1;
    border-radius: 8px;

    color: #1e293b;
    background-color: #ffffff;
    font: inherit;
    font-size: 1rem;

    outline: none;
    transition: border-color 0.15s ease,
                box-shadow 0.15s ease;
}

input[type="number"]:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Alerts */

.alert {
    width: 100%;
    padding: 14px 18px;

    border: 1px solid transparent;
    border-left-width: 4px;
    border-radius: 8px;

    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.5;
}

.alert-error {
    color: #b42318;
    background-color: #fef2f2;
    border-color: #ef4444;
}

.alert-success {
    color: #166534;
    background-color: #f0fdf4;
    border-color: #22c55e;
}

.alert-info {
    color: #1d4ed8;
    background-color: #eff6ff;
    border-color: #3b82f6;
}

/* Small screens */

@media (max-width: 520px) {
    .container {
        padding: 28px 20px;
    }

    form {
        flex-wrap: wrap;
    }

    input[type="number"] {
        width: 100%;
    }
}
