/* Root Variables */
:root {
    --primary-color: #667eea;
    --primary-dark: #764ba2;
    --secondary-color: #48bb78;
    --danger-color: #f56565;
    --warning-color: #ed8936;
    --info-color: #4299e1;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-overlay: rgba(0, 0, 0, 0.5);
    
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --text-muted: #a0aec0;
    
    --border-color: #e2e8f0;
    --border-hover: #cbd5e0;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.1);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    
    --transition: all 0.3s ease;
    --transition-fast: all 0.2s ease;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --bg-primary: #1a202c;
    --bg-secondary: #2d3748;
    --bg-card: rgba(45, 55, 72, 0.95);
    --bg-overlay: rgba(0, 0, 0, 0.7);
    
    --text-primary: #f7fafc;
    --text-secondary: #e2e8f0;
    --text-muted: #a0aec0;
    
    --border-color: #4a5568;
    --border-hover: #718096;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    min-height: 100vh;
    color: var(--text-primary);
    transition: var(--transition);
    line-height: 1.6;
}

/* Authentication Styles */
.auth-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 400px;
    margin: 20px;
    animation: scaleIn 0.5s ease-out;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    color: var(--text-primary);
    font-size: 2.2rem;
    margin-bottom: 8px;
    text-shadow: none;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.auth-btn {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    margin-top: 10px;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-switch a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-fast);
}

.auth-switch a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.error-message {
    background: rgba(245, 101, 101, 0.1);
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
    padding: 10px;
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    font-size: 0.9rem;
    display: none;
}

.success-message {
    background: rgba(72, 187, 120, 0.1);
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
    padding: 10px;
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    font-size: 0.9rem;
    display: none;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    animation: fadeInDown 1s ease-out;
}

.header-content h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

.header-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.theme-icon,
.notification-icon {
    font-size: 1.2rem;
}

/* Notification Banner */
.notification-banner {
    background: linear-gradient(135deg, var(--warning-color), #dd6b20);
    color: white;
    padding: 15px 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideDown 0.5s ease-out;
}

.notification-banner p {
    margin: 0;
    font-weight: 500;
}

.notification-banner .btn {
    margin-left: 10px;
}

/* Layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.left-panel,
.right-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 25px;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.card h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-controls {
    display: flex;
    gap: 10px;
}

/* Icons */
.icon {
    width: 20px;
    height: 20px;
    fill: var(--primary-color);
    flex-shrink: 0;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Buttons */
.btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    font-family: inherit;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color), #38a169);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #e53e3e);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #dd6b20);
}

.btn-small {
    padding: 8px 12px;
    font-size: 0.8rem;
    border-radius: var(--radius-md);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
}

.btn-icon .icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: rgba(102, 126, 234, 0.1);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.stat-card:hover {
    background: rgba(102, 126, 234, 0.15);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    font-size: 2rem;
    opacity: 0.8;
}

.stat-info {
    flex: 1;
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Progress */
.progress-section {
    margin-bottom: 25px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.progress-header h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
}

#progressPercent {
    font-weight: 600;
    color: var(--primary-color);
}

.progress-bar {
    background: var(--border-color);
    border-radius: var(--radius-md);
    height: 12px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    background: linear-gradient(90deg, var(--secondary-color), #38a169);
    height: 100%;
    border-radius: var(--radius-md);
    transition: width 0.8s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

/* Charts */
.charts-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.chart-card {
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--border-color);
}

.chart-card.full-width {
    grid-column: 1 / -1;
}

.chart-card h4 {
    margin-bottom: 15px;
    color: var(--text-primary);
    font-size: 1rem;
}

.chart-card canvas {
    max-height: 200px;
}

/* Tasks */
.task-list {
    max-height: 600px;
    overflow-y: auto;
    margin-top: 20px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-icon {
    width: 64px;
    height: 64px;
    fill: var(--text-muted);
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.task-item {
    background: rgba(102, 126, 234, 0.05);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-color);
    animation: slideInRight 0.5s ease-out;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.task-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.task-item:hover::before {
    left: 100%;
}

.task-item:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.task-item.completed {
    opacity: 0.7;
    border-left-color: var(--secondary-color);
    background: rgba(72, 187, 120, 0.05);
}

.task-item.completed:hover {
    background: rgba(72, 187, 120, 0.1);
}

.task-item.overdue {
    border-left-color: var(--danger-color);
    background: rgba(245, 101, 101, 0.05);
}

.task-item.overdue:hover {
    background: rgba(245, 101, 101, 0.1);
}

.task-item.completed .task-title {
    text-decoration: line-through;
    opacity: 0.7;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 15px;
}

.task-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
    line-height: 1.4;
    flex: 1;
}

.task-priority {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.priority-high {
    background: rgba(245, 101, 101, 0.2);
    color: var(--danger-color);
}

.priority-medium {
    background: rgba(237, 137, 54, 0.2);
    color: var(--warning-color);
}

.priority-low {
    background: rgba(72, 187, 120, 0.2);
    color: var(--secondary-color);
}

.task-description {
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    gap: 15px;
}

.task-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    flex: 1;
}

.task-info-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.task-info-item .icon {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.task-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.task-subject {
    display: inline-block;
    padding: 3px 8px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--primary-color);
    text-transform: capitalize;
}

.overdue-indicator {
    color: var(--danger-color);
    font-weight: 600;
}

/* Timeline */
.timeline-card {
    max-height: 400px;
    overflow: hidden;
}

.timeline {
    max-height: 320px;
    overflow-y: auto;
    padding-right: 10px;
}

.timeline::-webkit-scrollbar {
    width: 4px;
}

.timeline::-webkit-scrollbar-track {
    background: var(--border-color);
    border-radius: 2px;
}

.timeline::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 2px;
}

.timeline-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.timeline-item {
    position: relative;
    padding-left: 35px;
    margin-bottom: 20px;
    animation: fadeInLeft 0.5s ease-out;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 8px;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 3px solid var(--bg-card);
    box-shadow: 0 0 0 2px var(--primary-color);
    animation: pulse 2s infinite;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: 17px;
    top: 20px;
    width: 2px;
    height: calc(100% + 5px);
    background: var(--border-color);
}

.timeline-item:last-child::after {
    display: none;
}

.timeline-item.create::before {
    background: var(--secondary-color);
    box-shadow: 0 0 0 2px var(--secondary-color);
}

.timeline-item.complete::before {
    background: var(--info-color);
    box-shadow: 0 0 0 2px var(--info-color);
}

.timeline-item.delete::before {
    background: var(--danger-color);
    box-shadow: 0 0 0 2px var(--danger-color);
}

.timeline-content {
    background: var(--bg-primary);
    padding: 15px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.timeline-content:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.timeline-message {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.timeline-time {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    backdrop-filter: blur(5px);
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
    padding: 20px;
    overflow-y: auto;
}

.modal-content {
    position: relative;
    max-width: 600px;
    margin: 50px auto;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    animation: scaleIn 0.3s ease-out;
    border: 1px solid var(--border-color);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 25px 15px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--text-primary);
}

.modal-body {
    padding: 25px;
}

/* Notification Toast Container */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.toast {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 15px 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
}

.toast.success::before {
    background: var(--secondary-color);
}

.toast.error::before {
    background: var(--danger-color);
}

.toast.warning::before {
    background: var(--warning-color);
}

.toast-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    font-size: 0.9rem;
}

.toast-message {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.toast-close:hover {
    background: var(--border-color);
}

/* Pomodoro Timer */
.pomodoro-timer {
    text-align: center;
    padding: 20px;
}

.timer-display {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -2px;
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.timer-settings {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 300px;
    margin: 0 auto;
}

.timer-settings label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.timer-settings input {
    width: 80px;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: var(--shadow-xl);
}

.fab svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
    transition: var(--transition);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.95);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .charts-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .header-content h1 {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .filter-controls {
        width: 100%;
        flex-direction: column;
    }
    
    .task-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .task-actions {
        align-self: flex-end;
    }
    
    .fab {
        bottom: 20px;
        right: 20px;
    }
    
    .toast-container {
        left: 15px;
        right: 15px;
        max-width: none;
    }
    
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        margin: 20px auto;
    }
    
    .timer-display {
        font-size: 3rem;
    }
    
    .timer-controls {
        flex-wrap: wrap;
    }
    
    .auth-card {
        padding: 30px 20px;
        margin: 15px;
    }
    
    .auth-header h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .task-info {
        flex-direction: column;
        gap: 8px;
    }
    
    .task-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .timer-display {
        font-size: 2.5rem;
    }
    
    .user-info {
        flex-direction: column;
        gap: 10px;
    }
}