/* ==========================================================
   必博体育 BIBO SPORTS — Site Kit 共享样式
   live-bibo.com.cn | 沪ICP备91588914号
   ========================================================== */

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: '思源黑体', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #F5F1E6;
  background-color: #0A0C10;
  background-image: radial-gradient(ellipse at 15% -5%, rgba(61, 183, 255, 0.07) 0%, transparent 55%),
                    radial-gradient(ellipse at 90% 110%, rgba(212, 168, 67, 0.05) 0%, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'DIN Alternate', 'Bebas Neue', '思源黑体', sans-serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: #F5F1E6;
}

p { margin-bottom: 1rem; }

a {
  color: #3DB7FF;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #F2C76E;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

ul, ol {
  padding-left: 1.25rem;
}

::selection {
  background: #D4A843;
  color: #0A0C10;
}

:focus-visible {
  outline: 2px solid #C8FF2E;
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- CSS Variables ---------- */
:root {
  --color-bg: #0A0C10;
  --color-panel: #151A22;
  --color-gold: #D4A843;
  --color-gold-bright: #F2C76E;
  --color-blue: #3DB7FF;
  --color-neon: #C8FF2E;
  --color-text: #F5F1E6;
  --color-text-dim: #B6B3A9;
  --color-border: #2A2D37;

  --font-headline: 'DIN Alternate', 'Bebas Neue', '思源黑体', sans-serif;
  --font-body: '思源黑体', 'Noto Sans SC', 'PingFang SC', sans-serif;
  --font-data: 'DIN Condensed', 'Roboto Condensed', 'Courier New', monospace;

  --header-height: 64px;
  --nav-rail-width: 200px;
  --container-max: 1320px;
  --container-pad: 24px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Typography Helpers ---------- */
.data-number {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  font-size: 1.5rem;
  letter-spacing: 0.03em;
  color: var(--color-gold-bright);
  line-height: 1.2;
}

.annotation {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--color-text-dim);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  line-height: 1.6;
  white-space: nowrap;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

#main-content {
  display: block;
  padding-top: var(--header-height);
  min-height: 60vh;
}

@media (min-width: 1024px) {
  #main-content {
    margin-left: var(--nav-rail-width);
  }
}

.section {
  padding: 80px 0;
}

.section-title {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 28px;
  font-family: var(--font-headline);
  font-size: clamp(28px, 4vw, 48px);
}

.section-index {
  font-family: var(--font-data);
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--color-blue);
  font-weight: 500;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  text-decoration: none;
  line-height: 1.4;
}

.btn-primary {
  background: var(--color-gold);
  color: #0A0C10;
}

.btn-primary:hover {
  background: var(--color-gold-bright);
  color: #0A0C10;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 168, 67, 0.25);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-outline:hover {
  color: var(--color-gold-bright);
  border-color: var(--color-gold);
  background: rgba(212, 168, 67, 0.06);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--color-text-dim);
  margin-bottom: 24px;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  padding: 0;
  gap: 4px;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  margin: 0 8px;
  color: var(--color-text-dim);
  opacity: 0.5;
}

.breadcrumb-link {
  color: var(--color-text-dim);
  transition: color 0.3s;
}

.breadcrumb-link:hover {
  color: var(--color-gold-bright);
}

.breadcrumb-current {
  color: var(--color-text);
  font-weight: 500;
}

/* ---------- Skip Link ---------- */
.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 9999;
  background: var(--color-gold);
  color: #0A0C10;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top 0.3s var(--ease);
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
  color: #0A0C10;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* ---------- Scroll Progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--color-gold), var(--color-blue));
  z-index: 2000;
  pointer-events: none;
  transition: width 0.08s linear;
  box-shadow: 0 1px 4px rgba(61, 183, 255, 0.2);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: transparent;
  transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.header-bar {
  position: relative;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

.header-bar::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold), var(--color-blue), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.site-header[data-scrolled] .header-bar {
  background: rgba(10, 12, 16, 0.92);
  border-bottom-color: rgba(42, 45, 55, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.site-header[data-scrolled] .header-bar::after {
  opacity: 1;
}

/* ---------- Brand ---------- */
.brand {
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-cn {
  font-family: var(--font-headline);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-gold);
  line-height: 1.1;
}

.brand-en {
  font-family: var(--font-data);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--color-gold-bright);
  margin-top: 3px;
  line-height: 1;
}

/* ---------- Header Live ---------- */
.header-live {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--color-blue);
  border-radius: 50%;
  animation: live-pulse 1.6s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(61, 183, 255, 0.7); }
  50% { box-shadow: 0 0 0 7px rgba(61, 183, 255, 0); }
}

.live-label {
  font-family: var(--font-data);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--color-neon);
}

.live-score {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-data);
  font-size: 14px;
  color: var(--color-text-dim);
  background: rgba(21, 26, 34, 0.6);
  border: 1px solid rgba(42, 45, 55, 0.6);
  border-radius: 999px;
  padding: 4px 14px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.team-name {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--color-text-dim);
  letter-spacing: 0.02em;
}

.score-num {
  font-family: var(--font-data);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-gold-bright);
  line-height: 1;
}

.score-colon {
  color: var(--color-text-dim);
  font-size: 13px;
}

/* ---------- Site Nav (Desktop Rail) ---------- */
.site-nav {
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: 0;
  width: var(--nav-rail-width);
  padding: 32px 12px 24px;
  background: transparent;
  border-right: 1px solid transparent;
  z-index: 999;
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

.site-header[data-scrolled] .site-nav {
  background: rgba(10, 12, 16, 0.88);
  border-right-color: rgba(42, 45, 55, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  margin: 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--color-text);
  text-decoration: none;
  border-left: 3px solid transparent;
  border-radius: 0 8px 8px 0;
  transition: color 0.3s, background-color 0.3s, border-color 0.3s;
  position: relative;
}

.nav-link::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--color-blue);
  border-radius: 50%;
  opacity: 0;
  flex-shrink: 0;
  transition: opacity 0.3s;
}

.nav-link:hover {
  color: var(--color-gold-bright);
  background: rgba(212, 168, 67, 0.06);
  border-left-color: var(--color-gold);
}

.nav-link:hover::before,
.nav-link[aria-current="page"]::before {
  opacity: 1;
}

.nav-link[aria-current="page"] {
  color: var(--color-gold);
  border-left-color: var(--color-gold);
  background: rgba(212, 168, 67, 0.09);
  font-weight: 700;
}

/* ---------- Mobile Nav Toggle ---------- */
.nav-toggle {
  display: none;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #0F1419;
  border-top: 1px solid var(--color-border);
  position: relative;
  margin-left: 0;
}

@media (min-width: 1024px) {
  .site-footer {
    margin-left: var(--nav-rail-width);
  }
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding-top: 64px;
  padding-bottom: 48px;
}

@media (min-width: 768px) {
  .footer-top {
    grid-template-columns: 1.2fr 0.8fr 1.2fr;
    gap: 48px;
  }
}

.footer-col {
  display: flex;
  flex-direction: column;
}

.footer-brand {
  font-family: var(--font-headline);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-gold);
  margin-bottom: 4px;
  line-height: 1.1;
}

.footer-brand-dot {
  color: var(--color-blue);
}

.footer-tagline {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-text-dim);
  margin-bottom: 16px;
}

.footer-desc {
  font-size: 14px;
  color: var(--color-text-dim);
  line-height: 1.7;
  max-width: 340px;
}

.footer-heading {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--color-gold);
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 8px;
}

.footer-heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 28px;
  height: 2px;
  background: var(--color-gold);
  opacity: 0.6;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--color-text-dim);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.3s, padding-left 0.3s;
  display: inline-block;
}

.footer-links a:hover {
  color: var(--color-gold-bright);
  padding-left: 6px;
}

.footer-contact-col {
  gap: 0;
}

.footer-contact-item {
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
}

.footer-contact-label {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--color-text-dim);
  opacity: 0.7;
  margin-bottom: 2px;
}

.footer-contact-value {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--color-text);
  line-height: 1.5;
}

.footer-contact-time {
  font-size: 12px;
  color: var(--color-text-dim);
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(42, 45, 55, 0.5);
}

.footer-bottom {
  border-top: 1px solid rgba(42, 45, 55, 0.6);
  padding: 18px 0;
  background: rgba(0, 0, 0, 0.25);
}

.footer-bottom-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-bottom-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }
}

.copyright {
  font-size: 13px;
  color: var(--color-text-dim);
  margin: 0;
}

.footer-icp {
  font-size: 12px;
  color: var(--color-text-dim);
  margin: 0;
  opacity: 0.7;
}

.footer-legal {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 20px;
}

.footer-legal a {
  font-size: 13px;
  color: var(--color-text-dim);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-legal a:hover {
  color: var(--color-gold-bright);
}

/* ---------- Cards & Tags ---------- */
.card {
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  border-color: rgba(212, 168, 67, 0.35);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 18px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-dim);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1.4;
}

.tag:hover {
  color: var(--color-text);
  border-color: var(--color-gold);
  background: rgba(212, 168, 67, 0.06);
}

.tag[aria-pressed="true"] {
  color: #0A0C10;
  background: var(--color-gold);
  border-color: var(--color-gold);
  font-weight: 700;
}

/* ---------- Image Frame ---------- */
.image-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  aspect-ratio: 16 / 9;
}

.image-frame img,
.image-frame .image-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-frame .image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #151A22 0%, #1E2530 100%);
  color: var(--color-text-dim);
  font-family: var(--font-data);
  font-size: 14px;
  letter-spacing: 0.12em;
}

.image-wide {
  aspect-ratio: 16 / 9;
}

.image-square {
  aspect-ratio: 1 / 1;
}

.image-tall {
  aspect-ratio: 3 / 4;
}

/* ---------- Reveal on Scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

[data-reveal][data-revealed] {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Mobile Responsive ---------- */
@media (max-width: 1023px) {
  :root {
    --header-height: 60px;
    --container-pad: 20px;
  }

  .header-bar {
    padding: 0 16px;
  }

  .brand-cn {
    font-size: 22px;
  }

  .brand-en {
    font-size: 9px;
    letter-spacing: 0.24em;
  }

  .header-live {
    gap: 6px;
  }

  .live-score {
    padding: 3px 10px;
    font-size: 13px;
    gap: 4px;
  }

  .live-label {
    font-size: 11px;
  }

  .team-name {
    font-size: 12px;
  }

  .score-num {
    font-size: 15px;
  }

  /* Mobile Nav Panel */
  .site-nav {
    top: 0;
    left: auto;
    right: 0;
    bottom: 0;
    width: min(340px, 88%);
    padding: 80px 28px 32px;
    background: rgba(10, 12, 16, 0.98);
    border-left: 1px solid var(--color-border);
    border-right: none;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
    z-index: 1500;
    overflow-y: auto;
  }

  .site-header[data-scrolled] .site-nav {
    background: rgba(10, 12, 16, 0.98);
  }

  .site-nav[data-open] {
    transform: translateX(0);
  }

  .nav-list {
    gap: 4px;
  }

  .nav-link {
    font-size: 18px;
    padding: 15px 14px;
    border-left-width: 3px;
  }

  /* Mobile Toggle Button */
  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-gold);
    border: none;
    color: #0A0C10;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    cursor: pointer;
    z-index: 1600;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(212, 168, 67, 0.3);
    transition: transform 0.3s var(--ease), background-color 0.3s ease, box-shadow 0.3s ease;
    flex-direction: column;
    line-height: 1.1;
  }

  .nav-toggle:hover {
    background: var(--color-gold-bright);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(242, 199, 110, 0.4);
  }

  .nav-toggle-icon {
    width: 18px;
    height: 2px;
    background: #0A0C10;
    border-radius: 2px;
    position: relative;
    transition: background-color 0.2s;
  }

  .nav-toggle-icon::before,
  .nav-toggle-icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: #0A0C10;
    border-radius: 2px;
    transition: transform 0.3s var(--ease);
  }

  .nav-toggle-icon::before {
    top: -6px;
  }

  .nav-toggle-icon::after {
    top: 6px;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-icon {
    background-color: transparent;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-icon::before {
    transform: rotate(45deg);
    top: 0;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-icon::after {
    transform: rotate(-45deg);
    top: 0;
  }

  .nav-toggle-text {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
  }

  .section {
    padding: 48px 0;
  }

  .section-title {
    font-size: 28px;
    margin-bottom: 20px;
  }
}

@media (max-width: 600px) {
  .header-live {
    gap: 4px;
  }

  .live-score {
    padding: 3px 8px;
  }

  .team-name {
    font-size: 11px;
    max-width: 48px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .footer-top {
    gap: 32px;
    padding-top: 48px;
  }

  .footer-brand {
    font-size: 28px;
  }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  .live-dot {
    animation: none;
    box-shadow: none;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .card:hover {
    transform: none;
  }

  .btn:hover,
  .btn-primary:hover {
    transform: none;
  }

  .nav-toggle:hover {
    transform: none;
  }
}
