:root{--bg: #f4f5fb;--bg2: #ffffff;--ink: #1a1b2e;--muted: #8b8fa3;--rule: #e8eaf3;--accent: #5b6ef5;--accent2: #a855f7;--accent-soft: rgba(91, 110, 245, .08);--accent2-soft: rgba(168, 85, 247, .08);--success: #22c55e;--warning: #f59e0b;--danger: #ef4444;--font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;--max: 680px;--radius: 16px;--radius-sm: 10px;--shadow: 0 4px 24px rgba(26, 27, 46, .06);--shadow-hover: 0 8px 32px rgba(26, 27, 46, .1)}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html{font-size:16px;scroll-behavior:smooth}body{font-family:var(--font);color:var(--ink);background:var(--bg);line-height:1.6;min-height:100vh;padding:2rem 1rem 4rem;position:relative;overflow-x:hidden}body:before{content:"";position:fixed;top:0;right:0;bottom:0;left:0;background:radial-gradient(ellipse at 20% 0%,rgba(91,110,245,.07),transparent 50%),radial-gradient(ellipse at 80% 100%,rgba(168,85,247,.06),transparent 50%),radial-gradient(ellipse at 50% 50%,rgba(91,110,245,.03),transparent 60%);pointer-events:none;z-index:0}.page{max-width:var(--max);margin:0 auto;position:relative;z-index:1}.app-header{text-align:center;margin-bottom:1.75rem}.app-logo{display:inline-flex;align-items:center;gap:.6rem;margin-bottom:.3rem}.logo-icon{width:38px;height:38px;border-radius:12px;background:linear-gradient(135deg,var(--accent),var(--accent2));display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px #5b6ef54d}.logo-icon svg{width:20px;height:20px}.app-title{font-size:1.65rem;font-weight:700;letter-spacing:-.02em;background:linear-gradient(135deg,var(--accent),var(--accent2));-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.app-date{font-size:.85rem;color:var(--muted);font-weight:400}.todo-card{background:#ffffffbf;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.8);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden;transition:box-shadow .3s ease}.progress-section{padding:1.25rem 1.5rem .5rem;border-bottom:1px solid var(--rule)}.progress-info{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:.5rem}.progress-label{font-size:.8rem;color:var(--muted);font-weight:400}.progress-count{font-size:.85rem;font-weight:700;color:var(--accent)}.progress-bar{height:6px;background:var(--rule);border-radius:100px;overflow:hidden;margin-bottom:1rem}.progress-fill{height:100%;background:linear-gradient(90deg,var(--accent),var(--accent2));border-radius:100px;width:0%;transition:width .5s cubic-bezier(.4,0,.2,1)}.input-area{padding:1rem 1.5rem;display:flex;gap:.6rem;align-items:center}.input-wrapper{flex:1;display:flex;align-items:center;background:var(--bg);border:2px solid transparent;border-radius:var(--radius-sm);padding:0 .85rem;transition:border-color .2s ease,background .2s ease}.input-wrapper:focus-within{border-color:var(--accent);background:var(--bg2)}.input-wrapper svg{width:18px;height:18px;color:var(--muted);flex-shrink:0}.input-wrapper input[type=text]{flex:1;border:none;outline:none;background:transparent;font-family:var(--font);font-size:.92rem;color:var(--ink);padding:.65rem .5rem}.input-wrapper input[type=text]::placeholder{color:var(--muted)}.priority-select{border:none;outline:none;background:transparent;font-family:var(--font);font-size:.8rem;color:var(--muted);cursor:pointer;border-left:1px solid var(--rule);padding:.3rem 0 .3rem .6rem}.add-btn{background:linear-gradient(135deg,var(--accent),var(--accent2));border:none;border-radius:var(--radius-sm);color:#fff;width:42px;height:42px;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;box-shadow:0 4px 12px #5b6ef540;transition:transform .15s ease,box-shadow .2s ease}.add-btn:hover{transform:scale(1.05);box-shadow:0 6px 16px #5b6ef559}.add-btn:active{transform:scale(.97)}.add-btn svg{width:20px;height:20px}.filters{display:flex;gap:.35rem;padding:0 1.5rem;margin-top:.25rem}.filter-btn{border:none;background:transparent;font-family:var(--font);font-size:.82rem;font-weight:400;color:var(--muted);padding:.45rem .9rem;border-radius:100px;cursor:pointer;transition:all .2s ease;display:inline-flex;align-items:center;gap:.35rem;flex-shrink:0;white-space:nowrap}.filter-btn:hover{color:var(--ink);background:var(--accent-soft)}.filter-btn.active{background:var(--accent);color:#fff;font-weight:700}.filter-badge{font-size:.7rem;font-weight:700;background:var(--rule);color:var(--muted);padding:1px 7px;border-radius:100px;min-width:20px;text-align:center}.filter-btn.active .filter-badge{background:#ffffff40;color:#fff}.todo-list{list-style:none;padding:.5rem 1.5rem 0;max-height:480px;overflow-y:auto}.todo-list::-webkit-scrollbar{width:6px}.todo-list::-webkit-scrollbar-track{background:transparent}.todo-list::-webkit-scrollbar-thumb{background:var(--rule);border-radius:100px}.todo-item{display:flex;align-items:center;gap:.75rem;padding:.75rem .85rem;border-radius:var(--radius-sm);margin-bottom:.4rem;background:transparent;transition:background .2s ease;position:relative;animation:slideIn .35s cubic-bezier(.4,0,.2,1)}@keyframes slideIn{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.todo-item:hover{background:var(--accent-soft)}.todo-item.completed{opacity:.55}.todo-checkbox{width:22px;height:22px;border:2px solid var(--rule);border-radius:7px;cursor:pointer;flex-shrink:0;display:flex;align-items:center;justify-content:center;transition:all .2s ease;position:relative}.todo-checkbox:hover{border-color:var(--accent)}.todo-item.completed .todo-checkbox{background:linear-gradient(135deg,var(--accent),var(--accent2));border-color:transparent}.todo-checkbox svg{width:14px;height:14px;color:#fff;opacity:0;transform:scale(.5);transition:all .2s ease}.todo-item.completed .todo-checkbox svg{opacity:1;transform:scale(1)}.priority-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}.priority-dot.high{background:var(--danger);box-shadow:0 0 6px #ef444466}.priority-dot.medium{background:var(--warning)}.priority-dot.low{background:var(--success)}.todo-content{flex:1;display:flex;flex-direction:column;gap:.15rem;min-width:0}.todo-title{font-size:.9rem;font-weight:400;color:var(--ink);line-height:1.4;word-break:break-word;transition:all .2s ease}.todo-item.completed .todo-title{text-decoration:line-through;color:var(--muted)}.todo-meta{display:flex;align-items:center;gap:.6rem;font-size:.72rem;color:var(--muted)}.todo-date{display:inline-flex;align-items:center;gap:.25rem}.todo-date svg{width:12px;height:12px}.todo-delete{border:none;background:transparent;cursor:pointer;color:var(--muted);padding:.35rem;border-radius:8px;display:flex;align-items:center;justify-content:center;opacity:0;transition:all .2s ease;flex-shrink:0}.todo-item:hover .todo-delete{opacity:.6}.todo-delete:hover{opacity:1!important;color:var(--danger);background:#ef444414}.todo-delete svg{width:16px;height:16px}.todo-item.removing{animation:slideOut .3s ease forwards}@keyframes slideOut{to{opacity:0;transform:translate(20px);height:0;padding:0;margin:0}}.empty-state{text-align:center;padding:3rem 1.5rem 2.5rem;color:var(--muted)}.empty-icon{width:64px;height:64px;margin:0 auto 1rem;border-radius:50%;background:var(--accent-soft);display:flex;align-items:center;justify-content:center}.empty-icon svg{width:30px;height:30px;color:var(--accent)}.empty-title{font-size:1rem;font-weight:700;color:var(--ink);margin-bottom:.3rem}.empty-desc{font-size:.82rem}.todo-footer{display:flex;justify-content:space-between;align-items:center;padding:.85rem 1.5rem;border-top:1px solid var(--rule);font-size:.8rem;color:var(--muted)}.todo-footer span{font-weight:400}.todo-footer .count strong{color:var(--accent);font-weight:700}.clear-btn{border:none;background:transparent;font-family:var(--font);font-size:.8rem;color:var(--muted);cursor:pointer;transition:color .2s ease;padding:.25rem .5rem;border-radius:6px}.clear-btn:hover{color:var(--danger);background:#ef44440f}.clear-btn:disabled{opacity:.4;cursor:not-allowed}.logout-btn{position:absolute;top:0;right:0;border:none;background:var(--accent-soft);color:var(--accent);font-family:var(--font);font-size:.8rem;font-weight:600;cursor:pointer;padding:.4rem .9rem;border-radius:100px;transition:all .2s ease}.logout-btn:hover{background:var(--accent);color:#fff}.auth-card{background:#ffffffbf;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.8);border-radius:var(--radius);box-shadow:var(--shadow);padding:2.5rem 2rem;max-width:400px;margin:0 auto}.auth-title{font-size:1.5rem;font-weight:700;text-align:center;margin-bottom:.3rem;color:var(--ink)}.auth-subtitle{font-size:.85rem;color:var(--muted);text-align:center;margin-bottom:1.75rem}.auth-form{display:flex;flex-direction:column;gap:.75rem}.auth-input{border:2px solid var(--rule);border-radius:var(--radius-sm);padding:.7rem .95rem;font-family:var(--font);font-size:.9rem;color:var(--ink);background:var(--bg);outline:none;transition:border-color .2s ease,background .2s ease}.auth-input:focus{border-color:var(--accent);background:var(--bg2)}.auth-input::placeholder{color:var(--muted)}.auth-error{font-size:.82rem;color:var(--danger);background:#ef444414;padding:.5rem .85rem;border-radius:var(--radius-sm);text-align:center}.auth-submit{background:linear-gradient(135deg,var(--accent),var(--accent2));border:none;border-radius:var(--radius-sm);color:#fff;font-family:var(--font);font-size:.95rem;font-weight:600;padding:.75rem;cursor:pointer;box-shadow:0 4px 12px #5b6ef540;transition:transform .15s ease,box-shadow .2s ease;margin-top:.25rem}.auth-submit:hover{transform:scale(1.02);box-shadow:0 6px 16px #5b6ef559}.auth-submit:active{transform:scale(.98)}.auth-submit:disabled{opacity:.6;cursor:not-allowed;transform:none}.auth-toggle{display:block;text-align:center;margin-top:1.25rem;font-size:.85rem;color:var(--accent);cursor:pointer;transition:color .2s ease}.auth-toggle:hover{color:var(--accent2)}.spinner{display:inline-block;width:26px;height:26px;border:3px solid var(--rule);border-top-color:var(--accent);border-radius:50%;animation:spin .7s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.btn-spinner{display:inline-block;width:18px;height:18px;border:2.5px solid rgba(255,255,255,.35);border-top-color:#fff;border-radius:50%;animation:spin .6s linear infinite}.add-btn.is-loading{cursor:wait;transform:none;box-shadow:0 4px 12px #5b6ef540}.add-btn:disabled{opacity:.85}.list-loading{display:flex;flex-direction:column;align-items:center;gap:.75rem;padding:3rem 1.5rem 2.5rem;color:var(--muted);font-size:.85rem}.history-entry{margin-left:auto}.history-entry svg{width:14px;height:14px}.sync-error{margin:.6rem 1.5rem 0;font-size:.8rem;color:var(--warning);background:#f59e0b1a;padding:.5rem .85rem;border-radius:var(--radius-sm);text-align:center;animation:slideIn .3s ease}.todo-item.pending .todo-checkbox{animation:pulseSoft 1s ease-in-out infinite}@keyframes pulseSoft{0%,to{box-shadow:0 0 #5b6ef500}50%{box-shadow:0 0 0 4px #5b6ef526}}.history-badge.sm{font-size:.66rem;padding:.14rem .5rem}.todo-item.completed .history-badge{opacity:.8}.history-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#1a1b2e66;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;padding:1.25rem;z-index:100;animation:fadeIn .2s ease}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.history-modal{background:#ffffffeb;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border:1px solid rgba(255,255,255,.8);border-radius:var(--radius);box-shadow:var(--shadow-hover);width:100%;max-width:520px;max-height:min(80vh,640px);display:flex;flex-direction:column;overflow:hidden;animation:modalIn .25s cubic-bezier(.4,0,.2,1)}@keyframes modalIn{0%{opacity:0;transform:translateY(16px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}.history-header{display:flex;align-items:center;justify-content:space-between;padding:1.1rem 1.35rem .85rem;border-bottom:1px solid var(--rule)}.history-heading{display:flex;align-items:center;gap:.6rem}.logo-icon.small{width:30px;height:30px;border-radius:9px;box-shadow:none}.logo-icon.small svg{width:16px;height:16px}.history-title{font-size:1.05rem;font-weight:700;color:var(--ink)}.history-close{border:none;background:transparent;color:var(--muted);cursor:pointer;padding:.4rem;border-radius:8px;display:flex;align-items:center;justify-content:center;transition:all .2s ease}.history-close:hover{color:var(--ink);background:var(--accent-soft)}.history-close svg{width:18px;height:18px}.history-toolbar{padding:.85rem 1.35rem;display:flex;flex-direction:column;gap:.6rem;border-bottom:1px solid var(--rule)}.history-search{padding:0 .75rem}.history-search input[type=text]{padding:.5rem .4rem;font-size:.85rem}.history-status-group{display:flex;gap:.35rem;flex-wrap:wrap}.history-chip{border:none;background:var(--bg);font-family:var(--font);font-size:.78rem;color:var(--muted);cursor:pointer;padding:.32rem .8rem;border-radius:100px;transition:all .2s ease}.history-chip:hover{color:var(--ink);background:var(--accent-soft)}.history-chip.active{background:var(--accent);color:#fff;font-weight:600}.history-dates{display:flex;gap:.35rem;flex-wrap:wrap}.history-date-select{-moz-appearance:none;appearance:none;-webkit-appearance:none;border:none;background:var(--bg);font-family:var(--font);font-size:.78rem;color:var(--muted);cursor:pointer;padding:.32rem 1.6rem .32rem .85rem;border-radius:100px;outline:none;transition:all .2s ease;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%238b8fa3' stroke-width='2.5' 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 .65rem center}.history-date-select:hover:not(:disabled){color:var(--ink);background-color:var(--accent-soft)}.history-date-select:disabled{opacity:.45;cursor:not-allowed}.history-date-select.set{background-color:var(--accent);color:#fff;font-weight:600;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")}.history-body{flex:1;overflow-y:auto;min-height:180px}.history-body::-webkit-scrollbar{width:6px}.history-body::-webkit-scrollbar-thumb{background:var(--rule);border-radius:100px}.history-loading{display:flex;flex-direction:column;align-items:center;gap:.7rem;padding:2.5rem 1rem;color:var(--muted);font-size:.85rem}.history-list{list-style:none;padding:.5rem 1.35rem}.history-item{display:flex;align-items:center;gap:.7rem;padding:.7rem .6rem;border-radius:var(--radius-sm);margin-bottom:.3rem;transition:background .2s ease}.history-item:hover{background:var(--accent-soft)}.history-item.completed .todo-title{text-decoration:line-through;color:var(--muted)}.history-item-content{flex:1;display:flex;flex-direction:column;gap:.1rem;min-width:0}.history-item .todo-title{font-size:.88rem}.history-item .todo-meta{font-size:.72rem}.history-badge{flex-shrink:0;font-size:.72rem;font-weight:600;padding:.22rem .65rem;border-radius:100px}.history-badge.todo{background:var(--accent-soft);color:var(--accent)}.history-badge.doing{background:#f59e0b1f;color:var(--warning)}.history-badge.done{background:#22c55e1f;color:var(--success)}.history-empty{text-align:center;padding:2.5rem 1.5rem;color:var(--muted);font-size:.88rem}.history-empty-sub{font-size:.78rem;margin-top:.3rem}.history-footer{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.8rem 1.35rem;border-top:1px solid var(--rule)}.history-page-btn{border:none;background:var(--bg);font-family:var(--font);font-size:.8rem;font-weight:600;color:var(--accent);cursor:pointer;padding:.45rem .95rem;border-radius:var(--radius-sm);transition:all .2s ease}.history-page-btn:hover:not(:disabled){background:var(--accent);color:#fff}.history-page-btn:disabled{opacity:.4;cursor:not-allowed}.history-page-info{font-size:.78rem;color:var(--muted);text-align:center}@media(max-width:540px){body{padding:1.25rem .75rem 3rem}.input-area{padding:.85rem 1rem;flex-wrap:wrap}.input-wrapper{width:100%}.priority-select{font-size:.75rem}.add-btn{width:100%;height:40px}.filters{padding:0 1rem;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none}.filters::-webkit-scrollbar{display:none}.history-entry{margin-left:0}.sync-error{margin:.6rem 1rem 0}.todo-list{padding:.5rem 1rem}.todo-footer{padding:.85rem 1rem}.app-title{font-size:1.4rem}.auth-card{padding:2rem 1.25rem}.history-overlay{padding:.75rem;align-items:flex-end}.history-modal{max-height:88vh;border-radius:var(--radius) var(--radius) 12px 12px}.history-header,.history-toolbar,.history-footer{padding-left:1rem;padding-right:1rem}.history-list{padding:.5rem 1rem}.history-chip{padding:.28rem .7rem}}
