
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-start: #0f172a;
    --bg-end: #1f2937;
    --card: rgba(255, 255, 255, 0.08);
    --card-border: rgba(255, 255, 255, 0.18);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #38bdf8;
    --accent-strong: #60a5fa;
    --success: #22c55e;
}

body {
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    background: url(to-do.jpg);
    background-size: cover;
    color: var(--text-primary);
}

.page-bg {
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.95));
    pointer-events: none;
}

.container {
    position: relative;
    max-width: 520px;
    margin: 48px auto;
    padding: 32px;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(20px);
    overflow: hidden;
}

.hero {
    display: grid;
    gap: 20px;
    margin-bottom: 28px;
}

.subtitle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: rgba(56, 189, 248, 0.12);
    border-radius: 999px;
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

h1 {
    font-size: clamp(2rem, 3.5vw, 3rem);
    line-height: 1.05;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    max-width: 90%;
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.stats div {
    padding: 18px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.stats strong {
    display: block;
    font-size: 1.8rem;
    margin-bottom: 6px;
}

.stats span {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.todo-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    margin-bottom: 24px;
}

.todo-form input {
    width: 100%;
    padding: 16px 20px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    font-size: 1rem;
}

.todo-form input::placeholder {
    color: rgba(148, 163, 184, 0.75);
}

.btn {
    min-width: 140px;
    border: none;
    border-radius: 18px;
    padding: 0 24px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #0f172a;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(56, 189, 248, 0.25);
}

.task-panel {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 22px;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.task-header h2 {
    font-size: 1.3rem;
}

.clear-btn {
    border: none;
    border-radius: 16px;
    padding: 10px 16px;
    background: rgba(229, 231, 235, 0.12);
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s ease;
}

.clear-btn:hover {
    background: rgba(229, 231, 235, 0.18);
}

.task-list {
    list-style: none;
    display: grid;
    gap: 12px;
    max-height: 320px;
    overflow-y: auto;
    padding: 0;
    margin: 0;
}

.task-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.task-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

.task-item label {
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
}

.task-item.completed label {
    color: rgba(148, 163, 184, 0.9);
    text-decoration: line-through;
}

.task-item button {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
}

.task-item button:hover {
    color: var(--accent);
}

.empty-state {
    margin-top: 12px;
    color: var(--text-secondary);
    text-align: center;
}

@media (max-width: 640px) {
    .container {
        margin: 16px;
        padding: 24px;
    }

    .todo-form {
        grid-template-columns: 1fr;
    }

    .btn {
        width: 100%;
    }
}
