/* ══════════════════════════════════════════
   球侠 Design System · base.css
   朱红 · 鎏金 · 米白 中国风江湖气质
══════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600;700;900&family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream:   #F7F0E4;
  --cream2:  #EFE4D0;
  --cream3:  #FBF6EE;
  --paper:   #FFFDF8;
  --red:     #8C1D18;
  --red2:    #631310;
  --red3:    #5C0D0A;
  --gold:    #B8892D;
  --gold2:   #F6D89B;
  --gold3:   #C4A050;
  --ink:     #2A211C;
  --ink2:    #4D4037;
  --ink3:    #8B7869;
  --ink4:    #D6C2A3;
  --border:  #E0D3BF;
  --border2: #D0BFAA;
  --serif:   'Noto Serif SC', 'STSong', serif;
  --sans:    'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --shadow-sm: 0 2px 8px rgba(92,13,10,.08);
  --shadow-md: 0 4px 20px rgba(92,13,10,.10);
  --shadow-lg: 0 8px 32px rgba(92,13,10,.13);
  --r-sm: 8px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px;
  --nav-h: 60px;
  --shell-max: 1360px;
  --content-max: 1320px;
  --content-max-narrow: 1040px;
  --shell-pad: 28px;
}

html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--sans); background: var(--cream); color: var(--ink); min-height: 100vh; -webkit-font-smoothing: antialiased; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--ink4); border-radius: 4px; }

a { text-decoration: none; color: inherit; }
.serif { font-family: var(--serif); }
.text-red { color: var(--red); }
.text-gold { color: var(--gold); }
.text-muted { color: var(--ink3); }

/* ── NAVBAR ── */
.navbar {
  position: sticky; top: 0; z-index: 200;
  height: var(--nav-h);
  background: linear-gradient(135deg, var(--red2) 0%, var(--red3) 100%);
  display: flex; align-items: center;
  width: min(var(--shell-max), calc(100vw - 32px));
  margin: 0 auto;
  padding: 0 var(--shell-pad); gap: 0;
  box-shadow: 0 2px 16px rgba(92,13,10,.25);
}
.navbar::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(246,216,155,.35), transparent);
}
.nav-logo {
  font-family: var(--serif); font-size: 20px; font-weight: 900;
  color: var(--gold2); display: flex; align-items: center; gap: 9px;
  margin-right: 36px; letter-spacing: .04em; flex-shrink: 0;
}
.logo-badge {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--gold2); display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--red2); font-weight: 900;
}
.nav-links { display: flex; gap: 2px; flex: 1; }
.nav-link {
  padding: 7px 15px; font-size: 14px; color: rgba(246,216,155,.65);
  border-radius: 18px; cursor: pointer; transition: all .2s; white-space: nowrap;
}
.nav-link:hover, .nav-link.active { color: var(--gold2); background: rgba(255,255,255,.1); }
.nav-search-wrap { position: relative; margin-right: 10px; }
.nav-search {
  background: rgba(241,224,197,.12); border: 1px solid rgba(246,216,155,.18);
  border-radius: 20px; padding: 7px 16px 7px 34px;
  font-size: 13px; color: var(--gold2); width: 200px; outline: none;
  font-family: var(--sans); transition: width .25s, background .2s;
}
.nav-search::placeholder { color: rgba(246,216,155,.4); }
.nav-search:focus { width: 240px; background: rgba(241,224,197,.2); }
.nav-search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: rgba(246,216,155,.4); font-size: 14px; pointer-events: none; }
.nav-btn {
  background: linear-gradient(135deg, var(--gold2), var(--gold3));
  color: var(--red3); border: none; border-radius: 20px;
  padding: 8px 20px; font-size: 13px; font-weight: 700;
  font-family: var(--serif); cursor: pointer; white-space: nowrap; transition: opacity .2s;
}
.nav-btn:hover { opacity: .88; }
.nav-user {
  display: flex; align-items: center; gap: 10px;
}
.nav-wallet {
  display: flex; align-items: center; gap: 6px;
  background: rgba(246,216,155,.12); border: 1px solid rgba(246,216,155,.2);
  border-radius: 18px; padding: 5px 14px; font-size: 13px; color: var(--gold2);
  cursor: pointer; transition: background .2s;
}
.nav-wallet:hover { background: rgba(246,216,155,.2); }

/* ── CARDS ── */
.card { background: var(--paper); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 20px; }
.card-sm { border-radius: var(--r-md); padding: 14px 16px; }

/* ── SECTION HEADER ── */
.sec-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sec-title {
  font-family: var(--serif); font-size: 17px; font-weight: 700; color: var(--red);
  display: flex; align-items: center; gap: 8px;
}
.sec-title::before {
  content: ''; display: inline-block; width: 4px; height: 17px;
  background: linear-gradient(180deg, var(--gold2), var(--gold3)); border-radius: 2px;
}
.sec-more { font-size: 13px; color: var(--ink3); cursor: pointer; }
.sec-more:hover { color: var(--red); }

/* ── CHIPS / TAGS ── */
.chip {
  display: inline-flex; align-items: center;
  background: var(--cream2); border: 1px solid var(--border);
  border-radius: 16px; padding: 5px 14px;
  font-size: 13px; color: var(--ink2); cursor: pointer; transition: all .2s; white-space: nowrap;
}
.chip:hover, .chip.active { background: var(--red2); color: var(--gold2); border-color: var(--red2); }
.chip-sm { padding: 3px 10px; font-size: 11px; border-radius: 12px; }
.chip-tag { background: rgba(140,29,24,.08); color: var(--red); border-color: rgba(140,29,24,.15); }
.chip-tag:hover { background: var(--red2); color: var(--gold2); }

/* ── AVATAR ── */
.avatar {
  border-radius: 50%; background: linear-gradient(135deg, #C89D54, #E8C97A);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 700; color: var(--red2); flex-shrink: 0;
}
.avatar-xl  { width: 72px; height: 72px; font-size: 28px; }
.avatar-lg  { width: 56px; height: 56px; font-size: 22px; }
.avatar-md  { width: 40px; height: 40px; font-size: 16px; }
.avatar-sm  { width: 32px; height: 32px; font-size: 13px; }
.avatar-xs  { width: 24px; height: 24px; font-size: 10px; }

/* ── BUTTONS ── */
.btn {
  border: none; border-radius: 16px; cursor: pointer;
  font-family: var(--serif); font-weight: 700;
  transition: opacity .2s, transform .15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn:hover { opacity: .88; }
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(135deg, var(--red2), var(--red3)); color: var(--gold2); padding: 10px 24px; font-size: 14px; }
.btn-gold    { background: linear-gradient(135deg, var(--gold2), var(--gold3)); color: var(--red3); padding: 10px 24px; font-size: 14px; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--ink2); padding: 9px 20px; font-size: 13px; font-family: var(--sans); font-weight: 400; }
.btn-outline:hover { border-color: var(--red); color: var(--red); }
.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 12px; }
.btn-xs { padding: 4px 10px; font-size: 11px; border-radius: 10px; }

/* ── GOLD DIVIDER ── */
.gold-rule { height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .35; margin: 20px 0; }

/* ── PLAN BADGE ── */
.plan-badge {
  width: 48px; height: 48px; border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--red2), var(--red3));
  display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0;
}
.plan-badge-league { font-size: 9px; color: rgba(246,216,155,.7); letter-spacing: .06em; }
.plan-badge-icon   { font-size: 18px; }
.plan-badge-sm { width: 38px; height: 38px; }
.plan-badge-sm .plan-badge-icon { font-size: 14px; }

/* ── PRICE ── */
.price { font-family: var(--serif); font-weight: 900; color: var(--gold); }
.price-lg { font-size: 28px; }
.price-md { font-size: 22px; }
.price-sm { font-size: 18px; }

/* ── FOLLOW BTN ── */
.follow-btn {
  border: 1px solid var(--border); border-radius: 12px;
  padding: 5px 14px; font-size: 12px; color: var(--red);
  background: var(--cream2); cursor: pointer; transition: all .2s; white-space: nowrap;
}
.follow-btn:hover, .follow-btn.following { background: var(--red2); color: var(--gold2); border-color: var(--red2); }

/* ── LIVE DOT ── */
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #E53E3E; animation: blink 1.4s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.35} }

/* ── BLUR / LOCK ── */
.blur-block { position: relative; border-radius: 10px; overflow: hidden; margin-bottom: 14px; }
.blur-content { font-size: 14px; color: var(--ink2); line-height: 1.8; filter: blur(6px); user-select: none; pointer-events: none; padding: 12px; background: var(--cream); border-radius: 10px; }
.blur-overlay {
  position: absolute; inset: 0;
  background: rgba(251,246,238,.72);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
}
.blur-overlay-text { font-size: 13px; color: var(--ink3); }

/* ── BREADCRUMB ── */
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  width: min(var(--content-max), calc(100vw - 32px));
  margin: 0 auto;
  padding: 16px var(--shell-pad) 0;
  font-size: 12px; color: var(--ink3);
}
.breadcrumb a { color: var(--ink3); }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb-sep { color: var(--ink4); }

/* ── PAGE LAYOUTS ── */
.page-wrap {
  width: min(var(--content-max), calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px var(--shell-pad) 60px;
}
.page-wrap-narrow {
  width: min(var(--content-max-narrow), calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px var(--shell-pad) 60px;
}
.two-col   { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.three-col { display: grid; grid-template-columns: 220px 1fr 280px; gap: 20px; align-items: start; }
.sticky-top { position: sticky; top: calc(var(--nav-h) + 16px); }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--ink3); }
.empty-state-icon { font-size: 48px; margin-bottom: 12px; opacity: .5; }
.empty-state-text { font-size: 14px; }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--gold2); padding: 10px 22px;
  border-radius: 20px; font-size: 13px; z-index: 999;
  opacity: 0; transition: opacity .3s; pointer-events: none;
  box-shadow: var(--shadow-md);
}
.toast.show { opacity: 1; }

/* ── MODAL ── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 500;
  background: rgba(42,33,28,.55); align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal { background: var(--paper); border-radius: var(--r-xl); padding: 32px; max-width: 440px; width: 92%; box-shadow: var(--shadow-lg); }
.modal-title { font-family: var(--serif); font-size: 20px; font-weight: 700; color: var(--red); margin-bottom: 20px; text-align: center; }

/* ── FORM ── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; color: var(--ink2); margin-bottom: 6px; font-weight: 500; }
.form-input {
  width: 100%; background: var(--cream); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 10px 14px; font-size: 14px; color: var(--ink); outline: none; font-family: var(--sans); transition: border .2s;
}
.form-input:focus { border-color: var(--gold); }

/* ── STAT ITEM ── */
.stat-item { text-align: center; }
.stat-num   { font-family: var(--serif); font-size: 20px; font-weight: 700; color: var(--ink); }
.stat-label { font-size: 11px; color: var(--ink3); margin-top: 2px; }
