/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4361ee;
    --primary-light: #4895ef;
    --secondary-color: #3a0ca3;
    --success-color: #4cc9f0;
    --danger-color: #f72585;
    --warning-color: #f8961e;
    --dark-color: #1a1a2e;
    --light-color: #f8f9fa;
    --gray-color: #6c757d;
    --border-color: #e0e0e0;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--dark-color);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
    transition: var(--transition);
}

body.dark-mode {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: var(--light-color);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background-color: white;
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.dark-mode .container {
    background-color: #1e1e2e;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: cover;
}

.header-content, .date-section {
    position: relative;
    z-index: 1;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.stats {
    display: flex;
    gap: 20px;
    margin-top: 25px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition);
}

.stat-circle:hover {
    transform: scale(1.1);
}

.stat-circle.total { background-color: rgba(255, 255, 255, 0.2); }
.stat-circle.completed { background-color: rgba(76, 201, 240, 0.8); }
.stat-circle.pending { background-color: rgba(248, 150, 30, 0.8); }
.stat-circle.today { background-color: rgba(247, 37, 133, 0.8); }

.stat-item p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.date-section {
    text-align: right;
}

.current-date {
    margin-bottom: 15px;
}

.date-day {
    font-size: 2rem;
    font-weight: 700;
}

.date-full {
    font-size: 1.1rem;
    opacity: 0.9;
}

.time {
    font-size: 2.5rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

/* Main Content Layout */
.main-content {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    padding: 30px;
    min-height: 70vh;
}

.left-panel {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.right-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Cards */
.input-card, .filters-card, .motivation-card {
    background: var(--light-color);
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.dark-mode .input-card,
.dark-mode .filters-card,
.dark-mode .motivation-card {
    background: #2d2d44;
}

.input-card h3, .filters-card h3, .motivation-card h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
}

/* Input Section */
.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

#task-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
    background: white;
}

.dark-mode #task-input {
    background: #3a3a52;
    border-color: #4a4a6a;
    color: white;
}

#task-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(67, 97, 238, 0.3);
}

.task-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.option {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option label {
    font-size: 0.9rem;
    color: var(--gray-color);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.option select, .option input[type="date"] {
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    background: white;
    transition: var(--transition);
}

.dark-mode .option select,
.dark-mode .option input[type="date"] {
    background: #3a3a52;
    border-color: #4a4a6a;
    color: white;
}

.quick-add {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

.quick-add h4 {
    margin-bottom: 15px;
    color: var(--gray-color);
    font-size: 1rem;
}

.quick-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.quick-btn {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
    border: 2px solid rgba(67, 97, 238, 0.3);
    padding: 10px;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    transition: var(--transition);
}

.quick-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Filter Buttons */
.filter-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 25px;
}

.filter-btn {
    background: white;
    color: var(--dark-color);
    border: 2px solid var(--border-color);
    padding: 12px;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    transition: var(--transition);
}

.dark-mode .filter-btn {
    background: #3a3a52;
    color: white;
    border-color: #4a4a6a;
}

.filter-btn.active, .filter-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.category-filters, .sort-options {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

.category-filters h4, .sort-options h4 {
    margin-bottom: 15px;
    color: var(--gray-color);
    font-size: 1rem;
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-filter {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.dark-mode .category-filter {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.category-filter.active, .category-filter:hover {
    background: var(--primary-color);
    color: white;
}

#sort-select {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    background: white;
    transition: var(--transition);
}

.dark-mode #sort-select {
    background: #3a3a52;
    border-color: #4a4a6a;
    color: white;
}

/* Motivation Card */
#motivation-text {
    font-style: italic;
    text-align: center;
    margin-bottom: 25px;
    color: var(--gray-color);
    font-size: 1.1rem;
}

.progress-ring {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto;
}

.progress-ring-circle {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 8;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dashoffset 1s ease;
}

.progress-percent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Tasks Header */
.tasks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.tasks-header h2 {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.8rem;
}

.tasks-actions {
    display: flex;
    gap: 15px;
}

.btn-secondary {
    background: var(--light-color);
    color: var(--dark-color);
    border: 2px solid var(--border-color);
    padding: 12px 20px;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.dark-mode .btn-secondary {
    background: #3a3a52;
    color: white;
    border-color: #4a4a6a;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #2a9d8f);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(76, 201, 240, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #e63946);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(247, 37, 133, 0.3);
}

.btn-success:disabled, .btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Tasks Container */
.tasks-container {
    flex: 1;
    background: var(--light-color);
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
    overflow-y: auto;
    max-height: 500px;
    transition: var(--transition);
}

.dark-mode .tasks-container {
    background: #2d2d44;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-color);
}

.empty-icon {
    font-size: 4rem;
    color: var(--border-color);
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.dark-mode .empty-state h3 {
    color: white;
}

.empty-state p {
    font-size: 1.1rem;
}

/* Task Items */
.task-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-left: 5px solid var(--primary-color);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    animation: fadeIn 0.5s ease;
}

.dark-mode .task-item {
    background: #3a3a52;
}

.task-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.task-item.completed {
    opacity: 0.8;
    border-left-color: var(--success-color);
}

.task-item.high-priority {
    border-left-color: var(--danger-color);
}

.task-item.urgent-priority {
    border-left-color: var(--danger-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(247, 37, 133, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(247, 37, 133, 0); }
    100% { box-shadow: 0 0 0 0 rgba(247, 37, 133, 0); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.task-checkbox {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: var(--success-color);
}

.task-content {
    flex: 1;
}

.task-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--dark-color);
    transition: var(--transition);
}

.dark-mode .task-title {
    color: white;
}

.task-item.completed .task-title {
    text-decoration: line-through;
    color: var(--gray-color);
}

.task-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.task-priority, .task-category, .task-date {
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.8rem;
}

.task-priority.low { background: rgba(76, 201, 240, 0.2); color: var(--success-color); }
.task-priority.medium { background: rgba(248, 150, 30, 0.2); color: var(--warning-color); }
.task-priority.high { background: rgba(247, 37, 133, 0.2); color: var(--danger-color); }
.task-priority.urgent { background: rgba(247, 37, 133, 0.3); color: white; }

.task-category.work { background: rgba(67, 97, 238, 0.2); color: var(--primary-color); }
.task-category.personal { background: rgba(76, 201, 240, 0.2); color: var(--success-color); }
.task-category.shopping { background: rgba(248, 150, 30, 0.2); color: var(--warning-color); }
.task-category.health { background: rgba(247, 37, 133, 0.2); color: var(--danger-color); }
.task-category.learning { background: rgba(155, 81, 224, 0.2); color: #9b51e0; }

.task-date {
    background: rgba(108, 117, 125, 0.1);
    color: var(--gray-color);
}

.task-date.overdue {
    background: rgba(247, 37, 133, 0.2);
    color: var(--danger-color);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.task-actions {
    display: flex;
    gap: 10px;
}

.task-action-btn {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--gray-color);
}

.task-action-btn:hover {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
    transform: scale(1.1);
}

.task-action-btn.delete:hover {
    background: rgba(247, 37, 133, 0.1);
    color: var(--danger-color);
}

.task-action-btn.edit:hover {
    background: rgba(248, 150, 30, 0.1);
    color: var(--warning-color);
}

/* Bulk Actions */
.bulk-actions {
    background: var(--light-color);
    border-radius: 15px;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.dark-mode .bulk-actions {
    background: #2d2d44;
}

.selected-count {
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.selected-count span {
    font-size: 1.5rem;
}

.bulk-buttons {
    display: flex;
    gap: 15px;
}

/* Footer */
.footer {
    background: var(--light-color);
    padding: 25px 30px;
    border-top: 2px solid var(--border-color);
    transition: var(--transition);
}

.dark-mode .footer {
    background: #2d2d44;
    border-top-color: #4a4a6a;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gray-color);
    font-size: 0.9rem;
}

.storage-status {
    font-size: 0.8rem;
    color: var(--success-color) !important;
}

.footer-buttons {
    display: flex;
    gap: 15px;
}

/* Notification */
.notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    z-index: 1000;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .left-panel {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        display: grid;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        text-align: center;
        gap: 25px;
    }
    
    .date-section {
        text-align: center;
    }
    
    .stats {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .task-options {
        grid-template-columns: 1fr;
    }
    
    .filter-buttons {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .tasks-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .bulk-actions {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }
    
    .bulk-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .header, .main-content, .footer {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .stat-circle {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .time {
        font-size: 1.8rem;
    }
}