:root {
    --bg-color: #0f172a;
    --container-bg: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --danger-color: #ef4444;
    --danger-hover: #dc2626;
    --border-color: #334155;
    --success-color: #10b981;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.app-container {
    background-color: var(--container-bg);
    width: 100%;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.header {
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.header p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

#taskForm {
    display: flex;
    gap: 0.5rem;
}

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

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

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-primary:active {
    transform: scale(0.98);
}

.tasks-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.task-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.task-item {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.task-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.task-item.completed .task-title {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.task-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.checkbox-custom {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    cursor: pointer;
    display: grid;
    place-content: center;
    transition: background-color 0.2s, border-color 0.2s;
}

.checkbox-custom::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    color: white;
    font-size: 12px;
}

.checkbox-custom:checked {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.checkbox-custom:checked::before {
    transform: scale(1);
}

.task-title {
    font-size: 1rem;
    font-weight: 500;
    word-break: break-word;
    transition: color 0.2s;
}

.btn-delete {
    background: transparent;
    color: var(--danger-color);
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s;
}

.btn-delete:hover {
    color: var(--danger-hover);
}

/* Responsividade */
@media (max-width: 480px) {
    .app-container {
        padding: 1.5rem;
    }

    #taskForm {
        flex-direction: column;
    }

    .btn-primary {
        justify-content: center;
    }
}

.app-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    width: 100%;
    opacity: 0.7;
}