/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
    animation: fadeIn 0.5s ease-in-out;
    overflow: hidden;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header Section */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
}

header h1 {
    margin: 0 0 10px 0;
    font-size: 2.5rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.stats {
    font-size: 1.1rem;
    font-weight: 500;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Add Task Section */
.add-task-section {
    padding: 30px;
    border-bottom: 1px solid #e2e8f0;
}

.add-task-section h2 {
    margin: 0 0 20px 0;
    color: #4a5568;
    font-size: 1.5rem;
    font-weight: 600;
}

.task-input-group {
    margin-bottom: 20px;
}

.task-input-group input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1.1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.task-input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.task-details-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.input-field {
    display: flex;
    flex-direction: column;
}

.input-field label {
    margin-bottom: 5px;
    font-weight: 500;
    color: #4a5568;
    font-size: 0.9rem;
}

.input-field select,
.input-field input[type="date"] {
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    background: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
}

.input-field select:focus,
.input-field input[type="date"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.primary-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    align-self: flex-start;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Task Management Section */
.task-management {
    padding: 30px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.search-filter-row {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

.search-box input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    background: white;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #667eea;
    background: transparent;
    color: #667eea;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background: #667eea;
    color: white;
}

.filter-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
}

.progress-section {
    margin-bottom: 20px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.progress-label {
    font-weight: 600;
    color: #4a5568;
}

.progress-text {
    font-weight: 500;
    color: #667eea;
}

.progress-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 5px;
    width: 0%;
    transition: width 0.4s ease;
}

.bulk-actions {
    text-align: center;
}

.secondary-btn {
    background: #e2e8f0;
    color: #4a5568;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    background: #cbd5e0;
    transform: translateY(-1px);
}

/* Task List Section */
.task-list-section {
    padding: 30px;
}

#taskList {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#taskList li {
    padding: 20px;
    margin-bottom: 12px;
    background: white;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #667eea;
    opacity: 0;
    transform: translateY(20px);
    animation: slideIn 0.3s ease forwards;
}

.fade-in {
    animation: slideIn 0.3s ease forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#taskList li:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

#taskList li.completed {
    background: rgba(198, 246, 213, 0.8);
    border-left-color: #48bb78;
    opacity: 0.8;
}

#taskList li span {
    flex: 1;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.task-text {
    flex: 1;
    font-size: 1.1rem;
}

.category-badge,
.priority-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.category-personal {
    background: #fed7d7;
    color: #c53030;
}

.category-work {
    background: #c6f6d5;
    color: #276749;
}

.category-shopping {
    background: #fefcbf;
    color: #744210;
}

.category-other {
    background: #e2e8f0;
    color: #4a5568;
}

.priority-low {
    background: #e6fffa;
    color: #234e52;
}

.priority-medium {
    background: #fef5e7;
    color: #744210;
}

.priority-high {
    background: #fed7d7;
    color: #c53030;
}

.due-date {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(113, 128, 150, 0.1);
}

.due-date.overdue {
    color: #e53e3e;
    background: rgba(229, 62, 62, 0.1);
    font-weight: 600;
}

.due-date.today {
    color: #dd6b20;
    background: rgba(221, 107, 32, 0.1);
    font-weight: 600;
}

.task-actions {
    display: flex;
    gap: 8px;
}

.edit-btn,
.delete-btn {
    background: rgba(74, 85, 104, 0.1);
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.edit-btn:hover {
    background: #4299e1;
    color: white;
}

.delete-btn:hover {
    background: #f56565;
    color: white;
}

.edit-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
}

/* Dark Mode */
body.dark-mode {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    color: #e2e8f0;
}

body.dark-mode .container {
    background: rgba(45, 55, 72, 0.95);
    color: #e2e8f0;
}

body.dark-mode header {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
}

body.dark-mode .add-task-section,
body.dark-mode .task-management,
body.dark-mode .task-list-section {
    border-color: #4a5568;
}

body.dark-mode .task-management {
    background: #2d3748;
}
}