* { box-sizing: border-box; }

:root {
  --accent-1: #6366f1;
  --accent-2: #8b5cf6;
  --accent-3: #06b6d4;
  --accent-4: #f59e0b;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --glass: rgba(15, 23, 42, 0.55);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glow: rgba(99, 102, 241, 0.45);
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -20px) scale(1.05); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

body {
  margin: 0;
  font-family: "Segoe UI", "Microsoft JhengHei", "PingFang TC", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  min-height: 100vh;
  background: #030712;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(
    135deg,
    #0f172a 0%,
    #1e1b4b 25%,
    #312e81 50%,
    #0e7490 75%,
    #0f172a 100%
  );
  background-size: 400% 400%;
  animation: gradientShift 18s ease infinite;
}

body::after {
  content: "";
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow), transparent 70%);
  top: -120px;
  right: -80px;
  z-index: -1;
  animation: floatOrb 12s ease-in-out infinite;
  pointer-events: none;
}

.orb-2 {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.25), transparent 70%);
  bottom: -100px;
  left: -60px;
  z-index: -1;
  animation: floatOrb 16s ease-in-out infinite reverse;
  pointer-events: none;
}

a { color: #a5b4fc; text-decoration: none; transition: color 0.2s; }
a:hover { color: #c4b5fd; }
.gold, .accent { color: #fbbf24; }
.muted { color: var(--muted); font-size: 15px; }

.brand-logo-en,
.brand-logo-zh {
  font-weight: 700;
  text-align: center;
  line-height: 1.25;
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 7s linear infinite;
}

.brand-logo-en {
  font-size: 1.28rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  background-image: linear-gradient(
    90deg,
    #c4b5fd 0%,
    #e2e8f0 25%,
    #67e8f9 55%,
    #a5b4fc 80%,
    #c4b5fd 100%
  );
}

.brand-logo-zh {
  font-size: 1.08rem;
  margin-top: 10px;
  letter-spacing: 0.2em;
  background-image: linear-gradient(
    90deg,
    #fcd34d 0%,
    #fde68a 18%,
    #fbbf24 38%,
    #fb923c 55%,
    #fef3c7 72%,
    #f59e0b 88%,
    #fcd34d 100%
  );
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #a5b4fc, #67e8f9, #fbbf24);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 6s linear infinite;
}

.brand-sub { font-size: 13px; color: var(--muted); letter-spacing: 0.15em; text-transform: uppercase; }

.btn {
  display: inline-block;
  padding: 13px 22px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2), var(--accent-3));
  background-size: 200% auto;
  box-shadow: 0 4px 20px var(--glow);
  transition: transform 0.2s, box-shadow 0.2s, background-position 0.4s;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px var(--glow);
  background-position: right center;
}
.btn.secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  box-shadow: none;
  color: var(--text);
}
.btn.secondary:hover { background: rgba(255, 255, 255, 0.1); }
.btn.telegram {
  background: linear-gradient(135deg, #229ed9, #0088cc);
  box-shadow: 0 4px 20px rgba(34, 158, 217, 0.4);
}
.btn.block { width: 100%; }

label {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-size: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
textarea { min-height: 120px; resize: vertical; }

.card {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.auth-page .auth-wrap {
  max-width: 420px;
  margin: 6vh auto;
  padding: 32px;
}
.auth-page .auth-wrap.register-wrap {
  max-width: 520px;
}

.terms-box {
  max-height: 200px;
  overflow-y: auto;
  padding: 14px 16px;
  margin-bottom: 14px;
  border-radius: 10px;
  border: 1px solid rgba(251, 191, 36, 0.25);
  background: rgba(0, 0, 0, 0.4);
  font-size: 13px;
  line-height: 1.75;
  color: #cbd5e1;
}
.terms-box h4 {
  margin: 0 0 8px;
  font-size: 14px;
  color: #fbbf24;
  font-weight: 600;
}
.terms-box h4:not(:first-child) { margin-top: 14px; }
.terms-box p { margin: 0 0 8px; }
.terms-box ul {
  margin: 0 0 8px;
  padding-left: 1.2em;
}
.terms-box li { margin-bottom: 4px; }
.terms-final {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(251, 191, 36, 0.35);
  color: #fde68a;
  font-weight: 600;
}

.terms-agree {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}
.terms-agree input {
  width: auto;
  margin: 3px 0 0;
  flex-shrink: 0;
  accent-color: #fbbf24;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.auth-page .auth-wrap h1 { margin: 12px 0 8px; font-size: 1.75rem; }
.auth-page .brand-logo-en { font-size: 1.65rem; }
.auth-page .brand-logo-zh { font-size: 1.35rem; margin-top: 12px; }

.lang-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--glass-border);
  flex-shrink: 0;
}
.lang-switch button {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  margin: 0;
}
.lang-switch button.active {
  background: rgba(99, 102, 241, 0.35);
  color: #e2e8f0;
}
.auth-page .lang-switch-wrap {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 296px;
  background: rgba(3, 7, 18, 0.6);
  backdrop-filter: blur(12px);
  border-right: 1px solid var(--glass-border);
  padding: 24px 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}
.sidebar .brand {
  padding: 24px 8px 28px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 12px;
  text-align: center;
}
.sidebar .brand-logo-en {
  font-size: clamp(1rem, 3.2vw, 1.22rem);
  letter-spacing: 0.03em;
}
.sidebar .brand-logo-zh {
  font-size: clamp(0.92rem, 2.8vw, 1.05rem);
  letter-spacing: 0.16em;
}
.sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  color: var(--muted);
  text-decoration: none;
  font-size: 16px;
  border-left: 3px solid transparent;
  transition: all 0.2s;
}
.sidebar a:hover, .sidebar a.active {
  color: var(--text);
  background: rgba(99, 102, 241, 0.12);
  border-left-color: var(--accent-2);
}
.sidebar .nav-icon { opacity: 0.7; font-size: 18px; }
.sidebar .logout { margin-top: auto; border-top: 1px solid var(--glass-border); padding-top: 12px; }

.main { flex: 1; padding: 20px 28px 28px; overflow: auto; }

.page-header {
  background: linear-gradient(
    120deg,
    rgba(99, 102, 241, 0.28) 0%,
    rgba(6, 182, 212, 0.22) 35%,
    rgba(139, 92, 246, 0.26) 70%,
    rgba(99, 102, 241, 0.28) 100%
  );
  background-size: 300% 300%;
  animation: gradientShift 14s ease infinite;
  border: 1px solid rgba(129, 140, 248, 0.35);
  border-radius: 16px;
  padding: 22px 26px;
  margin-bottom: 22px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.12);
  position: relative;
  overflow: hidden;
}
.page-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
  animation: shimmer 8s linear infinite;
  pointer-events: none;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  position: relative;
  z-index: 1;
}
.topbar h2 {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 700;
  background: linear-gradient(90deg, #e2e8f0, #a5b4fc, #67e8f9);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 8s linear infinite;
}
.user-pill {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  font-size: 15px;
}

.balance-box {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(6, 182, 212, 0.15));
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.balance-box::before {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.15), transparent);
  pointer-events: none;
}
.balance-box .amt {
  font-size: 2.85rem;
  font-weight: 800;
  background: linear-gradient(90deg, #fbbf24, #f59e0b, #fde68a);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}
.plan-card {
  text-align: center;
  transition: transform 0.25s, border-color 0.25s;
  position: relative;
}
.plan-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.5);
}
.plan-card h4 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  background: linear-gradient(90deg, #c4b5fd, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.plan-card .price {
  font-size: 1.85rem;
  font-weight: 800;
  margin: 10px 0;
  color: #fbbf24;
}

table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--glass-border);
  text-align: left;
}
th { color: var(--muted); font-weight: 500; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }
tr:hover td { background: rgba(255, 255, 255, 0.02); }

.mono {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 14px;
  word-break: break-all;
}

.modal-bg {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.88);
  backdrop-filter: blur(8px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-bg.show { display: flex; }
.modal {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 28px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}
.modal h3 { margin-top: 0; font-size: 1.4rem; }

.qr-wrap { text-align: center; margin: 16px 0; }
.qr-wrap img { border-radius: 12px; border: 2px solid var(--glass-border); }

.addr-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px dashed rgba(251, 191, 36, 0.5);
  padding: 14px;
  border-radius: 12px;
  text-align: center;
  margin: 14px 0;
  color: #fbbf24;
}

.warn { color: #f87171; font-size: 14px; margin-top: 8px; }
.ok-msg { color: #34d399; font-size: 15px; margin-top: 8px; }

.badge {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.badge.pending { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.badge.ok { background: rgba(52, 211, 153, 0.2); color: #34d399; }
.badge.bad { background: rgba(248, 113, 113, 0.2); color: #f87171; }

.feedback-hero {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: stretch;
  margin-bottom: 24px;
}
.feedback-tg {
  flex: 1;
  min-width: 260px;
  text-align: center;
  padding: 32px 24px;
}
.feedback-tg .tg-icon { font-size: 48px; margin-bottom: 12px; }
.feedback-form { flex: 2; min-width: 300px; }

.section-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent-1), var(--accent-3));
}

.card h3 { font-size: 1.25rem; margin-top: 0; }

.team-stat {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.team-stat .stat-box {
  flex: 1;
  min-width: 140px;
  padding: 20px;
  text-align: center;
  background: rgba(99, 102, 241, 0.12);
  border-radius: 14px;
  border: 1px solid var(--glass-border);
}
.team-stat .stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: #a5b4fc;
}

/* ── Landing page ── */
.landing-page { min-height: 100vh; }
.landing-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 24px;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
}
.landing-nav {
  display: flex;
  gap: 8px 16px;
  flex-wrap: wrap;
  flex: 1;
  justify-content: center;
}
.landing-nav a {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.landing-nav a:hover { color: #c4b5fd; }
.landing-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 16px 32px; font-size: 17px; }

.landing-hero {
  text-align: center;
  padding: 48px 24px 56px;
  max-width: 900px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #67e8f9;
  border: 1px solid rgba(103, 232, 249, 0.35);
  background: rgba(6, 182, 212, 0.08);
  margin-bottom: 20px;
}
.hero-title {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 16px;
  background: linear-gradient(90deg, #e2e8f0, #a5b4fc, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.75;
  max-width: 720px;
  margin: 0 auto 24px;
}
.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 28px;
}
.metric-pill {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
}
.hero-cta { margin-top: 8px; }

.landing-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.product-card {
  padding: 28px;
  border-radius: 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
}
.product-card.highlight {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.12);
}
.product-tag {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #67e8f9;
  margin-bottom: 10px;
}
.product-card h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
}
.product-sub {
  margin: 0 0 12px;
  font-size: 15px;
}
.product-desc {
  color: #cbd5e1;
  line-height: 1.75;
  margin: 0 0 20px;
  font-size: 15px;
}
.product-metrics {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.metric-box {
  flex: 1;
  min-width: 90px;
  padding: 14px;
  text-align: center;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--glass-border);
}
.metric-val {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  color: #a5b4fc;
  letter-spacing: 0.06em;
}
.metric-lbl {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: 0.1em;
}
.plans-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.plan-preview {
  padding: 14px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  text-align: center;
}
.plan-preview .price {
  display: block;
  color: #fbbf24;
  font-weight: 700;
  margin: 6px 0;
}
.install-guide h3 {
  margin: 0 0 16px;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}
.install-steps {
  margin: 0;
  padding-left: 1.2em;
  line-height: 2;
  color: #cbd5e1;
}
.landing-footer {
  text-align: center;
  padding: 32px 24px 48px;
  border-top: 1px solid var(--glass-border);
  color: var(--muted);
  font-size: 13px;
}
.landing-footer p { margin: 0 0 8px; }

/* ── Download guide ── */
.dl-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 8px;
}
.dl-download-box {
  text-align: center;
  padding: 8px 4px 12px;
}
.dl-download-btn {
  display: inline-block;
  margin-top: 16px;
  min-width: 240px;
}
.dl-params-box .dl-param-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--glass-border);
  font-size: 14px;
  flex-wrap: wrap;
}
.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.guide-step h4 {
  margin: 0 0 6px;
  color: #a5b4fc;
  font-size: 1.05rem;
}
.guide-step p { margin: 0 0 12px; }
.guide-step picture,
.guide-step img {
  display: block;
  width: 100%;
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.25);
}

@media (max-width: 768px) {
  .dl-top { grid-template-columns: 1fr; }
  .landing-header { flex-direction: column; align-items: stretch; }
  .landing-nav { justify-content: flex-start; }
  .landing-header-actions { justify-content: space-between; }
  .layout { flex-direction: column; }
  .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--glass-border); }
  .sidebar .logout { margin-top: 0; }
  .main { padding: 20px 16px; }
}
