:root {
  --bg: #0d1117;
  --panel: rgba(22, 27, 34, 0.86);
  --line: #262d38;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #3370ff;
  --accent-2: #00d6b9;
  --danger: #f85149;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(51, 112, 255, 0.28), transparent 60%),
    radial-gradient(700px 420px at 100% 0%, rgba(0, 214, 185, 0.16), transparent 55%),
    var(--bg);
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.brand {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand em {
  font-style: normal;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(51, 112, 255, 0.7);
}

#userBox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #1f2633;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.center { text-align: center; }

#loginView { padding: 40px 24px; }
#loginView h1 { margin: 0 0 8px; font-size: 22px; }
#loginView .muted { margin: 0 0 24px; }
#loginView .tip {
  margin: 22px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.btn {
  display: inline-block;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(1px); }

.btn.primary {
  background: linear-gradient(135deg, var(--accent), #1f5eff);
  box-shadow: 0 6px 18px rgba(51, 112, 255, 0.35);
}

.ghost {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}

.ghost:hover { color: var(--text); border-color: #38404d; }
.ghost.small { font-size: 12px; padding: 5px 10px; }

#feishuBtn { margin-bottom: 16px; }

#devForm {
  display: flex;
  gap: 10px;
  max-width: 420px;
  margin: 0 auto;
}

#devForm input {
  flex: 1;
  min-width: 0;
  background: #0f141b;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}

#devForm input:focus,
.addbar input:focus { border-color: var(--accent); }

.addbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
}

.addbar input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid rgba(38, 45, 56, 0.7);
}

.list li:last-child { border-bottom: none; }

.list input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  flex: none;
  border: 1.5px solid #3d4655;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
}

.list input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--accent-2), #12b48f);
  border-color: transparent;
}

.list input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1.5px;
  width: 5px;
  height: 9px;
  border: solid #04140f;
  border-width: 0 2px 2px 0;
  transform: rotate(42deg);
}

.list .text {
  flex: 1;
  font-size: 15px;
  line-height: 1.45;
  word-break: break-word;
  cursor: pointer;
}

.list .done .text {
  color: #5b6472;
  text-decoration: line-through;
}

.list .del {
  flex: none;
  background: transparent;
  border: none;
  color: #4b5563;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}

.list .del:hover { color: var(--danger); background: rgba(248, 81, 73, 0.1); }

.meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(38, 45, 56, 0.7);
  font-size: 12.5px;
  color: var(--muted);
  min-height: 28px;
}

.muted { color: var(--muted); }

.hidden { display: none !important; }

.fade-in { animation: fade 0.25s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
