:root {
  --color-primary: #0c8f80;
  --color-primary-dark: #0a6257;
  --color-primary-darker: #083f39;
  --color-accent: #f0923c;
  --color-accent-dark: #dd7523;
  --color-success: #388e3c;
  --color-danger: #d64545;
  --color-text: #3b4548;
  --color-text-muted: #64736e;
  --color-text-light: #94a19d;
  --color-bg: #fffaf2;
  --color-bg-soft: #f6efe3;
  --color-bg-muted: #ece1d0;
  --color-border: #e2d5bf;
  --color-border-soft: #eee3d4;
  --gradient-hero: linear-gradient(180deg, #0b3a35 0%, #0d6b5e 48%, #15977f 100%);
  --gradient-deep: linear-gradient(180deg, #092a28 0%, #0b3a35 100%);
  --gradient-dept: linear-gradient(180deg, #0f5048 0%, #092a28 100%);
  --gradient-security: linear-gradient(180deg, #062723 0%, #0c352f 100%);
  --gradient-mission: linear-gradient(180deg, #0b453c 0%, #092a28 100%);
  --gradient-trust: linear-gradient(180deg, #092a28 0%, #0b3a35 100%);
  --gradient-cta: linear-gradient(180deg, #0b3a35 0%, #0d6b5e 48%, #15977f 100%);
  --gradient-accent: linear-gradient(120deg, #f6a44d 0%, #e57722 100%);
  --gradient-icon: linear-gradient(180deg, #20a88e 0%, #0a6257 100%);
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-blur: blur(16px);
  --shadow-sm: 0 8px 18px rgba(35, 49, 46, 0.05), 0 2px 6px rgba(35, 49, 46, 0.03);
  --shadow-md: 0 16px 32px rgba(35, 49, 46, 0.08), 0 4px 12px rgba(35, 49, 46, 0.04);
  --shadow-lg: 0 24px 48px rgba(35, 49, 46, 0.12), 0 8px 24px rgba(35, 49, 46, 0.06);
  --shadow-xl: 0 32px 64px rgba(35, 49, 46, 0.14), 0 12px 28px rgba(35, 49, 46, 0.06);
  --shadow-primary: 0 18px 40px rgba(12, 143, 128, 0.2), 0 6px 14px rgba(12, 143, 128, 0.12);
  --shadow-accent: 0 16px 38px rgba(240, 146, 60, 0.24), 0 4px 10px rgba(240, 146, 60, 0.12);
  --radius-sm: 8px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-pill: 40px;
  --space-xs: 0.6rem;
  --space-sm: 1.15rem;
  --space-md: 1.75rem;
  --space-lg: 2.3rem;
  --space-xl: 3.5rem;
  --space-2xl: 5.8rem;
  --transition-fast: 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-base: 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  --transition-slow: 0.7s cubic-bezier(0.22, 1, 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: #f5faf7;
  font-size: 1.5rem;
  flex-shrink: 0;
  box-shadow: 0 10px 24px rgba(12, 143, 128, 0.22), 0 3px 8px rgba(12, 143, 128, 0.1);
}

.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: #f5faf7;
  padding-block: var(--space-2xl);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8, 30, 27, 0.16);
  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.92;
  margin-bottom: var(--space-md);
  font-weight: 500;
}

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

.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.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

@keyframes noticeSlideIn {
  from {
    transform: translateY(-100%);
    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%;
  box-shadow: var(--shadow-sm);
}

.whyus-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-primary);
  border-color: rgba(12, 143, 128, 0.18);
}

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

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

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

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

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

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

.text-white-75 {
  color: rgba(248, 250, 247, 0.8) !important;
}

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

.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(245, 250, 247, 0.86);
}

.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: #f5faf7;
  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: #f5faf7;
}

.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: inset 0 -10px 22px rgba(128, 56, 5, 0.16), 0 20px 44px rgba(240, 146, 60, 0.3), 0 6px 16px rgba(4, 24, 22, 0.24);
}

.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: #f5faf7;
  transition: all var(--transition-base);
}

.node:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.14);
}

.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);
}

.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);
  box-shadow: var(--shadow-sm);
}

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

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

.mission-list li {
  margin-bottom: var(--space-sm);
  color: #cfe1dd;
}

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

.stats-card {
  transition: all var(--transition-base);
  background: var(--color-bg-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.stats-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  background: linear-gradient(180deg, var(--color-bg) 0%, #e1f1ec 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);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
  box-shadow: var(--shadow-sm);
}

.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.08);
}

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

.match-card {
  transition: all var(--transition-base);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
  box-shadow: var(--shadow-sm);
}

.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: #f5faf7;
}

.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.14);
}

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

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

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

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

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

.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: #f5faf7;
  position: relative;
  overflow: hidden;
}

.cta-banner-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8, 30, 27, 0.14);
  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(248, 250, 247, 0.86) !important;
}

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

.footer a {
    transition: color 0.2s ease-out;
}

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

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

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

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

.footer-beian img {
    margin-inline-end: 4px;
    border-radius: 0.25rem;
    box-shadow: 0 0.125rem 0.5rem rgba(15, 73, 62, 0.1);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease-out;
}

.footer-beian a:hover img {
    transform: scale(1.15) rotate(-4deg);
}

.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: #0F6E5F;
    box-shadow: 0 0 0 0.18rem rgba(15, 110, 95, 0.13), 0 0.45rem 1.5rem -0.45rem rgba(12, 84, 72, 0.2);
}

.btn-primary {
    background-color: #0F6E5F;
    border-color: #0F6E5F;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1.5rem -0.6rem rgba(11, 84, 70, 0.45);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #0A584C;
    border-color: #0A584C;
    box-shadow: 0 0.35rem 1.1rem -0.5rem rgba(11, 84, 70, 0.55);
}

.input-group-text {
    background-color: #F3ECDF;
    border-color: #E5D8C1;
}

/* ============================================
   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.75rem;
}

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

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

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

/* 数据统计 (默认 4 列) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.75rem;
    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: 2.25rem;
    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.75rem;
}

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

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

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

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

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

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

/* 荣誉列表 (默认 2 列交替) */
.honor-list {
    display: flex;
    flex-direction: column;
    gap: 3.25rem;
}
.honor-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.25rem;
    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%; }
}