:root {
  --color-primary: #0f766e;
  --color-primary-dark: #115e59;
  --color-primary-darker: #042f2e;
  --color-accent: #d97706;
  --color-accent-dark: #b45309;
  --color-success: #059669;
  --color-danger: #e11d48;
  --color-text: #292524;
  --color-text-muted: #78716c;
  --color-text-light: #a8a29e;
  --color-bg: #ffffff;
  --color-bg-soft: #f6f0e4;
  --color-bg-muted: #eae0cf;
  --color-border: #d8cfbf;
  --color-border-soft: #e8dfd0;
  --gradient-hero: linear-gradient(160deg, #081612 0%, #0e2e26 55%, #185545 100%);
  --gradient-deep: linear-gradient(160deg, #061210 0%, #0b241e 100%);
  --gradient-dept: linear-gradient(160deg, #0b241e 0%, #155345 100%);
  --gradient-security: linear-gradient(160deg, #06100e 0%, #0e2a23 100%);
  --gradient-mission: linear-gradient(160deg, #092019 0%, #123d32 100%);
  --gradient-trust: linear-gradient(160deg, #040d0a 0%, #0c2821 100%);
  --gradient-cta: linear-gradient(160deg, #155345 0%, #1f6b56 100%);
  --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
  --gradient-icon: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
  --glass-bg: rgba(255, 255, 255, 0.055);
  --glass-border: rgba(255, 255, 255, 0.13);
  --glass-blur: blur(14px);
  --shadow-sm: 0 2px 4px rgba(41, 37, 36, 0.04), 0 8px 20px -6px rgba(41, 37, 36, 0.07);
  --shadow-md: 0 4px 8px rgba(41, 37, 36, 0.05), 0 20px 40px -10px rgba(41, 37, 36, 0.12);
  --shadow-lg: 0 6px 12px rgba(41, 37, 36, 0.06), 0 30px 60px -15px rgba(41, 37, 36, 0.16);
  --shadow-xl: 0 8px 16px rgba(41, 37, 36, 0.07), 0 40px 80px -20px rgba(41, 37, 36, 0.18);
  --shadow-primary: 0 4px 8px rgba(15, 118, 110, 0.08), 0 20px 40px -12px rgba(15, 118, 110, 0.16);
  --shadow-accent: 0 4px 8px rgba(217, 119, 6, 0.08), 0 20px 40px -12px rgba(217, 119, 6, 0.16);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 60px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 6rem;
  --transition-fast: 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
  --transition-base: 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
  --transition-slow: 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

:where(body) {
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

:where(img) {
  max-width: 100%;
  height: auto;
}

.bg-glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
}

.icon-circle {
  width: 60px;
  height: 60px;
  background: var(--gradient-icon);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fcf9f2;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.header {
  background: var(--color-bg);
  z-index: 1030;
}

.header .navbar-brand img {
  transition: transform var(--transition-fast);
}

.header .navbar-brand:hover img {
  transform: scale(1.04);
}

.header .nav-link {
  font-weight: 500;
  color: var(--color-text);
  transition: color var(--transition-fast);
}

.header .nav-link:hover {
  color: var(--color-primary);
}

.hero-section {
  min-height: 480px;
  background: var(--gradient-hero);
  color: #fefcf7;
  padding-block: var(--space-2xl);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
  z-index: 0;
  pointer-events: none;
}

.hero-section > .container {
  position: relative;
  z-index: 1;
}

.hero-section h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  line-height: 1.2;
}

.hero-section h2 {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  opacity: 0.85;
  margin-bottom: var(--space-md);
  font-weight: 500;
}

.hero-section .lead {
  font-size: 1.1rem;
  max-width: 700px;
  margin-inline: auto;
  opacity: 0.9;
}

.hero-buttons {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
  margin-block-start: var(--space-md);
}

.notice-bar {
  animation: noticeSlideIn 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.notice-bar a {
  transition: opacity var(--transition-fast);
}

.notice-bar a:hover {
  opacity: 0.75;
}

@keyframes noticeSlideIn {
  from { transform: translateY(-10px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.breadcrumb-nav {
  background: var(--color-bg-muted);
}

.breadcrumb-nav .breadcrumb-item a {
  transition: color var(--transition-fast);
}

.breadcrumb-nav .breadcrumb-item a:hover {
  color: var(--color-primary-dark) !important;
}

.why-us-section {
  background: var(--color-bg-soft);
}

.whyus-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: all var(--transition-base);
  height: 100%;
}

.whyus-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-primary);
}

.about-section {
  background: var(--gradient-deep);
  color: #fefcf7;
}

.about-img-wrap {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.about-img-wrap img {
  transition: transform var(--transition-slow);
}

.about-img-wrap:hover img {
  transform: scale(1.04);
}

.about-card {
  transition: all var(--transition-base);
}

.about-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.08);
}

.text-white-75 {
  color: rgba(255, 255, 255, 0.78) !important;
}

.departments-section {
  background: var(--gradient-dept);
  color: #fefcf7;
}

.departments-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.departments-subtitle {
  font-size: 1.05rem;
  max-width: 800px;
  margin-inline: auto;
  color: rgba(255, 255, 255, 0.8);
}

.departments-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-block-start: var(--space-lg);
}

@media (min-width: 768px) {
  .departments-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.d-item {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
}

.d-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

.d-num span {
  color: #fcf9f2;
  font-size: 1.1rem;
  margin-inline-start: var(--space-xs);
}

.d-image {
  margin-bottom: var(--space-sm);
}

.d-image img {
  width: 100%;
  border-radius: var(--radius-md);
}

.security-section {
  background: var(--gradient-security);
  color: #fcf9f2;
}

.security-network {
  position: relative;
  max-width: 800px;
  margin: var(--space-xl) auto;
  min-height: 400px;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .security-network {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, auto);
  }

  .core-node        { grid-column: 2; grid-row: 2; }
  .node-top-left    { grid-column: 1; grid-row: 1; }
  .node-top-right   { grid-column: 3; grid-row: 1; }
  .node-bottom-left { grid-column: 1; grid-row: 3; }
  .node-bottom-right{ grid-column: 3; grid-row: 3; }
}

.core-node {
  background: var(--gradient-accent);
  border-radius: 50%;
  width: 140px;
  height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-inline: auto;
  color: var(--color-primary-darker);
  font-weight: 700;
  box-shadow: 0 0 40px rgba(217, 119, 6, 0.3), 0 0 80px rgba(217, 119, 6, 0.12);
}

.node {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  text-align: center;
  color: #fcf9f2;
  transition: all var(--transition-base);
}

.node:hover {
  transform: scale(1.03);
  background: rgba(255, 255, 255, 0.08);
}

.node-title {
  font-weight: 600;
  color: var(--color-accent);
  margin-block: var(--space-xs);
}

@media (max-width: 767.98px) {
  .core-node { width: 120px; height: 120px; }
}

.honor-section {
  background: var(--color-bg-soft);
}

.honor-row {
  padding-block: var(--space-sm);
}

.honor-text-card {
  padding: var(--space-md);
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border-inline-start: 4px solid var(--color-primary);
  transition: all var(--transition-base);
}

.honor-text-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.mission-section {
  background: var(--gradient-mission);
  padding-block: var(--space-2xl);
  color: #fcf9f2;
}

.mission-list li {
  margin-bottom: var(--space-sm);
  color: rgba(255, 255, 255, 0.85);
}

.stats-section {
  background: var(--color-bg);
}

.stats-card {
  transition: all var(--transition-base);
  background: var(--color-bg-soft);
}

.stats-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  background: linear-gradient(135deg, #ffffff 0%, #f5efe3 100%);
}

.stats-card h3 {
  font-variant-numeric: tabular-nums;
  color: var(--color-primary-darker);
}

.news-section {
  background: var(--color-bg-soft);
}

.news-card {
  transition: all var(--transition-base);
  border: 1px solid var(--color-border-soft);
}

.news-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.news-img-wrap {
  height: 200px;
  overflow: hidden;
  position: relative;
}

.news-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.news-card:hover .news-img-wrap img {
  transform: scale(1.06);
}

.matches-section {
  background: var(--color-bg-soft);
}

.match-card {
  transition: all var(--transition-base);
  border: 1px solid var(--color-border-soft);
}

.match-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.match-card .team {
  min-width: 0;
}

.match-card .team .small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-card .score {
  font-variant-numeric: tabular-nums;
  color: var(--color-primary-darker);
}

.trust-section {
  background: var(--gradient-trust);
  color: #fcf9f2;
}

.trust-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-md);
  padding: var(--space-lg) var(--space-sm);
  height: 100%;
  transition: all var(--transition-base);
}

.trust-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.08);
}

.partners-section {
  background: var(--color-bg-soft);
}

.partner-card {
  transition: all var(--transition-base);
}

.partner-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-primary);
}

.testimonials-section {
  background: var(--color-bg);
}

.testimonial-card {
  transition: all var(--transition-base);
  border-block-start: 4px solid transparent;
}

.testimonial-card:hover {
  border-block-start-color: var(--color-accent);
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.cta-banner-section {
  background: var(--gradient-cta);
  color: #fcf9f2;
  position: relative;
  overflow: hidden;
}

.cta-banner-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
  z-index: 0;
}

.cta-banner-section > .container {
  position: relative;
  z-index: 1;
}

.cta-banner-section .btn-warning {
  box-shadow: var(--shadow-accent);
}

.text-white-75 {
  color: rgba(255, 255, 255, 0.85) !important;
}

.footer {
  font-size: 0.9rem;
  color: #d6d3d1;
}

.footer a {
    transition: color 0.4s ease;
}

.footer a:hover {
    color: #d97c3d !important;
}

.footer-copyright {
    font-size: 0.85rem;
}

/* Beian */
.footer-beian {
    font-size: 0.8rem;
    line-height: 1.8;
    opacity: 0.92;
}

.footer-beian a:hover {
    color: #d97c3d !important;
    text-decoration: underline !important;
}

.footer-beian img {
    margin-inline-end: 4px;
    transition: transform 0.4s ease, filter 0.4s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

.footer-beian a:hover img {
    transform: scale(1.18);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.12));
}

.footer-beian li {
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .footer-beian ul {
        flex-direction: column;
        gap: var(--space-xs) !important;
    }

    .footer-beian li {
        white-space: normal;
        text-align: center;
    }
}

/* ============================================
   22. Form (Login/Signup/Contact)
   ============================================ */
.form-control:focus,
.form-select:focus {
    border-color: #1b4a3a;
    background-color: #fffdf7;
    caret-color: #d97c3d;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04), 0 12px 24px -10px rgba(27, 74, 58, 0.18), 0 0 0 0.2rem rgba(217, 124, 61, 0.13);
}

.btn-primary {
    background-color: #1b4a3a;
    border-color: #1b4a3a;
    border-radius: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04), 0 14px 28px -10px rgba(27, 74, 58, 0.28);
    transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #286253;
    border-color: #286253;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.06), 0 24px 48px -14px rgba(27, 74, 58, 0.38);
}

.input-group-text {
    background-color: #f5efe4;
    border-color: #e7dccb;
    border-radius: 14px;
}

/* ============================================
   23. Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   Grid Layout Defaults (CSS-Variant-Ready)
   CSSVariantEngine sẽ override các rules này
   ============================================================ */

/* 新闻网格 (默认 3 列) */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.4rem;
}

/* 功能特性列表 (默认 3 列) */
.feature-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.4rem;
}

/* 用户评价 (默认 3 列) */
.testimonial-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.4rem;
}

/* 合作伙伴 (默认 4 列) */
.partner-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.4rem;
    align-items: center;
}

/* 数据统计 (默认 4 列) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.4rem;
    text-align: center;
}

/* FAQ 列表 (默认单列居中) */
.faq-list {
    max-width: 820px;
    margin: 0 auto;
}

/* Hero 内容 (默认居中) */
.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

/* Hero 分割布局 (左文右图) */
.hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
    align-items: center;
}
.hero-split-text { }
.hero-split-img { text-align: center; }

/* CTA 内容 (默认居中) */
.cta-inner {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

/* 作者团队 (默认 4 列) */
.authors-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.4rem;
}

/* 联系渠道 (默认 3 列) */
.channels-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.4rem;
}

/* 文章列表 (默认 2 列) */
.post-list-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.4rem;
}

/* 相关文章 (默认 3 列) */
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
}

/* 赛事列表 (默认 3 列) */
.matches-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
}

/* 步 骤网格 (默认 4 列) */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.4rem;
}

/* 二维码网格 (默认 3 列) */
.qr-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.4rem;
    justify-items: center;
}

/* 荣誉列表 (默认 2 列交替) */
.honor-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}
.honor-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
    align-items: center;
}
.honor-row-reverse {
    direction: rtl;
}
.honor-row-reverse > * {
    direction: ltr;
}

/* ============================================================
   Responsive Defaults
   ============================================================ */
@media (max-width: 1024px) {
    .news-grid,
    .feature-list,
    .channels-grid,
    .testimonial-list { grid-template-columns: repeat(2, 1fr); }

    .partner-grid,
    .stats-grid,
    .authors-grid { grid-template-columns: repeat(2, 1fr); }

    .matches-grid { grid-template-columns: repeat(2, 1fr); }
    .steps-grid { grid-template-columns: repeat(2, 1fr); }

    .hero-split { grid-template-columns: 1fr; }
    .honor-row { grid-template-columns: 1fr; }
    .honor-row-reverse { direction: ltr; }
}

@media (max-width: 640px) {
    .news-grid,
    .feature-list,
    .testimonial-list,
    .channels-grid,
    .post-list-grid,
    .related-grid,
    .authors-grid,
    .matches-grid { grid-template-columns: 1fr; }

    .partner-grid,
    .stats-grid { grid-template-columns: repeat(2, 1fr); }

    .steps-grid { grid-template-columns: 1fr; }
    .qr-grid { grid-template-columns: 1fr; max-width: 300px; margin: 0 auto; }

    .faq-list { max-width: 100%; }
}