:root {
  --color-primary: #8b5cf6;
  --color-primary-dark: #6d28d9;
  --color-primary-darker: #2e1065;
  --color-accent: #f0b429;
  --color-accent-dark: #b45309;
  --color-success: #10b981;
  --color-danger: #ef4444;
  --color-text: #ede9fe;
  --color-text-muted: #c4b5fd;
  --color-text-light: #8b7bb8;
  --color-bg: #0f0f1a;
  --color-bg-soft: #17152a;
  --color-bg-muted: #1e1b36;
  --color-border: #302d4f;
  --color-border-soft: #25224a;
  --gradient-hero: linear-gradient(135deg, #2e1065 0%, #8b5cf6 45%, #f0b429 120%);
  --gradient-deep: linear-gradient(135deg, #0f0f1a 0%, #2e1065 100%);
  --gradient-dept: linear-gradient(135deg, #1e1b36 0%, #4c1d95 55%, #8b5cf6 100%);
  --gradient-security: linear-gradient(135deg, #0f0f1a 0%, #17152a 50%, #2e1065 100%);
  --gradient-mission: linear-gradient(135deg, #2e1065 0%, #6d28d9 50%, #8b5cf6 100%);
  --gradient-trust: linear-gradient(135deg, #0f0f1a 0%, #1e1b36 100%);
  --gradient-cta: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 45%, #f0b429 110%);
  --gradient-accent: linear-gradient(135deg, #f0b429 0%, #b45309 100%);
  --gradient-icon: linear-gradient(135deg, #8b5cf6 0%, #f0b429 100%);
  --glass-bg: rgba(139, 92, 246, 0.12);
  --glass-border: rgba(240, 180, 41, 0.28);
  --glass-blur: blur(14px);
  --shadow-sm: 0 4px 16px rgba(139, 92, 246, 0.15);
  --shadow-md: 0 8px 30px rgba(139, 92, 246, 0.2);
  --shadow-lg: 0 16px 40px rgba(15, 15, 26, 0.5);
  --shadow-xl: 0 20px 50px rgba(15, 15, 26, 0.6);
  --shadow-primary: 0 12px 35px rgba(139, 92, 246, 0.35);
  --shadow-accent: 0 10px 30px rgba(240, 180, 41, 0.35);
  --radius-sm: 10px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-pill: 50px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 5rem;
  --transition-fast: 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  --transition-base: 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  --transition-slow: 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

:where(body) {
  color: var(--color-text);
  background: radial-gradient(ellipse at top, #1e1b36 0%, #0f0f1a 70%);
  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);
  border-radius: var(--radius-md);
}

.icon-circle {
  width: 60px;
  height: 60px;
  background: var(--gradient-icon);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff7ed;
  font-size: 1.5rem;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35), 0 0 0 1px rgba(240, 180, 41, 0.3);
}

.header {
  background: linear-gradient(180deg, rgba(15, 15, 26, 0.92), rgba(23, 21, 42, 0.76));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1030;
  box-shadow: 0 4px 24px rgba(15, 15, 26, 0.45);
}

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

.header .navbar-brand:hover img {
  transform: scale(1.05);
  filter: drop-shadow(0 6px 14px rgba(240, 180, 41, 0.35));
}

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

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

.hero-section {
  min-height: 480px;
  background: var(--gradient-hero);
  color: #f8f5ff;
  padding-block: var(--space-2xl);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 -60px 80px rgba(15, 15, 26, 0.4);
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 120%, rgba(240, 180, 41, 0.18) 0%, rgba(15, 15, 26, 0.35) 70%);
  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;
  text-shadow: 0 10px 24px rgba(15, 15, 26, 0.5);
}

.hero-section h2 {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  opacity: 0.95;
  margin-bottom: var(--space-md);
  font-weight: 500;
  text-shadow: 0 4px 16px rgba(15, 15, 26, 0.45);
}

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

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

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

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

.breadcrumb-nav {
  background: linear-gradient(135deg, #17152a 0%, #1e1b36 100%);
}

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

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

.why-us-section {
  background: linear-gradient(135deg, #17152a 0%, #1e1b36 55%, #0f0f1a 100%);
}

.whyus-card {
  background: linear-gradient(145deg, #ffffff 0%, #f3f0ff 80%);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: all var(--transition-base);
  height: 100%;
  color: #2a2546;
  box-shadow: 0 6px 18px rgba(15, 15, 26, 0.2);
}

.whyus-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-primary);
  border-color: rgba(139, 92, 246, 0.4);
}

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

.about-img-wrap {
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 40px rgba(15, 15, 26, 0.5);
}

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

.about-img-wrap:hover img {
  transform: scale(1.05);
  filter: saturate(1.2);
}

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

.about-card:hover {
  transform: translateY(-3px);
  background: rgba(240, 180, 41, 0.12);
  box-shadow: 0 12px 28px rgba(15, 15, 26, 0.35);
}

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

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

.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(248, 245, 255, 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);
  box-shadow: 0 6px 16px rgba(15, 15, 26, 0.2), inset 0 0 0 1px rgba(240, 180, 41, 0.08);
}

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

.d-num span {
  color: #fff7ed;
  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: #f8f5ff;
}

.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(240, 180, 41, 0.6), 0 0 80px rgba(139, 92, 246, 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: #f8f5ff;
  transition: all var(--transition-base);
  box-shadow: 0 8px 20px rgba(15, 15, 26, 0.25);
}

.node:hover {
  transform: scale(1.05);
  background: rgba(240, 180, 41, 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: linear-gradient(135deg, #17152a 0%, #1e1b36 100%);
}

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

.honor-text-card {
  padding: var(--space-md);
  background: linear-gradient(145deg, #ffffff 0%, #f3f0ff 100%);
  border-radius: var(--radius-md);
  border-inline-start: 4px solid var(--color-primary);
  transition: all var(--transition-base);
  color: #2a2546;
  box-shadow: 0 8px 20px rgba(15, 15, 26, 0.18);
}

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

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

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

.stats-section {
  background: linear-gradient(135deg, #0f0f1a 0%, #17152a 100%);
}

.stats-card {
  transition: all var(--transition-base);
  background: linear-gradient(145deg, #ffffff 0%, #f0edff 100%);
  color: #2a2546;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 20px rgba(15, 15, 26, 0.22);
}

.stats-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  background: radial-gradient(circle at 0% 0%, #ffffff 0%, #e8e3ff 100%);
}

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

.news-section {
  background: linear-gradient(135deg, #17152a 0%, #1e1b36 50%, #0f0f1a 100%);
}

.news-card {
  transition: all var(--transition-base);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(248, 245, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%);
  color: #f8f5ff;
  box-shadow: 0 10px 24px rgba(15, 15, 26, 0.3);
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-accent);
}

.news-img-wrap {
  height: 200px;
  overflow: hidden;
  position: relative;
  border-radius: var(--radius-lg);
}

.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: linear-gradient(135deg, #1e1b36 0%, #17152a 100%);
}

.match-card {
  transition: all var(--transition-base);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  background: rgba(248, 245, 255, 0.06);
  color: #f8f5ff;
  box-shadow: 0 8px 20px rgba(15, 15, 26, 0.25);
}

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

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

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

.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);
  box-shadow: 0 10px 24px rgba(15, 15, 26, 0.25);
}

.trust-card:hover {
  transform: translateY(-3px);
  background: rgba(240, 180, 41, 0.14);
}

.partners-section {
  background: linear-gradient(135deg, #17152a 0%, #0f0f1a 100%);
}

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

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

.testimonials-section {
  background: linear-gradient(135deg, #0f0f1a 0%, #17152a 100%);
}

.testimonial-card {
  transition: all var(--transition-base);
  border-block-start: 4px solid transparent;
  border-radius: var(--radius-md);
  background: rgba(248, 245, 255, 0.05);
  box-shadow: 0 8px 24px rgba(15, 15, 26, 0.25);
}

.testimonial-card:hover {
  border-block-start-color: var(--color-accent);
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  background: rgba(240, 180, 41, 0.08);
}

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

.cta-banner-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(240, 180, 41, 0.18) 0%, rgba(15, 15, 26, 0.4) 100%);
  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: #b7aed6;
  background: linear-gradient(180deg, #0f0f1a 0%, #17152a 100%);
}

.footer a {
    transition: color 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.footer-copyright {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
}

/* Beian */
.footer-beian {
    font-size: 0.8rem;
    line-height: 1.8;
    opacity: 0.8;
    color: rgba(255, 255, 255, 0.65);
}

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

.footer-beian img {
    margin-inline-end: 4px;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s ease;
}

.footer-beian a:hover img {
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px rgba(240, 199, 94, 0.45));
}

.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: #7c3aed;
    box-shadow: 0 0 0 0.2rem rgba(124, 58, 237, 0.16), 0 8px 30px rgba(124, 58, 237, 0.12), 0 0 40px rgba(240, 199, 94, 0.08);
}

.btn-primary {
    color: #1a1a2e;
    background-image: linear-gradient(135deg, #f2cc6c 0%, #d4a72c 50%, #b8860b 100%);
    background-color: #d4a72c;
    border-color: #b8860b;
    border-radius: 0.5rem;
    box-shadow: 0 4px 18px rgba(184, 134, 11, 0.28);
}

.btn-primary:hover,
.btn-primary:focus {
    color: #1a1a2e;
    background-image: linear-gradient(135deg, #e8b844 0%, #c9961f 50%, #a87608 100%);
    background-color: #c9961f;
    border-color: #a87608;
    border-radius: 0.5rem;
    box-shadow: 0 6px 24px rgba(184, 134, 11, 0.4);
}

.input-group-text {
    background-image: linear-gradient(180deg, #f7f4ff 0%, #eee7ff 100%);
    background-color: #f4f2ff;
    border-color: #e0d6ff;
}

/* ============================================
   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;
    background: radial-gradient(ellipse 80% 70% at 50% 0%, rgba(124, 58, 237, 0.07), transparent 70%);
    border-radius: 1.25rem;
}

/* Hero 内容 (默认居中) */
.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    background: radial-gradient(ellipse 85% 65% at 50% 0%, rgba(240, 199, 94, 0.1), transparent 70%);
    border-radius: 1.25rem;
}

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

/* CTA 内容 (默认居中) */
.cta-inner {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    background: radial-gradient(ellipse 85% 65% at 50% 0%, rgba(240, 199, 94, 0.1), transparent 70%);
    border-radius: 1.25rem;
}

/* 作者团队 (默认 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: 0.9rem;
}

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

/* 步 骤网格 (默认 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.8rem;
}
.honor-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.8rem;
    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%; }
}