:root {
  --bg-abyss: #030814;
  --bg-deep: #061126;
  --bg-navy: #0a1c3f;
  --bg-panel: rgba(8, 20, 44, 0.88);

  --gold-100: #fff6d8;
  --gold-300: #f7dfae;
  --gold-500: #e3bd63;
  --gold-700: #b98a2e;
  --gold-900: #6e4f12;

  --cyan: #37e6ff;
  --blue-400: #3aa0ff;
  --blue-600: #1668d8;

  --green-online: #2fe58c;
  --red-crimson: #ff3344;

  --text-hi: #f2f7ff;
  --text-mid: #c3d3ec;
  --text-low: #8195b5;

  --font-body: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Oswald', 'Be Vietnam Pro', sans-serif;
  --font-accent: 'Cinzel', 'Times New Roman', serif;

  --header-h: 76px;

  --t-fast: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --t-smooth: 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);

  --shadow-deep: 0 18px 44px rgba(0, 0, 0, 0.85);
  --glow-cyan: rgba(55, 230, 255, 0.45);
  --glow-gold: rgba(227, 189, 99, 0.45);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  color-scheme: dark;
  background-color: var(--bg-abyss);
}

body {
  font-family: var(--font-body);
  color: var(--text-hi);
  background:
    radial-gradient(ellipse 90% 60% at 50% -8%, rgba(22, 68, 150, 0.42) 0%, transparent 60%),
    radial-gradient(circle at 50% 18%, var(--bg-navy) 0%, var(--bg-deep) 46%, var(--bg-abyss) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(227, 189, 99, 0.35);
  color: #fff;
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-abyss); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold-700), var(--blue-600));
  border-radius: 6px;
  border: 2px solid var(--bg-abyss);
}

h1, h2, h3, h4 { font-weight: 700; }

.svg-icon {
  width: 1.1em;
  height: 1.1em;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  fill: currentColor;
}
.svg-icon-lg { width: 1.7em; height: 1.7em; }
.svg-icon-xl { width: 2.3em; height: 2.3em; }

.ic-gold { fill: var(--gold-500); filter: drop-shadow(0 0 6px rgba(227, 189, 99, 0.5)); }
.ic-cyan { fill: var(--cyan); filter: drop-shadow(0 0 6px rgba(55, 230, 255, 0.5)); }
.ic-green { fill: var(--green-online); }
.ic-zalo { fill: #37b3ff; }
.ic-facebook { fill: #2f7cf6; }

.container {
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
  padding-inline: 32px;
}

#particle-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  opacity: 0.85;
}

.bg-vignette {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, transparent 40%, rgba(2, 5, 13, 0.55) 82%, rgba(3, 8, 20, 0.9) 100%);
  pointer-events: none;
  z-index: 2;
}

.text-gold-gradient {
  background: linear-gradient(180deg, #ffffff 0%, var(--gold-300) 32%, var(--gold-500) 62%, var(--gold-700) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 22px rgba(227, 189, 99, 0.28));
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: linear-gradient(180deg, rgba(2, 5, 13, 0.94) 0%, rgba(6, 17, 38, 0.82) 78%, rgba(6, 17, 38, 0) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background var(--t-fast), box-shadow var(--t-fast);
}

.site-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 4%, rgba(185, 138, 46, 0.75) 30%, rgba(247, 223, 174, 0.95) 50%, rgba(185, 138, 46, 0.75) 70%, transparent 96%);
}

.site-header.scrolled {
  background: linear-gradient(180deg, rgba(2, 5, 13, 0.97) 0%, rgba(4, 11, 26, 0.94) 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: var(--header-h);
  max-width: 1600px;
  margin-inline: auto;
  padding-inline: 32px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
}

.nav-logo-thumb {
  height: 48px;
  width: auto;
  filter: drop-shadow(0 0 10px rgba(58, 160, 255, 0.55)) drop-shadow(0 3px 6px rgba(0, 0, 0, 0.8));
  transition: transform var(--t-fast), filter var(--t-fast);
}

.nav-brand:hover .nav-logo-thumb {
  transform: scale(1.06);
  filter: drop-shadow(0 0 16px rgba(55, 230, 255, 0.75)) drop-shadow(0 3px 6px rgba(0, 0, 0, 0.8));
}

.nav-brand-texts {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.nav-brand-text {
  font-family: var(--font-accent);
  font-size: 1.32rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  background: linear-gradient(180deg, #fff 15%, var(--gold-300) 55%, var(--gold-500) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.9));
}

.nav-brand-sub {
  font-family: var(--font-accent);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(55, 230, 255, 0.65);
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 30px;
}

.nav-link {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-mid);
  text-decoration: none;
  padding: 8px 2px;
  position: relative;
  transition: color var(--t-fast), text-shadow var(--t-fast);
}

.nav-link::before,
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  height: 2px;
  width: 7px;
  background: var(--gold-500);
  opacity: 0;
  transform: scaleX(0);
  transition: all var(--t-smooth);
}

.nav-link::before { left: 0; }
.nav-link::after { right: 0; }

.nav-link:hover,
.nav-link.active {
  color: var(--gold-100);
  text-shadow: 0 0 14px rgba(247, 223, 174, 0.55);
}

.nav-link:hover::before,
.nav-link:hover::after,
.nav-link.active::before,
.nav-link.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav-link.active::before,
.nav-link.active::after {
  box-shadow: 0 0 8px var(--glow-gold);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-audio-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(185, 138, 46, 0.55);
  background: radial-gradient(circle at 35% 30%, rgba(22, 68, 150, 0.55), rgba(6, 17, 38, 0.9));
  color: var(--gold-300);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t-fast);
}

.btn-audio-toggle:hover {
  border-color: var(--gold-300);
  color: #fff;
  box-shadow: 0 0 14px rgba(55, 230, 255, 0.5), inset 0 0 10px rgba(55, 230, 255, 0.15);
  transform: translateY(-1px);
}

.btn-mobile-menu {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border: 1px solid rgba(185, 138, 46, 0.5);
  background: rgba(8, 20, 44, 0.7);
  color: var(--gold-300);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast);
}

.btn-mobile-menu:hover { border-color: var(--gold-300); }

.mu-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 220px;
  aspect-ratio: 2172 / 724;
  background: url('../assets/KMUS22_Button_Blank_01.png') center / 100% 100% no-repeat;
  border: none;
  outline: none;
  padding: 0;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  overflow: visible;
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.8));
  transition: transform 0.16s ease, filter var(--t-fast);
}

.mu-button::after {
  content: '';
  position: absolute;
  inset: 4% 3%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.28) 50%, transparent 58%);
  transform: translateX(-130%) skewX(-6deg);
  opacity: 0;
}

.mu-button:hover::after,
.mu-button:focus-visible::after {
  transform: translateX(130%) skewX(-6deg);
  opacity: 1;
  transition: transform 0.7s ease, opacity 0.2s ease;
}

.mu-button:hover,
.mu-button:focus-visible {
  background-image: url('../assets/KMUS22_Button_Blank_02.png');
  transform: scale(1.045) translateY(-1px);
  filter: drop-shadow(0 0 16px rgba(55, 230, 255, 0.65)) drop-shadow(0 6px 14px rgba(0, 0, 0, 0.9));
}

.mu-button:active {
  background-image: url('../assets/KMUS22_Button_Blank_02.png');
  transform: scale(0.97) translateY(2px);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.9));
}

.mu-button span {
  position: relative;
  z-index: 2;
  font-family: var(--font-display);
  font-weight: 600;
  color: #fff4d1;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-shadow: 0 2px 4px #000, 0 0 12px rgba(58, 160, 255, 0.85);
  margin-top: -2px;
  transition: color var(--t-fast), text-shadow var(--t-fast);
}

.mu-button:hover span,
.mu-button:focus-visible span {
  color: #ffffff;
  text-shadow: 0 2px 4px #000, 0 0 12px var(--cyan), 0 0 30px rgba(247, 223, 174, 0.65);
}

.btn-ic {
  position: relative;
  z-index: 2;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  transition: transform var(--t-fast);
}

.mu-button:hover .btn-ic,
.mu-button:focus-visible .btn-ic { transform: translateY(-1px) scale(1.1); }

.btn-gold .btn-ic { fill: var(--gold-300); filter: drop-shadow(0 0 6px rgba(227, 189, 99, 0.85)); }
.btn-cyan .btn-ic { fill: var(--cyan); filter: drop-shadow(0 0 6px rgba(55, 230, 255, 0.85)); }
.btn-zalo .btn-ic { fill: #37b3ff; filter: drop-shadow(0 0 6px rgba(55, 179, 255, 0.85)); }
.btn-fan .btn-ic { fill: #5b93ff; filter: drop-shadow(0 0 6px rgba(91, 147, 255, 0.85)); }
.btn-guide .btn-ic { fill: #c39bff; filter: drop-shadow(0 0 6px rgba(195, 155, 255, 0.85)); }

.mu-button.btn-gold:hover,
.mu-button.btn-gold:focus-visible {
  filter: drop-shadow(0 0 18px rgba(227, 189, 99, 0.7)) drop-shadow(0 6px 14px rgba(0, 0, 0, 0.9));
}

.mu-button.btn-cyan:hover,
.mu-button.btn-cyan:focus-visible {
  filter: drop-shadow(0 0 18px rgba(55, 210, 255, 0.65)) drop-shadow(0 6px 14px rgba(0, 0, 0, 0.9));
}

.mu-button.btn-zalo:hover,
.mu-button.btn-zalo:focus-visible {
  filter: drop-shadow(0 0 18px rgba(55, 179, 255, 0.65)) drop-shadow(0 6px 14px rgba(0, 0, 0, 0.9));
}

.mu-button.btn-fan:hover,
.mu-button.btn-fan:focus-visible {
  filter: drop-shadow(0 0 18px rgba(80, 140, 255, 0.65)) drop-shadow(0 6px 14px rgba(0, 0, 0, 0.9));
}

.mu-button.btn-guide:hover,
.mu-button.btn-guide:focus-visible {
  filter: drop-shadow(0 0 18px rgba(180, 140, 255, 0.65)) drop-shadow(0 6px 14px rgba(0, 0, 0, 0.9));
}

.btn-guide > span { color: #efe7ff; }
.btn-zalo > span { color: #ddf1ff; }
.btn-fan > span { color: #e2ebff; }

.mu-btn-nav { width: 172px; }
.mu-btn-nav span { font-size: 0.84rem; }

.mu-btn-sm { width: 186px; }
.mu-btn-sm span { font-size: 0.92rem; }

.mu-btn-md { width: 218px; }
.mu-btn-md span { font-size: 1.02rem; }

.mu-btn-lg { width: 264px; }
.mu-btn-lg span { font-size: 1.14rem; }

.hero-section {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding-top: calc(var(--header-h) + 20px);
  padding-bottom: 56px;
  z-index: 3;
}

.hero-base-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 62% 46% at 50% 30%, rgba(23, 74, 165, 0.5) 0%, rgba(10, 28, 63, 0.28) 52%, transparent 78%),
    linear-gradient(180deg, rgba(3, 8, 20, 0.25) 0%, transparent 30%, rgba(3, 8, 20, 0.6) 100%);
  z-index: 1;
}

.hero-glow {
  position: absolute;
  left: 50%;
  top: 30%;
  width: min(720px, 80vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(55, 140, 255, 0.22) 0%, rgba(55, 140, 255, 0.07) 45%, transparent 70%);
  filter: blur(6px);
  animation: heroGlowPulse 6s ease-in-out infinite alternate;
  z-index: 1;
  pointer-events: none;
}

@keyframes heroGlowPulse {
  from { opacity: 0.65; transform: translate(-50%, -50%) scale(0.96); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
}

.hero-characters-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
  will-change: transform;
}

.char-side {
  position: absolute;
  bottom: 0;
  height: 100%;
  width: min(42vw, 820px);
  background-image: url('../assets/KMUS22_Background_Characters_NoLogo.png');
  background-repeat: no-repeat;
  background-size: auto 100%;
  filter: drop-shadow(0 0 30px rgba(30, 120, 255, 0.3));
  will-change: transform, filter;
  transform-origin: 50% 100%;
  animation: charAura 4.5s ease-in-out infinite alternate;
}

/* ── Lớp video nền AI (nếu có hero_characters_loop.mp4) ── */
.hero-video-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.6s ease;
}

.hero-video-layer.ready { opacity: 0.9; }

/* Khi video AI đã chạy: ẩn ảnh nhân vật tĩnh để không chồng hình */
body.has-hero-video .hero-characters-container {
  opacity: 0;
  transition: opacity 1.4s ease;
}

.hero-video-layer video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: screen; /* nền đen của video tự hoà vào nền trang */
  filter: saturate(1.15) brightness(1.02) contrast(1.05);
  -webkit-mask-image: radial-gradient(ellipse 78% 68% at 50% 55%, #000 40%, transparent 78%);
  mask-image: radial-gradient(ellipse 78% 68% at 50% 55%, #000 40%, transparent 78%);
}

/* Aura sáng thở nhịp dưới chân nhân vật */
.char-side::after {
  content: '';
  position: absolute;
  bottom: 2%;
  width: 68%;
  height: 16%;
  background: radial-gradient(ellipse at center, rgba(55, 160, 255, 0.35) 0%, rgba(55, 230, 255, 0.14) 45%, transparent 72%);
  filter: blur(14px);
  animation: charGroundGlow 3.6s ease-in-out infinite alternate;
  pointer-events: none;
}

.char-left {
  left: 0;
  background-position: left bottom;
}

.char-left::after { left: 4%; }

.char-right {
  right: 0;
  background-position: right bottom;
  animation-name: charEnterRight, charFloat, charAura;
  animation-delay: 0.15s, 2s, 2.2s;
}

.char-right::after { right: 4%; animation-delay: 1.4s; }

@keyframes charEnterLeft {
  from { opacity: 0; transform: translateX(-70px) translateY(20px); filter: blur(8px) drop-shadow(0 0 0 rgba(30, 120, 255, 0)); }
  to { opacity: 1; transform: translateX(0) translateY(0); filter: blur(0) drop-shadow(0 0 30px rgba(30, 120, 255, 0.3)); }
}

@keyframes charEnterRight {
  from { opacity: 0; transform: translateX(70px) translateY(20px); filter: blur(8px) drop-shadow(0 0 0 rgba(30, 120, 255, 0)); }
  to { opacity: 1; transform: translateX(0) translateY(0); filter: blur(0) drop-shadow(0 0 30px rgba(30, 120, 255, 0.3)); }
}

@keyframes charFloat {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(-12px) scale(1.008); }
}

@keyframes charAura {
  from { filter: drop-shadow(0 0 24px rgba(30, 120, 255, 0.25)); }
  to { filter: drop-shadow(0 0 46px rgba(55, 230, 255, 0.55)) drop-shadow(0 0 26px rgba(227, 189, 99, 0.18)); }
}

@keyframes charGroundGlow {
  from { opacity: 0.45; transform: scaleX(0.9); }
  to { opacity: 1; transform: scaleX(1.08); }
}

.hero-center {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: min(1260px, 86vw);
  padding-inline: 20px;
}

.hero-logo-wrap {
  position: relative;
  display: inline-block;
  animation: logoIn 1.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes logoIn {
  from { opacity: 0; transform: scale(0.86) translateY(26px); filter: blur(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}

/* ── Vòng hào quang tia sáng xoay sau logo ── */
.logo-rays {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 150%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  z-index: -2;
  pointer-events: none;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(227, 189, 99, 0.14) 0deg 6deg,
    transparent 6deg 24deg
  );
  -webkit-mask-image: radial-gradient(circle, rgba(0,0,0,0.9) 12%, rgba(0,0,0,0.35) 40%, transparent 68%);
  mask-image: radial-gradient(circle, rgba(0,0,0,0.9) 12%, rgba(0,0,0,0.35) 40%, transparent 68%);
  animation: raysSpin 26s linear infinite, raysBreath 5s ease-in-out infinite alternate;
}

@keyframes raysSpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes raysBreath {
  from { opacity: 0.55; }
  to { opacity: 1; }
}

/* ── Quầng sáng thở nhịp sau logo ── */
.logo-halo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 120%;
  aspect-ratio: 1.6;
  transform: translate(-50%, -50%);
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgba(55, 230, 255, 0.28) 0%, rgba(58, 160, 255, 0.14) 38%, transparent 68%),
    radial-gradient(ellipse at center, rgba(227, 189, 99, 0.18) 0%, transparent 55%);
  filter: blur(10px);
  animation: haloPulse 4.2s ease-in-out infinite alternate;
}

@keyframes haloPulse {
  from { opacity: 0.55; transform: translate(-50%, -50%) scale(0.92); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}

.hero-logo {
  width: min(500px, 54vw);
  height: auto;
  filter: drop-shadow(0 0 26px rgba(58, 160, 255, 0.65)) drop-shadow(0 16px 34px rgba(0, 0, 0, 0.95));
  transition: filter var(--t-smooth), transform var(--t-smooth);
  animation: logoFloat 5.5s ease-in-out infinite alternate, logoGlowShift 4s ease-in-out infinite alternate;
  will-change: transform, filter;
}

@keyframes logoFloat {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(-8px) scale(1.015); }
}

@keyframes logoGlowShift {
  from { filter: drop-shadow(0 0 22px rgba(58, 160, 255, 0.6)) drop-shadow(0 16px 34px rgba(0, 0, 0, 0.95)); }
  to { filter: drop-shadow(0 0 38px rgba(55, 230, 255, 0.85)) drop-shadow(0 0 55px rgba(227, 189, 99, 0.45)) drop-shadow(0 16px 34px rgba(0, 0, 0, 0.95)); }
}

.hero-logo:hover {
  transform: scale(1.03);
  animation-play-state: paused, paused;
  filter: drop-shadow(0 0 40px rgba(55, 230, 255, 0.95)) drop-shadow(0 0 70px rgba(227, 189, 99, 0.55)) drop-shadow(0 16px 34px rgba(0, 0, 0, 0.95));
}

/* ── Vệt sáng quét ngang logo định kỳ ── */
.logo-shine {
  position: absolute;
  inset: 6% 2%;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
  -webkit-mask-image: url('../assets/KMUS22_Classic_Logo.png');
  mask-image: url('../assets/KMUS22_Classic_Logo.png');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.logo-shine::before {
  content: '';
  position: absolute;
  top: -30%;
  bottom: -30%;
  left: 0;
  width: 32%;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.34) 45%, rgba(255, 246, 216, 0.55) 50%, rgba(255, 255, 255, 0.34) 55%, transparent 100%);
  transform: translateX(-220%) skewX(-14deg);
  animation: logoSweep 4.6s ease-in-out infinite;
}

@keyframes logoSweep {
  0% { transform: translateX(-220%) skewX(-14deg); }
  38%, 100% { transform: translateX(480%) skewX(-14deg); }
}

/* ── Hạt lấp lánh quanh logo ── */
.logo-sparkles {
  position: absolute;
  inset: -8%;
  z-index: 3;
  pointer-events: none;
}

.spark {
  position: absolute;
  width: 6px;
  height: 6px;
  background: radial-gradient(circle, #fff 0%, rgba(247, 223, 174, 0.9) 40%, transparent 70%);
  border-radius: 50%;
  opacity: 0;
  animation: sparkTwinkle 3.4s ease-in-out infinite;
}

.spark::before {
  content: '';
  position: absolute;
  inset: -140%;
  background:
    linear-gradient(0deg, transparent 46%, rgba(255, 246, 216, 0.85) 50%, transparent 54%),
    linear-gradient(90deg, transparent 46%, rgba(255, 246, 216, 0.85) 50%, transparent 54%);
}

@keyframes sparkTwinkle {
  0%, 100% { opacity: 0; transform: scale(0.3) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(45deg); }
}

.spark.s1 { top: 12%; left: 8%; animation-delay: 0s; }
.spark.s2 { top: 4%; right: 16%; animation-delay: 0.7s; width: 8px; height: 8px; }
.spark.s3 { bottom: 18%; left: 3%; animation-delay: 1.3s; width: 5px; height: 5px; }
.spark.s4 { bottom: 8%; right: 6%; animation-delay: 1.9s; }
.spark.s5 { top: 40%; right: -2%; animation-delay: 2.5s; width: 7px; height: 7px; }
.spark.s6 { top: 55%; left: -3%; animation-delay: 3s; width: 5px; height: 5px; }

.hero-tagline {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: clamp(0.82rem, 1.25vw, 1.05rem);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-300);
  text-shadow: 0 2px 10px #000, 0 0 18px rgba(58, 160, 255, 0.65);
  animation: fadeUp 0.9s ease 0.35s both;
}

.hero-tagline span { color: var(--cyan); font-weight: 600; }

.hero-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(430px, 72%);
  margin: 16px auto 26px;
  animation: fadeUp 0.9s ease 0.5s both;
}

.hd-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-500));
}

.hd-line:last-child { background: linear-gradient(90deg, var(--gold-500), transparent); }

.hd-gem {
  width: 9px;
  height: 9px;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-700));
  transform: rotate(45deg);
  box-shadow: 0 0 10px var(--glow-gold), 0 0 20px rgba(55, 230, 255, 0.35);
}

.hero-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
  width: 100%;
  animation: fadeUp 0.9s ease 0.65s both;
}

.hero-actions .mu-button {
  width: 200px;
  flex-shrink: 0;
}

.hero-actions .mu-button span { font-size: 0.94rem; }

.server-status-bar {
  position: relative;
  width: 100%;
  background: linear-gradient(180deg, rgba(10, 24, 54, 0.92), rgba(5, 12, 30, 0.94));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(185, 138, 46, 0.4);
  padding: 12px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: var(--shadow-deep), inset 0 0 22px rgba(22, 68, 150, 0.16);
  clip-path: polygon(
    14px 0, calc(100% - 14px) 0, 100% 14px,
    100% calc(100% - 14px), calc(100% - 14px) 100%,
    14px 100%, 0 calc(100% - 14px), 0 14px
  );
  animation: fadeUp 0.9s ease 0.8s both;
}

.server-status-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-500), var(--cyan), transparent);
  opacity: 0.8;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
  justify-content: center;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green-online);
  box-shadow: 0 0 10px var(--green-online), 0 0 22px rgba(47, 229, 140, 0.5);
  animation: pulse 2.2s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(1.35); }
}

.status-texts {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
  text-align: left;
}

.status-label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-low);
  white-space: nowrap;
}

.status-value {
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--gold-300);
  white-space: nowrap;
  text-shadow: 0 0 10px rgba(247, 223, 174, 0.35);
}

.status-value.status-online { color: var(--green-online); text-shadow: 0 0 12px rgba(47, 229, 140, 0.6); }

.status-divider {
  width: 1px;
  height: 26px;
  background: linear-gradient(180deg, transparent, rgba(227, 189, 99, 0.5), transparent);
  flex-shrink: 0;
}

.hero-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 150px;
  background: linear-gradient(180deg, transparent, var(--bg-abyss));
  z-index: 6;
  pointer-events: none;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.section {
  position: relative;
  z-index: 5;
  padding: 92px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 54px;
}

.section-kicker {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(55, 230, 255, 0.55);
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-ornament {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(340px, 70%);
  margin: 16px auto 0;
}

.so-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-700));
}

.so-line:last-child { background: linear-gradient(90deg, var(--gold-700), transparent); }

.so-gem {
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, var(--gold-300), var(--gold-700));
  box-shadow: 0 0 12px var(--glow-gold);
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 1.8vw, 30px);
  width: 100%;
  margin-bottom: 26px;
}

.event-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1672 / 941;
  transition: transform var(--t-smooth), filter var(--t-smooth);
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.85));
  will-change: transform;
}

.event-card:hover {
  transform: translateY(-6px) scale(1.012);
  filter: drop-shadow(0 0 26px rgba(55, 230, 255, 0.35)) drop-shadow(0 22px 44px rgba(0, 0, 0, 0.92));
}

.card-shine {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  overflow: hidden;
}

.card-shine::before {
  content: '';
  position: absolute;
  top: -12%;
  bottom: -12%;
  left: 0;
  width: 34%;
  background: linear-gradient(100deg, transparent 0%, rgba(160, 210, 255, 0.10) 45%, rgba(255, 255, 255, 0.16) 50%, rgba(160, 210, 255, 0.10) 55%, transparent 100%);
  transform: translateX(-160%) skewX(-8deg);
}

.event-card:hover .card-shine::before {
  transform: translateX(420%) skewX(-8deg);
  transition: transform 1.1s ease;
}

.event-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

.event-content {
  position: absolute;
  left: 13%;
  right: 13%;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  text-align: center;
}

.event-alpha .event-content { top: 33%; bottom: 41%; }
.event-beta .event-content { top: 37%; bottom: 42%; }

.event-content::before {
  content: '';
  position: absolute;
  inset: -5% -3%;
  z-index: -1;
  background: radial-gradient(ellipse at center, rgba(3, 9, 26, 0.6) 0%, rgba(3, 9, 26, 0.25) 60%, transparent 100%);
  border-radius: 14px;
}

.countdown-box {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 7px;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
  padding: 4px 7px 3px;
  background: linear-gradient(180deg, rgba(6, 14, 34, 0.9), rgba(3, 8, 20, 0.92));
  border: 1px solid rgba(227, 189, 99, 0.55);
  box-shadow: inset 0 0 10px rgba(22, 68, 150, 0.35), 0 4px 10px rgba(0, 0, 0, 0.7);
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
}

.countdown-number {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.7vw, 1.6rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--gold-100);
  text-shadow: 0 0 10px rgba(227, 189, 99, 0.75), 0 2px 4px #000;
  font-variant-numeric: tabular-nums;
}

.countdown-label {
  font-size: clamp(0.5rem, 0.62vw, 0.64rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-top: 1px;
}

.event-info-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
}

.event-badge {
  display: inline-block;
  padding: 2px 14px;
  font-family: var(--font-accent);
  font-size: clamp(0.62rem, 0.74vw, 0.76rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 8px 100%, 0 50%);
}

.badge-alpha {
  background: linear-gradient(90deg, var(--gold-700), var(--gold-500) 50%, var(--gold-700));
  color: #241400;
  text-shadow: 0 1px 0 rgba(255, 246, 216, 0.5);
}

.badge-beta {
  background: linear-gradient(90deg, var(--blue-600), var(--cyan) 50%, var(--blue-600));
  color: #00131f;
  text-shadow: 0 1px 0 rgba(210, 245, 255, 0.5);
}

.event-datetime {
  font-family: var(--font-display);
  font-size: clamp(0.78rem, 0.95vw, 0.98rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--gold-300);
  text-shadow: 0 2px 5px #000;
}

.event-desc {
  font-size: clamp(0.62rem, 0.74vw, 0.76rem);
  font-weight: 500;
  color: var(--text-mid);
  line-height: 1.4;
}

.event-desc strong { color: var(--gold-100); }

.event-action-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
}

.features-section {
  background: linear-gradient(180deg, transparent 0%, rgba(8, 20, 44, 0.35) 50%, transparent 100%);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 24px;
}

.feature-card {
  position: relative;
  background: linear-gradient(165deg, rgba(13, 33, 71, 0.72) 0%, rgba(6, 17, 38, 0.94) 100%);
  border: 1px solid rgba(185, 138, 46, 0.3);
  padding: 34px 24px 30px;
  text-align: center;
  overflow: hidden;
  transition: transform var(--t-smooth), border-color var(--t-smooth), box-shadow var(--t-smooth);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  clip-path: polygon(16px 0, calc(100% - 16px) 0, 100% 16px, 100% calc(100% - 16px), calc(100% - 16px) 100%, 16px 100%, 0 calc(100% - 16px), 0 16px);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-500), var(--cyan), transparent);
  transform: scaleX(0);
  transition: transform 0.55s var(--t-smooth);
}

.feature-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 55% at 50% -10%, rgba(55, 140, 255, 0.16), transparent 65%);
  opacity: 0;
  transition: opacity var(--t-smooth);
  pointer-events: none;
}

.feature-card:hover {
  transform: translateY(-7px);
  border-color: rgba(227, 189, 99, 0.65);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.85), 0 0 24px rgba(55, 230, 255, 0.22);
}

.feature-card:hover::before { transform: scaleX(1); }
.feature-card:hover::after { opacity: 1; }

.feature-icon-box {
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(45deg);
  border: 1px solid rgba(227, 189, 99, 0.6);
  background: linear-gradient(135deg, rgba(22, 104, 216, 0.4), rgba(8, 20, 44, 0.95));
  box-shadow: 0 0 14px rgba(22, 104, 216, 0.4), inset 0 0 12px rgba(55, 230, 255, 0.15);
  transition: all var(--t-smooth);
}

.feature-icon-box svg {
  transform: rotate(-45deg);
  width: 1.7em;
  height: 1.7em;
}

.feature-card:hover .feature-icon-box {
  border-color: var(--gold-300);
  box-shadow: 0 0 22px rgba(55, 230, 255, 0.6), inset 0 0 16px rgba(55, 230, 255, 0.3);
  transform: rotate(45deg) scale(1.1);
}

.feature-title {
  font-family: var(--font-display);
  font-size: 1.16rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-300);
  margin-bottom: 10px;
  text-shadow: 0 0 12px rgba(247, 223, 174, 0.3);
}

.feature-desc {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-mid);
  line-height: 1.7;
}

.download-section {
  background:
    radial-gradient(ellipse 60% 45% at 50% 40%, rgba(22, 68, 150, 0.28) 0%, transparent 72%),
    linear-gradient(180deg, transparent, rgba(3, 8, 20, 0.7) 85%);
}

.download-layout {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 28px;
  align-items: start;
}

.download-links-card,
.requirements-card {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid rgba(185, 138, 46, 0.38);
  padding: 30px;
  box-shadow: var(--shadow-deep), inset 0 0 30px rgba(22, 68, 150, 0.12);
  clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px);
}

.download-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--gold-300);
  padding-bottom: 14px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(227, 189, 99, 0.25);
  text-shadow: 0 0 14px rgba(247, 223, 174, 0.3);
}

.download-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dl-primary-btn {
  display: inline-flex;
  width: min(380px, 100%);
  margin: 2px auto 24px;
  animation: primaryGlow 3.2s ease-in-out infinite alternate;
}

.dl-primary-btn:hover,
.dl-primary-btn:focus-visible { animation: none; }

@keyframes primaryGlow {
  from { filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 10px rgba(227, 189, 99, 0.35)); }
  to { filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 24px rgba(227, 189, 99, 0.7)); }
}

.download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  background: linear-gradient(180deg, rgba(13, 33, 71, 0.55), rgba(8, 20, 44, 0.65));
  border: 1px solid rgba(58, 160, 255, 0.22);
  transition: all var(--t-fast);
}

.download-item:hover {
  background: linear-gradient(180deg, rgba(22, 60, 130, 0.6), rgba(10, 26, 58, 0.8));
  border-color: rgba(227, 189, 99, 0.6);
  transform: translateX(6px);
  box-shadow: -4px 0 0 0 var(--gold-500), 0 8px 20px rgba(0, 0, 0, 0.55);
}

.download-info {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.download-name {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-hi);
}

.download-meta {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-low);
}

.req-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 6px;
}

.req-table th,
.req-table td {
  padding: 11px 12px;
  text-align: left;
  font-size: 0.86rem;
  border-bottom: 1px solid rgba(227, 189, 99, 0.14);
}

.req-table th {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--gold-300);
  background: rgba(13, 33, 71, 0.55);
}

.req-table td { color: var(--text-mid); }
.req-table tbody tr { transition: background var(--t-fast); }
.req-table tbody tr:hover { background: rgba(22, 68, 150, 0.18); }
.req-table td strong { color: var(--cyan); font-weight: 600; }

.community-section {
  background: linear-gradient(180deg, transparent, rgba(8, 20, 44, 0.3));
}

.community-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 22px;
}

.community-box {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 250px;
  padding: 17px 26px;
  text-decoration: none;
  background: linear-gradient(165deg, rgba(13, 33, 71, 0.75), rgba(6, 17, 38, 0.92));
  border: 1px solid rgba(185, 138, 46, 0.35);
  transition: all var(--t-fast);
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px);
}

.community-box:hover {
  border-color: var(--gold-300);
  transform: translateY(-5px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.75), 0 0 22px rgba(55, 230, 255, 0.35);
}

.community-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 35% 30%, rgba(22, 104, 216, 0.45), rgba(6, 17, 38, 0.95));
  border: 1px solid rgba(227, 189, 99, 0.45);
  box-shadow: 0 0 12px rgba(22, 104, 216, 0.35);
  transition: all var(--t-fast);
  flex-shrink: 0;
}

.community-box:hover .community-icon {
  border-color: var(--gold-300);
  box-shadow: 0 0 18px rgba(55, 230, 255, 0.55);
  transform: scale(1.08);
}

.community-texts {
  display: flex;
  flex-direction: column;
  text-align: left;
  min-width: 0;
}

.community-box-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold-300);
}

.community-box-desc {
  font-size: 0.79rem;
  font-weight: 400;
  color: var(--text-mid);
}

.site-footer {
  position: relative;
  z-index: 10;
  background: linear-gradient(180deg, var(--bg-abyss), #01040b);
  padding: 30px 0 34px;
  text-align: center;
  border-top: 1px solid rgba(185, 138, 46, 0.3);
}

.footer-ornament {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(420px, 80%);
  margin: 0 auto 26px;
}

.footer-logo {
  max-width: 190px;
  height: auto;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 12px rgba(58, 160, 255, 0.5));
}

.footer-copyright {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text-low);
  max-width: 680px;
  margin: 0 auto 14px;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 28px;
  list-style: none;
}

.footer-link {
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mid);
  text-decoration: none;
  transition: color var(--t-fast), text-shadow var(--t-fast);
}

.footer-link:hover {
  color: var(--gold-300);
  text-shadow: 0 0 12px rgba(247, 223, 174, 0.5);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 5, 13, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-fast), visibility var(--t-fast);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  position: relative;
  width: 100%;
  max-width: 620px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 36px 34px 32px;
  background: linear-gradient(165deg, #0d2148 0%, #061126 100%);
  border: 1px solid var(--gold-500);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.95),
    0 0 40px rgba(22, 104, 216, 0.35),
    inset 0 0 0 1px rgba(58, 160, 255, 0.25),
    inset 0 0 30px rgba(227, 189, 99, 0.12);
  transform: scale(0.9) translateY(24px);
  transition: transform var(--t-smooth);
}

.modal-overlay.active .modal-box { transform: scale(1) translateY(0); }

.modal-gem {
  position: absolute;
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, var(--gold-300), var(--gold-700));
  box-shadow: 0 0 12px var(--glow-gold);
}

.modal-gem-tl { top: -6px; left: -6px; }
.modal-gem-br { bottom: -6px; right: -6px; }

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 20, 44, 0.8);
  border: 1px solid rgba(227, 189, 99, 0.45);
  border-radius: 50%;
  color: var(--gold-300);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: all var(--t-fast);
}

.modal-close:hover {
  color: #fff;
  border-color: var(--red-crimson);
  background: rgba(120, 10, 25, 0.6);
  transform: rotate(90deg);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.42rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  color: var(--gold-100);
  text-shadow: 0 0 14px rgba(227, 189, 99, 0.45);
}

.modal-ornament {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(260px, 70%);
  margin: 12px auto 18px;
}

.modal-sub {
  text-align: center;
  color: var(--text-mid);
  font-size: 0.92rem;
  margin-bottom: 22px;
}

.modal-info-list {
  color: var(--text-mid);
  font-size: 0.92rem;
  line-height: 2;
  margin-bottom: 26px;
}

.modal-info-list strong { color: var(--gold-300); font-weight: 700; }

.modal-action { text-align: center; }

[data-reveal] { will-change: opacity, transform; }

.js [data-reveal="up"] {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.js [data-reveal="left"] {
  opacity: 0;
  transform: translateX(-46px);
  transition: opacity 0.85s ease, transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

.js [data-reveal="right"] {
  opacity: 0;
  transform: translateX(46px);
  transition: opacity 0.85s ease, transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

.js [data-reveal].revealed {
  opacity: 1;
  transform: none;
}

@media (max-width: 1280px) {
  .hero-center { max-width: min(1060px, 90vw); }
  .char-side { width: 38vw; }
  .hero-actions .mu-button { width: 190px; }
}

@media (max-width: 1100px) {
  .nav-menu { gap: 20px; }
  .download-layout { grid-template-columns: 1fr; }
  .char-side { opacity: 0.85; }
}

@media (max-width: 1020px) {
  .events-grid {
    grid-template-columns: 1fr;
    max-width: 600px;
    gap: 30px;
    margin-inline: auto;
  }
  .hero-characters-container { opacity: 0.8; }
}

@media (min-width: 901px) and (max-height: 820px) {
  .hero-logo { width: min(430px, 46vw); }
  .hero-divider { margin: 10px auto 16px; }
  .events-grid { margin-bottom: 18px; }
  .hero-actions { margin-bottom: 18px; }
}

@media (max-width: 900px) {
  :root { --header-h: 66px; }
  .nav-container { padding-inline: 20px; }

  .nav-menu {
    position: fixed;
    top: var(--header-h);
    left: 0;
    width: 100%;
    flex-direction: column;
    gap: 4px;
    padding: 18px 24px 26px;
    background: rgba(2, 5, 13, 0.97);
    border-bottom: 2px solid var(--gold-700);
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.85);
    transform: translateY(-130%);
    transition: transform var(--t-smooth);
    z-index: 99;
  }

  .nav-menu.active { transform: translateY(0); }

  .nav-link {
    display: block;
    padding: 12px 8px;
    font-size: 1rem;
    border-bottom: 1px solid rgba(185, 138, 46, 0.15);
  }

  .btn-mobile-menu { display: flex; }
  .mu-btn-nav { display: none; }

  .hero-center { max-width: 92vw; }
  .char-side { width: 44vw; opacity: 0.6; }
  .hero-logo { width: min(480px, 74vw); }
}

@media (max-width: 720px) {
  .container { padding-inline: 20px; }

  .hero-section { padding-bottom: 44px; }
  .hero-characters-container { opacity: 0.45; }
  .char-side { width: 58vw; height: 70%; }

  .hero-tagline { letter-spacing: 0.14em; }

  .events-grid { max-width: min(480px, 100%); margin-bottom: 20px; gap: 24px; }
  .event-action-wrap .mu-button { width: 170px; }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
    max-width: 440px;
  }

  .hero-actions .mu-button { width: 100%; }

  .server-status-bar {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 12px;
    padding: 14px 18px;
  }

  .status-item { flex: 0 0 46%; }
  .status-divider { display: none; }

  .section { padding: 70px 0; }

  .event-alpha .event-content { top: 32%; bottom: 40%; }
  .event-beta .event-content { top: 36%; bottom: 41%; }

  .countdown-unit { min-width: 42px; padding: 3px 5px 2px; }

  .download-links-card,
  .requirements-card { padding: 22px 18px; }

  .download-item { flex-direction: column; align-items: stretch; text-align: center; }
  .download-item .mu-button { width: 100%; }
  .download-item:hover { transform: none; }

  .community-box { width: 100%; }
}

@media (max-width: 420px) {
  .hero-actions { grid-template-columns: 1fr; max-width: 280px; }
  .countdown-box { gap: 5px; }
  .countdown-unit { min-width: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
