/* ============================================================
   MD电竞 · style.css
   黑金电竞风格 | 数据驱动点单中心
   ============================================================ */

/* ====== DESIGN TOKENS ====== */
:root {
  --black:   #0A0A0A;
  --deep:    #111111;
  --card:    #161616;
  --border:  #222222;
  --gold:    #C9A227;
  --gold-lt: #E8C547;
  --gold-dk: #9A7A1A;
  --white:   #F5F5F5;
  --muted:   #888888;
  --radius:  8px;
  --font-display: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

/* ====== RESET ====== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
button { border: none; cursor: pointer; background: none; font-family: inherit; }

/* ====== UTILITIES ====== */
.container { width: 100%; max-width: 480px; margin: 0 auto; padding: 0 20px; }
.gold { color: var(--gold); }
.section { padding: 60px 0; }
.section-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase;
  color: var(--gold); margin-bottom: 12px;
}
.section-tag::before, .section-tag::after {
  content: ''; display: block; width: 20px; height: 1px; background: var(--gold);
}
.section-title {
  font-size: 26px; font-weight: 800; line-height: 1.2;
  letter-spacing: -0.5px; margin-bottom: 8px;
}
.section-sub { color: var(--muted); font-size: 13px; margin-bottom: 36px; }
.gold-line {
  width: 40px; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-lt));
  border-radius: 2px; margin-bottom: 36px;
}
.btn-gold {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--gold-dk), var(--gold), var(--gold-lt));
  color: var(--black); font-weight: 800; font-size: 15px;
  padding: 14px 32px; border-radius: var(--radius);
  letter-spacing: 1px; transition: opacity .2s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn-gold:active { opacity: .85; transform: scale(.97); }
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--gold); color: var(--gold);
  font-weight: 700; font-size: 14px;
  padding: 12px 28px; border-radius: var(--radius);
  letter-spacing: 1px; transition: background .2s, color .2s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn-outline:active { background: var(--gold); color: var(--black); transform: scale(.97); }
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 0;
}

/* ====== NAV ====== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,10,10,.92); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 56px; display: flex; align-items: center;
}
.nav-inner {
  width: 100%; max-width: 480px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--gold-dk), var(--gold));
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 900; color: var(--black);
  letter-spacing: -1px;
}
.nav-logo-text { font-size: 18px; font-weight: 900; letter-spacing: 2px; }
.nav-logo-text span { color: var(--gold); }
.nav-cta {
  font-size: 12px; font-weight: 700; letter-spacing: 1px;
  color: var(--black);
  background: linear-gradient(135deg, var(--gold-dk), var(--gold-lt));
  padding: 7px 16px; border-radius: 20px;
  -webkit-tap-highlight-color: transparent;
}

/* ====== ANNOUNCEMENT BAR ====== */
.announce-bar {
  position: fixed; top: 56px; left: 0; right: 0; z-index: 99;
  height: 34px;
  background: linear-gradient(90deg, #0d0d0d, #1a1500, #0d0d0d);
  border-bottom: 1px solid rgba(201,162,39,.25);
  overflow: hidden; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.announce-track { display: flex; height: 100%; transition: transform .45s cubic-bezier(.4,0,.2,1); }
.announce-slide {
  min-width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  gap: 10px; padding: 0 40px; flex-shrink: 0;
}
.announce-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold); flex-shrink: 0;
  animation: pulse 2s infinite;
}
.announce-text {
  font-size: 12px; font-weight: 600; color: var(--gold-lt);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: .5px;
}

/* ====== HERO (compact, auto-height) ====== */
.hero {
  padding-top: 90px;
  height: auto;
  min-height: 0;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(201,162,39,.15) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 20% 80%, rgba(201,162,39,.08) 0%, transparent 60%),
    var(--black);
}
.hero-bg::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(201,162,39,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,162,39,.06) 1px, transparent 1px);
  background-size: 40px 40px;
}
.hero-bg::after {
  content: '';
  position: absolute;
  right: -60px; top: 60px;
  width: 200px; height: 500px;
  background: linear-gradient(160deg, rgba(201,162,39,.12), transparent);
  transform: skewX(-15deg);
  border-left: 2px solid rgba(201,162,39,.3);
}
.hero-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  padding: 28px 20px 32px;
  max-width: 480px; margin: 0 auto; width: 100%;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(201,162,39,.12); border: 1px solid rgba(201,162,39,.3);
  color: var(--gold-lt); font-size: 11px; font-weight: 700; letter-spacing: 2px;
  padding: 5px 12px; border-radius: 20px;
  margin-bottom: 20px; width: fit-content;
}
.hero-eyebrow::before {
  content: ''; width: 6px; height: 6px;
  background: var(--gold-lt); border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.8); }
}
.hero-title {
  font-size: 36px; font-weight: 900; line-height: 1.08;
  letter-spacing: -1px; margin-bottom: 6px;
}
.hero-title .line2 {
  background: linear-gradient(90deg, var(--gold), var(--gold-lt));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  color: var(--muted); font-size: 14px; line-height: 1.7;
  margin-bottom: 26px; max-width: 300px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.hero-stats {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.stat-item { background: var(--card); padding: 14px 12px; text-align: center; }
.stat-num {
  font-size: 22px; font-weight: 900; letter-spacing: -1px;
  background: linear-gradient(135deg, var(--gold), var(--gold-lt));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ====== ORDER CENTER (fully data-driven) ====== */
.category-tabs {
  display: flex; gap: 10px; overflow-x: auto;
  margin-bottom: 18px; padding-bottom: 4px;
  -ms-overflow-style: none; scrollbar-width: none;
}
.category-tabs::-webkit-scrollbar { display: none; }
.category-tab {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted); font-size: 13px; font-weight: 700;
  transition: border-color .2s, color .2s, background .2s;
  -webkit-tap-highlight-color: transparent;
}
.category-tab.active {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(201,162,39,.25), rgba(201,162,39,.08));
  color: var(--gold-lt);
}
.order-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.order-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .2s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.order-card:active { border-color: var(--gold); transform: scale(.98); }
.order-img {
  aspect-ratio: 4/3; width: 100%; position: relative;
  background: var(--deep);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.order-img img { width: 100%; height: 100%; object-fit: cover; }
.order-img .img-fallback { font-size: 32px; opacity: .5; }
.order-img-tag {
  position: absolute; top: 8px; left: 8px;
  font-size: 10px; font-weight: 800; letter-spacing: 1px;
  background: rgba(0,0,0,.55); color: var(--gold-lt);
  border: 1px solid rgba(201,162,39,.4);
  padding: 2px 8px; border-radius: 4px;
}
.order-info { padding: 10px 12px 12px; flex: 1; display: flex; flex-direction: column; }
.order-name {
  font-size: 13px; font-weight: 800; line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.order-desc {
  font-size: 11px; color: var(--muted); line-height: 1.5;
  margin-bottom: 10px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.order-price-row { display: flex; align-items: center; justify-content: space-between; }
.order-price { color: var(--gold); font-weight: 900; font-size: 16px; }
.order-price small { font-size: 11px; color: var(--muted); font-weight: 500; }
.order-arrow {
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(201,162,39,.12); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0;
}
.order-empty {
  grid-column: 1 / -1; text-align: center; color: var(--muted);
  font-size: 13px; padding: 40px 0;
}

/* ====== ORDER DETAIL (二级页面) ====== */
.order-detail {
  position: fixed; top: 0; bottom: 0; right: 0; z-index: 200;
  width: 100%; max-width: 480px;
  background: var(--black);
  transform: translateX(100%);
  transition: transform .3s ease;
  display: flex; flex-direction: column;
  pointer-events: none;
}
.order-detail.active { transform: translateX(0); pointer-events: auto; }
.order-detail-header {
  display: flex; align-items: center; gap: 12px;
  height: 56px; padding: 0 16px; flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  background: rgba(10,10,10,.95);
}
.order-detail-back {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-size: 20px; flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.order-detail-header-title {
  font-size: 15px; font-weight: 800;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.order-detail-body { flex: 1; overflow-y: auto; padding: 0 20px 24px; -webkit-overflow-scrolling: touch; }
.order-detail-hero {
  margin: 0 -20px 20px; aspect-ratio: 16/9;
  background: var(--deep);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.order-detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.order-detail-title { font-size: 21px; font-weight: 900; margin-bottom: 8px; line-height: 1.3; }
.order-detail-tag {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 1px;
  color: var(--gold); background: rgba(201,162,39,.1);
  border: 1px solid rgba(201,162,39,.25);
  padding: 4px 10px; border-radius: 4px; margin-bottom: 14px;
}
.platform-toggle { display: none; gap: 10px; margin-bottom: 16px; }
.platform-btn {
  flex: 1;
  padding: 12px 0; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--card);
  color: var(--muted); font-size: 14px; font-weight: 800;
  letter-spacing: 1px; text-align: center;
  transition: border-color .2s, color .2s, background .2s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.platform-btn.active {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(201,162,39,.25), rgba(201,162,39,.08));
  color: var(--gold-lt);
}
.platform-btn:active { transform: scale(.97); }
.platform-desc { font-size: 12px; color: var(--muted); margin-top: -16px; margin-bottom: 20px; }
.order-detail-price { display: flex; align-items: baseline; gap: 2px; margin-bottom: 24px; }
.order-detail-price .currency { font-size: 18px; font-weight: 800; color: var(--gold); }
.order-detail-price .num { font-size: 36px; font-weight: 900; color: var(--gold); letter-spacing: -1px; }
.order-detail-price .unit { font-size: 13px; color: var(--muted); margin-left: 6px; }
.order-detail-section { margin-bottom: 20px; }
.order-detail-section h4 {
  font-size: 13px; font-weight: 800; color: var(--gold-lt);
  margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}
.order-detail-section p { font-size: 13px; color: var(--muted); line-height: 1.8; white-space: pre-line; }
.detail-images { display: flex; flex-direction: column; gap: 10px; }
.detail-images img {
  width: 100%; height: auto;
  border-radius: 8px; border: 1px solid var(--border);
}
.order-detail-cta {
  flex-shrink: 0; display: flex; gap: 12px;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: rgba(10,10,10,.95);
}
.order-detail-cta .btn-gold, .order-detail-cta .btn-outline { flex: 1; }

/* Category-themed tints for cover fallback */
.cat-tint-0  { background: linear-gradient(135deg, rgba(34,197,94,.25), rgba(34,197,94,.05)); }
.cat-tint-1 { background: linear-gradient(135deg, rgba(220,38,38,.25), rgba(220,38,38,.05)); }
.cat-tint-2  { background: linear-gradient(135deg, rgba(168,85,247,.25), rgba(168,85,247,.05)); }
.cat-tint-3 { background: linear-gradient(135deg, rgba(201,162,39,.3), rgba(201,162,39,.05)); }
.cat-tint-4 { background: linear-gradient(135deg, rgba(59,130,246,.25), rgba(59,130,246,.05)); }

/* ====== PROCESS ====== */
.process-steps { display: flex; flex-direction: column; gap: 0; }
.process-step { display: flex; gap: 16px; align-items: flex-start; padding: 0 0 32px; position: relative; }
.process-step:last-child { padding-bottom: 0; }
.step-left { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.step-num {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, var(--gold-dk), var(--gold));
  color: var(--black); font-size: 16px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
}
.step-line { width: 2px; flex: 1; min-height: 32px; margin-top: 4px; background: linear-gradient(180deg, var(--gold), transparent); }
.process-step:last-child .step-line { display: none; }
.step-content { padding-top: 8px; flex: 1; }
.step-title { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.step-desc { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* ====== PAYMENT ====== */
.payment-card { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); line-height: 0; }
.payment-img { display: block; width: 100%; height: auto; }
.payment-note {
  margin-top: 20px; font-size: 12px; color: var(--muted);
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; line-height: 1.7;
}
.payment-note strong { color: var(--gold); }

/* ====== CONTACT ====== */
.contact { background: var(--deep); }
.contact-cards { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.contact-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  display: flex; align-items: center; gap: 16px;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .2s, transform .15s;
}
.contact-card:active { border-color: var(--gold); transform: scale(.99); }
.contact-icon {
  width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.contact-icon.wechat { background: linear-gradient(135deg, #1aad19, #0f8c0e); }
.contact-icon.qq { background: linear-gradient(135deg, #1296db, #0a6fa8); }
.contact-info { flex: 1; }
.contact-label { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.contact-value { font-size: 15px; font-weight: 800; }
.online-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.3);
  color: #22c55e; font-size: 11px; font-weight: 700;
  padding: 6px 14px; border-radius: 20px; margin-bottom: 20px;
}
.online-dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; animation: pulse 2s infinite; }
.hours-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; }
.hours-title { font-size: 12px; color: var(--muted); font-weight: 700; letter-spacing: 1px; margin-bottom: 8px; }
.hours-row { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; }
.hours-row span:last-child { color: var(--gold); font-weight: 700; }

/* ====== FOOTER ====== */
.footer { background: var(--deep); border-top: 1px solid var(--border); padding: 40px 20px 60px; }
.footer-inner { max-width: 480px; margin: 0 auto; }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-logo-icon {
  width: 36px; height: 36px; border-radius: 8px;
  background: linear-gradient(135deg, var(--gold-dk), var(--gold));
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 900; color: var(--black);
}
.footer-logo-text { font-size: 20px; font-weight: 900; letter-spacing: 2px; }
.footer-logo-text span { color: var(--gold); }
.footer-slogan { font-size: 12px; color: var(--muted); margin-bottom: 24px; }
.footer-copy { font-size: 11px; color: rgba(255,255,255,.2); }

/* ====== FLOATING CTA ====== */
.float-cta {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(10,10,10,.95); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  z-index: 99;
  display: flex; gap: 10px;
  max-width: 480px; margin: 0 auto;
  transition: opacity .3s;
}
.float-cta .btn-gold, .float-cta .btn-outline { flex: 1; padding: 12px 16px; font-size: 14px; border-radius: 8px; }

/* ====== SCROLL ANIMATIONS ====== */
.reveal { opacity: 1; transform: translateY(0); transition: opacity .5s ease, transform .5s ease; }
.reveal.pre { opacity: 0; transform: translateY(20px); }

/* ====== WECHAT SAFE AREA ====== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  body { padding-bottom: env(safe-area-inset-bottom); }
}
