:root {
  color-scheme: light;
  --bg: #f3f7f6;
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-section: #e9f1ef;
  --text: #0d1f1b;
  --text-secondary: #526762;
  --text-muted: #778985;
  --border: rgba(13, 76, 64, 0.14);
  --border-light: rgba(13, 76, 64, 0.09);
  --accent: #0c8f78;
  --accent-hover: #087461;
  --accent-soft: rgba(12, 143, 120, 0.11);
  --accent-strong: #0a715f;
  --cyan: #129fc2;
  --danger: #c83d4f;
  --danger-soft: #fff1f3;
  --warning: #a56605;
  --warning-soft: #fff8e9;
  --success: #188f57;
  --success-soft: #edf9f2;
  --shadow-sm: 0 1px 2px rgba(13, 55, 47, 0.05);
  --shadow-md: 0 12px 30px rgba(13, 55, 47, 0.08);
  --shadow-lg: 0 24px 56px rgba(13, 55, 47, 0.13);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --transition: 180ms ease-out;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  --max-width: 1120px;
}

body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07110f;
  --bg-card: rgba(20, 33, 30, 0.94);
  --bg-section: #10201c;
  --text: #f0f7f5;
  --text-secondary: #a9bbb6;
  --text-muted: #82938f;
  --border: rgba(157, 225, 208, 0.16);
  --border-light: rgba(157, 225, 208, 0.1);
  --accent: #32c9a4;
  --accent-hover: #57d9b8;
  --accent-soft: rgba(50, 201, 164, 0.14);
  --accent-strong: #71e1c2;
  --cyan: #45c8e8;
  --danger: #ff8190;
  --danger-soft: rgba(255, 83, 104, 0.12);
  --warning: #f4bd61;
  --warning-soft: rgba(244, 189, 97, 0.1);
  --success: #52d38f;
  --success-soft: rgba(82, 211, 143, 0.11);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.22);
  --shadow-md: 0 14px 34px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.4);
}

html { scroll-behavior: smooth; }
body {
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(18, 159, 194, 0.06), transparent 300px),
    var(--bg);
}
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { font: inherit; }
button:focus-visible, a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-light);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  box-shadow: none;
  -webkit-backdrop-filter: saturate(150%) blur(22px);
  backdrop-filter: saturate(150%) blur(22px);
}
.header-inner { min-height: 72px; padding: 10px 24px; }
.logo { gap: 12px; font-size: 17px; letter-spacing: 0; }
.logo:hover { text-decoration: none; }
.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  overflow: hidden;
  background: transparent;
  box-shadow: var(--shadow-sm);
}
.logo-icon img { width: 100%; height: 100%; display: block; object-fit: cover; }
.logo-copy { display: grid; line-height: 1.15; }
.logo-copy small { margin-top: 4px; color: var(--text-muted); font-size: 11px; font-weight: 500; }
.header-actions { gap: 10px; }
.theme-btn, .refresh-btn {
  min-width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.theme-btn { width: 44px; border-radius: 14px; }
.refresh-btn { padding: 0 16px; border-radius: 14px; color: var(--accent-strong); }
.theme-btn:hover, .refresh-btn:hover {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 38%, var(--border));
  color: var(--accent-strong);
  text-decoration: none;
  transform: none;
  box-shadow: var(--shadow-sm);
}
.ui-icon { width: 19px; height: 19px; flex: 0 0 auto; stroke-width: 2; }
.theme-label { display: none; }

.hero {
  position: relative;
  overflow: hidden;
  padding: 54px 24px 42px;
  text-align: left;
  background: transparent;
}
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 440px;
  height: 240px;
  top: -95px;
  left: calc(50% + 230px);
  background: linear-gradient(135deg, rgba(18, 159, 194, 0.16), rgba(62, 210, 128, 0.12));
  filter: blur(52px);
  border-radius: 50%;
}
.hero .container { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 42px; align-items: center; }
.hero-copy { max-width: 670px; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
}
.hero h1 { margin: 0 0 12px; font-size: 40px; line-height: 1.16; letter-spacing: 0; }
.hero .subtitle { margin: 0; max-width: 620px; color: var(--text-secondary); font-size: 17px; line-height: 1.7; }
.hero-meta { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.hero-tag {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: var(--bg-card) !important;
  color: var(--text-secondary) !important;
  box-shadow: var(--shadow-sm);
}
.hero-visual {
  width: 210px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
}
.hero-visual-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.hero-visual-head img { width: 44px; height: 44px; border-radius: 12px; }
.hero-visual-head strong { font-size: 15px; }
.hero-visual-head small { display: block; margin-top: 3px; color: var(--text-muted); font-size: 12px; }
.hero-visual-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-radius: 14px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 13px;
  font-weight: 650;
}
.hero-visual-status span:first-child { display: flex; align-items: center; gap: 7px; }
.hero-visual-status i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 14%, transparent); }

.container { padding: 0 24px; }
.safety-section { margin-top: 0 !important; }
.warning-banner {
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 36px;
  padding: 22px 24px;
  border-color: color-mix(in srgb, var(--warning) 26%, var(--border));
  border-radius: 20px;
  background: var(--warning-soft);
  box-shadow: none;
}
.warning-banner .icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin: 0;
  border-radius: 13px;
  background: color-mix(in srgb, var(--warning) 14%, transparent);
  color: var(--warning);
}
.warning-banner .title { font-size: 17px; }
.warning-banner .text { color: var(--text-secondary); }
.warning-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 20px; margin-top: 14px; }
.warning-item { align-items: flex-start; color: var(--text-secondary); }
.warning-item .bullet { background: color-mix(in srgb, var(--warning) 14%, transparent); color: var(--warning); }

.account-toolbar { margin-top: 0 !important; }
.section-title { margin-bottom: 18px; font-size: 24px; gap: 12px; }
.section-kicker { display: flex; align-items: center; gap: 10px; min-width: 0; }
.section-title .badge { margin-left: auto; padding: 5px 10px; background: var(--accent-soft); color: var(--accent-strong); }
.page-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(100%, 470px);
  padding: 4px;
  margin-bottom: 18px;
  border-radius: 16px;
  background: var(--bg-section);
}
.page-switch-btn {
  min-height: 44px;
  padding: 8px 16px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text-secondary);
}
.page-switch-btn:hover { border: 0; background: var(--accent-soft); color: var(--accent-strong); }
.page-switch-btn.active { background: var(--bg-card); color: var(--text); box-shadow: var(--shadow-sm); }
.filter-bar { gap: 8px; margin-bottom: 14px; scrollbar-width: none; }
.filter-bar::-webkit-scrollbar { display: none; }
.filter-btn {
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 13px;
  border-color: var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent-strong); }
.filter-btn.active { border-color: var(--accent); background: var(--accent); color: #fff; }
.loading-line, .status-bar { min-height: 48px; border-radius: 14px; background: var(--bg-section); color: var(--text-secondary); }
.status-bar { margin: 0 0 16px; padding: 12px 16px; }
.accounts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.account-card {
  min-width: 0;
  overflow: hidden;
  border-color: var(--border);
  border-radius: 20px;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.account-card:hover { transform: none; border-color: color-mix(in srgb, var(--accent) 36%, var(--border)); box-shadow: var(--shadow-md); }
.account-card-top { padding: 20px 20px 16px; }
.account-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-soft);
  font-size: 25px;
}
.account-meta .type { font-size: 17px; }
.account-meta .region { margin-top: 2px; font-size: 13px; }
.region-badge { max-width: 105px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-card-body { margin: 0 20px; border-radius: 15px; background: var(--bg-section); }
.account-row { min-height: 54px; padding: 12px 14px; }
.account-row .label { width: 50px; color: var(--text-muted); }
.account-row .value-wrap { min-width: 0; }
.account-row .value { min-width: 0; overflow-wrap: anywhere; }
.inline-copy-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--accent-strong);
}
.inline-copy-btn:hover { background: var(--accent-soft); }
.account-card-footer { padding: 16px 20px 20px; }
.copy-btn {
  min-width: 140px;
  min-height: 44px;
  border-radius: 14px;
  background: var(--accent);
  color: white;
  box-shadow: none;
}
.copy-btn:hover { background: var(--accent-hover); transform: none; box-shadow: none; }
.copy-btn:disabled { opacity: 1; background: var(--success-soft); color: var(--success); cursor: default; }
.status-dot.available { background: var(--success); }
.status-dot.available::after { border-color: var(--success); }

.faq-section, .guide-section { margin-top: 56px; }
.faq-list, .guide-steps { border: 1px solid var(--border); border-radius: 20px; background: var(--bg-card); box-shadow: var(--shadow-sm); }
.faq-item { border-bottom-color: var(--border-light); }
.faq-question { min-height: 58px; padding: 16px 20px; color: var(--text); font-size: 16px; }
.faq-question:hover { background: var(--accent-soft); }
.faq-arrow { color: var(--text-muted); }
.faq-answer-inner { padding: 0 20px 20px; color: var(--text-secondary); }
.guide-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; }
.guide-step { min-width: 0; padding: 22px 18px; border-right: 1px solid var(--border-light); }
.guide-step:last-child { border-right: 0; }
.step-number { background: var(--accent-soft); color: var(--accent-strong); }
.step-content p { color: var(--text-secondary); }
.tutorial-img-btn {
  min-height: 48px;
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--bg-card);
  color: var(--accent-strong);
}
.tutorial-img-btn:hover { border-color: var(--accent); background: var(--accent-soft); }

.site-footer { margin-top: 64px; padding: 32px 0 max(32px, env(safe-area-inset-bottom)); border-top: 1px solid var(--border-light); background: transparent; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { width: 40px; height: 40px; border-radius: 11px; }
.footer-copy p:first-child { color: var(--text); font-weight: 700; }
.footer-copy p:last-child { color: var(--text-muted); font-size: 13px; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; justify-content: flex-end; font-size: 13px; }
.footer-links a { color: var(--text-secondary); }
.footer-links a:hover { color: var(--accent-strong); text-decoration: none; }

.toast { min-width: 160px; min-height: 48px; padding: 12px 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--text); color: var(--bg); box-shadow: var(--shadow-lg); }
.spinner { border-color: var(--border); border-top-color: var(--accent); }
.swal2-popup { border: 1px solid var(--border) !important; background: var(--bg-card) !important; color: var(--text) !important; box-shadow: var(--shadow-lg) !important; }
.swal2-html-container { color: var(--text-secondary) !important; }
.swal2-confirm { min-height: 44px; background: var(--accent) !important; }
.swal2-cancel { min-height: 44px; }

@media (max-width: 820px) {
  .hero { padding-top: 40px; }
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .hero h1 { font-size: 34px; }
  .accounts-grid { grid-template-columns: 1fr; }
  .guide-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-step:nth-child(2) { border-right: 0; }
  .guide-step:nth-child(-n+2) { border-bottom: 1px solid var(--border-light); }
}

@media (max-width: 560px) {
  .header-inner, .container { padding-left: 16px; padding-right: 16px; }
  .site-header .logo-copy small, .refresh-btn .button-label { display: none; }
  .refresh-btn { width: 44px; min-width: 44px; padding: 0; justify-content: center; }
  .hero { padding: 34px 16px 30px; }
  .hero h1 { font-size: 30px; }
  .hero .subtitle { font-size: 16px; }
  .hero-meta { gap: 8px; }
  .hero-tag { font-size: 12px; }
  .warning-banner { padding: 18px; }
  .warning-banner .icon { width: 40px; height: 40px; }
  .warning-list { grid-template-columns: 1fr; }
  .section-title { font-size: 21px; }
  .section-kicker { min-width: 0; }
  .page-switcher { width: 100%; }
  .account-card-top { padding: 17px 16px 14px; }
  .account-card-body { margin: 0 16px; }
  .account-card-footer { padding: 14px 16px 17px; }
  .copy-btn { min-width: 128px; padding-left: 13px; padding-right: 13px; font-size: 13px; }
  .guide-steps { grid-template-columns: 1fr; }
  .guide-step { border-right: 0; border-bottom: 1px solid var(--border-light); }
  .guide-step:last-child { border-bottom: 0; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
  .footer-links { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
