* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f4f4f5;
    color: #18181b;
}

body {
    min-height: 100vh;
}

.container {
    width: min(100% - 32px, 700px);
    margin: 60px auto;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.login-card {
    max-width: 420px;
    margin: 100px auto;
}

h1 {
    margin-top: 0;
    margin-bottom: 8px;
}

.muted {
    color: #71717a;
}

.error {
    color: #dc2626;
}

form {
    display: flex;
    gap: 10px;
}

.login-card form {
    display: block;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #d4d4d8;
    border-radius: 7px;
    font: inherit;
    background: white;
}

.login-card input[type="password"] {
    margin-bottom: 12px;
}

button {
    border: 0;
    border-radius: 7px;
    padding: 10px 16px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    background: #18181b;
    color: white;
}

button:hover {
    opacity: 0.9;
}

button:disabled {
    opacity: 0.5;
    cursor: default;
}

.secondary-button {
    background: #e4e4e7;
    color: #18181b;
}

.list-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.list-header h1 {
    margin-bottom: 4px;
}

.list-header p {
    margin: 0;
}

.add-item-form {
    margin-bottom: 20px;
}

.add-item-form input {
    flex: 1;
}

.shopping-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.shopping-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e4e4e7;
}

.shopping-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.item-text {
    flex: 1;
    word-break: break-word;
}

.item-text.checked {
    text-decoration: line-through;
    color: #a1a1aa;
}

.remove-button {
    padding: 4px 9px;
    background: transparent;
    color: #71717a;
    font-size: 22px;
    line-height: 1;
}

.remove-button:hover {
    background: #f4f4f5;
    color: #dc2626;
}

.empty-list {
    padding: 30px 0;
    text-align: center;
    color: #71717a;
}

.list-message {
    text-align: center;
}

@media (max-width: 600px) {

    .container {
        width: calc(100% - 20px);
        margin: 20px auto;
    }

    .card {
        padding: 18px;
    }

    .login-card {
        margin: 50px auto;
    }

    .list-header {
        align-items: center;
    }

    .add-item-form {
        flex-direction: column;
    }

    .add-item-form button {
        width: 100%;
    }
}