/* ═══════════════════════════════════════════════════════════
   PCCC BỎ TÚI – BIO LINK  |  Style chủ đề Đỏ–Đen Huyền Ảo
   Version 2.0 Pro  ·  GSAP + ScrollTrigger + TextPlugin
═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;600;700&display=swap');

/* ─── DESIGN TOKENS ─── */
:root {
  /* Màu đỏ-đen huyền bí */
  --c-red-hot:       #e81212;
  --c-red-deep:      #cc0000;
  --c-red-dark:      #8b0000;
  --c-red-darkest:   #3d0000;
  --c-black:         #080808;
  --c-black-2:       #0f0f0f;
  --c-black-3:       #161616;
  --c-black-4:       #1e1e1e;
  --c-smoke:         rgba(255,255,255,0.04);
  --c-smoke-2:       rgba(255,255,255,0.07);
  --c-smoke-3:       rgba(255,255,255,0.11);
  --c-text:          #f2eaea;
  --c-text-dim:      rgba(242,234,234,0.55);
  --c-text-faint:    rgba(242,234,234,0.28);
  --c-glow:          rgba(232,18,18,0.40);
  --c-glow-soft:     rgba(232,18,18,0.14);
  --c-glow-faint:    rgba(232,18,18,0.06);

  /* Typography */
  --f-hero:   'Bebas Neue', 'Barlow Condensed', Impact, sans-serif;
  --f-body:   'Be Vietnam Pro', sans-serif;
  --f-mono:   'JetBrains Mono', 'Fira Code', monospace;

  /* Shape */
  --r-card:   16px;
  --r-btn:    50px;
  --r-pill:   100px;

  /* Motion */
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-back:  cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-circ:  cubic-bezier(0.23, 1, 0.32, 1);
  --dur-normal: 0.4s;
  --dur-slow:   0.7s;
}

/* ═══════════════════════════════════
   BASE RESET
═══════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  /* Prevent layout thrash on mobile */
  -webkit-overflow-scrolling: touch;
}
body {
  font-family: var(--f-body);
  background-color: var(--c-black);
  color: var(--c-text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}
a {
  text-decoration: none;
  color: inherit;
  outline: none;
  /* Faster tap response on mobile */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
img, svg { display: block; }
button {
  cursor: pointer;
  border: none;
  background: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* ═══════════════════════════════════
   PERFORMANCE: GPU ACCELERATION
═══════════════════════════════════ */

/* Force GPU composite layers on animated elements */
.ring-outer-spin,
.ring-mid-spin,
.ring-inner-spin,
.ring-inner-pulse {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.logo-halo {
  will-change: transform, opacity;
  transform: translateZ(0);
}

.orbit-ring-svg {
  will-change: contents;
}

#particleCanvas,
#bgCanvas {
  will-change: contents;
  transform: translateZ(0);
}

.link-card {
  will-change: transform;
  -webkit-backface-visibility: hidden;
}

/* Removed prefers-reduced-motion block to force animations to play */

/* ═══════════════════════════════════
   PERFORMANCE: MOBILE OPTIMIZATIONS
═══════════════════════════════════ */
@media (max-width: 480px) {
  /* Reduce blur complexity on small screens */
  .logo-halo {
    filter: blur(16px) !important;
    opacity: 0.35 !important;
  }
  /* Simpler ring glow on mobile */
  .ring-outer-spin circle,
  .ring-mid-spin circle {
    filter: none !important;
  }
  /* Reduce text shadows */
  .logo-pccc {
    text-shadow: 0 0 20px rgba(232,18,18,0.6) !important;
  }
  /* Faster link card transitions */
  .link-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
  }
  /* Hide cursor glow on touch devices */
  #cursorGlow {
    display: none !important;
  }
}

/* ═══════════════════════════════════
   BACKGROUND LAYERS
═══════════════════════════════════ */

/* ═══════════════════════════════════
   BACKGROUND CANVAS LAYERS
═══════════════════════════════════ */

/* 0 — Background engine canvas (created by bg.js) */
#bgCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  image-rendering: optimizeSpeed;
}

/* 1 — Particle Canvas (embers) */
#particleCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: screen;  /* Embers blend additively over background */
  image-rendering: optimizeSpeed;
}


/* 2 — Atmosphere layers */
.atmo-layer {
  position: fixed;
  left: 0; right: 0; top: -15vh; bottom: -15vh;
  z-index: 2;
  pointer-events: none;
}
.atmo-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 100% 80% at 50% 50%,
    transparent 30%,
    rgba(0,0,0,0.70) 100%
  );
}
.atmo-fire-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 35vh;
  background: radial-gradient(
    ellipse 90% 55% at 50% 110%,
    rgba(140,0,0,0.18) 0%,
    rgba(80,0,0,0.08) 45%,
    transparent 70%
  );
  animation: fireBreath 4s ease-in-out infinite alternate;
}
@keyframes fireBreath {
  from { opacity: 0.7; transform: scaleY(0.95); }
  to   { opacity: 1;   transform: scaleY(1.05); }
}
.atmo-scanlines {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.04) 2px,
    rgba(0,0,0,0.04) 4px
  );
  pointer-events: none;
}

/* 3 — Film grain noise */
.noise {
    position: fixed;
    inset: -100px;
    z-index: 3;
    pointer-events: none;
    opacity: 0.1;
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyBAMAAADsEZWCAAAAGFBMVEUAAAAAAAAMDAwYGBglJSUrKytSUlJjY2Nv0jL9AAAAK3RSTlMAAQIDAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKiwtMDuG0AAAAVZJREFUOMul1M0LwjAQB/BcY4/S9m4ePCjWw25e9OBBBA/evLjnIgjiwb/vN2mX7m2H+YTA72XzG5IEHcexg7TNYy3P88k5vX8+b3w+F344X7x9Yj1xPh98Pud+OF+8fWI9cT4ffD7nfjhfvH1iPWEz54s3T6wnbOZ88eaJ9YTNnC/ePLGe+O8x3jyxxnh1YI3x6sAa49WBNcarA2uMVwfWGK8OrDFeHVhjvDqwxvjvxhrj1YI1xqsFa4xXC9YYrxasMV4tWGO8WrDGeLVgjfFqwRrj1YI1xqsFa4xXC9YYrxasMV4tWGO8WrDGeLVgjfFqwRrj1YI1xqsFa4xXC9YYrxasMV4tWGO8WrDGeLVgjfFqwRrj1YI1xqsFa4xXC9YYrxasMV4tWGO8WrDGeLVgjfF+AV86qA4140g9AAAAAElFTkSuQmCC");
    background-size: 150px;
    background-repeat: repeat;
    animation: grainShift 0.4s steps(2) infinite;
  }
@keyframes grainShift {
  0%   { transform: translate(0,0)    rotate(0deg); }
  25%  { transform: translate(-3px,-2px) rotate(0.2deg); }
  50%  { transform: translate(2px,3px)   rotate(-0.1deg); }
  75%  { transform: translate(-1px,2px)  rotate(0.15deg); }
  100% { transform: translate(1px,-1px)  rotate(-0.05deg); }
}

/* 4 — Cursor glow */
.cursor-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,18,18,0.10) 0%, transparent 70%);
  pointer-events: none;
  z-index: 4;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
  opacity: 0;
}
@media (hover: hover) {
  .cursor-glow { opacity: 1; }
}

/* ═══════════════════════════════════
   LAYOUT WRAPPER
═══════════════════════════════════ */
.wrapper {
  position: relative;
  z-index: 10;
  max-width: 500px;
  margin: 0 auto;
  padding: 0 18px 80px;
}

/* ═══════════════════════════════════
   HERO SECTION
═══════════════════════════════════ */
.hero {
  padding: 56px 0 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

/* ─── LOGO WRAP (orbit layout) ─── */
.logo-wrap {
    position: relative;
    width: 100%;
    max-width: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    cursor: pointer;
    margin: 0 auto;
}

/* Red halo pulse behind center */
.logo-halo {
  position: absolute;
  inset: 20%;
  background: radial-gradient(ellipse, rgba(232,18,18,0.5) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(28px);
  pointer-events: none;
  animation: haloBreath 2.5s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes haloBreath {
  from { opacity: 0.5; transform: scale(0.88); }
  to   { opacity: 1;   transform: scale(1.12); }
}

/* ── ORBIT ARENA: full square, svg inside covers all ── */
.orbit-arena {
  position: absolute;
  inset: 0;
  /* pointer-events: none was here but blocks drag — removed */
  pointer-events: none; /* outer div: none, SVG itself handles events */
}
.orbit-ring-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: all; /* ✔ SVG catches pointer/touch for drag */
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none; /* ✔ prevent scroll conflict on mobile */
  transform: translateZ(0); /* Force GPU compositing layer */
}

/* ── MAGIC RING ANIMATIONS ── */

/* Ring 1 – Outer – clockwise 12s */
.ring-outer-spin {
  transform-origin: 200px 200px;
  animation: spinCW 12s linear infinite;
  will-change: transform;
}

/* Ring 2 – Middle – counter-clockwise 8s */
.ring-mid-spin {
  transform-origin: 200px 200px;
  animation: spinCCW 8s linear infinite;
  will-change: transform;
}

/* Ring 3 – Inner – clockwise slow 20s */
.ring-inner-spin {
  transform-origin: 200px 200px;
  animation: spinCW 20s linear infinite;
  will-change: transform;
}

/* Ghost base rings – static */
/* Static ghost rings — no pointer events */
.ring-base { pointer-events: none; }
/* Spinning ring arcs — no pointer events (drag handled by SVG root) */
.ring-outer-spin, .ring-mid-spin, .ring-inner-spin { pointer-events: none; }

/* Inner ring pulse (opacity breathing) */
.ring-inner-pulse {
  animation: ringPulse 2.5s ease-in-out infinite alternate;
}

@keyframes spinCW {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes spinCCW {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); }
}
@keyframes ringPulse {
  from { opacity: 0.4;  stroke-width: 1; }
  to   { opacity: 1;    stroke-width: 1.8; }
}

/* ── HOVER ACTIVE: rings speed up + glow intensify ── */
.orbit-hover-active .ring-outer-spin {
  animation-duration: 3s !important; /* 12s → 3s = 4× faster */
}
.orbit-hover-active .ring-mid-spin {
  animation-duration: 2s !important; /* 8s → 2s */
}
.orbit-hover-active .ring-inner-spin {
  animation-duration: 5s !important; /* 20s → 5s */
}
.orbit-hover-active .ring-inner-pulse {
  animation-duration: 0.8s !important;
}
/* Icons get brighter glow on active */
.orbit-hover-active .orbit-icon circle:first-child {
  stroke: #ff4444;
  filter: url(#fNeonStrong);
  transition: stroke 0.3s, filter 0.3s;
}


/* ── NEON COMET SHIMMER on all ring arcs ── */
/* Outer ring gets extra glow flare every few seconds */
.ring-outer-spin circle:first-child {
  animation: cometShimmerOuter 4s ease-in-out infinite alternate;
}
@keyframes cometShimmerOuter {
  from { filter: url(#fRingGlow); opacity: 0.75; stroke-width: 2; }
  to   { filter: url(#fNeonStrong); opacity: 1; stroke-width: 3; }
}

/* Middle ring */
.ring-mid-spin circle:first-child {
  animation: cometShimmerMid 3s ease-in-out infinite alternate;
}
@keyframes cometShimmerMid {
  from { opacity: 0.6; stroke-width: 2; }
  to   { opacity: 1;   stroke-width: 3.5; }
}


/* Orbit icon base state */
.orbit-icon {
  transition: filter 0.2s ease;
}
.orbit-icon circle:first-child {
  /* icon backdrop circle */
  transition: stroke 0.3s ease, filter 0.3s ease;
}

/* Neon scan dot — position controlled by initOrbitDrag JS, not CSS animation */
.orbit-scan-dot {
  /* animation: orbitScan 3s linear infinite; — disabled, drag controls position */
  pointer-events: none;
}
/* orbitScan keyframe kept but not used */
@keyframes orbitScan {
  from { transform: rotate(0deg)   translateY(-155px) rotate(0deg); }
  to   { transform: rotate(360deg) translateY(-155px) rotate(-360deg); }
}

/* Icon flash when scan dot passes by */
@keyframes iconFlash {
  0%  { filter: none; }
  15% { filter: drop-shadow(0 0 12px #ff4444) drop-shadow(0 0 24px #e81212); }
  40% { filter: drop-shadow(0 0 6px #e81212); }
  100% { filter: none; }
}

/* ── CENTER TYPOGRAPHY ── */
.logo-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.logo-center-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
  padding: 0 60px; /* inset from icons */
}

.logo-sub-top {
  /* Be Vietnam Pro – tiếng Việt chuẩn, Bebas Neue KHÔNG có dấu */
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: clamp(6px, 1.6vw, 9px);
  font-weight: 600;
  letter-spacing: 0.16em;
  color: rgba(232,18,18,0.7);
  text-transform: uppercase;
  line-height: 1.2;
}

.logo-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  line-height: 0.9;
}

.logo-kienthuc {
      font-family: 'Montserrat', sans-serif;
      font-size: clamp(18px, 4.5vw, 26px);
      font-weight: 800;
      letter-spacing: 0.06em;
      color: transparent;
      text-transform: uppercase;
      margin-bottom: -6px;
      text-shadow: 0 2px 4px rgba(0,0,0,0.8);
      background-color: #ff9900;
      background-image: url("flame.webp");
      background-size: 100% 200%;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      line-height: 1.3;
      padding-top: 0.1em;
      animation: textFire 4s linear infinite;
  }

.logo-pccc {
      font-family: 'Montserrat', sans-serif;
      font-size: clamp(36px, 9vw, 56px);
      font-weight: 800;
      letter-spacing: 0.02em;
      text-transform: uppercase;
      color: transparent;
      text-shadow:
        0 0 15px rgba(255,255,255,0.7),
        0 0 30px rgba(255,255,255,0.4),
        0 2px 8px rgba(0,0,0,0.8);
      background-color: #ff9900;
      background-image: url("flame.webp");
      background-size: 100% 200%;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      line-height: 1.3;
      padding-top: 0.1em;
      animation: pcccPulse 4s ease-in-out infinite alternate, textFire 4s linear infinite;
  }
@keyframes pcccPulse {
    from { text-shadow: 0 0 10px rgba(255,255,255,0.5), 0 2px 8px rgba(0,0,0,0.8); }
    to   { text-shadow: 0 0 25px rgba(255,255,255,1), 0 0 50px rgba(255,255,255,0.6), 0 2px 8px rgba(0,0,0,0.8); }
}

.logo-botui {
      font-family: 'Montserrat', sans-serif;
      font-size: clamp(22px, 6.5vw, 36px);
      font-weight: 800;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: transparent;
      text-shadow:
        0 0 20px rgba(232,18,18,0.8),
        0 0 40px rgba(232,18,18,0.4),
        0 2px 6px rgba(0,0,0,0.9);
      background-color: #ff9900;
      background-image: url("flame.webp");
      background-size: 100% 200%;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      line-height: 1.3;
      padding-top: 0.1em;
      animation: botuiNeon 2s ease-in-out infinite alternate, textFire 4s linear infinite;
  }
  @keyframes botuiNeon {
    from { text-shadow: 0 0 12px rgba(232,18,18,0.6), 0 2px 6px rgba(0,0,0,0.9); }
    to   { text-shadow: 0 0 30px rgba(232,18,18,1), 0 0 60px rgba(232,18,18,0.4), 0 0 8px rgba(255,80,0,0.5), 0 2px 6px rgba(0,0,0,0.9); }
  }
  
  @keyframes textFire {
    0% { background-position: 0% 100%; }
    100% { background-position: 0% 0%; }
  }

.logo-decree {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: clamp(7px, 1.8vw, 10px);
  font-weight: 400;
  letter-spacing: 0.1em;
  color: rgba(242,234,234,0.45);
  margin-top: 4px;
}

/* Center flame icon */
.logo-flame-icon {
  margin-top: 6px;
  animation: flameDance 1.8s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 8px rgba(232,18,18,0.7));
}
@keyframes flameDance {
  from { transform: scaleX(1) scaleY(1)    skewX(0deg);   }
  to   { transform: scaleX(1.08) scaleY(1.04) skewX(-3deg); }
}



/* ─── HERO META (tagline + badge) ─── */
.hero-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: center;
}

.tagline-line {
  /* Be Vietnam Pro Bold – tiếng Việt có dấu chuẩn, chỉ Latin mới dùng Bebas */
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: clamp(1.1rem, 4vw, 1.6rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-text);
  text-shadow: 0 0 24px rgba(232,18,18,0.45);
  min-height: 2.4rem;
  display: flex;
  align-items: center;
  gap: 2px;
  justify-content: center;
}
.tagline-cursor {
  color: var(--c-red-hot);
  animation: blink 0.9s step-end infinite;
  font-weight: 300;
  opacity: 1;
}
@keyframes blink {
  0%,100% { opacity: 1; }
  50%      { opacity: 0; }
}

.decree-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 20px;
  background: linear-gradient(
    135deg,
    rgba(232,18,18,0.10) 0%,
    rgba(139,0,0,0.07) 100%
  );
  border: 1px solid rgba(232,18,18,0.28);
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.6px;
  color: rgba(242,234,234,0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
}
.decree-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-red-hot);
  box-shadow: 0 0 8px var(--c-red-hot);
  animation: dotPulse 1.5s ease-in-out infinite alternate;
  flex-shrink: 0;
}
@keyframes dotPulse {
  from { box-shadow: 0 0 4px rgba(232,18,18,0.6); transform: scale(0.9); }
  to   { box-shadow: 0 0 12px rgba(232,18,18,1);  transform: scale(1.1); }
}
.decree-badge-icon { font-size: 0.9rem; }
.decree-badge strong { color: var(--c-red-hot); }

/* ─── WAVE DIVIDER ─── */
.wave-divider {
  width: 100%;
  height: 40px;
  overflow: visible;
  opacity: 0;
}
.wave-divider svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
#waveMain {
  animation: waveBreath 3.5s ease-in-out infinite alternate;
  transform-origin: center 35px;
}
#waveShadow {
  animation: waveBreath 2.8s ease-in-out infinite alternate-reverse;
  transform-origin: center 35px;
  opacity: 0.5;
}
@keyframes waveBreath {
  from { transform: scaleY(0.85) translateX(0); }
  to   { transform: scaleY(1.15) translateX(-6px); }
}

/* ─── HERO STATS ─── */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 28px;
  background: linear-gradient(135deg, rgba(232,18,18,0.07), rgba(139,0,0,0.05));
  border: 1px solid rgba(232,18,18,0.18);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  opacity: 0;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.stat-num {
  font-family: var(--f-hero);
  font-size: 1.8rem;
  line-height: 1;
  color: var(--c-red-hot);
  text-shadow: 0 0 14px rgba(232,18,18,0.6);
  letter-spacing: 1px;
}
.stat-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--c-text-dim);
}
.stat-divider {
  color: rgba(232,18,18,0.25);
  font-size: 1.4rem;
  font-weight: 100;
}

/* ═══════════════════════════════════
   LINKS SECTION
═══════════════════════════════════ */
.links-section {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

/* ─── GROUP ─── */
.link-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Group header */
.group-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Be Vietnam Pro', sans-serif; /* tiếng Việt có dấu */
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--c-text-dim);
  margin-bottom: 4px;
  opacity: 0;
}
.group-header svg {
  opacity: 0.7;
  flex-shrink: 0;
  animation: gemSpin 8s linear infinite;
}
@keyframes gemSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.group-header::before,
.group-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232,18,18,0.35));
}
.group-header::after {
  background: linear-gradient(90deg, rgba(232,18,18,0.35), transparent);
}

/* ─── LINK CARD ─── */
.link-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.038) 0%,
    rgba(139,0,0,0.05)  100%
  );
  border: 1px solid rgba(232,18,18,0.14);
  border-radius: var(--r-card);
  cursor: pointer;
  overflow: hidden;
  transition:
    transform var(--dur-normal) var(--ease-out),
    box-shadow var(--dur-normal) var(--ease-out),
    border-color var(--dur-normal) var(--ease-out),
    background var(--dur-normal) var(--ease-out);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  will-change: transform;
  opacity: 0;
  /* Preserve 3D for tilt effect */
  transform-style: preserve-3d;
  perspective: 600px;
}

/* Sweeping light on hover */
.lc-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255,255,255,0.07) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  transition: transform 0.65s var(--ease-out);
  pointer-events: none;
  border-radius: var(--r-card);
}

.link-card:hover .lc-shine,
.link-card:focus-visible .lc-shine {
  transform: translateX(200%);
}
.link-card:hover,
.link-card:focus-visible {
  border-color: rgba(232,18,18,0.48);
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.055) 0%,
    rgba(139,0,0,0.10) 100%
  );
  box-shadow:
    0 6px 28px rgba(232,18,18,0.18),
    0 0 0 1px rgba(232,18,18,0.08),
    inset 0 1px 0 rgba(255,255,255,0.07);
  transform: translateY(-3px);
}

/* Featured card */
.link-card--featured {
  background: linear-gradient(
    135deg,
    rgba(232,18,18,0.09) 0%,
    rgba(139,0,0,0.11) 100%
  );
  border-color: rgba(232,18,18,0.32);
  box-shadow: 0 4px 22px rgba(232,18,18,0.10);
}
.link-card--featured:hover {
  box-shadow:
    0 8px 36px rgba(232,18,18,0.28),
    0 0 0 1px rgba(232,18,18,0.12);
}

/* Featured badge */
.lc-featured-badge {
  position: absolute;
  top: -1px;
  right: 16px;
  background: var(--c-red-hot);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  padding: 4px 10px;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 2px 10px rgba(232,18,18,0.5);
  animation: badgeGlow 1.8s ease-in-out infinite alternate;
}
@keyframes badgeGlow {
  from { box-shadow: 0 2px 8px  rgba(232,18,18,0.4); }
  to   { box-shadow: 0 2px 18px rgba(232,18,18,0.85); }
}

/* New badge */
.lc-new-badge {
  flex-shrink: 0;
  background: linear-gradient(135deg, #1a6b1a, #0d3d0d);
  color: #7fff7f;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 4px 9px;
  border-radius: 50px;
  border: 1px solid rgba(127,255,127,0.3);
}

/* Icon */
.lc-icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: rgba(232,18,18,0.07);
  border: 1px solid rgba(232,18,18,0.16);
  transition: background var(--dur-normal), transform var(--dur-normal);
}
.link-card:hover .lc-icon {
  background: rgba(232,18,18,0.14);
  transform: scale(1.08);
}
.lc-icon svg {
  width: 28px;
  height: 28px;
}

/* Body text */
.lc-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.lc-title {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--c-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--dur-normal);
}
.lc-sub {
  font-size: 0.73rem;
  color: var(--c-text-dim);
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.link-card:hover .lc-title { color: #fff; }

/* Arrow */
.lc-arrow {
  flex-shrink: 0;
  color: rgba(232,18,18,0.55);
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  transition: transform 0.3s var(--ease-out), color 0.3s;
}
.link-card:hover .lc-arrow {
  transform: translateX(5px);
  color: var(--c-red-hot);
}

/* ─── SOCIAL GRID ─── */
.social-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 380px) {
  .social-grid { grid-template-columns: repeat(4, 1fr); }
}

.social-card {
  display: block;
  border: 1px solid rgba(232,18,18,0.12);
  border-radius: 14px;
  padding: 14px 8px;
  background: rgba(255,255,255,0.025);
  cursor: pointer;
  transition:
    transform var(--dur-normal) var(--ease-out),
    border-color var(--dur-normal),
    background var(--dur-normal),
    box-shadow var(--dur-normal);
  opacity: 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.social-card:hover {
  border-color: rgba(232,18,18,0.42);
  background: rgba(232,18,18,0.08);
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 8px 28px rgba(232,18,18,0.2);
}
.sc-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.sc-icon {
  width: 34px;
  height: 34px;
  color: var(--c-red-hot);
  transition: transform 0.35s var(--ease-back), color 0.25s;
}
.sc-icon svg { width: 100%; height: 100%; }
.social-card:hover .sc-icon {
  transform: scale(1.18) rotate(-6deg);
  color: #ff4444;
}
.sc-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: 0.3px;
}
.sc-handle {
  font-size: 0.62rem;
  color: var(--c-text-dim);
  letter-spacing: 0.2px;
}

/* ─── EMERGENCY CARD ─── */
.emergency-card {
  position: relative;
  padding: 22px 20px;
  background: linear-gradient(
    135deg,
    rgba(232,18,18,0.13) 0%,
    rgba(100,0,0,0.10)  100%
  );
  border: 1.5px solid rgba(232,18,18,0.38);
  border-radius: 20px;
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
}

/* Pulse rings */
.ec-pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  border: 2px solid rgba(232,18,18,0.5);
  pointer-events: none;
  animation: ecRingPulse 2.4s ease-in-out infinite;
}
.ec-pulse-ring--2 {
  animation-delay: 1.2s;
}
@keyframes ecRingPulse {
  0%   { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0;   transform: scale(1.06); }
}

.ec-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
}
.ec-icon-area {
  flex-shrink: 0;
}
.ec-siren {
  font-size: 2.4rem;
  line-height: 1;
  animation: sirenShake 3.5s ease-in-out infinite;
  display: inline-block;
}
@keyframes sirenShake {
  0%,85%,100% { transform: rotate(0); }
  87%  { transform: rotate(-10deg); }
  89%  { transform: rotate(10deg); }
  91%  { transform: rotate(-7deg); }
  93%  { transform: rotate(7deg); }
  95%  { transform: rotate(-4deg); }
  97%  { transform: rotate(4deg); }
}
.ec-text { flex: 1; }
.ec-title {
  display: block;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--c-text);
  margin-bottom: 4px;
}
.ec-desc {
  font-size: 0.76rem;
  color: var(--c-text-dim);
  margin-bottom: 8px;
}
.ec-numbers {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ec-num-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: rgba(232,18,18,0.15);
  border: 1px solid rgba(232,18,18,0.3);
  border-radius: 50px;
  font-size: 0.72rem;
  color: var(--c-text-dim);
}
.ec-num-chip em {
  font-style: normal;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--c-red-hot);
}
.ec-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 18px;
  background: var(--c-red-hot);
  color: #fff;
  border-radius: var(--r-btn);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.8px;
  box-shadow: 0 4px 18px rgba(232,18,18,0.45);
  transition: all var(--dur-normal) var(--ease-out);
  animation: callBtnPulse 2s ease-in-out infinite alternate;
  white-space: nowrap;
}
@keyframes callBtnPulse {
  from { box-shadow: 0 4px 14px rgba(232,18,18,0.4); }
  to   { box-shadow: 0 4px 28px rgba(232,18,18,0.75); }
}
.ec-btn:hover {
  background: #ff2424;
  transform: scale(1.06);
  box-shadow: 0 6px 30px rgba(232,18,18,0.7);
}
.ec-btn svg { flex-shrink: 0; }

/* ═══════════════════════════════════
   FOOTER
═══════════════════════════════════ */
.site-footer {
  margin-top: 52px;
  text-align: center;
  padding: 0 0 12px;
  opacity: 0;
}
.footer-flame-wave {
  height: 30px;
  margin-bottom: 20px;
  overflow: hidden;
}
.footer-flame-wave svg {
  width: 100%;
  height: 100%;
}
.footer-logo-mark {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
  opacity: 0.55;
}
.footer-brand {
  font-family: 'Be Vietnam Pro', sans-serif; /* BỎ TÚI cần tiếng Việt */
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(242,234,234,0.22);
  margin-bottom: 6px;
}
.footer-brand span {
  color: rgba(232,18,18,0.38);
}
.footer-tagline {
  font-size: 0.73rem;
  color: var(--c-text-faint);
  letter-spacing: 0.8px;
  margin-bottom: 4px;
}
.footer-copy {
  font-size: 0.65rem;
  color: rgba(242,234,234,0.15);
  letter-spacing: 0.5px;
}

/* ═══════════════════════════════════
   SCROLLBAR
═══════════════════════════════════ */
::-webkit-scrollbar { 
  display: none; 
}

/* ═══════════════════════════════════
   TEXT SELECTION
═══════════════════════════════════ */
::selection {
  background: rgba(232,18,18,0.35);
  color: #fff;
}

/* ═══════════════════════════════════
   FOCUS ACCESSIBILITY
═══════════════════════════════════ */
:focus-visible {
  outline: 2px solid rgba(232,18,18,0.7);
  outline-offset: 3px;
}

/* ═══════════════════════════════════
   RESPONSIVE
═══════════════════════════════════ */
@media (max-width: 450px) {
    .tagline-line {
      font-size: clamp(0.9rem, 3.5vw, 1.2rem);
      min-height: 2.8rem;
    }
  }
  @media (max-width: 400px) {
    .hero { padding: 44px 0 20px; gap: 16px; }
    .logo-wrap { max-width: 300px; max-height: 300px; }
    .logo-pccc { font-size: 34px !important; }
    .logo-botui { font-size: 22px !important; }
    
    .lc-title { font-size: 0.86rem; }
    .lc-sub   { font-size: 0.68rem; }
    .ec-btn   { padding: 10px 14px; font-size: 0.8rem; }
    
    .hero-stats { 
      gap: 6px; 
      padding: 12px 8px; 
      width: 100%; 
      justify-content: center;
      flex-wrap: nowrap;
    }
    .stat-num { font-size: 1.15rem; }
    .stat-label { font-size: 0.5rem; letter-spacing: 0.5px; }
    .stat-divider { margin: 0 2px; font-size: 0.8rem; }
  }
@media (max-width: 340px) {
  .social-grid { grid-template-columns: repeat(2, 1fr); }
  .ec-content { flex-wrap: wrap; }
  .ec-btn { width: 100%; justify-content: center; }
}

/* ═══════════════════════════════════
   MOBILE PERFORMANCE (≤ 480px)
   Reduce expensive blur filters on small screens
═══════════════════════════════════ */
@media (max-width: 480px) {
  .logo-halo {
    filter: blur(16px); /* Reduced from 28px — cheaper GPU fill */
  }
  /* Reduce backdrop blur on cards for smoother scrolling */
  .link-card,
  .social-card,
  .decree-badge,
  .emergency-card {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
  /* Simplify ring shimmer on small screens */
  .ring-outer-spin circle:first-child,
  .ring-mid-spin circle:first-child {
    animation-duration: 8s;
  }
}

/* Removed prefers-reduced-motion block */

/* ═══════════════════════════════════
   PRINT
═══════════════════════════════════ */
@media print {
  #particleCanvas, .atmo-layer, .noise, .cursor-glow { display: none; }
  .wrapper { max-width: 100%; }
  .link-card { border: 1px solid #ccc; opacity: 1 !important; }
}
