:root {
    --primary-color: #2563EB; /* Deep Blue */
    --primary-hover: #1D4ED8;
    --secondary-color: #64748B;
    --danger-color: #EF4444;
    --danger-hover: #DC2626;
    --success-color: #10B981;
    --success-hover: #059669;
    --background-color: #F8FAFC; /* Soft light background */
    --card-bg: #FFFFFF;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --border-color: #E2E8F0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px; /* Rounded corners as requested */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.header {
    background-color: var(--card-bg);
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

.nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav a:hover, .nav a.active {
    color: var(--primary-color);
}

.header-contact {
    display: flex;
    gap: 1.5rem;
}

.contact-link {
    text-decoration: none;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.contact-link:hover {
    color: var(--primary-color);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 3rem 1rem;
}

/* To-Do Container */
.todo-container {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    max-width: 600px;
    width: 100%;
}

.todo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.todo-header h2 {
    font-size: 1.75rem;
    color: var(--text-main);
    font-weight: 700;
}

.task-counter {
    background-color: var(--background-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
}
.task-counter #task-count {
    color: var(--primary-color);
}

/* Input Group */
.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

#task-input {
    flex: 1;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    color: var(--text-main);
}

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

#task-input::placeholder {
    color: var(--text-muted);
}

/* Buttons */
.btn {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}
.btn-success:hover {
    background-color: var(--success-hover);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-danger-outline {
    background-color: transparent;
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}
.btn-danger-outline:hover {
    background-color: var(--danger-color);
    color: white;
}

.todo-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}

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

.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease forwards;
}

.task-item:hover {
    border-color: var(--primary-color);
    transform: translateX(4px);
}

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

.task-name {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-main);
    word-break: break-word;
    transition: all 0.3s ease;
}

/* Task Item Completed State */
.task-item.completed {
    background-color: var(--background-color);
    opacity: 0.8;
}

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

.task-item.completed:hover {
    transform: none;
    border-color: var(--border-color);
}

/* Action Buttons inside Task */
.task-item-actions {
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.task-item:hover .task-item-actions {
    opacity: 1;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.icon-btn:active {
    transform: scale(0.9);
}

.btn-complete { background-color: #ECFDF5; color: var(--success-color); }
.btn-complete:hover { background-color: var(--success-color); color: white; }

.btn-edit { background-color: #EFF6FF; color: var(--primary-color); }
.btn-edit:hover { background-color: var(--primary-color); color: white; }

.btn-delete { background-color: #FEF2F2; color: var(--danger-color); }
.btn-delete:hover { background-color: var(--danger-color); color: white; }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.empty-state.hidden {
    display: none;
}

.empty-state h3 {
    color: var(--text-main);
    font-size: 1.25rem;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Animations */
@keyframes slideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    to { opacity: 0; transform: translateX(20px); }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--text-main);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform: translateY(150%);
    opacity: 0;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success i { color: var(--success-color); }
.toast.danger i { color: var(--danger-color); }
.toast.info i { color: var(--primary-color); }

/* Footer */
.footer {
    background-color: var(--card-bg);
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: auto;
}

.text-danger { color: var(--danger-color); }

.footer-contact {
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-size: 0.95rem;
}

.footer-contact a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-contact a:hover {
    color: var(--primary-color);
}
