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

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #10b981;
    --danger: #ef4444;
    --text: #1f2937;
    --text-light: #6b7280;
    --border: #e5e7eb;
    --bg: #f9fafb;
    --card-bg: #ffffff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    padding: 1rem;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 0;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-light);
    font-size: 0.95rem;
}

.task-form {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

#task-input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: var(--card-bg);
}

#task-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

button {
    padding: 0.875rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

.tasks-container {
    background: var(--card-bg);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    min-height: 300px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 250px;
    color: var(--text-light);
    text-align: center;
}

.empty-state svg {
    margin-bottom: 1rem;
    opacity: 0.4;
}

.task-list {
    list-style: none;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.task-item:last-child {
    border-bottom: none;
}

.task-item:hover {
    background: var(--bg);
}

.task-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--success);
}

.task-text {
    flex: 1;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: var(--text-light);
    opacity: 0.6;
}

.task-date {
    font-size: 0.75rem;
    color: var(--text-light);
    white-space: nowrap;
}

.delete-btn {
    padding: 0.5rem;
    background: transparent;
    color: var(--danger);
    border: 1px solid transparent;
    border-radius: 0.375rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.delete-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    transform: none;
}

footer {
    text-align: center;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

@media (max-width: 640px) {
    body {
        padding: 0.5rem;
    }

    .container {
        padding: 1rem 0;
    }

    h1 {
        font-size: 1.5rem;
    }

    .task-form {
        flex-direction: column;
        gap: 0.5rem;
    }

    button {
        width: 100%;
    }

    .tasks-container {
        padding: 1rem;
    }

    .task-item {
        padding: 0.75rem 0.5rem;
    }

    .task-date {
        display: none;
    }
}
