/* 高成群英會 V2 — prestige financial dashboard visual system */
:root {
  --ui-bg: #07090c;
  --ui-bg-deep: #030405;
  --ui-surface: rgba(20, 18, 13, .88);
  --ui-surface-strong: #17140d;
  --ui-surface-hover: #211b0e;
  --ui-gold: #f6c945;
  --ui-gold-bright: #ffe397;
  --ui-gold-deep: #9f7112;
  --ui-line: rgba(246, 201, 69, .28);
  --ui-line-strong: rgba(246, 201, 69, .58);
  --ui-text: #f8f4e8;
  --ui-muted: #bda869;
  --ui-muted-2: #827452;
  --ui-focus: #fff0a5;
  --ui-radius-lg: 22px;
  --ui-radius-md: 14px;
  --ui-radius-sm: 10px;
  --ui-shadow: 0 18px 60px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html { background: var(--ui-bg-deep); scroll-behavior: smooth; }
body {
  min-width: 0;
  background:
    radial-gradient(ellipse 72% 42% at 50% -10%, rgba(191, 133, 20, .22), transparent 66%),
    radial-gradient(circle at 5% 30%, rgba(120, 78, 8, .13), transparent 30%),
    linear-gradient(180deg, #10100d 0, var(--ui-bg) 27%, var(--ui-bg-deep) 100%);
  color: var(--ui-text);
  font-family: "Microsoft JhengHei", "Noto Sans TC", Inter, system-ui, sans-serif;
  letter-spacing: .01em;
}
body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .25;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, #000, transparent 72%);
}
header, main { max-width: 1360px; padding-left: 24px; padding-right: 24px; }
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--ui-line-strong);
  border-radius: var(--ui-radius-lg);
  background:
    linear-gradient(100deg, rgba(31, 23, 8, .96), rgba(14, 14, 12, .84) 62%, rgba(86, 54, 6, .52)),
    #11100c;
  box-shadow: var(--ui-shadow), inset 0 1px 0 rgba(255, 237, 177, .11);
  padding: 32px 38px;
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .22;
  background: repeating-linear-gradient(116deg, transparent 0 42px, rgba(255, 230, 146, .12) 43px 44px, transparent 45px 82px);
}
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 390px;
  height: 390px;
  right: -110px;
  top: -245px;
  border: 1px solid rgba(255, 213, 93, .28);
  border-radius: 50%;
  box-shadow: 0 0 0 42px rgba(255, 201, 69, .025), 0 0 90px 18px rgba(246, 184, 35, .18);
}
.brand { gap: 21px; }
.brand img { width: 68px; filter: drop-shadow(0 8px 18px rgba(246,201,69,.52)); }
.eyebrow { color: var(--ui-gold-bright); font-size: 11px; font-weight: 700; letter-spacing: .22em; }
h1 {
  max-width: 930px;
  margin: 7px 0 0;
  color: transparent;
  background: linear-gradient(108deg, #fff7c8 0%, var(--ui-gold) 46%, #d49b20 100%);
  background-clip: text;
  -webkit-background-clip: text;
  font-size: clamp(31px, 5.1vw, 56px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.period { display: none; }

.tabs {
  justify-content: center;
  gap: 6px;
  margin: 26px 0 18px;
  padding: 7px;
  border: 1px solid rgba(246, 201, 69, .17);
  border-radius: 16px;
  background: rgba(15, 14, 10, .78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045), 0 10px 32px rgba(0,0,0,.16);
  scrollbar-color: var(--ui-gold-deep) transparent;
}
.tabs button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 15px;
  color: #d8c995;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .01em;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}
.tabs button:hover { color: var(--ui-gold-bright); background: rgba(246,201,69,.09); border-color: rgba(246,201,69,.24); }
.tabs button.active {
  border-color: rgba(255, 226, 140, .78);
  color: #171108;
  background: linear-gradient(135deg, #ffe995, #e5ad28 58%, #b87b0c);
  box-shadow: 0 5px 16px rgba(230, 174, 33, .25), inset 0 1px 0 rgba(255,255,255,.58);
}
.tabs button:focus-visible, .search-box input:focus-visible { outline: 2px solid var(--ui-focus); outline-offset: 3px; }

.panel { animation: panel-in .24s ease both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 26px 0 16px;
  color: var(--ui-text);
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 800;
  letter-spacing: -.035em;
}
.section-title::before {
  content: "";
  width: 5px;
  height: 1em;
  border-radius: 99px;
  background: linear-gradient(var(--ui-gold-bright), var(--ui-gold-deep));
  box-shadow: 0 0 14px rgba(246,201,69,.55);
}
.section-note { display: none; }
.search-box {
  position: relative;
  display: block;
  margin: 0 0 17px;
  padding: 0;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-md);
  background: linear-gradient(100deg, rgba(31, 26, 14, .92), rgba(16, 15, 12, .88));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}
.search-box::before { content: "⌕"; position: absolute; left: 16px; top: 50%; transform: translateY(-53%); color: var(--ui-gold); font-size: 24px; line-height: 1; pointer-events: none; }
.search-box label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.search-box input {
  width: 100%;
  height: 52px;
  padding: 0 18px 0 48px;
  border: 0;
  border-radius: var(--ui-radius-md);
  color: var(--ui-text);
  background: transparent;
  font-size: 15px;
}
.search-box input::placeholder { color: #897950; }
.search-box:focus-within { border-color: var(--ui-line-strong); box-shadow: 0 0 0 3px rgba(246,201,69,.09); }

.podium { gap: 12px; margin: 0 0 18px; }
.pod {
  position: relative;
  overflow: hidden;
  min-height: 108px;
  padding: 18px 16px;
  border: 1px solid rgba(255, 213, 99, .24);
  border-radius: var(--ui-radius-md);
  background: linear-gradient(145deg, rgba(36, 30, 16, .94), rgba(16, 15, 12, .96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.pod::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.055), transparent 62%); transform: translateX(-120%); transition: transform .55s ease; }
.pod:hover::after { transform: translateX(120%); }
.pod:first-child { border-color: rgba(255, 218, 108, .9); background: radial-gradient(circle at 50% -65%, rgba(247,202,70,.38), transparent 66%), linear-gradient(145deg, #362713, #15130d); box-shadow: 0 10px 28px rgba(212, 157, 22, .17), inset 0 1px 0 rgba(255,244,192,.3); }
.pod:nth-child(2) { border-color: rgba(214, 218, 225, .62); }
.pod:nth-child(3) { border-color: rgba(203, 128, 45, .7); }
.rank { color: var(--ui-gold-bright); font-weight: 800; font-size: 20px; }
.pod b { display: inline-block; margin-top: 4px; font-size: 16px; }
.pod br + * { color: var(--ui-muted); }

.wrap {
  position: relative;
  overflow-x: auto;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-md);
  background: rgba(11, 12, 13, .88);
  box-shadow: var(--ui-shadow), inset 0 1px 0 rgba(255,255,255,.025);
  scrollbar-color: var(--ui-gold-deep) #13110b;
  scrollbar-width: thin;
}
.wrap::-webkit-scrollbar { height: 9px; }
.wrap::-webkit-scrollbar-track { background: #13110b; }
.wrap::-webkit-scrollbar-thumb { background: linear-gradient(90deg, #8e6515, #e5b33f); border: 2px solid #13110b; border-radius: 99px; }
table { min-width: 740px; font-variant-numeric: tabular-nums; }
th, td { padding: 13px 14px; border-bottom: 1px solid rgba(246,201,69,.12); }
th { color: var(--ui-gold-bright); background: linear-gradient(180deg, #241d0c, #1a160c); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
td { color: #f3efe5; font-size: 15px; }
td.left { font-weight: 700; }
tr:nth-child(even) { background: rgba(255,255,255,.018); }
tbody tr { transition: background .16s ease, box-shadow .16s ease; }
tbody tr:hover { background: linear-gradient(90deg, rgba(246,201,69,.12), rgba(246,201,69,.025)); box-shadow: inset 3px 0 0 var(--ui-gold); }
tbody tr:last-child td { border-bottom: 0; }
.notice { border: 1px solid var(--ui-line); border-radius: var(--ui-radius-md); background: linear-gradient(135deg, rgba(38,31,13,.9), rgba(17,16,12,.92)); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.ida-overview { display: grid; grid-template-columns: minmax(165px, .9fr) minmax(180px, 1fr) 2.4fr; gap: 12px; align-items: stretch; margin-bottom: 17px; padding: 12px; }
.ida-metric { display: grid; align-content: center; min-height: 112px; padding: 16px; border: 1px solid rgba(246,201,69,.2); border-radius: var(--ui-radius-sm); background: rgba(0,0,0,.15); }
.ida-metric span, .ida-metric em { color: var(--ui-muted); font-size: 13px; font-style: normal; }
.ida-metric b { margin-top: 3px; color: var(--ui-gold-bright); font-size: 35px; line-height: 1; }
.ida-metric small { margin-top: 4px; color: var(--ui-gold); font-size: 13px; }
.ida-metric em { margin-top: 7px; line-height: 1.4; }
.notice h2 { color: var(--ui-gold-bright); }
.tiers { gap: 10px; }
.tier { border: 1px solid rgba(246,201,69,.18); border-radius: var(--ui-radius-sm); background: rgba(0,0,0,.16); color: var(--ui-muted); }
.tier b { color: var(--ui-gold-bright); }
.empty { padding: 38px 20px; border: 1px dashed var(--ui-line); border-radius: var(--ui-radius-md); color: var(--ui-muted); text-align: center; }

@media (max-width: 700px) {
  header, main { width: 100%; max-width: 100%; padding-left: 11px; padding-right: 11px; }
  .hero { border-radius: 18px; padding: 20px 17px; }
  .hero::after { width: 260px; height: 260px; right: -120px; top: -145px; }
  .brand { align-items: center; gap: 13px; }
  .brand img { width: 54px; flex: 0 0 auto; }
  .eyebrow { font-size: 9px; letter-spacing: .17em; }
  h1 { margin-top: 5px; font-size: clamp(28px, 8.4vw, 37px); line-height: 1.14; letter-spacing: -.055em; }
  .tabs { justify-content: flex-start; margin: 17px -1px 12px; padding: 5px; border-radius: 13px; }
  .tabs button { min-height: 39px; padding: 8px 13px; font-size: 14px; }
  .section-title { margin: 20px 2px 12px; font-size: 25px; }
  .search-box { margin-bottom: 14px; }
  .search-box input { height: 50px; font-size: 15px; }
  .podium { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-bottom: 15px; }
  .pod { min-height: 100px; padding: 12px 5px; }
  .rank { font-size: 18px; }
  .pod b { font-size: 14px; }
  .pod { font-size: 13px; }
  .wrap { border-radius: 12px; }
  table { min-width: 680px; }
  th, td { padding: 12px 12px; }
  th { font-size: 12px; }
  td { font-size: 15px; }
  .notice { padding: 16px; }
  .ida-overview { grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px; }
  .ida-overview .tiers { grid-column: 1 / -1; }
  .ida-metric { min-height: 96px; padding: 13px; }
  .ida-metric b { font-size: 29px; }
  .notice h2 { font-size: 18px; }
  .tiers { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
