:root {
    --primary: #4a6cf7;
    --bg-color: #f5f7ff;
    --card-bg: #ffffff;
    --text-color: #333333;
    --border-color: #e1e5f1;
    --completed-color: #888888;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --hover-bg: #f0f3ff;
}

[data-theme="dark"] {
    --primary: #6b8aff;
    --bg-color: #121826;
    --card-bg: #1e293b;
    --text-color: #e2e8f0;
    --border-color: #334155;
    --completed-color: #94a3b8;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    --hover-bg: #2d3748;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
}

.container {
    width: 100%;
    max-width: 600px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
}

.theme-toggle {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.theme-toggle:hover {
    transform: scale(1.05);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    fill: var(--text-color);
}

.input-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.input-group {
    display: flex;
    gap: 0.5rem;
}

input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

input:focus {
    border-color: var(--primary);
}

button {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.todo-list {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

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

.todo-item:hover {
    background-color: var(--hover-bg);
    border-radius: 8px;
}

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

.todo-checkbox {
    width: 20px;
    height: 20px;
    margin-right: 1rem;
    cursor: pointer;
    accent-color: var(--primary);
}

.todo-text {
    flex: 1;
    font-size: 1rem;
}

.completed .todo-text {
    text-decoration: line-through;
    color: var(--completed-color);
}

.delete-btn {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

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

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--completed-color);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    fill: var(--completed-color);
}

.stats {
    display: flex;
    justify-content: space-between;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow);
    font-size: 0.9rem;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

@media (max-width: 600px) {
    h1 {
        font-size: 1.5rem;
    }

    .input-group {
        flex-direction: column;
    }

    button {
        width: 100%;
    }

    .stats {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .filter-buttons {
        justify-content: center;
    }
}