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

:root {
    --primary-blue: #007AFF;
    --primary-blue-dark: #0051D5;
    --primary-gradient: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
    
    /* Glass morphism colors */
    --glass-white: rgba(255, 255, 255, 0.25);
    --glass-white-strong: rgba(255, 255, 255, 0.4);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-border-strong: rgba(255, 255, 255, 0.3);
    --glass-shadow: rgba(31, 38, 135, 0.37);
    
    /* Text colors for glass */
    --text-primary: rgba(255, 255, 255, 0.95);
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-tertiary: rgba(255, 255, 255, 0.6);
    --text-on-glass: rgba(255, 255, 255, 0.9);
    
    /* Glass backgrounds */
    --glass-bg-primary: rgba(255, 255, 255, 0.1);
    --glass-bg-secondary: rgba(255, 255, 255, 0.15);
    --glass-bg-tertiary: rgba(255, 255, 255, 0.08);
    
    /* Destructive and success with glass */
    --destructive-glass: rgba(255, 59, 48, 0.8);
    --success-glass: rgba(48, 209, 88, 0.8);
    
    /* Advanced shadows */
    --shadow-glass-light: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --shadow-glass-medium: 0 8px 32px 0 rgba(31, 38, 135, 0.5);
    --shadow-glass-heavy: 0 16px 64px 0 rgba(31, 38, 135, 0.6);
    --shadow-inner: inset 0 1px 0 rgba(255, 255, 255, 0.2);
    
    /* Border radius for liquid feel */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
}

@supports (backdrop-filter: blur(20px)) {
    :root {
        --blur-background: rgba(255, 255, 255, 0.7);
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 30%, #5B73E8 60%, #667eea 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

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

/* Viewport height adjustments for mobile browsers */
@supports (height: 100dvh) {
    body {
        min-height: 100dvh;
    }
    
    .app-container {
        min-height: 100dvh;
    }
}

@supports (height: 100svh) {
    body {
        min-height: 100svh;
    }
    
    .app-container {
        min-height: 100svh;
    }
}

.app-container {
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--glass-white);
    backdrop-filter: blur(40px) saturate(2);
    -webkit-backdrop-filter: blur(40px) saturate(2);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-glass-medium);
}

.app-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-border-strong), transparent);
    opacity: 0.8;
}

/* Add Todo Section */
.add-todo-section {
    padding: 48px 20px 28px;
    background: var(--glass-bg-primary);
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.input-container {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--glass-bg-secondary);
    border-radius: var(--radius-2xl);
    padding: 8px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-glass-light), var(--shadow-inner);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.input-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    border-radius: var(--radius-2xl);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.input-container:focus-within {
    border-color: var(--glass-border-strong);
    box-shadow: 
        var(--shadow-glass-medium), 
        var(--shadow-inner),
        0 0 0 4px rgba(0, 122, 255, 0.15);
    transform: translateY(-1px);
}

.input-container:focus-within::before {
    opacity: 1;
}

#todoInput {
    flex: 1;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    padding: 18px 24px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.95);
    outline: none;
    border-radius: var(--radius-lg);
    min-width: 0;
    width: 100%;
    font-weight: 500;
    letter-spacing: 0.2px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

#todoInput:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.3);
}

#todoInput::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

#todoInput::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.6);
}

#todoInput::-moz-placeholder {
    color: rgba(255, 255, 255, 0.6);
    opacity: 1;
}

#todoInput:-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.add-button {
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
    border: none;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        var(--shadow-glass-light),
        inset 0 1px 0 rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden;
}

.add-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s ease;
    transform: scale(0.8);
}

.add-button:hover::before {
    opacity: 1;
    transform: scale(1);
}

.add-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        var(--shadow-glass-heavy),
        inset 0 1px 0 rgba(255,255,255,0.3);
}

.add-button:active {
    transform: translateY(0) scale(0.98);
}

/* Filters */
.filters-container {
    background: var(--glass-bg-primary);
    padding: 24px 20px 28px;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.filters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.filter-buttons {
    display: flex;
    background: var(--glass-bg-secondary);
    border-radius: var(--radius-lg);
    padding: 6px;
    gap: 4px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-glass-light), var(--shadow-inner);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    flex: 1;
}

.task-counter {
    background: var(--glass-bg-secondary);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: var(--shadow-glass-light), var(--shadow-inner);
    flex-shrink: 0;
}

.task-counter span {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    letter-spacing: 0.2px;
}

.filter-btn {
    flex: 1;
    padding: 14px 18px;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    letter-spacing: 0.3px;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--glass-white-strong);
    border-radius: var(--radius-md);
    opacity: 0;
    transition: all 0.3s ease;
    transform: scale(0.8);
}

.filter-btn.active::before {
    opacity: 1;
    transform: scale(1);
}

.filter-btn.active {
    color: var(--text-primary);
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    box-shadow: var(--shadow-glass-light);
}

.filter-btn:hover:not(.active)::before {
    opacity: 0.5;
    transform: scale(0.95);
}

.filter-btn:hover:not(.active) {
    color: var(--text-primary);
}

/* Todos Container */
.todos-container {
    flex: 1;
    background: rgba(0, 0, 0, 0.15);
    min-height: 400px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.todos-list {
    padding: 12px 20px 24px;
    flex: 1;
}

/* Todo Item */
.todo-item {
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    margin: 10px 0;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--glass-border-strong);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: var(--shadow-glass-light), var(--shadow-inner);
}

.todo-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255,255,255,0.1) 0%, 
        rgba(255,255,255,0.05) 50%, 
        rgba(255,255,255,0.1) 100%);
    opacity: 0;
    transition: all 0.4s ease;
    border-radius: var(--radius-lg);
}

.todo-item::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--primary-blue), #5856D6);
    border-radius: var(--radius-lg);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
}

.todo-item:hover::before {
    opacity: 1;
}

.todo-item:hover::after {
    opacity: 0.3;
}

.todo-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glass-heavy), var(--shadow-inner);
    border-color: var(--glass-border-strong);
}

.todo-item.completed {
    opacity: 0.75;
    transform: scale(0.97);
    background: var(--glass-bg-tertiary);
}

.todo-item.completed:hover {
    transform: scale(0.97) translateY(-2px);
    opacity: 0.85;
}

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

/* Checkbox */
.todo-checkbox {
    width: 28px;
    height: 28px;
    border: 2px solid var(--glass-border-strong);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    position: relative;
    background: var(--glass-bg-tertiary);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-inner);
}

.todo-checkbox::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
    opacity: 0;
    transform: scale(0.6);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-glass-light);
}

.todo-checkbox::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.1) 100%);
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.4s ease;
}

.todo-item.completed .todo-checkbox::before {
    opacity: 1;
    transform: scale(1);
}

.todo-item.completed .todo-checkbox::after {
    opacity: 1;
    transform: scale(1);
}

.todo-item.completed .todo-checkbox {
    border-color: transparent;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.todo-checkbox svg {
    width: 16px;
    height: 16px;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

.todo-item.completed .todo-checkbox svg {
    opacity: 1;
    transform: scale(1.1);
}

/* Todo Text */
.todo-content {
    flex: 1;
    min-width: 0;
}

.todo-text {
    font-size: 16px;
    color: var(--text-on-glass);
    word-wrap: break-word;
    line-height: 1.5;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.todo-date {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 6px;
    font-weight: 400;
    opacity: 0.8;
}

/* Delete Button */
.delete-btn {
    background: var(--destructive-glass);
    border: none;
    border-radius: var(--radius-sm);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateX(15px) scale(0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-glass-light);
    border: 1px solid rgba(255,255,255,0.2);
}

.delete-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.1) 100%);
    border-radius: var(--radius-sm);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.todo-item:hover .delete-btn {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.delete-btn:hover::before {
    opacity: 1;
}

.delete-btn:hover {
    background: rgba(255, 31, 20, 0.9);
    transform: scale(1.1);
    box-shadow: var(--shadow-glass-medium);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.empty-state p {
    font-size: 16px;
    color: var(--text-tertiary);
}

.empty-state.hidden {
    display: none;
}

/* Footer */
.app-footer {
    background: var(--glass-bg-secondary);
    padding: 28px 20px;
    border-top: 1px solid var(--glass-border);
    text-align: center;
    flex-shrink: 0;
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    box-shadow: var(--shadow-inner);
}

.clear-btn {
    background: var(--destructive-glass);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 16px 32px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 18px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: var(--shadow-glass-light);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.clear-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.1) 100%);
    opacity: 0;
    transition: all 0.3s ease;
    border-radius: var(--radius-md);
}

.clear-btn:hover::before {
    opacity: 1;
}

.clear-btn:disabled {
    background: var(--glass-bg-tertiary);
    color: var(--text-tertiary);
    cursor: not-allowed;
    border-color: var(--glass-border);
    opacity: 0.6;
}

.clear-btn:disabled::before {
    display: none;
}

.clear-btn:not(:disabled):hover {
    background: rgba(255, 31, 20, 0.9);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glass-heavy);
}

.app-info {
    margin-top: 16px;
}

.app-info small {
    color: var(--text-tertiary);
    font-size: 13px;
    font-weight: 500;
    opacity: 0.8;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    transition: transform 0.3s ease, opacity 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

.todo-item.adding {
    animation: slideInUp 0.3s ease;
}

.todo-item.removing {
    animation: slideOutDown 0.3s ease;
}

/* Touch interactions */
@media (hover: none) {
    .todo-item:hover {
        transform: none;
        box-shadow: var(--shadow-light);
    }
    
    .delete-btn {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
/* Mobile First - Small screens (320px and up) */
@media (max-width: 480px) {
    .app-container {
        max-width: 100%;
        width: 100%;
        border-radius: 0;
        min-height: 100vh;
        margin: 0;
    }
    
    .add-todo-section {
        padding: 32px 16px 16px;
    }
    
    .filters-container {
        padding: 16px;
    }
    
    .filters-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .task-counter {
        text-align: center;
        align-self: center;
        padding: 8px 12px;
    }
    
    .task-counter span {
        font-size: 12px;
    }
    
    .todos-list {
        padding: 0 16px;
    }
    
    .todo-item {
        padding: 16px;
        margin: 6px 0;
    }
    
    .todo-text {
        font-size: 15px;
    }
    
    .app-footer {
        padding: 16px;
        padding-bottom: 32px;
    }
    
    .clear-btn {
        width: 100%;
        padding: 14px 24px;
    }
}

/* Tablet portrait and small laptops (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .app-container {
        max-width: 500px;
        width: 90%;
        margin: 20px auto;
        border-radius: 20px;
        box-shadow: var(--shadow-heavy);
    }
    
    .add-todo-section {
        padding: 40px 24px 20px;
    }
    
    .filters-container {
        padding: 20px 24px;
    }
    
    .todos-list {
        padding: 0 24px;
    }
    
    .app-footer {
        padding: 20px 24px;
    }
}

/* Desktop and large tablets (769px and up) */
@media (min-width: 769px) {
    .app-container {
        max-width: 600px;
        width: 80%;
        margin: 30px auto;
        border-radius: 24px;
        box-shadow: var(--shadow-heavy);
    }
    
    .add-todo-section {
        padding: 48px 32px 24px;
    }
    
    .filters-container {
        padding: 24px 32px;
    }
    
    .todos-list {
        padding: 0 32px;
    }
    
    .todo-item {
        padding: 24px;
        margin: 10px 0;
    }
    
    .todo-text {
        font-size: 17px;
    }
    
    .app-footer {
        padding: 24px 32px;
    }
    
    /* Hover effects for desktop */
    .add-button:hover {
        background: var(--primary-blue-dark);
        transform: scale(1.05);
    }
    
    .filter-btn:hover:not(.active) {
        background: rgba(0, 122, 255, 0.1);
        color: var(--primary-blue);
    }
}

/* Large screens (1200px and up) */
@media (min-width: 1200px) {
    .app-container {
        max-width: 700px;
        width: 60%;
    }
    
    .add-todo-section {
        padding: 60px 40px 30px;
    }
    
    .filters-container {
        padding: 30px 40px;
    }
    
    .todos-list {
        padding: 0 40px;
    }
    
    .todo-item {
        padding: 28px;
        margin: 12px 0;
    }
    
    .app-footer {
        padding: 30px 40px;
    }
}

/* Orientation handling for mobile devices */
@media (max-width: 768px) and (orientation: landscape) {
    .add-todo-section {
        padding: 20px 20px 12px;
    }
    
    .filters-container {
        padding: 12px 20px;
    }
    
    .todo-item {
        padding: 12px 20px;
        margin: 4px 0;
    }
    
    .app-footer {
        padding: 12px 20px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .todo-checkbox,
    .add-button,
    .delete-btn {
        /* Ensure crisp rendering on high DPI displays */
        transform: translateZ(0);
    }
}

/* Container Queries for modern browsers */
@supports (container-type: inline-size) {
    .app-container {
        container-type: inline-size;
        container-name: todo-app;
    }
    
    /* Small container */
    @container todo-app (max-width: 400px) {
        .todo-text {
            font-size: 15px;
        }
        
        .todo-item {
            padding: 16px;
        }
        
        .task-counter span {
            font-size: 12px;
        }
    }
    
    /* Medium container */
    @container todo-app (min-width: 401px) and (max-width: 600px) {
        .todo-text {
            font-size: 16px;
        }
        
        .todo-item {
            padding: 20px;
        }
        
        .task-counter span {
            font-size: 13px;
        }
    }
    
    /* Large container */
    @container todo-app (min-width: 601px) {
        .todo-text {
            font-size: 17px;
        }
        
        .todo-item {
            padding: 24px;
        }
        
        .task-counter span {
            font-size: 14px;
        }
    }
}

/* Extra large screens (1600px and up) */
@media (min-width: 1600px) {
    .app-container {
        max-width: 800px;
        width: 50%;
    }
}

/* Light mode input overrides */
@media (prefers-color-scheme: light) {
    #todoInput {
        background: rgba(255, 255, 255, 0.6);
        color: rgba(0, 0, 0, 0.9);
        border-color: rgba(0, 0, 0, 0.1);
    }
    
    #todoInput:focus {
        background: rgba(255, 255, 255, 0.8);
        color: rgba(0, 0, 0, 1);
        border-color: rgba(0, 122, 255, 0.3);
    }
    
    #todoInput::placeholder,
    #todoInput::-webkit-input-placeholder,
    #todoInput::-moz-placeholder,
    #todoInput:-ms-input-placeholder {
        color: rgba(0, 0, 0, 0.5);
    }
    
    :root {
        --text-on-glass: rgba(0, 0, 0, 0.9);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        /* Enhanced glass morphism for dark mode */
        --glass-white: rgba(255, 255, 255, 0.08);
        --glass-white-strong: rgba(255, 255, 255, 0.15);
        --glass-border: rgba(255, 255, 255, 0.08);
        --glass-border-strong: rgba(255, 255, 255, 0.2);
        --glass-shadow: rgba(0, 0, 0, 0.3);
        
        /* Dark glass backgrounds */
        --glass-bg-primary: rgba(255, 255, 255, 0.03);
        --glass-bg-secondary: rgba(255, 255, 255, 0.08);
        --glass-bg-tertiary: rgba(255, 255, 255, 0.05);
        
        /* Dark text colors */
        --text-primary: rgba(255, 255, 255, 0.95);
        --text-secondary: rgba(255, 255, 255, 0.8);
        --text-tertiary: rgba(255, 255, 255, 0.5);
        --text-on-glass: rgba(255, 255, 255, 0.9);
        
        /* Dark shadows */
        --shadow-glass-light: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
        --shadow-glass-medium: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
        --shadow-glass-heavy: 0 16px 64px 0 rgba(0, 0, 0, 0.5);
        --shadow-inner: inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    
    body {
        background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 30%, #16213e 60%, #0f3460 100%);
        background-size: 400% 400%;
    }
    
    body::before {
        background: 
            radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.15) 0%, transparent 50%),
            radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.08) 0%, transparent 50%),
            radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.05) 0%, transparent 50%);
    }
    
    #todoInput {
        background: rgba(255, 255, 255, 0.05);
        color: rgba(255, 255, 255, 0.9);
        border-color: rgba(255, 255, 255, 0.08);
    }
    
    #todoInput:focus {
        background: rgba(255, 255, 255, 0.1);
        color: rgba(255, 255, 255, 1);
        border-color: rgba(255, 255, 255, 0.2);
    }
    
    #todoInput::placeholder,
    #todoInput::-webkit-input-placeholder,
    #todoInput::-moz-placeholder,
    #todoInput:-ms-input-placeholder {
        color: rgba(255, 255, 255, 0.4);
    }
    
    .todos-container {
        background: rgba(0, 0, 0, 0.25);
    }
    
    .todo-item {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.15);
    }
}