/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4a90e2;
    --secondary-color: #f5f6fa;
    --success-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f1c40f;
    --text-color: #2c3e50;
    --border-color: #dcdde1;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --card-bg: #fff;
    --text-primary: #333;
    --text-secondary: #666;
    --bg-light: #f8f9fa;
    --red: #e74c3c;
    --red-light: #fee2e2;
    --yellow: #f1c40f;
    --yellow-light: #fef3c7;
    --green: #2ecc71;
    --green-light: #d1fae5;
    --purple: #7a288a;
    --purple-light: #f3e5f5;
    --blue: #2196f3;
    --blue-light: #e3f2fd;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--secondary-color);
}

/* Landing Page */
.landing-page {
    min-height: 100vh;
    background-color: white;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: white;
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.hero-section {
    min-height: 100vh;
    padding: 40px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.hero-content {
    flex: 1;
    max-width: 600px;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #666;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-image {
    flex: 1;
    max-width: 500px;
    display: flex;
    justify-content: center;
}

.hero-image img {
    width: 100%;
    height: auto;
    animation: float 3s ease-in-out infinite;
}

.features-section {
    padding: 4rem 5%;
    background: var(--secondary-color);
}

.features-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.feature-card p {
    color: #666;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* Responsive Design for Landing Page */
@media (max-width: 768px) {
    .hero-section {
        padding-top: 80px; /* Reduced from 120px */
        padding-bottom: 40px;
        min-height: calc(100vh - 60px); /* Adjust for smaller nav */
    }

    .hero-content {
        padding-top: 1rem;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
        line-height: 1.3;
    }

    .hero-section {
        flex-direction: column;
        text-align: center;
        padding-top: 6rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image {
        margin-top: 2rem;
    }
}

@media screen and (max-width: 576px) {
    .nav {
        min-height: 60px; /* Set fixed minimum height */
    }

    .hero-section {
        padding-top: 65px; /* Slightly reduced */
    }

    .hero-content {
        padding-top: 0.5rem;
    }

    .hero-content h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .auth-container {
        padding-top: 65px;
    }
}

/* Container */
.app-container {
    min-height: 100vh;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

/* Authentication */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.auth-box {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

/* Auth Page Styles */
.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.auth-nav {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.auth-nav .nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-nav .back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-nav .back-link:hover {
    color: var(--primary-color);
}

.auth-nav .logo h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.auth-container {
    padding-top: 80px; /* Match hero section */
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-box {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    margin: 1rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: #666;
    font-size: 0.95rem;
}

.auth-form h3 {
    color: #333;
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-form .form-group {
    margin-bottom: 0.5rem;
}

.input-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon i {
    position: absolute;
    left: 1rem;
    color: #666;
}

.input-icon input {
    padding-left: 2.75rem;
    width: 100%;
    height: 48px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-icon input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.auth-form .btn {
    width: 100%;
    height: 48px;
    margin: 1.5rem 0 1rem;
    font-size: 1rem;
}

.form-switch {
    text-align: center;
    color: #666;
    margin: 1rem 0 0;
}

.form-switch a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.form-switch a:hover {
    text-decoration: underline;
}

/* Password Toggle Button */
.password-toggle {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--primary-color);
}

/* Error Messages */
.error-message {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: block;
    min-height: 1.25em;
}

/* Password Requirements */
.password-requirements {
    color: #666;
    font-size: 0.85rem;
    margin-top: 0.1rem;
    display: block;
}

.password-requirements ul {
    list-style: none;
    padding-left: 0;
    margin: 0.1rem 0 0;
}

.password-requirements li {
    margin: 0.1rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.password-requirements li::before {
    position: absolute;
    left: 0;
    color: #dc3545;
    font-weight: bold;
}

.password-requirements li.valid::before {
    content: "✓";
    color: #28a745;
}

/* Input validation states */
.input-icon input.is-invalid {
    border-color: #dc3545;
}

.input-icon input.is-valid {
    border-color: #28a745;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

input, select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
}

textarea {
    height: 100px;
    resize: vertical;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s, transform 0.1s;
}

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

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    width: 100%;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

/* Main App Layout */
.app-header {
    background: white;
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-content {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Task Controls */
.task-controls {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.search-filter {
    flex: 1;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-box {
    position: relative;
    flex: 2;
}

.search-box input {
    width: 100%;
    padding: 0.875rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #f8f9fa;
}

.search-box input:focus {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.filter-select {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-select:hover {
    background: white;
}

.filter-select:focus {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.reset-filters {
    padding: 0.875rem 1.25rem;
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.reset-filters:hover {
    background: #e9ecef;
    color: #333;
}

.control-group {
    display: flex;
    gap: 1rem;
}

#addTaskBtn {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#addTaskBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#addTaskBtn i {
    font-size: 1rem;
}

/* Notification styles */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
    max-width: 300px;
}

.notification.success {
    background: #2ecc71;
}

.notification.error {
    background: #e74c3c;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .task-controls {
        flex-direction: column;
        padding: 1rem;
    }

    .search-filter {
        flex-direction: column;
        width: 100%;
    }

    .search-box,
    .filter-select {
        width: 100%;
    }

    .control-group {
        width: 100%;
    }

    #addTaskBtn {
        width: 100%;
        justify-content: center;
    }
}

/* Tasks List */
.tasks-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.task-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.task-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.task-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0.5rem 0;
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: auto;
}

.task-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--bg-light);
    color: var(--text-secondary);
}

.task-tag i {
    font-size: 0.8rem;
}

/* Priority Tags */
.task-tag.priority-high {
    background: var(--red-light);
    color: var(--red);
}

.task-tag.priority-medium {
    background: var(--yellow-light);
    color: var(--yellow);
}

.task-tag.priority-low {
    background: var(--green-light);
    color: var(--green);
}

/* Status Tags */
.task-tag.status-pending {
    background: var(--purple-light);
    color: var(--purple);
}

.task-tag.status-in-progress {
    background: var(--blue-light);
    color: var(--blue);
}

.task-tag.status-completed {
    background: var(--green-light);
    color: var(--green);
}

.task-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.task-actions button {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.task-actions .edit-btn {
    background: var(--blue-light);
    color: var(--blue);
}

.task-actions .edit-btn:hover {
    background: var(--blue);
    color: white;
}

.task-actions .delete-btn {
    background: var(--red-light);
    color: var(--red);
}

.task-actions .delete-btn:hover {
    background: var(--red);
    color: white;
}

/* Tasks Grid */
.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
}

/* No Tasks Message */
.no-tasks {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    background: var(--card-bg);
    border-radius: 12px;
    color: var(--text-secondary);
}

.no-tasks i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-tasks p {
    font-size: 1.1rem;
    margin: 0;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    z-index: 1000;
    overflow-y: auto;
    padding: 20px 10px;
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    margin: 20px auto;
    padding: 20px;
    position: relative;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-color);
}

/* Logout Modal Styles */
.logout-modal-content {
    max-width: 400px !important;
    text-align: center;
    padding: 2rem !important;
}

.logout-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.logout-body h2 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.logout-body p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.logout-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.stay-btn, .logout-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stay-btn {
    background-color: var(--bg-light);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

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

.logout-btn {
    background-color: #dc3545;
    color: white;
    border: none;
}

.logout-btn:hover {
    background-color: #c82333;
}

#logout-modal.modal {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#logout-modal.modal:not(.hidden) {
    display: flex;
    opacity: 1;
}

/* Task Manager Styles */
.app-header {
    background: white;
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #2ecc71;
    border-radius: 50%;
    display: inline-block;
}

.main-content {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Task Controls */
.task-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    gap: 1rem;
}

.search-filter {
    display: flex;
    gap: 1rem;
    flex: 1;
    max-width: 800px;
}

.search-box {
    position: relative;
    flex: 1;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
}

.search-box .fa-search {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.clear-search {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.clear-search:hover {
    opacity: 1;
}

.reset-filters {
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reset-filters:hover {
    background: #e9ecef;
    color: #333;
}

/* Tasks Grid */
.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.task-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.task-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.task-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.task-tag {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.priority-high {
    background: #fee2e2;
    color: #991b1b;
}

.priority-medium {
    background: #fef3c7;
    color: #92400e;
}

.priority-low {
    background: #d1fae5;
    color: #065f46;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-in-progress {
    background: #dbeafe;
    color: #1e40af;
}

.status-completed {
    background: #d1fae5;
    color: #065f46;
}

.task-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.task-actions button {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.edit-btn {
    background: #e8f5e9;
    color: #2e7d32;
}

.edit-btn:hover {
    background: #c8e6c9;
}

.delete-btn {
    background: #ffebee;
    color: #c62828;
}

.delete-btn:hover {
    background: #ffcdd2;
}

/* Task Form */
.task-form {
    display: grid;
    gap: 1.5rem;
    padding: 0.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group label i {
    color: var(--primary-color);
    font-size: 1rem;
}

.form-control {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: var(--bg-light);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

select.form-control {
    appearance: none;
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1em;
}

/* Priority Select Styling */
select#task-priority option[value="high"] {
    color: var(--red);
}

select#task-priority option[value="medium"] {
    color: var(--yellow);
}

select#task-priority option[value="low"] {
    color: var(--green);
}

/* Status Select Styling */
select#task-status option[value="pending"] {
    color: var(--purple);
}

select#task-status option[value="in-progress"] {
    color: var(--blue);
}

select#task-status option[value="completed"] {
    color: var(--green);
}

/* Modal Header */
.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-light);
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-header h3 i {
    color: var(--primary-color);
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    width: 90%;
    margin: 2rem auto;
    position: relative;
    overflow: hidden;
}

.modal .close-btn {
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.modal .close-btn:hover {
    color: var(--text-primary);
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 12px 12px;
}

.form-actions button {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.form-actions .cancel-btn {
    background: var(--bg-light);
    color: var(--text-secondary);
}

.form-actions .cancel-btn:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.form-actions .submit-btn {
    background: var(--primary-color);
    color: white;
}

.form-actions .submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive Design */
@media (max-width: 768px) {
    .task-controls {
        flex-direction: column;
    }
    
    .search-filter {
        flex-direction: column;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    .modal {
        padding: 10px;
        align-items: flex-start;
    }

    .modal-content {
        margin: 10px auto;
        max-height: calc(100vh - 20px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .form-label {
        margin-bottom: 5px;
    }

    .form-control {
        padding: 8px 12px;
    }
}

/* Skeleton Loading Animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    background: #f6f7f8;
    background-image: linear-gradient(
        to right,
        #f6f7f8 0%,
        #edeef1 20%,
        #f6f7f8 40%,
        #f6f7f8 100%
    );
    background-repeat: no-repeat;
    background-size: 2000px 100%;
    animation: shimmer 2s infinite linear;
}

.task-card.skeleton {
    border: none;
    padding: 20px;
    margin-bottom: 20px;
}

.skeleton-header {
    margin-bottom: 15px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    background: #eee;
    border-radius: 4px;
}

.skeleton-description {
    height: 60px;
    margin: 15px 0;
    background: #eee;
    border-radius: 4px;
}

.skeleton-meta {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.skeleton-tag {
    height: 24px;
    width: 80px;
    background: #eee;
    border-radius: 12px;
}

.skeleton-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.skeleton-button {
    height: 32px;
    width: 80px;
    background: #eee;
    border-radius: 4px;
}

/* Make skeleton items semi-transparent */
.skeleton .skeleton-title,
.skeleton .skeleton-description,
.skeleton .skeleton-tag,
.skeleton .skeleton-button {
    opacity: 0.7;
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .task-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-filter {
        flex-direction: column;
    }

    .tasks-list {
        grid-template-columns: 1fr;
    }
}

/* Transitions and Animations */
.fade-out {
    opacity: 0 !important;
    transition: opacity 0.3s ease-out !important;
}

.fade-in {
    opacity: 1 !important;
    transition: opacity 0.3s ease-in !important;
}

/* Animation keyframes */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Ensure elements are visible by default */
.landing-page,
.app-container,
.auth-container {
    opacity: 1;
}

/* Animations */
.modal, .task-card {
    animation: fadeIn 0.3s ease-in-out;
}

/* Loading States */
.fa-spinner {
    margin-right: 8px;
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

button:disabled .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Filter Styles */
.filter-select {
    background-color: white;
    transition: all 0.3s ease;
}

.filter-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.1);
}

/* Auth Button Loading State */
.auth-button {
    position: relative;
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

.auth-button:hover {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.auth-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.button-text,
.button-loader {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.button-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.auth-button.loading .button-text {
    opacity: 0;
}

.auth-button.loading .button-loader {
    opacity: 1;
}

/* Custom Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    animation: slideIn 0.3s ease-out forwards;
}

.notification.success {
    background: #10B981;
    color: white;
}

.notification.error {
    background: #EF4444;
    color: white;
}

.notification i {
    font-size: 1.25rem;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.notification.hiding {
    animation: slideOut 0.3s ease-in forwards;
}

/* Empty State Styles */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px auto;
    max-width: 500px;
}

.empty-state i {
    color: #6c757d;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #343a40;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.empty-state p {
    color: #6c757d;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.empty-state .add-first-task {
    padding: 10px 20px;
    font-size: 1.1rem;
}

/* Responsive Design */
@media screen and (max-width: 1200px) {
    .container {
        max-width: 960px;
    }

    .task-card {
        flex: 0 0 calc(33.333% - 20px);
    }
}

@media screen and (max-width: 992px) {
    .container {
        max-width: 720px;
    }

    .task-card {
        flex: 0 0 calc(50% - 20px);
    }

    .main-content {
        padding: 20px;
    }

    .task-controls {
        flex-direction: column;
        gap: 15px;
    }

    .search-filter {
        flex-direction: column;
        width: 100%;
    }

    .search-box {
        width: 100%;
    }

    .filter-select {
        width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media screen and (max-width: 768px) {
    .container {
        max-width: 540px;
        padding: 0 15px;
    }

    .app-header {
        padding: 15px;
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .user-info {
        flex-direction: column;
        gap: 10px;
    }

    .task-card {
        flex: 0 0 100%;
    }

    .modal-content {
        width: 95%;
        margin: 10px;
        padding: 15px;
    }

    .task-meta {
        flex-wrap: wrap;
    }

    .task-actions {
        flex-direction: column;
        gap: 10px;
    }

    .task-actions button {
        width: 100%;
    }

    /* Auth Pages Responsive */
    .auth-container {
        padding: 20px;
    }

    .auth-box {
        width: 95%;
        max-width: none;
        margin: 10px;
        padding: 20px;
    }

    .auth-header {
        margin-bottom: 20px;
    }

    .auth-header h2 {
        font-size: 1.5rem;
    }

    .auth-form {
        gap: 15px;
    }

    .auth-footer {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

@media screen and (max-width: 576px) {
    .container {
        padding: 0 10px;
    }

    .app-header {
        padding: 10px;
    }

    .logo h1 {
        font-size: 1.25rem;
    }

    .modal-content {
        padding: 10px;
    }

    .form-actions {
        flex-direction: column;
        gap: 10px;
    }

    .form-actions button {
        width: 100%;
    }

    .task-tag {
        font-size: 0.8rem;
        padding: 4px 8px;
    }

    .task-title {
        font-size: 1.1rem;
    }

    /* Landing Page Responsive */
    .hero-section {
        padding: 40px 20px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .feature-card {
        padding: 15px;
    }

    /* Logout Modal Responsive */
    .logout-modal-content {
        width: 90%;
        padding: 15px !important;
    }

    .logout-actions {
        flex-direction: column;
        gap: 10px;
    }

    .logout-actions button {
        width: 100%;
    }

    .logout-body h2 {
        font-size: 1.25rem;
    }

    .logout-body p {
        font-size: 0.9rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) {
    .task-card:hover {
        transform: none;
        box-shadow: var(--shadow);
    }

    .btn:hover {
        transform: none;
    }

    .task-actions button:hover {
        transform: none;
    }
}

/* Print Optimization */
@media print {
    .task-actions,
    .task-controls,
    .app-header button,
    .modal {
        display: none !important;
    }

    .task-card {
        break-inside: avoid;
        border: 1px solid #ddd;
    }

    .app-container {
        padding: 0;
    }
}

/* Navigation Styles */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: white;
    padding: 1rem 5%;
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: all 0.3s ease;
}

@media screen and (max-width: 768px) {
    .nav {
        padding: 0.5rem 5%; /* Reduced padding */
    }

    .nav-brand {
        font-size: 1.2rem; /* Smaller brand text */
    }

    .nav-links {
        gap: 0.8rem; /* Reduced gap between links */
    }

    .nav-link {
        padding: 0.4rem 0.8rem; /* Smaller padding for links */
        font-size: 0.9rem; /* Smaller font size */
    }

    /* Adjust hero section spacing */
    .hero-section {
        padding-top: 80px; /* Reduced from 120px */
        min-height: calc(100vh - 60px); /* Adjust for smaller nav */
    }

    .hero-content {
        margin-top: 1rem;
    }

    /* Adjust auth container spacing */
    .auth-container {
        padding-top: 80px; /* Match hero section */
        min-height: calc(100vh - 60px);
    }

    .auth-box {
        margin-top: 1rem;
    }
}

/* Extra small devices */
@media screen and (max-width: 576px) {
    .nav {
        padding: 0.4rem 4%; /* Even smaller padding */
    }

    .nav-brand {
        font-size: 1.1rem;
    }

    .nav-links {
        gap: 0.5rem;
    }

    .nav-link {
        padding: 0.3rem 0.6rem;
        font-size: 0.85rem;
    }

    /* Further adjust content spacing */
    .hero-section {
        padding-top: 70px;
    }

    .auth-container {
        padding-top: 70px;
    }
}