:root {
    --bg-primary: #0f0f13;
    --bg-secondary: #1a1a22;
    --bg-tertiary: #252530;
    --bg-card: #1e1e28;
    --accent-primary: #ff6b4a;
    --accent-secondary: #ff8f76;
    --accent-glow: rgba(255, 107, 74, 0.3);
    --success: #4ade80;
    --success-glow: rgba(74, 222, 128, 0.2);
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --border: #2d2d3a;
    --danger: #ef4444;
    --danger-hover: #dc2626;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    background-image: 
        radial-gradient(ellipse at 20% 0%, rgba(255, 107, 74, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(74, 222, 128, 0.05) 0%, transparent 50%);
}

#root {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 20px;
    width: 100%;
}

.header {
    text-align: center;
    margin-bottom: 48px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.add-task-form {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.add-task-form input {
    flex: 1;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s ease;
}

.add-task-form input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.add-task-form input::placeholder {
    color: var(--text-muted);
}

.btn {
    padding: 16px 28px;
    border: none;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), #ff8560);
    color: white;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px var(--accent-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.filter-container {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-list-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.task-list-empty .icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.task-list-empty p {
    font-size: 1.1rem;
}

.task {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.task:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.task.completed {
    background: linear-gradient(135deg, var(--bg-card), rgba(74, 222, 128, 0.05));
    border-color: var(--success);
    box-shadow: 0 0 20px var(--success-glow);
}

.checkbox-wrapper {
    position: relative;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.checkbox-wrapper input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 1;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.checkbox-wrapper input:checked + .checkmark {
    background: var(--success);
    border-color: var(--success);
}

.checkmark::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s ease;
}

.checkbox-wrapper input:checked + .checkmark::after {
    transform: rotate(45deg) scale(1);
}

.task-content {
    flex: 1;
    min-width: 0;
}

.task-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-word;
    transition: all 0.2s ease;
}

.task.completed .task-title {
    color: var(--text-muted);
    text-decoration: line-through;
}

.task-edit-input {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--accent-primary);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    outline: none;
}

.task-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.btn-icon:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.btn-icon.edit:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.btn-icon.delete:hover {
    color: var(--danger);
    border-color: var(--danger);
}

.btn-icon.save {
    color: var(--success);
    border-color: var(--success);
}

.btn-icon.save:hover {
    background: var(--success);
    color: white;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

@media (max-width: 600px) {
    .header h1 {
        font-size: 2rem;
    }

    .add-task-form {
        flex-direction: column;
    }

    .btn-primary {
        justify-content: center;
    }

    .stats {
        gap: 20px;
    }

    .task {
        flex-wrap: wrap;
    }

    .task-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 8px;
        padding-top: 12px;
        border-top: 1px solid var(--border);
    }
}
