/* ============================================
   TASKFLOW — Smart TODO App
   Modern CSS with Dark/Light Theme System
   ============================================ */

/* === CSS Variables === */
:root {
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --accent: #6c5ce7;
    --accent-light: #a29bfe;
    --accent-dark: #5a4bd1;
    --success: #00b894;
    --success-light: #55efc4;
    --danger: #e17055;
    --danger-light: #fab1a0;
    --warning: #fdcb6e;
    --info: #74b9ff;

    --priority-low: #00b894;
    --priority-medium: #fdcb6e;
    --priority-high: #e17055;

    --category-personal: #6c5ce7;
    --category-work: #e17055;
    --category-study: #74b9ff;
    --category-health: #00b894;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
}

/* Dark Theme (default) */
[data-theme="dark"] {
    color-scheme: dark;
    --bg-primary: #0a0a14;
    --bg-secondary: #12121f;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.07);
    --bg-input: rgba(255, 255, 255, 0.06);
    --bg-input-focus: rgba(255, 255, 255, 0.1);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(108, 92, 231, 0.5);
    --text-primary: #f0f0f5;
    --text-secondary: #9999aa;
    --text-muted: #666680;
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
    --glow: 0 0 30px rgba(108, 92, 231, 0.15);
}

/* Light Theme */
[data-theme="light"] {
    color-scheme: light;
    --bg-primary: #f5f5fa;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --bg-input: rgba(0, 0, 0, 0.04);
    --bg-input-focus: rgba(0, 0, 0, 0.06);
    --bg-glass: rgba(255, 255, 255, 0.7);
    --border-color: rgba(0, 0, 0, 0.08);
    --border-focus: rgba(108, 92, 231, 0.4);
    --text-primary: #1a1a2e;
    --text-secondary: #555566;
    --text-muted: #999999;
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.08);
    --glow: 0 0 30px rgba(108, 92, 231, 0.08);
}

/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 20px;
    transition: background var(--transition), color var(--transition);
    overflow-x: hidden;
}

/* === Aurora Background === */
.aurora-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.aurora-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: aurora-float 20s ease-in-out infinite;
}

[data-theme="light"] .aurora-shape {
    opacity: 0.2;
}

.aurora-shape.shape-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    top: -150px;
    right: -100px;
    animation-duration: 18s;
}

.aurora-shape.shape-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #00cec9 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
    animation-duration: 22s;
    animation-delay: -5s;
}

.aurora-shape.shape-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #fd79a8 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-duration: 25s;
    animation-delay: -10s;
}

@keyframes aurora-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.1); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(40px, 30px) scale(1.05); }
}

/* === App Wrapper === */
.app-wrapper {
    width: 100%;
    max-width: 640px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* === Header === */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.logo i {
    color: var(--accent);
    font-size: 1.3rem;
}

.header-right {
    display: flex;
    gap: 8px;
}

.theme-toggle,
.shortcuts-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all var(--transition);
    backdrop-filter: blur(10px);
}

.theme-toggle:hover,
.shortcuts-btn:hover {
    background: var(--bg-card-hover);
    color: var(--accent);
    border-color: var(--border-focus);
    transform: translateY(-2px);
    box-shadow: var(--glow);
}

/* === Stats Bar === */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
    transition: all var(--transition);
}

.stat-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    background: rgba(108, 92, 231, 0.12);
    color: var(--accent);
}

.stat-icon.completed-icon {
    background: rgba(0, 184, 148, 0.12);
    color: var(--success);
}

.stat-icon.active-icon {
    background: rgba(116, 185, 255, 0.12);
    color: var(--info);
}

.stat-icon.overdue-icon {
    background: rgba(225, 112, 85, 0.12);
    color: var(--danger);
}

.stat-number {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    font-family: var(--font-mono);
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* === Progress Bar === */
.progress-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    backdrop-filter: blur(10px);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.progress-track {
    height: 6px;
    background: var(--bg-input);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
    background-size: 200% 100%;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* === Add Task Form === */
.add-task-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px;
    backdrop-filter: blur(10px);
    transition: all var(--transition);
}

.add-task-form:focus-within {
    border-color: var(--border-focus);
    box-shadow: var(--glow);
}

.form-main {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.form-main input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 0.95rem;
    font-family: var(--font-main);
    color: var(--text-primary);
    transition: all var(--transition);
    outline: none;
}

.form-main input::placeholder {
    color: var(--text-muted);
}

.form-main input:focus {
    background: var(--bg-input-focus);
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.add-btn {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    border: none;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    flex-shrink: 0;
}

.add-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.4);
}

.add-btn:active {
    transform: scale(0.95);
}

.form-options {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.option-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.option-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.option-label i {
    margin-right: 3px;
}

.priority-pills {
    display: flex;
    gap: 4px;
}

.priority-pill {
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.priority-pill:hover {
    background: var(--bg-card-hover);
}

.priority-pill[data-priority="low"].active {
    background: rgba(0, 184, 148, 0.15);
    border-color: var(--priority-low);
    color: var(--priority-low);
}

.priority-pill[data-priority="medium"].active {
    background: rgba(253, 203, 110, 0.15);
    border-color: var(--priority-medium);
    color: var(--priority-medium);
}

.priority-pill[data-priority="high"].active {
    background: rgba(225, 112, 85, 0.15);
    border-color: var(--priority-high);
    color: var(--priority-high);
}

.due-date-input,
.category-select {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all var(--transition);
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.category-select {
    padding-right: 28px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239999aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
}

.category-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 8px;
}

.due-date-input::-webkit-calendar-picker-indicator {
    filter: invert(0.5);
    cursor: pointer;
    opacity: 0.7;
    transition: opacity var(--transition);
}

.due-date-input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

[data-theme="dark"] .due-date-input::-webkit-calendar-picker-indicator {
    filter: invert(0.7);
}

.due-date-input:focus,
.category-select:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.due-date-input:hover,
.category-select:hover {
    border-color: var(--text-muted);
}

/* === Toolbar === */
.toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 180px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i:first-child {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding: 10px 36px 10px 36px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: var(--font-main);
    transition: all var(--transition);
    outline: none;
    backdrop-filter: blur(10px);
}

.search-box input:focus {
    border-color: var(--border-focus);
    background: var(--bg-input-focus);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-clear {
    position: absolute;
    right: 8px;
    width: 24px;
    height: 24px;
    border: none;
    background: var(--bg-input);
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    transition: all var(--transition);
}

.search-clear:hover {
    background: var(--danger);
    color: white;
}

.filter-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 4px;
    backdrop-filter: blur(10px);
}

.filter-tab {
    padding: 6px 14px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 500;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.filter-tab:hover {
    color: var(--text-primary);
    background: var(--bg-input);
}

.filter-tab.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 2px 8px rgba(108, 92, 231, 0.3);
}

.sort-dropdown {
    position: relative;
}

.sort-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 500;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all var(--transition);
    backdrop-filter: blur(10px);
}

.sort-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.sort-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 160px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 6px;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    display: none;
    backdrop-filter: blur(20px);
}

.sort-menu.show {
    display: block;
    animation: dropdown-in 0.2s ease;
}

@keyframes dropdown-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.sort-option {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-family: var(--font-main);
    cursor: pointer;
    text-align: left;
    transition: all var(--transition);
}

.sort-option:hover {
    background: var(--bg-input);
    color: var(--text-primary);
}

.sort-option.active {
    color: var(--accent);
    font-weight: 600;
}

/* === Task List === */
.task-list-container {
    min-height: 100px;
}

.task-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* === Task Item === */
.task-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: all var(--transition);
    backdrop-filter: blur(10px);
    cursor: grab;
    position: relative;
    overflow: hidden;
    animation: task-enter 0.3s ease;
}

@keyframes task-enter {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.task-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 0 2px 2px 0;
    transition: background var(--transition);
}

.task-item[data-priority="low"]::before { background: var(--priority-low); }
.task-item[data-priority="medium"]::before { background: var(--priority-medium); }
.task-item[data-priority="high"]::before { background: var(--priority-high); }

.task-item:hover {
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-card);
    transform: translateY(-2px);
}

.task-item.completed {
    opacity: 0.6;
}

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

.task-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
    box-shadow: var(--shadow-lg);
}

.task-item.drag-over {
    border-color: var(--accent);
    background: rgba(108, 92, 231, 0.05);
}

/* Checkbox */
.task-checkbox {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 1px;
    transition: all var(--transition);
    background: transparent;
    color: transparent;
    font-size: 0.65rem;
}

.task-checkbox:hover {
    border-color: var(--accent);
    background: rgba(108, 92, 231, 0.1);
}

.task-item.completed .task-checkbox {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

/* Task Content */
.task-content {
    flex: 1;
    min-width: 0;
}

.task-text {
    font-size: 0.92rem;
    color: var(--text-primary);
    word-break: break-word;
    line-height: 1.5;
    transition: color var(--transition);
}

.task-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.task-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-priority {
    background: rgba(108, 92, 231, 0.1);
    color: var(--accent);
}

.badge-priority[data-priority="low"] {
    background: rgba(0, 184, 148, 0.1);
    color: var(--priority-low);
}

.badge-priority[data-priority="medium"] {
    background: rgba(253, 203, 110, 0.15);
    color: var(--priority-medium);
}

.badge-priority[data-priority="high"] {
    background: rgba(225, 112, 85, 0.1);
    color: var(--priority-high);
}

.badge-category {
    background: rgba(108, 92, 231, 0.1);
    color: var(--accent);
}

.badge-category[data-category="personal"] {
    background: rgba(108, 92, 231, 0.1);
    color: var(--category-personal);
}

.badge-category[data-category="work"] {
    background: rgba(225, 112, 85, 0.1);
    color: var(--category-work);
}

.badge-category[data-category="study"] {
    background: rgba(116, 185, 255, 0.1);
    color: var(--category-study);
}

.badge-category[data-category="health"] {
    background: rgba(0, 184, 148, 0.1);
    color: var(--category-health);
}

.task-due {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.task-due i {
    font-size: 0.65rem;
}

.task-due.overdue {
    color: var(--danger);
    font-weight: 600;
}

.task-due.due-today {
    color: var(--warning);
    font-weight: 600;
}

.task-date {
    font-size: 0.68rem;
    color: var(--text-muted);
}

/* Task Actions */
.task-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity var(--transition);
    flex-shrink: 0;
}

.task-item:hover .task-actions {
    opacity: 1;
}

.task-action-btn {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all var(--transition);
}

.task-action-btn:hover {
    background: var(--bg-input);
    color: var(--text-primary);
}

.task-action-btn.delete-btn:hover {
    background: rgba(225, 112, 85, 0.12);
    color: var(--danger);
}

/* Edit Mode */
.task-edit-input {
    width: 100%;
    padding: 6px 10px;
    border: 2px solid var(--accent);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.92rem;
    font-family: var(--font-main);
    outline: none;
    transition: all var(--transition);
}

.task-edit-input:focus {
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

/* === Empty State === */
.empty-state,
.no-results {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state h3,
.no-results h3 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 600;
}

.empty-state p,
.no-results p {
    font-size: 0.85rem;
}

/* === Bulk Actions === */
.bulk-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.bulk-btn {
    padding: 8px 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(10px);
}

.bulk-btn:hover {
    transform: translateY(-2px);
}

.clear-completed-btn:hover {
    background: rgba(0, 184, 148, 0.1);
    border-color: var(--success);
    color: var(--success);
}

.clear-all-btn:hover {
    background: rgba(225, 112, 85, 0.1);
    border-color: var(--danger);
    color: var(--danger);
}

/* === Footer === */
.app-footer {
    text-align: center;
    padding: 20px 0 8px;
    border-top: 1px solid var(--border-color);
    margin-top: 8px;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.footer-content a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition);
}

.footer-content a:hover {
    color: var(--accent-light);
}

.footer-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid var(--accent);
    transition: transform var(--transition);
}

.footer-content a:hover .footer-avatar {
    transform: scale(1.15);
}

.footer-shortcuts {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.footer-shortcuts kbd,
kbd {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* === Modal === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
    animation: fade-in 0.2s ease;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 400px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: modal-in 0.3s ease;
}

@keyframes modal-in {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.modal-header h3 i {
    color: var(--accent);
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.modal-close:hover {
    background: var(--bg-input);
    color: var(--text-primary);
}

.modal-body {
    padding: 16px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shortcut-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.shortcut-row:last-child {
    border-bottom: none;
}

/* === Toast === */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: var(--font-main);
    box-shadow: var(--shadow-lg);
    white-space: nowrap;
    animation: toast-in 0.3s ease;
    backdrop-filter: blur(20px);
}

.toast.toast-out {
    animation: toast-out 0.3s ease forwards;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(12px); }
}

/* === Confetti === */
.confetti-piece {
    position: fixed;
    z-index: 3000;
    pointer-events: none;
    border-radius: 2px;
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* === Selection === */
::selection {
    background: rgba(108, 92, 231, 0.3);
    color: var(--text-primary);
}

/* === Responsive === */
@media (max-width: 600px) {
    body {
        padding: 12px;
    }

    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .toolbar {
        flex-direction: column;
    }

    .search-box {
        min-width: 100%;
    }

    .filter-tabs {
        width: 100%;
        overflow-x: auto;
    }

    .task-actions {
        opacity: 1;
    }

    .sort-dropdown {
        width: 100%;
    }

    .sort-btn {
        width: 100%;
        justify-content: center;
    }

    .sort-menu {
        left: 0;
        right: 0;
    }

    .app-header {
        padding: 10px 0;
    }

    .logo {
        font-size: 1.25rem;
    }

    .stat-card {
        padding: 10px;
    }

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

    .bulk-actions {
        flex-direction: column;
    }

    .bulk-btn {
        justify-content: center;
    }
}

@media (max-width: 380px) {
    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .stat-icon {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }

    .priority-pills {
        gap: 2px;
    }

    .priority-pill {
        padding: 3px 8px;
        font-size: 0.65rem;
    }
}
