:root {
  --bg: #0b0f17;
  --bg2: #111827;
  --card: #161e2e;
  --line: #243044;
  --text: #e6ebf3;
  --muted: #93a0b5;
  --brand: #22d3a6;
  --brand2: #3b82f6;
  --up: #22c55e;
  --down: #ef4444;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 800px; }
section { padding: 80px 0; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 12px; }
.sub { color: var(--muted); margin: 0 0 40px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.alt { background: var(--bg2); }
.grad { background: linear-gradient(90deg, var(--brand), var(--brand2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.btn { display: inline-block; padding: 12px 24px; border-radius: 999px; font-weight: 700; border: 1px solid transparent; cursor: pointer; font-size: 1rem; transition: transform .15s, opacity .15s; font-family: inherit; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(90deg, var(--brand), var(--brand2)); color: #04110d; }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-sm { padding: 6px 14px; font-size: .85rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.tag { display: inline-block; font-size: .75rem; padding: 3px 10px; border-radius: 999px; background: rgba(34,211,166,.12); color: var(--brand); font-weight: 700; }
.up { color: var(--up); } .down { color: var(--down); }
.note { color: var(--muted); font-size: .85rem; margin-top: 20px; }

/* Nav */
header { position: sticky; top: 0; z-index: 50; background: rgba(11,15,23,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-weight: 900; font-size: 1.3rem; display: flex; align-items: center; gap: 8px; }
.logo-mark { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, var(--brand), var(--brand2)); display: grid; place-items: center; color: #04110d; font-size: .9rem; }
.menu { display: flex; gap: 28px; color: var(--muted); font-weight: 500; }
.menu a:hover, .menu a.on { color: var(--text); }
.nav-right { display: flex; gap: 12px; align-items: center; }
.nav-right select { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.burger { display: none; background: none; border: 0; color: var(--text); font-size: 1.5rem; cursor: pointer; }
@media (max-width: 860px) {
  .menu { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--bg2); padding: 20px; border-bottom: 1px solid var(--line); }
  .menu.open { display: flex; }
  .burger { display: block; }
  .nav-right .btn, .nav-right select { display: none; }
}

/* Hero */
.hero { padding: 100px 0 80px; background: radial-gradient(ellipse at top, rgba(59,130,246,.18), transparent 60%), radial-gradient(ellipse at 20% 80%, rgba(34,211,166,.12), transparent 50%); }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.2; margin: 16px 0; }
.hero p { color: var(--muted); font-size: 1.15rem; max-width: 640px; margin: 0 auto 32px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-points { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; margin-top: 40px; color: var(--muted); }
.hero-points span::before { content: "✓ "; color: var(--brand); font-weight: 900; }
.page-hero { padding: 70px 0 40px; background: radial-gradient(ellipse at top, rgba(59,130,246,.15), transparent 60%); }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 12px 0; }
.page-hero p { color: var(--muted); max-width: 680px; margin: 0 auto; }

/* Stats */
.stat { text-align: center; }
.stat .num { font-size: 2.6rem; font-weight: 900; }
.stat .label { color: var(--muted); }

.pain .icon { font-size: 2rem; }
.pain h3 { margin: 12px 0 6px; }
.pain p { color: var(--muted); margin: 0; }

/* Tables */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tab { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-weight: 700; font-family: inherit; }
.tab.active { background: var(--brand); color: #04110d; border-color: var(--brand); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); }
th { background: var(--bg2); color: var(--muted); font-size: .85rem; font-weight: 600; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255,255,255,.02); }
.pick { font-weight: 700; color: var(--brand); }
.locked td { filter: blur(4px); user-select: none; }
.portfolio { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-top: 20px; }
.portfolio .card { padding: 18px; }
.portfolio .v { font-size: 1.6rem; font-weight: 900; }
.portfolio .k { color: var(--muted); font-size: .85rem; }

/* Feature rows */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: 40px 0; border-bottom: 1px solid var(--line); }
.feature:last-child { border-bottom: 0; }
.feature:nth-child(even) .f-text { order: 2; }
.feature h3 { font-size: 1.5rem; margin: 10px 0; }
.feature p { color: var(--muted); }
.f-visual { aspect-ratio: 16/10; border-radius: var(--radius); background: linear-gradient(135deg, #1a2438, #0f1624); border: 1px solid var(--line); display: grid; place-items: center; font-size: 4rem; }
@media (max-width: 760px) { .feature { grid-template-columns: 1fr; } .feature:nth-child(even) .f-text { order: 0; } }

.leagues { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.league { padding: 10px 18px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); font-weight: 700; }

.advanced { background: linear-gradient(135deg, rgba(59,130,246,.12), rgba(34,211,166,.08)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lock { color: var(--muted); font-size: .85rem; }

.notif { display: flex; gap: 12px; align-items: flex-start; }
.notif .dot { width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; background: var(--bg2); font-size: 1.2rem; }
.notif b { display: block; }
.notif small { color: var(--muted); }

.cmp td:first-child { color: var(--muted); }
.cmp .us { background: rgba(34,211,166,.06); font-weight: 700; }

/* Pricing */
.billing { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 40px; }
.billing button { border: 0; background: transparent; color: var(--muted); padding: 8px 20px; border-radius: 999px; cursor: pointer; font-weight: 700; font-family: inherit; }
.billing button.active { background: var(--brand); color: #04110d; }
.plan { display: flex; flex-direction: column; position: relative; }
.plan.popular { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), 0 20px 50px rgba(34,211,166,.12); }
.plan .badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #04110d; font-size: .75rem; font-weight: 800; padding: 4px 12px; border-radius: 999px; }
.plan .price { font-size: 2.4rem; font-weight: 900; margin: 10px 0 0; }
.plan .price small { font-size: 1rem; color: var(--muted); font-weight: 500; }
.plan ul { list-style: none; padding: 0; margin: 20px 0; flex: 1; }
.plan li { padding: 6px 0; color: var(--muted); }
.plan li::before { content: "✓ "; color: var(--brand); font-weight: 900; }

.step .n { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #04110d; display: grid; place-items: center; font-weight: 900; font-size: 1.2rem; margin-bottom: 12px; }
.step p { color: var(--muted); margin: 0; }

/* FAQ */
details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin-bottom: 12px; }
summary { padding: 18px 22px; cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--brand); font-size: 1.3rem; }
details[open] summary::after { content: "−"; }
details p { padding: 0 22px 18px; margin: 0; color: var(--muted); }

/* Forms */
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: .9rem; color: var(--muted); margin-bottom: 6px; }
input, select, textarea { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); font-size: 1rem; font-family: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.form-ok { color: var(--brand); margin-top: 12px; }
.auth { max-width: 420px; margin: 60px auto; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: 20px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.news form { display: flex; gap: 10px; max-width: 480px; margin: 0 auto; flex-wrap: wrap; }
.news input { flex: 1; min-width: 200px; border-radius: 999px; padding: 12px 18px; }

/* Articles */
.post { display: flex; flex-direction: column; gap: 8px; transition: border-color .15s; }
.post:hover { border-color: var(--brand); }
.post .thumb { aspect-ratio: 16/9; border-radius: 10px; background: linear-gradient(135deg, #1a2438, #0f1624); display: grid; place-items: center; font-size: 3rem; margin-bottom: 8px; }
.post h3 { margin: 0; font-size: 1.1rem; }
.post p { margin: 0; color: var(--muted); font-size: .9rem; }
.prose h2 { font-size: 1.4rem; margin-top: 36px; }
.prose p, .prose li { color: var(--muted); }

/* App (member area) */
.app { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 65px); }
.side { border-right: 1px solid var(--line); padding: 24px 16px; background: var(--bg2); }
.side a { display: block; padding: 10px 14px; border-radius: 10px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.side a:hover, .side a.on { background: var(--card); color: var(--text); }
.main { padding: 32px; overflow-x: hidden; }
.main h1 { margin: 0 0 20px; font-size: 1.6rem; }
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .side { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px; }
  .side a { white-space: nowrap; margin: 0 4px 0 0; }
  .main { padding: 20px; }
}
.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding-top: 10px; }
.bar-chart div { flex: 1; border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.bar-chart div span { position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%); font-size: .7rem; color: var(--muted); white-space: nowrap; }
.status { font-size: .8rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.status.win { background: rgba(34,197,94,.15); color: var(--up); }
.status.lose { background: rgba(239,68,68,.15); color: var(--down); }
.status.pending { background: rgba(147,160,181,.15); color: var(--muted); }

footer { border-top: 1px solid var(--line); padding: 50px 0 30px; color: var(--muted); font-size: .9rem; }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; margin-bottom: 30px; }
.foot-cols b { color: var(--text); display: block; margin-bottom: 10px; }
.foot-cols a { display: block; padding: 3px 0; }
.foot-cols a:hover { color: var(--text); }
.foot-bottom { border-top: 1px solid var(--line); padding-top: 20px; font-size: .8rem; }
