:root {
  --bg: #f6f8ff;
  --bg-2: #eef2ff;
  --panel: rgba(255, 255, 255, 0.76);
  --panel-strong: rgba(255, 255, 255, 0.92);
  --text: rgba(15, 23, 42, 0.94);
  --muted: rgba(51, 65, 85, 0.78);
  --muted-2: rgba(71, 85, 105, 0.66);
  --border: rgba(15, 23, 42, 0.12);
  --hairline: rgba(15, 23, 42, 0.14);
  --brand: #2563eb;
  --brand-2: #14b8a6;
  --danger: #ef4444;
  --shadow: 0 26px 70px rgba(2, 6, 23, 0.14);
  --shadow-soft: 0 12px 36px rgba(2, 6, 23, 0.12);
  --r-12: 12px;
  --r-16: 16px;
  --r-20: 20px;
  --ring: 0 0 0 5px rgba(37, 99, 235, 0.18);
}

html {
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="dark"] {
  --bg: #070a12;
  --bg-2: #0b1220;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.12);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.66);
  --muted-2: rgba(255, 255, 255, 0.52);
  --border: rgba(255, 255, 255, 0.14);
  --hairline: rgba(255, 255, 255, 0.22);
  --brand: #2f7cff;
  --brand-2: #16f3d6;
  --danger: #ff5e7a;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 10px 34px rgba(0, 0, 0, 0.35);
  --ring: 0 0 0 5px rgba(47, 124, 255, 0.22);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body,
body.text-gray-800 {
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  background:
    radial-gradient(900px 500px at 14% 6%, rgba(37, 99, 235, 0.22), transparent 60%),
    radial-gradient(760px 520px at 92% 26%, rgba(20, 184, 166, 0.16), transparent 62%),
    radial-gradient(900px 520px at 60% 120%, rgba(239, 68, 68, 0.10), transparent 64%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(16px, 2.2vw, 28px);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-20);
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: var(--text);
  user-select: none;
}

.logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 10px 26px rgba(47, 124, 255, 0.30));
}

.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.nav-right {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.10);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  background: var(--panel-strong);
  border-color: rgba(37, 99, 235, 0.26);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.14);
}

.theme-toggle:active {
  transform: translateY(0);
}

.theme-toggle:focus-visible {
  outline: none;
  box-shadow: var(--ring), 0 16px 40px rgba(2, 6, 23, 0.14);
}

.theme-toggle [data-theme-icon] {
  font-size: 14px;
  line-height: 1;
}

.theme-toggle [data-theme-label] {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.2px;
  font-weight: 700;
}

.hero {
  text-align: center;
  padding: clamp(28px, 6vw, 66px) 0 clamp(18px, 3vw, 30px);
}

.title {
  margin: 0;
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 900;
  letter-spacing: -0.6px;
  line-height: 1.06;
}

.title::after {
  content: "";
  display: block;
  width: min(760px, 92%);
  height: 1px;
  margin: 18px auto 0;
  background: linear-gradient(90deg, transparent, var(--hairline), transparent);
}

.subtitle {
  margin: 14px auto 0;
  max-width: 780px;
  font-size: clamp(14px, 1.6vw, 16px);
  line-height: 1.7;
  color: var(--muted);
}

.search-box {
  margin: 22px auto 0;
  max-width: 860px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

.search-box input {
  width: min(620px, 100%);
  height: 52px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(2, 6, 23, 0.08);
}

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

.search-box input:focus-visible {
  box-shadow: var(--ring), inset 0 0 0 1px rgba(2, 6, 23, 0.08);
  border-color: rgba(37, 99, 235, 0.48);
}

.search-box button {
  height: 52px;
  padding: 0 18px;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.96);
  font-weight: 900;
  letter-spacing: 0.2px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.22), 0 14px 30px rgba(20, 184, 166, 0.10);
  cursor: pointer;
  transform: translateY(0);
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.search-box button:hover {
  filter: saturate(1.06) brightness(1.02);
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(47, 124, 255, 0.26), 0 16px 32px rgba(22, 243, 214, 0.12);
}

.search-box button:active {
  transform: translateY(0);
}

.tips {
  margin: 14px auto 0;
  max-width: 860px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted-2);
  font-size: 13px;
}

/* 每个小提示项的样式 */
.tip-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* 统一的 ✓ 图标样式 */
.tip-item::before {
  content: "✓";
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.96);
  background: linear-gradient(135deg, rgba(47, 124, 255, 0.85), rgba(22, 243, 214, 0.75));
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.18);
  font-size: 14px;
  flex-shrink: 0;
}

.examples {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.examples span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.examples span:hover {
  transform: translateY(-1px);
  background: var(--panel-strong);
  border-color: rgba(37, 99, 235, 0.28);
}

.loading {
  margin-top: 18px;
  padding: 14px 16px;
  text-align: center;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--r-16);
  background: var(--panel);
  backdrop-filter: blur(12px);
}

.features {
  margin-top: clamp(20px, 3vw, 34px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature {
  position: relative;
  padding: 18px 18px 16px;
  border-radius: var(--r-20);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
  transform: translateY(0);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.feature::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(380px 180px at 20% 10%, rgba(47, 124, 255, 0.16), transparent 55%),
              radial-gradient(380px 180px at 85% 35%, rgba(22, 243, 214, 0.12), transparent 58%);
  opacity: 0.9;
}

.feature:hover {
  transform: translateY(-4px);
  border-color: rgba(47, 124, 255, 0.30);
  box-shadow: var(--shadow);
}

.feature h3 {
  position: relative;
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.2px;
}

.feature p {
  position: relative;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.footer {
  margin-top: clamp(28px, 5vw, 56px);
  padding: 580px 0 10px;
  text-align: center;
  color: var(--muted-2);
  font-size: 12px;
}

.tg-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.18);
  backdrop-filter: blur(14px);
  z-index: 999;
  transform: translateY(0);
  transition: transform 180ms ease, background 180ms ease;
}

.tg-float img {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 12px 30px rgba(22, 243, 214, 0.14));
}

.tg-float:hover {
  transform: translateY(-2px);
  background: var(--panel-strong);
}

.tg-tip {
  position: absolute;
  right: 74px;
  bottom: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.96);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.92), rgba(20, 184, 166, 0.84));
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.18);
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.tg-float:hover .tg-tip {
  opacity: 1;
  transform: translateX(0);
}

@media (max-width: 860px) {
  .navbar {
    padding: 10px 12px;
  }

  .nav-right {
    display: none;
  }

  .search-box {
    flex-direction: column;
    align-items: stretch;
  }

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

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

  .features {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .feature,
  .search-box button,
  .examples span,
  .tg-float,
  .tg-tip,
  .feedback-float,
  .feedback-modal button {
    transition: none;
  }
}

/* 反馈按钮 */
.feedback-float {
  position: fixed;
  right: 18px;
  bottom: 90px; /* 避免与 Telegram 按钮重叠 */
  width: 64px;
  height: 64px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.18);
  backdrop-filter: blur(14px);
  z-index: 999;
  transform: translateY(0);
  transition: transform 180ms ease, background 180ms ease;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}

.feedback-float:hover {
  transform: translateY(-2px);
  background: var(--panel-strong);
}

/* 模态框叠加层 */
.feedback-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

/* 模态框内容 */
.feedback-modal {
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  border: 1px solid var(--border);
  border-radius: var(--r-20);
  box-shadow: var(--shadow);
  padding: 24px;
  width: min(500px, 90vw);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feedback-modal h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

.feedback-modal .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feedback-modal label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.feedback-modal input[type="text"],
.feedback-modal textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  outline: none;
  font-size: 14px;
}

.feedback-modal input[type="text"]:focus-visible,
.feedback-modal textarea:focus-visible {
  box-shadow: var(--ring);
  border-color: rgba(37, 99, 235, 0.48);
}

.feedback-modal textarea {
  min-height: 100px;
  resize: vertical;
}

.feedback-modal .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.feedback-modal button {
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 160ms ease;
}

.feedback-modal button:not(.btn-gray) {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.15);
}

.feedback-modal button:not(.btn-gray):hover {
  filter: saturate(1.06) brightness(1.02);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.20);
}

.feedback-modal button.btn-gray {
  background: var(--panel);
  color: var(--muted);
  border: 1px solid var(--border);
}

.feedback-modal button.btn-gray:hover {
  background: var(--panel-strong);
  border-color: rgba(37, 99, 235, 0.2);
}

.feedback-modal .feedback-message {
  margin: 0;
  font-size: 13px;
  color: var(--danger);
  text-align: center;
}
