* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-light: #8b5cf6;
    --primary-dark: #4f46e5;
    --secondary-color: #64748b;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --danger-color: #f43f5e;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    
    /* Backgrounds */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --light-bg: #f1f5f9;
    --card-bg: #ffffff;
    --card-bg-dark: #334155;
    --surface-bg: #f8fafc;
    
    /* Borders and dividers */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --border-dark: #475569;
    
    /* Text colors */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --text-white: #ffffff;
    
    /* Shadows with modern depth */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Modern border radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    
    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 400% 400%;
    animation: gradientShift 10s ease infinite;
    min-height: 100vh;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

.flex {
    display: flex;
}

.flex-2 {
    flex: 2;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 1rem;
}

/* Loading Spinner */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-normal);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.025em;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition-normal);
}

.btn:hover::before {
    left: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #475569 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #e11d48 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #e11d48 0%, #be185d 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-sm {
    padding: 0.625rem 1.25rem;
    font-size: 0.75rem;
    border-radius: var(--radius-md);
}

/* Auth Page */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light), var(--accent-color));
}

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

.auth-header h1 {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}

.auth-form h2 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

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

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

/* App Container */
.app-container {
    background: var(--light-bg);
    min-height: 100vh;
}

/* Header */
.app-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 50;
}

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

.header-content h1 {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.875rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#user-welcome {
    color: var(--text-secondary);
    font-weight: 500;
}

#username {
    color: var(--primary-color);
    font-weight: 600;
}

/* Stats Section */
.stats-section {
    padding: 3rem 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 50%, var(--accent-color) 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.05"><circle cx="30" cy="30" r="2"/></g></svg>');
    opacity: 0.3;
}

.stats-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.stat-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-xl);
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: white;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-2xl);
    background: rgba(255, 255, 255, 0.2);
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    position: relative;
    flex-shrink: 0;
}

.stat-icon::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.4), transparent);
    z-index: -1;
}

.stat-icon.completed {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.3), rgba(5, 150, 105, 0.4));
}

.stat-icon.pending {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(217, 119, 6, 0.4));
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    display: block;
    line-height: 1;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.95;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
    background: var(--surface-bg);
    transition: var(--transition-normal);
    position: relative;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--text-secondary);
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Checkbox */
.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin-bottom: 0 !important;
}

.checkbox-label input[type="checkbox"] {
    width: auto !important;
    margin: 0;
}

/* Cards */
.add-todo-card,
.filters-container,
.todos-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: var(--transition-normal);
}

.add-todo-card:hover,
.filters-container:hover,
.todos-container:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-2xl);
}

.add-todo-card h2,
.filters-container h3,
.todos-header h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Filters */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: end;
}

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

.filter-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.filter-group select {
    min-width: 120px;
}

/* Todos List */
.todos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.todos-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.todo-item {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.todo-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    transition: var(--transition-normal);
}

.todo-item:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.95);
}

.todo-item:hover::before {
    width: 6px;
}

.todo-item.completed {
    opacity: 0.75;
    background: rgba(240, 249, 255, 0.9);
}

.todo-item.completed::before {
    background: linear-gradient(135deg, var(--success-color), #059669);
}

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

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

.todo-item.completed .todo-title {
    text-decoration: line-through;
    color: var(--text-muted);
}

.todo-actions {
    display: flex;
    gap: 0.375rem;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.625rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition-normal);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-icon.btn-complete:hover {
    color: var(--success-color);
    background: rgba(34, 197, 94, 0.1);
}

.btn-icon.btn-delete:hover {
    color: var(--danger-color);
    background: rgba(220, 38, 38, 0.1);
}

.todo-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.todo-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    font-size: 0.875rem;
}

.todo-priority {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    position: relative;
    overflow: hidden;
}

.todo-priority::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    transition: var(--transition-fast);
}

.todo-priority:hover::before {
    opacity: 0.15;
}

.todo-priority.low {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(74, 222, 128, 0.1));
    color: #059669;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.todo-priority.low::before {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.todo-priority.medium {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(251, 191, 36, 0.1));
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.todo-priority.medium::before {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.todo-priority.high {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.15), rgba(239, 68, 68, 0.1));
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.todo-priority.high::before {
    background: linear-gradient(135deg, #dc2626, #ef4444);
}

.todo-due-date {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.todo-due-date.overdue {
    color: var(--danger-color);
    font-weight: 500;
}

.todo-status {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.todo-status.completed {
    background: #dcfce7;
    color: #15803d;
}

.todo-status.pending {
    background: #fef3c7;
    color: #d97706;
}

/* No Todos */
.no-todos {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin: 2rem 0;
}

.no-todos i {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.7;
}

.no-todos h3 {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1.25rem;
}

.no-todos p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    animation: modalFadeIn 0.3s ease-out forwards;
}

@keyframes modalFadeIn {
    to {
        opacity: 1;
    }
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    transform: translateY(20px);
    animation: modalSlideIn 0.3s ease-out forwards;
}

@keyframes modalSlideIn {
    to {
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.modal-header h2 {
    margin: 0;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.25rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-close {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    font-size: 1.125rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.modal-close:hover {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger-color);
    transform: scale(1.05);
}

.modal-body {
    padding: 1.75rem;
    max-height: 60vh;
    overflow-y: auto;
}

.modal form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    padding: 1.75rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    border-left: 4px solid var(--primary-color);
    animation: slideInRight 0.3s ease-out;
}

.toast.success {
    border-left-color: var(--success-color);
}

.toast.error {
    border-left-color: var(--danger-color);
}

.toast.warning {
    border-left-color: var(--warning-color);
}

.toast-icon {
    font-size: 1.25rem;
}

.toast.success .toast-icon {
    color: var(--success-color);
}

.toast.error .toast-icon {
    color: var(--danger-color);
}

.toast.warning .toast-icon {
    color: var(--warning-color);
}

.toast-message {
    flex: 1;
    color: var(--text-primary);
    font-weight: 500;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        padding: 1rem;
        flex-direction: column;
        gap: 1.25rem;
        text-align: center;
    }

    .header-title {
        font-size: 1.75rem;
    }

    .main-content {
        padding: 1rem;
        gap: 1.5rem;
    }

    .stats-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .form-row {
        flex-direction: column;
        gap: 1rem;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .filter-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .filter-group select {
        min-width: auto;
        width: 100%;
    }

    .todo-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .todo-actions {
        align-self: flex-end;
        gap: 0.5rem;
    }

    .todo-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .modal-content {
        width: 95%;
        margin: 1rem;
        border-radius: var(--radius-lg);
    }

    .modal-header,
    .modal-body,
    .modal-actions {
        padding: 1.25rem;
    }

    .modal-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .toast {
        min-width: auto;
        width: calc(100vw - 2rem);
        border-radius: var(--radius-md);
    }

    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }

    .no-todos {
        padding: 3rem 1.5rem;
        margin: 1.5rem 0;
    }

    .no-todos i {
        font-size: 4rem;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem;
        margin: 1rem;
        border-radius: var(--radius-lg);
    }

    .header-title {
        font-size: 1.5rem;
    }

    .stats-section {
        padding: 1rem;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .add-todo-card,
    .filters-container,
    .todos-container {
        padding: 1rem;
        border-radius: var(--radius-lg);
    }

    .todo-item {
        padding: 1.25rem;
    }

    .todo-title {
        font-size: 1rem;
    }

    .btn-icon {
        min-width: 34px;
        height: 34px;
        padding: 0.5rem;
    }

    .todo-priority {
        padding: 0.25rem 0.625rem;
        font-size: 0.7rem;
    }

    .form-group label {
        font-size: 0.875rem;
    }

    .form-control {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }

    .no-todos {
        padding: 2.5rem 1rem;
    }

    .no-todos i {
        font-size: 3.5rem;
    }

    .no-todos h3 {
        font-size: 1.125rem;
    }
}