:root {
    --color-primary: #7c3aed;
    --color-primary-dark: #5b21b6;
    --color-primary-darker: #1e1b4b;
    --color-accent: #f97316;
    --color-accent-dark: #ea580c;
    --color-success: #14b8a6;
    --color-danger: #f43f5e;

    --color-text: #1e1e2f;
    --color-text-muted: #52525b;
    --color-text-light: #a1a1aa;
    --color-bg: #faf5ff;
    --color-bg-soft: #fdf4ff;
    --color-bg-muted: #ede9fe;
    --color-border: #d4d4d8;
    --color-border-soft: #e4e4e7;

    --gradient-hero: linear-gradient(135deg, #5b21b6 0%, #7c3aed 40%, #a78bfa 70%, #7c3aed 100%);
    --gradient-deep: linear-gradient(135deg, #1e1b4b 0%, #5b21b6 100%);
    --gradient-dept: linear-gradient(135deg, #312e81 0%, #6d28d9 100%);
    --gradient-security: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --gradient-mission: linear-gradient(135deg, #5b21b6 0%, #312e81 100%);
    --gradient-trust: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    --gradient-cta: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
    --gradient-accent: linear-gradient(135deg, #f97316 0%, #ea580c 50%, #fdba74 100%);
    --gradient-icon: linear-gradient(135deg, #7c3aed 0%, #c084fc 100%);

    --glass-bg: rgba(124, 58, 237, 0.1);
    --glass-border: rgba(124, 58, 237, 0.2);
    --glass-blur: blur(16px);

    --shadow-sm: 0 1px 3px rgba(124, 58, 237, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(124, 58, 237, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px rgba(124, 58, 237, 0.12), 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px rgba(124, 58, 237, 0.15), 0 10px 10px rgba(0, 0, 0, 0.04);
    --shadow-primary: 0 4px 14px rgba(124, 58, 237, 0.15);
    --shadow-accent: 0 4px 14px rgba(249, 115, 22, 0.15);

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --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.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 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: #faf5ff;
    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.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: #f8fafc;
    padding-block: var(--space-2xl);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.25);
    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.9;
    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.6s cubic-bezier(0.4, 0, 0.2, 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: 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(-5px);
    box-shadow: var(--shadow-primary);
}

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

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

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

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

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

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

.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, 250, 252, 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: #f8fafc;
    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: #f8fafc;
}

.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 30px rgba(249, 115, 22, 0.4);
}

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

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

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

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

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

.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-bg) 0%, var(--color-bg-muted) 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(-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);
}

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

.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(255, 255, 255, 0.12);
}

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

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

.cta-banner-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 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(248, 250, 252, 0.85) !important;
}

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

:root {
  --color-primary: #7c3aed;
  --color-accent: #06b6d4;
  --color-bg-muted: #f3f4f6;
  --color-border: #d1d5db;
  --transition-fast: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer a {
  transition: color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.footer-beian {
  font-size: 0.8rem;
  line-height: 1.8;
  opacity: 0.9;
  color: #6b7280;
}

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

.footer-beian img {
  margin-inline-end: 5px;
  transition: transform 0.4s ease;
}

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

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

@media (max-width: 575.98px) {
  .footer-beian ul {
    flex-direction: column;
    gap: var(--space-xs, 0.25rem) !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 3px rgba(124, 58, 237, 0.25),
    0 0 12px rgba(124, 58, 237, 0.1);
}

.btn-primary {
  background: linear-gradient(135deg, #7c3aed, #db2777);
  border: 2px solid transparent;
  border-image: linear-gradient(135deg, #7c3aed, #db2777) 1;
  background-clip: padding-box;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.35);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, #6d28d9, #be185d);
  border-image: linear-gradient(135deg, #6d28d9, #be185d) 1;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45);
}

.input-group-text {
  background: linear-gradient(135deg, #f9fafb, #e5e7eb);
  border-color: #d1d5db;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

@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 */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  background: linear-gradient(135deg, #fff1f2, #ffe4e6);
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(2px);
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(2px);
}

.testimonial-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(2px);
}

.partner-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  align-items: center;
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.faq-list {
  max-width: 820px;
  margin: 0 auto;
  background: linear-gradient(135deg, #f5f5f4, #e7e5e4);
  border-radius: 20px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  background: linear-gradient(135deg, #fce7f3, #fbcfe8);
  border-radius: 24px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  background: linear-gradient(145deg, #fef3c7, #fde68a, #fce7f3);
  border-radius: 20px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.hero-split-text { }
.hero-split-img { text-align: center; }

.cta-inner {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  border-radius: 24px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.authors-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  background: linear-gradient(135deg, #fce7f3, #fbcfe8, #fdf2f8);
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.channels-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  background: linear-gradient(160deg, #ede9fe, #c4b5fd);
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.post-list-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  background: linear-gradient(135deg, #ecfdf5, #a7f3d0);
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  background: linear-gradient(135deg, #fef9c3, #fef08a);
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.matches-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  background: linear-gradient(135deg, #fde68a, #fcd34d);
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  background: linear-gradient(135deg, #e0e7ff, #a5b4fc);
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.qr-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  justify-items: center;
  background: linear-gradient(135deg, #f3e8ff, #d8b4fe);
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.honor-list {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}
.honor-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  background: linear-gradient(135deg, #cffafe, #a5f3fc);
  border-radius: 16px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}
.honor-row-reverse {
  direction: rtl;
}
.honor-row-reverse > * {
  direction: ltr;
}

@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%; }
}