:root {
  --color-primary: #0d9488;
  --color-primary-dark: #115e59;
  --color-primary-darker: #042f2e;
  --color-accent: #f43f5e;
  --color-accent-dark: #e11d48;
  --color-success: #65a30d;
  --color-danger: #b91c1c;
  --color-text: #1f2937;
  --color-text-muted: #57534e;
  --color-text-light: #a8a29e;
  --color-bg: #fbfaf8;
  --color-bg-soft: #f5f0eb;
  --color-bg-muted: #e7e0d8;
  --color-border: #d6cfc7;
  --color-border-soft: #e7e0d8;
  --color-card: #fffdf9;
  --color-white: #fefdfa;
  --gradient-hero: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  --gradient-deep: linear-gradient(135deg, #042f2e 0%, #0d9488 100%);
  --gradient-dept: linear-gradient(135deg, #2e1065 0%, #6b21a8 100%);
  --gradient-security: linear-gradient(135deg, #1c1917 0%, #292524 100%);
  --gradient-mission: linear-gradient(135deg, #701a75 0%, #be185d 100%);
  --gradient-trust: linear-gradient(135deg, #042f2e 0%, #0f766e 100%);
  --gradient-cta: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
  --gradient-accent: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  --gradient-icon: linear-gradient(135deg, #0d9488 0%, #042f2e 100%);
  --glass-bg: rgba(254, 253, 250, 0.08);
  --glass-border: rgba(254, 253, 250, 0.18);
  --glass-blur: blur(14px);
  --shadow-sm: 0 4px 14px rgba(13, 148, 136, 0.06), 0 0 18px rgba(13, 148, 136, 0.04);
  --shadow-md: 0 8px 24px rgba(13, 148, 136, 0.1), 0 0 30px rgba(13, 148, 136, 0.08);
  --shadow-lg: 0 12px 32px rgba(13, 148, 136, 0.12), 0 0 42px rgba(13, 148, 136, 0.1);
  --shadow-xl: 0 16px 40px rgba(13, 148, 136, 0.14), 0 0 56px rgba(13, 148, 136, 0.12);
  --shadow-primary: 0 10px 28px rgba(13, 148, 136, 0.18), 0 0 36px rgba(13, 148, 136, 0.12);
  --shadow-accent: 0 10px 28px rgba(244, 63, 94, 0.2), 0 0 36px rgba(244, 63, 94, 0.12);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-pill: 32px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 5rem;
  --transition-fast: 0.18s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-base: 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
  --transition-slow: 0.55s cubic-bezier(0.16, 1, 0.3, 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: var(--color-white);
  font-size: 1.5rem;
  flex-shrink: 0;
  box-shadow: 0 0 24px rgba(13, 148, 136, 0.35);
}

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

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

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(4, 47, 46, 0.2);
  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.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.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

@keyframes noticeSlideIn {
  from {
    transform: translateY(-110%);
    opacity: 0;
    filter: blur(6px);
  }
  to {
    transform: translateY(0);
    opacity: 1;
    filter: blur(0);
  }
}

.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-card);
  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(-5px);
  box-shadow: var(--shadow-primary);
}

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

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

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

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

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

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

.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(254, 253, 250, 0.85);
}

.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: var(--color-white);
  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: var(--color-white);
}

.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 24px rgba(244, 63, 94, 0.5), 0 0 64px rgba(244, 63, 94, 0.25);
}

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

.node:hover {
  transform: scale(1.05);
  background: rgba(254, 253, 250, 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-soft);
}

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

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

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

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

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

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

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

.stats-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  background: linear-gradient(135deg, var(--color-card) 0%, #ecfdf5 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);
  background: var(--color-card);
}

.news-card:hover {
  transform: translateY(-5px);
  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-soft);
}

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

.match-card:hover {
  transform: translateY(-3px);
  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: var(--color-white);
}

.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(-3px);
  background: rgba(254, 253, 250, 0.14);
}

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

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

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

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

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

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

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

.cta-banner-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(4, 47, 46, 0.25);
  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(254, 253, 250, 0.85) !important;
}

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

.footer a {
    transition: color 0.35s ease, text-shadow 0.35s ease;
}

.footer a:hover {
    color: #fbbf24 !important;
    text-shadow: 0 0 18px rgba(251, 191, 36, 0.55);
}

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

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

.footer-beian a:hover {
    color: #fbbf24 !important;
    text-decoration: underline !important;
    text-shadow: 0 0 12px rgba(245, 158, 11, 0.45);
}

.footer-beian img {
    margin-inline-end: 4px;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.35s ease;
}

.footer-beian a:hover img {
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.6));
}

.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: #f59e0b;
    box-shadow: 0 0 0 0.25rem rgba(245, 158, 11, 0.18), 0 0 24px rgba(245, 158, 11, 0.3);
    caret-color: #d97706;
}

.btn-primary {
    background-color: #fbbf24;
    border-color: #f59e0b;
    color: #1e293b;
    border-radius: 0.75rem;
    box-shadow: 0 12px 28px -12px rgba(217, 119, 6, 0.65), 0 0 24px rgba(245, 158, 11, 0.35);
    transition: background-color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, color 0.35s ease;
    animation: glow-pulse 2.6s ease-in-out infinite;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #f59e0b;
    border-color: #d97706;
    box-shadow: 0 14px 34px -10px rgba(217, 119, 6, 0.8), 0 0 32px rgba(251, 191, 36, 0.6);
    color: #1e293b;
}

.input-group-text {
    background-color: #fef3c7;
    border-color: #eab308;
    color: #854d0e;
}

@keyframes glow-pulse {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.35));
    }
    50% {
        filter: drop-shadow(0 0 22px rgba(251, 191, 36, 0.6));
    }
}

/* ============================================
   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.5rem;
    background: linear-gradient(180deg, #fffdf7 0%, #fef3c7 100%);
    border-radius: 1rem;
    box-shadow: 0 12px 32px -16px rgba(180, 83, 9, 0.35), 0 0 24px rgba(245, 158, 11, 0.12);
}

/* 功能特性列表 (默认 3 列) */
.feature-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    background: #ffffff;
    border-radius: 0.875rem;
    box-shadow: 0 10px 30px -14px rgba(180, 83, 9, 0.28), 0 0 20px rgba(245, 158, 11, 0.08);
}

/* 用户评价 (默认 3 列) */
.testimonial-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    background: #fdf3d1;
    border-radius: 1rem;
    box-shadow: 0 12px 34px -14px rgba(180, 83, 9, 0.3), 0 0 24px rgba(245, 158, 11, 0.12);
}

/* 合作伙伴 (默认 4 列) */
.partner-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    align-items: center;
    background: #faeac3;
    border-radius: 0.875rem;
    box-shadow: 0 10px 28px -12px rgba(180, 83, 9, 0.32), 0 0 24px rgba(245, 158, 11, 0.1);
}

/* 数据统计 (默认 4 列) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    text-align: center;
    background: #1e293b;
    color: #fef3c7;
    border-radius: 1rem;
    box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.5), 0 0 32px rgba(245, 158, 11, 0.15);
    animation: glow-pulse 3.2s ease-in-out infinite;
}

/* 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: 2rem;
    align-items: center;
    background: #fffbeb;
    border-radius: 1rem;
    box-shadow: 0 14px 36px -18px rgba(180, 83, 9, 0.4), 0 0 24px rgba(245, 158, 11, 0.1);
}
.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.5rem;
    background: #fdfdf5;
    border-radius: 0.75rem;
    box-shadow: 0 10px 28px -16px rgba(180, 83, 9, 0.3), 0 0 18px rgba(245, 158, 11, 0.08);
}

/* 联系渠道 (默认 3 列) */
.channels-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    background: #fef0cc;
    border-radius: 1rem;
    box-shadow: 0 12px 30px -14px rgba(180, 83, 9, 0.35), 0 0 24px rgba(245, 158, 11, 0.1);
}

/* 文章列表 (默认 2 列) */
.post-list-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    background: #ffffff;
    border-radius: 0.875rem;
    box-shadow: 0 10px 28px -14px rgba(180, 83, 9, 0.25), 0 0 20px rgba(245, 158, 11, 0.08);
}

/* 相关文章 (默认 3 列) */
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    background: #fbf6ec;
    border-radius: 1rem;
    box-shadow: 0 10px 26px -14px rgba(180, 83, 9, 0.28), 0 0 18px rgba(245, 158, 11, 0.08);
}

/* 赛事列表 (默认 3 列) */
.matches-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    background: #f7edd8;
    border-radius: 0.875rem;
    box-shadow: 0 10px 28px -14px rgba(180, 83, 9, 0.3), 0 0 20px rgba(245, 158, 11, 0.1);
}

/* 步 骤网格 (默认 4 列) */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    background: #fffdf4;
    border-radius: 1rem;
    box-shadow: 0 12px 32px -18px rgba(180, 83, 9, 0.32), 0 0 24px rgba(245, 158, 11, 0.1);
}

/* 二维码网格 (默认 3 列) */
.qr-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    justify-items: center;
    background: #faf6ea;
    border-radius: 0.75rem;
    box-shadow: 0 10px 28px -16px rgba(180, 83, 9, 0.3), 0 0 18px rgba(245, 158, 11, 0.08);
}

/* 荣誉列表 (默认 2 列交替) */
.honor-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    background: linear-gradient(180deg, #fffdf7 0%, #fef3c7 100%);
    border-radius: 1rem;
    box-shadow: 0 12px 36px -18px rgba(180, 83, 9, 0.35), 0 0 24px rgba(245, 158, 11, 0.1);
}
.honor-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    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%; }
}