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

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* =========================
   Header / Navbar
========================= */
.site-header {
    background-color: #4f46e5;
    color: white;
    padding: 1rem 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-item {
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.logout-btn {
    border: none;
    background: #ef4444;
    color: white;
    cursor: pointer;
}

.logout-btn:hover {
    background: #dc2626;
}

/* =========================
   Footer
========================= */
.site-footer {
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
    background-color: #4f46e5;
    color: white;
}

.site-footer .social-links {
    margin-top: 0.5rem;
}

.site-footer a {
    color: #c7d2fe;
    font-weight: 500;
    transition: color 0.3s ease;
}

.site-footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* =========================
   Buttons
========================= */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border:  none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    font-weight: 500;
    text-align: center;
}

.btn-primary {
    background-color: #4f46e5;
    color: white;
}

.btn-primary:hover {
    background-color: #4338ca;
}

.btn-secondary {
    background-color: #e5e7eb;
    color: #333;
}

.btn-secondary:hover {
    background-color: #d1d5db;
}
/* =========================
   Hero Section
========================= */
.hero-section {
    background-color: #6366f1;
    color: white;
    text-align: center;
    padding: 4rem 0;
    border-radius: 8px;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.hero-buttons a {
    margin: 0 0.5rem;
}

/* =========================
   Features Section
========================= */
.features-section {
    background-color: #fff;
    padding: 3rem 0;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-left: 1rem;
}

.features-list li {
    padding-left: 0.5rem;
    position: relative;
}

.features-list li::before {
    content: '✔';
    color: #4f46e5;
    position: absolute;
    left: -1.5rem;
}

/* =========================
   About Section
========================= */
.about-section {
    background-color: #f3f4f6;
    padding: 3rem 0;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.about-section p {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* =========================
   Auth Forms
========================= */
.auth-section {
    padding: 4rem 0;
    display: flex;
    justify-content: center;
}

.auth-container {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.auth-title {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.auth-input {
    padding: 0.6rem;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

.auth-input:focus {
    border-color: #4f46e5;
    outline: none;
}

.auth-message {
    text-align: center;
    margin-top: 1rem;
    font-weight: 500;
}

/* =========================
   Tasks Section
========================= */
.tasks-section {
    padding: 2rem 0;
}

.tasks-title {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.tasks-list {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-left: 0;
}

.tasks-list li {
    background-color: white;
    padding: 0.7rem 1rem;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.task-input-container {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.task-input {
    flex: 1;
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

/* =========================
   Error Pages
========================= */
.error-page {
    padding: 4rem 0;
}

.error-page h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* =========================
   Responsive
========================= */
@media (max-width: 768px) {
    .features-list {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .tasks-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .task-input-container {
        flex-direction: column;
        align-items: stretch;
    }

    .navbar {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.5rem 1rem;
    }

    .logo {
        font-size: 1.6rem;
        margin-bottom: 0.5rem;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .nav-item {
        display: block;
        width: 100%;
        text-align: left;
        padding: 0.75rem 1rem;
        border-radius: 4px;
        transition: background-color 0.3s;
    }

    .nav-item:hover {
        background-color: rgba(255, 255, 255, 0.2);
    }   
}

/* =========================
   Dynamic Elements
========================= */

/* Task buttons (Mark Done / Mark Pending) */
.task-btn {
    padding: 0.3rem 0.6rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background-color 0.3s;
}

.task-btn.done {
    background-color: #10b981; /* green */
    color: white;
}

.task-btn.done:hover {
    background-color: #059669;
}

.task-btn.pending {
    background-color: #f59e0b; /* orange */
    color: white;
}

.task-btn.pending:hover {
    background-color: #d97706;
}

/* Delete button */
.delete-btn {
    padding: 0.3rem 0.6rem;
    border: none;
    border-radius: 4px;
    background-color: #ef4444; /* red */
    color: white;
    cursor: pointer;
    font-size: 0.85rem;
    margin-left: 0.5rem;
    transition: background-color 0.3s;
}

.delete-btn:hover {
    background-color: #dc2626;
}

/* Task list items */
.tasks-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    padding: 0.7rem 1rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.tasks-list li:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Input field for tasks */
.task-input {
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 1rem;
    flex: 1;
    transition: border-color 0.3s;
}

.task-input:focus {
    border-color: #4f46e5;
    outline: none;
}

/* Messages dynamically shown in auth forms */
.auth-message {
    text-align: center;
    font-weight: 500;
    margin-top: 0.5rem;
    transition: opacity 0.3s;
}

/* Success / error messages in auth forms */
.auth-message.success {
    color: #10b981; /* green */
}

.auth-message.error {
    color: #ef4444; /* red */
}

/* Hover animation for dynamically added links/buttons */
.btn, .task-btn, .delete-btn {
    transition: transform 0.2s, background-color 0.3s;
}

.btn:hover, .task-btn:hover, .delete-btn:hover {
    transform: translateY(-1px);
}

/* Subtle line-through animation for completed tasks */
.tasks-list li.completed {
    text-decoration: line-through;
    color: #6b7280;
    transition: color 0.3s, text-decoration 0.3s;
}