:root {
  color-scheme: only light;
  --red-900: #6e0b12;
  --red-800: #8c0d16;
  --red-700: #b40f1a;
  --red-600: #cf1d2a;
  --gold-500: #d6a243;
  --gold-300: #f2d791;
  --ink-900: #111217;
  --ink-700: #2b2d34;
  --ink-500: #6f7380;
  --paper: #fffaf2;
  --white: #ffffff;
  --line: rgba(17, 18, 23, 0.1);
  --shadow: 0 24px 80px rgba(28, 10, 12, 0.28);
  --page-bg:
    linear-gradient(115deg, rgba(255, 255, 255, 0.1) 0 12%, transparent 12% 100%),
    linear-gradient(150deg, #170e10 0%, #371013 42%, #8d111b 100%);
  --grid-line-1: rgba(255, 255, 255, 0.055);
  --grid-line-2: rgba(255, 255, 255, 0.045);
  --bank-card-border: rgba(255, 255, 255, 0.68);
  --bank-card-bg:
    linear-gradient(115deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0) 42%),
    radial-gradient(circle at 86% 68%, rgba(180, 15, 26, 0.14) 0 33%, transparent 34%),
    linear-gradient(145deg, #fffaf4 0%, #f0ebe4 46%, #d8d0c8 100%);
  --bank-card-ring: rgba(180, 15, 26, 0.12);
  --bank-card-top-line: linear-gradient(90deg, var(--red-700), var(--gold-500), transparent 72%);
  --surface-border: rgba(255, 255, 255, 0.68);
  --surface-bg: rgba(255, 250, 242, 0.95);
  --surface-shadow: 0 18px 60px rgba(20, 8, 10, 0.16);
  --note-bg:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 250, 242, 0.88)),
    linear-gradient(135deg, rgba(214, 162, 67, 0.24), transparent);
}

@media (prefers-color-scheme: dark) {
  :root {
    --page-bg:
      linear-gradient(115deg, rgba(255, 255, 255, 0.075) 0 12%, transparent 12% 100%),
      radial-gradient(circle at 78% 18%, rgba(180, 15, 26, 0.32), transparent 32%),
      linear-gradient(150deg, #07080c 0%, #16080c 46%, #3c050b 100%);
    --grid-line-1: rgba(255, 255, 255, 0.035);
    --grid-line-2: rgba(255, 255, 255, 0.028);
    --shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
    --bank-card-border: rgba(255, 255, 255, 0.58);
    --bank-card-bg:
      linear-gradient(115deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0) 42%),
      radial-gradient(circle at 86% 68%, rgba(180, 15, 26, 0.12) 0 33%, transparent 34%),
      linear-gradient(145deg, #fffdfa 0%, #ece5dc 48%, #d0c8bf 100%);
    --bank-card-ring: rgba(180, 15, 26, 0.1);
    --surface-border: rgba(255, 255, 255, 0.5);
    --surface-bg: rgba(250, 245, 238, 0.96);
    --surface-shadow: 0 22px 76px rgba(0, 0, 0, 0.36);
    --note-bg:
      linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(250, 244, 237, 0.9)),
      linear-gradient(135deg, rgba(180, 15, 26, 0.1), rgba(214, 162, 67, 0.16));
  }
}

:root[data-theme="dark"] {
  --page-bg:
    linear-gradient(115deg, rgba(255, 255, 255, 0.075) 0 12%, transparent 12% 100%),
    radial-gradient(circle at 78% 18%, rgba(180, 15, 26, 0.32), transparent 32%),
    linear-gradient(150deg, #07080c 0%, #16080c 46%, #3c050b 100%);
  --grid-line-1: rgba(255, 255, 255, 0.035);
  --grid-line-2: rgba(255, 255, 255, 0.028);
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  --bank-card-border: rgba(255, 255, 255, 0.58);
  --bank-card-bg:
    linear-gradient(115deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0) 42%),
    radial-gradient(circle at 86% 68%, rgba(180, 15, 26, 0.12) 0 33%, transparent 34%),
    linear-gradient(145deg, #fffdfa 0%, #ece5dc 48%, #d0c8bf 100%);
  --bank-card-ring: rgba(180, 15, 26, 0.1);
  --surface-border: rgba(255, 255, 255, 0.5);
  --surface-bg: rgba(250, 245, 238, 0.96);
  --surface-shadow: 0 22px 76px rgba(0, 0, 0, 0.36);
  --note-bg:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(250, 244, 237, 0.9)),
    linear-gradient(135deg, rgba(180, 15, 26, 0.1), rgba(214, 162, 67, 0.16));
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink-900);
  background: var(--page-bg);
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(var(--grid-line-1) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line-2) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 78%);
}

button {
  font: inherit;
}

.page {
  position: relative;
  width: min(1180px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 56px 0 40px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: 42px;
  align-items: center;
  min-height: 62vh;
}

.hero__content {
  color: var(--white);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin: 0 0 18px;
  padding: 0 14px;
  border: 1px solid rgba(242, 215, 145, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold-300);
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0;
}

h1 {
  max-width: 640px;
  margin: 0;
  font-size: 54px;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: 0;
}

.subhead {
  max-width: 520px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
  line-height: 1.7;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.action-button--primary {
  border-color: rgba(242, 215, 145, 0.65);
  color: #2c1610;
  background: linear-gradient(135deg, #f3d994 0%, #d6a243 100%);
}

.action-button:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.44);
  background: rgba(255, 255, 255, 0.16);
}

.action-button--primary:hover {
  border-color: rgba(255, 255, 255, 0.72);
  background: linear-gradient(135deg, #ffe7a9 0%, #dfa93e 100%);
}

.button-icon,
.button-icon svg {
  width: 20px;
  height: 20px;
}

.button-icon svg,
.icon-copy svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bank-card {
  position: relative;
  overflow: hidden;
  min-height: 330px;
  padding: 28px;
  border: 1px solid var(--bank-card-border);
  border-radius: 8px;
  color: var(--ink-900);
  background: var(--bank-card-bg);
  box-shadow: var(--shadow);
}

.bank-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
  background: var(--bank-card-top-line);
  content: "";
}

.bank-card::after {
  position: absolute;
  right: -90px;
  bottom: -105px;
  width: 300px;
  height: 300px;
  border: 36px solid var(--bank-card-ring);
  border-radius: 50%;
  content: "";
}

.bank-card__top,
.bank-card__bottom {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.bank-brand {
  display: flex;
  align-items: center;
}

.bank-brand__logo {
  width: min(250px, 58vw);
  height: auto;
  filter: drop-shadow(0 10px 18px rgba(17, 18, 23, 0.14));
}

.meta-label,
.meta-value {
  margin: 0;
}

.secure-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(180, 15, 26, 0.18);
  border-radius: 999px;
  color: var(--red-800);
  background: rgba(180, 15, 26, 0.07);
  font-size: 13px;
  white-space: nowrap;
}

.chip {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 62px;
  height: 44px;
  margin-top: 56px;
  overflow: hidden;
  border: 1px solid rgba(72, 48, 7, 0.18);
  border-radius: 8px;
  background: linear-gradient(135deg, #f8d979, #b87d22);
}

.chip span {
  border-right: 1px solid rgba(102, 67, 8, 0.24);
}

.chip span:last-child {
  border-right: 0;
}

.card-number {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 25px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 0;
}

.bank-card__bottom {
  margin-top: 32px;
}

.meta-label {
  color: var(--ink-500);
  font-size: 12px;
}

.meta-value {
  margin-top: 7px;
  font-size: 18px;
  font-weight: 700;
}

.details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  margin-top: 36px;
  align-items: stretch;
}

.info-panel,
.note {
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  background: var(--surface-bg);
  box-shadow: var(--surface-shadow);
  backdrop-filter: blur(14px);
}

.info-panel {
  padding: 24px;
}

.panel-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.panel-heading__logo {
  width: min(220px, 46%);
  height: auto;
  flex: 0 0 auto;
}

.panel-heading h2,
.panel-heading p {
  margin: 0;
}

.panel-heading h2 {
  font-size: 20px;
}

.panel-heading p {
  margin-top: 4px;
  color: var(--ink-500);
  font-size: 13px;
}

.info-list {
  display: grid;
  gap: 0;
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 86px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.info-row:last-child {
  border-bottom: 0;
}

.info-label,
.info-value {
  margin: 0;
}

.info-label {
  color: var(--ink-500);
  font-size: 13px;
}

.info-value {
  margin-top: 7px;
  color: var(--ink-900);
  font-size: 22px;
  font-weight: 800;
}

.info-value--number {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 24px;
  line-height: 1.35;
}

.icon-copy {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(180, 15, 26, 0.22);
  border-radius: 8px;
  color: var(--red-700);
  background: rgba(180, 15, 26, 0.06);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.icon-copy:hover {
  transform: translateY(-1px);
  border-color: rgba(180, 15, 26, 0.42);
  background: rgba(180, 15, 26, 0.1);
}

.icon-copy svg {
  width: 21px;
  height: 21px;
}

.note {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  padding: 24px;
  background: var(--note-bg);
}

.note__title {
  margin: 0 0 10px;
  color: var(--red-800);
  font-size: 18px;
  font-weight: 800;
}

.note p:last-child {
  margin: 0;
  color: var(--ink-700);
  font-size: 15px;
  line-height: 1.7;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(28px, env(safe-area-inset-bottom));
  z-index: 20;
  min-width: 180px;
  max-width: calc(100% - 40px);
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: var(--white);
  background: rgba(17, 18, 23, 0.88);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  text-align: center;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

:focus-visible {
  outline: 3px solid rgba(242, 215, 145, 0.88);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .page {
    width: min(100% - 32px, 720px);
    padding: 32px 0 28px;
  }

  .hero,
  .details {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    gap: 30px;
  }

  h1 {
    font-size: 42px;
  }

  .subhead {
    font-size: 16px;
  }

  .bank-card {
    min-height: 300px;
  }

  .details {
    margin-top: 24px;
  }
}

@media (max-width: 560px) {
  .page {
    width: min(100% - 24px, 480px);
    padding-top: 24px;
  }

  h1 {
    font-size: 34px;
    line-height: 1.16;
  }

  .quick-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .action-button {
    width: 100%;
  }

  .bank-card {
    min-height: 292px;
    padding: 20px;
  }

  .bank-card__top {
    align-items: center;
  }

  .bank-brand__logo {
    width: min(232px, 68vw);
  }

  .secure-badge {
    display: none;
  }

  .chip {
    width: 56px;
    height: 40px;
    margin-top: 42px;
  }

  .card-number {
    gap: 8px;
    margin-top: 28px;
    font-size: 20px;
  }

  .bank-card__bottom {
    margin-top: 28px;
  }

  .info-panel,
  .note {
    padding: 18px;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .panel-heading__logo {
    width: min(242px, 100%);
  }

  .info-row {
    min-height: 78px;
    gap: 14px;
  }

  .info-value {
    font-size: 20px;
  }

  .info-value--number {
    gap: 6px;
    font-size: 19px;
  }

  .icon-copy {
    width: 42px;
    height: 42px;
  }
}

@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;
  }
}
