/* ============================================
   MineSquad — Design System & Styles
   ============================================ */

/* --------------------------------------------
   1.  Design Tokens
   -------------------------------------------- */

:root {
  --accent: var(--violet-2);
  --accent-cyan: var(--cyan);
  --accent-gold: var(--gold);
  --accent-secondary: var(--pink);
  --bg: #070812;
  --bg-soft: #0e1022;
  --cyan: #37d5ff;
  --danger: #ff6b8a;
  --dim: #817795;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-display: 'Exo 2', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  --font-pixel: 'Press Start 2P', 'JetBrains Mono', monospace;
  --glow: 0 0 34px rgba(139, 92, 246, 0.34);
  --gold: #ffd166;
  --green: #49e58d;
  --line: rgba(174, 132, 255, 0.18);
  --line-strong: rgba(174, 132, 255, 0.38);
  --muted: #b9afd5;
  --panel: rgba(18, 20, 43, 0.72);
  --panel-strong: rgba(23, 25, 54, 0.92);
  --pink: #ff4fd8;
  --radius: 28px;
  --radius-sm: 16px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  --text: #f5f1ff;
  --text-muted: var(--muted);
  --text-secondary: var(--muted);
  --violet: #8b5cf6;
  --violet-2: #c084fc;
}

[data-theme="light"] {
  --bg: #eee7fb;
  --bg-soft: #e6ddf4;
  --cyan: #2b879d;
  --dim: #897f98;
  --glow: 0 0 20px rgba(118, 82, 207, 0.11);
  --gold: #9b6b18;
  --green: #2e9461;
  --line: rgba(97, 73, 139, 0.16);
  --line-strong: rgba(97, 73, 139, 0.28);
  --muted: #665b7a;
  --panel: rgba(246, 241, 255, 0.78);
  --panel-strong: rgba(238, 231, 249, 0.94);
  --pink: #c44aa5;
  --shadow: 0 18px 46px rgba(78, 59, 116, 0.13);
  --text: #261d38;
  --violet: #7652cf;
  --violet-2: #8a66d8;
}

/* --------------------------------------------
   2.  Reset & Base
   -------------------------------------------- */

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  min-height: 100%;
  min-height: -webkit-fill-available;
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at 10% 10%, rgba(139, 92, 246, 0.28), transparent 34rem),
    radial-gradient(circle at 90% 12%, rgba(55, 213, 255, 0.16), transparent 28rem),
    radial-gradient(circle at 55% 92%, rgba(255, 79, 216, 0.18), transparent 34rem),
    linear-gradient(180deg, #080816 0%, var(--bg) 42%, #03030a 100%);
  color: var(--text);
  font: 16px/1.65 var(--font-body);
  margin: 0;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

[data-theme="light"] body {
  background:
    radial-gradient(circle at 12% 10%, rgba(136, 104, 204, 0.14), transparent 30rem),
    radial-gradient(circle at 88% 18%, rgba(43, 135, 157, 0.1), transparent 28rem),
    radial-gradient(circle at 55% 96%, rgba(196, 74, 165, 0.1), transparent 30rem),
    linear-gradient(180deg, #f1ebfb 0%, #ebe4f6 46%, #e6ddf0 100%);
}

body::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: 46px 46px;
  content: '';
  inset: 0;
  mask-image: linear-gradient(to bottom, #000, transparent 82%);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 82%);
  pointer-events: none;
  position: fixed;
  z-index: -4;
}

[data-theme="light"] body::before {
  background-image:
    linear-gradient(rgba(74, 56, 108, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 56, 108, 0.035) 1px, transparent 1px);
  opacity: 0.55;
}

body::after {
  background: repeating-linear-gradient(0deg, transparent 0 7px, rgba(255, 255, 255, 0.018) 8px 9px);
  content: '';
  inset: 0;
  opacity: 0.35;
  pointer-events: none;
  position: fixed;
  z-index: -3;
}

[data-theme="light"] body::after {
  background: repeating-linear-gradient(0deg, transparent 0 8px, rgba(74, 56, 108, 0.025) 9px 10px);
  opacity: 0.22;
}

img,
canvas {
  height: auto;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  -webkit-appearance: none;
  appearance: none;
  color: inherit;
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button::-moz-focus-inner {
  border: 0;
  padding: 0;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--violet-2);
  outline-offset: 3px;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

strong {
  color: var(--text);
}

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

  .page-transition {
    display: none;
  }
}

/* --------------------------------------------
   3.  Background Effects
   -------------------------------------------- */

.bg-gradient,
.noise,
.bg-orbs {
  inset: 0;
  pointer-events: none;
  position: fixed;
}

.bg-gradient {
  background:
    radial-gradient(circle at 20% 18%, rgba(139, 92, 246, 0.28), transparent 26rem),
    radial-gradient(circle at 82% 24%, rgba(55, 213, 255, 0.18), transparent 24rem),
    radial-gradient(circle at 52% 88%, rgba(255, 79, 216, 0.18), transparent 28rem);
  overflow: hidden;
  z-index: -5;
}

.bg-gradient::before,
.bg-gradient::after {
  content: '';
  inset: -28%;
  opacity: 0.42;
  position: absolute;
  will-change: transform, filter;
}

.bg-gradient::before {
  animation: auroraSpin 28s linear infinite;
  background:
    conic-gradient(from 90deg at 50% 50%, transparent 0 12%, rgba(139, 92, 246, 0.28) 18%, transparent 28%, rgba(55, 213, 255, 0.2) 40%, transparent 52%, rgba(255, 79, 216, 0.24) 68%, transparent 82%),
    repeating-linear-gradient(115deg, transparent 0 26px, rgba(255, 255, 255, 0.035) 27px 28px);
  filter: blur(34px) saturate(135%);
}

.bg-gradient::after {
  animation: starDrift 36s linear infinite;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.72) 0 1px, transparent 1.7px),
    radial-gradient(circle, rgba(192, 132, 252, 0.52) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(55, 213, 255, 0.4) 0 1px, transparent 1.5px);
  background-position: 0 0, 42px 78px, 120px 34px;
  background-size: 130px 130px, 190px 190px, 260px 260px;
  filter: drop-shadow(0 0 5px rgba(192, 132, 252, 0.55));
  opacity: 0.24;
}

.noise {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.04'/%3E%3C/svg%3E");
  mix-blend-mode: screen;
  opacity: 0.2;
  z-index: -2;
}

[data-theme="light"] .bg-gradient { opacity: 0.64; }
[data-theme="light"] .bg-gradient::before { filter: blur(44px) saturate(95%); opacity: 0.18; }
[data-theme="light"] .bg-gradient::after { filter: none; opacity: 0.11; }
[data-theme="light"] .noise { mix-blend-mode: multiply; opacity: 0.1; }

#particleCanvas {
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

.bg-orbs::before,
.bg-orbs::after {
  animation: glassOrbit 22s ease-in-out infinite;
  border: 1px solid rgba(192, 132, 252, 0.1);
  border-radius: 38% 62% 48% 52% / 48% 36% 64% 52%;
  box-shadow: inset 0 0 70px rgba(139, 92, 246, 0.08), 0 0 80px rgba(55, 213, 255, 0.05);
  content: '';
  height: 34vmax;
  position: absolute;
  width: 34vmax;
}

.bg-orbs::before {
  right: -9vmax;
  top: 15vh;
}

.bg-orbs::after {
  animation-delay: -9s;
  bottom: -10vmax;
  left: -12vmax;
}

.orb {
  animation: drift 24s ease-in-out infinite;
  border-radius: 999px;
  filter: blur(80px);
  height: 42vw;
  min-height: 240px;
  min-width: 240px;
  opacity: 0.34;
  position: absolute;
  width: 42vw;
}

.orb-1 {
  background: #7c3aed;
  left: -12vw;
  top: -12vw;
}

.orb-2 {
  animation-delay: -8s;
  background: #0ea5e9;
  right: -13vw;
  top: 5vh;
}

.orb-3 {
  animation-delay: -14s;
  background: #d946ef;
  bottom: -18vw;
  left: 48vw;
}

.orb-4 {
  animation-delay: -5s;
  background: #4c1d95;
  bottom: 12vh;
  height: 26vw;
  left: 4vw;
  width: 26vw;
}

[data-theme="light"] .orb { filter: blur(105px); opacity: 0.12; }
[data-theme="light"] .bg-orbs::before,
[data-theme="light"] .bg-orbs::after { border-color: rgba(97, 73, 139, 0.08); box-shadow: inset 0 0 60px rgba(118, 82, 207, 0.045); opacity: 0.45; }

@keyframes drift {
  50% { transform: translate3d(5vw, -4vh, 0) scale(1.08); }
}

@keyframes auroraSpin {
  to { transform: rotate(1turn) scale(1.06); }
}

@keyframes starDrift {
  to { transform: translate3d(-90px, 130px, 0); }
}

@keyframes glassOrbit {
  50% {
    border-radius: 60% 40% 35% 65% / 42% 58% 42% 58%;
    transform: translate3d(5vw, -3vh, 0) rotate(18deg) scale(1.08);
  }
}

/* --------------------------------------------
   4.  Layout
   -------------------------------------------- */

.container {
  margin: 0 auto;
  position: relative;
  width: min(1180px, calc(100% - 40px));
}

.section {
  padding: 76px 0;
}

.section-header {
  display: grid;
  gap: 10px;
  margin-bottom: 30px;
}

.section-header h2,
.page-head h1,
.hero h1 {
  font-family: var(--font-display);
  letter-spacing: -0.045em;
  line-height: 0.98;
  margin: 0;
}

.section-header h2 {
  font-size: clamp(2rem, 5vw, 4rem);
}

.section-header p,
.page-head p,
.hero p {
  color: var(--muted);
  margin: 0;
  max-width: 680px;
}

.gradient-text {
  animation: shimmer 8s ease-in-out infinite;
  background: linear-gradient(100deg, #fff 0%, #d6bdff 28%, #8b5cf6 54%, #ff4fd8 78%, #37d5ff 100%);
  background-clip: text;
  -webkit-background-clip: text;
  background-size: 220% 100%;
  color: transparent;
}

[data-theme="light"] .gradient-text {
  background-image: linear-gradient(100deg, #46365f 0%, #7652cf 42%, #a84891 72%, #2b879d 100%);
}

@keyframes shimmer {
  50% { background-position: 100% 0; }
}

/* --------------------------------------------
   5.  Navigation
   -------------------------------------------- */

.navbar {
  align-items: center;
  background: rgba(8, 8, 20, 0.72);
  backdrop-filter: blur(22px) saturate(155%);
  -webkit-backdrop-filter: blur(22px) saturate(155%);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-top: 16px;
  padding: 12px 14px;
  position: sticky;
  top: 16px;
  z-index: 3000;
}

[data-theme="light"] .navbar { background: rgba(238, 231, 249, 0.82); }

.logo {
  align-items: center;
  display: inline-flex;
  font: 900 1.14rem/1 var(--font-display);
  gap: 10px;
  letter-spacing: -0.02em;
  padding-left: 8px;
}

.logo span:last-child {
  font-family: var(--font-pixel);
  font-size: 0.72rem;
  letter-spacing: 0;
}

.logo-icon {
  align-items: center;
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.24), rgba(255, 79, 216, 0.08));
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: var(--glow);
  color: var(--violet-2);
  display: grid;
  height: 36px;
  place-items: center;
  width: 36px;
}

.nav-group {
  align-items: center;
  display: flex;
  gap: 8px;
  order: 3;
}

.theme-btn,
.nav-toggle {
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  color: var(--muted);
  display: grid;
  height: 42px;
  place-items: center;
  transition: 0.2s ease;
  width: 42px;
}

.theme-btn:hover,
.nav-toggle:hover {
  background: rgba(139, 92, 246, 0.2);
  color: var(--text);
}

.nav-toggle { display: none; }

.nav-links {
  align-items: center;
  display: flex;
  gap: 4px;
}

.nav-links a,
.nav-links .support-link,
.dropdown-btn {
  align-items: center;
  background: transparent;
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 0.9rem;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  transition: 0.2s ease;
}

.nav-links a:hover,
.nav-links .support-link:hover,
.dropdown.open .dropdown-btn,
.nav-links a.active {
  background: rgba(139, 92, 246, 0.18);
  color: var(--text);
}

.nav-links .support-link {
  border: 1px solid rgba(255, 79, 216, 0.22);
  color: #f7b2ec;
}

[data-theme="light"] .nav-links .support-link {
  background: rgba(141, 61, 122, 0.045);
  border-color: rgba(141, 61, 122, 0.18);
  color: #8d3d7a;
}

.dropdown { position: relative; }

.dropdown-menu {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  display: none;
  min-width: 260px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  z-index: 3100;
}

.dropdown.open .dropdown-menu,
.dropdown:hover .dropdown-menu { display: grid; }

.dropdown-menu a {
  border-radius: 14px;
  justify-content: flex-start;
}

.mobile-bottom-nav { display: none; }

/* --------------------------------------------
   5b.  Donate Page
   -------------------------------------------- */

.ms-donate-page {
  animation: fadeUp 0.5s ease;
}

.ms-donate-header {
  margin-bottom: 32px;
}

.ms-donate-header-inner {
  margin: 0 auto;
  max-width: 1000px;
  text-align: center;
}

.ms-donate-header-inner > h1 {
  font-family: var(--font-display);
  font-size: 2.4rem;
  margin-bottom: 8px;
}

.ms-donate-header-inner > p {
  color: var(--muted);
  margin-bottom: 28px;
}

.ms-server-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}

.ms-server-tab {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 22px;
  transition: 0.3s ease;
}

.ms-server-tab:hover {
  border-color: var(--violet);
  color: var(--text);
}

.ms-server-tab.active {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--violet-2);
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.15);
  color: var(--violet-2);
}

.ms-products {
  margin: 0 auto;
  max-width: 1100px;
}

.ms-prod-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.ms-prod-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  position: relative;
  transition: 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
}

.ms-prod-card:hover {
  border-color: var(--violet-2);
  box-shadow: var(--glow);
  transform: translateY(-4px);
}

.ms-prod-card-bg {
  inset: 0;
  opacity: 0.4;
  pointer-events: none;
  position: absolute;
  border-radius: var(--radius);
}

.ms-prod-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ms-prod-info {
  padding: 16px 20px 20px;
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ms-prod-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ms-prod-price {
  align-items: baseline;
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.ms-price-label {
  color: var(--dim);
  font-size: 0.85rem;
}

.ms-price-current {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
}

.ms-buy-btn {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid var(--violet-2);
  border-radius: var(--radius-sm);
  color: var(--violet-2);
  cursor: pointer;
  font-weight: 700;
  padding: 10px 24px;
  transition: 0.3s ease;
  width: 100%;
}

.ms-buy-btn:hover {
  background: rgba(139, 92, 246, 0.3);
  box-shadow: var(--glow);
}

.ms-empty {
  color: var(--dim);
  font-size: 1.1rem;
  padding: 60px 0;
  text-align: center;
}

/* HolyWorld-style Payment Modal */
.hw-modal-overlay {
  align-items: center;
  background: rgba(3, 3, 10, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  inset: 0;
  justify-content: center;
  position: fixed;
  z-index: 9999;
}

.hw-modal {
  animation: modalFadeIn 0.25s ease;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  max-width: 90vw;
  min-height: 560px;
  min-width: 0;
  overflow: hidden;
  position: relative;
  width: min(960px, calc(100vw - 40px));
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@media (max-width: 1024px) {
  .hw-modal {
    width: calc(100vw - 32px);
    min-height: auto;
    max-height: 96vh;
    border-radius: var(--radius-sm);
  }
  .hw-responsive-wrapper { flex-direction: column; }
  .hw-left-panel { width: 100%; padding: 24px; }
  .hw-right-panel { padding: 24px; }
}

@media (max-width: 480px) {
  .hw-left-panel { padding: 16px; }
  .hw-right-panel { padding: 16px; }
  .hw-modal { width: calc(100vw - 20px); border-radius: 12px; }
}

.hw-close-btn {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--dim);
  cursor: pointer;
  font-size: 1.1rem;
  height: 36px;
  width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 10;
  transition: 0.25s ease;
}

.hw-close-btn:hover {
  color: var(--text);
  border-color: var(--violet-2);
  background: rgba(139, 92, 246, 0.12);
}

.hw-modal-content {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.hw-responsive-wrapper {
  display: flex;
  flex: 1;
  gap: 0;
}

.hw-left-panel {
  background: var(--bg-soft);
  display: flex;
  flex-direction: column;
  padding: 32px;
  width: 400px;
}

.hw-step-title {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.hw-step-subtitle {
  color: var(--dim);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.hw-radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.hw-radio-option {
  position: relative;
}

.hw-radio-option input[type="radio"] {
  display: none;
}

.hw-radio-label {
  cursor: pointer;
  display: block;
}

.hw-radio-content {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  transition: 0.25s ease;
}

.hw-radio-option input[type="radio"]:checked + .hw-radio-label .hw-radio-content {
  border-color: var(--violet-2);
  background: rgba(139, 92, 246, 0.1);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.2);
}

.hw-custom-radio {
  border: 2px solid var(--dim);
  border-radius: 50%;
  flex-shrink: 0;
  height: 20px;
  width: 20px;
  transition: 0.2s ease;
}

.hw-radio-option input[type="radio"]:checked + .hw-radio-label .hw-custom-radio {
  border-color: var(--violet-2);
  background: var(--violet-2);
  box-shadow: inset 0 0 0 4px var(--bg);
}

.hw-radio-option input[type="radio"]:not(:checked) + .hw-radio-label .hw-custom-radio {
  background: transparent;
}

.hw-period-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hw-period-duration {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
}

.hw-period-price {
  color: var(--violet-2);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
}

.hw-continue-btn {
  background: linear-gradient(135deg, var(--violet), var(--violet-2));
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 14px 24px;
  transition: 0.3s ease;
  width: 100%;
}

.hw-continue-btn:hover {
  box-shadow: 0 0 34px rgba(139, 92, 246, 0.4);
  transform: translateY(-1px);
}

.hw-right-panel {
  background: var(--bg);
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 32px;
}

.hw-info-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.hw-info-header {
  align-items: center;
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
}

.hw-info-icon {
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  height: 56px;
  width: 56px;
  flex-shrink: 0;
}

.hw-info-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
}

.hw-info-body {
  flex: 1;
  overflow: hidden;
}

.hw-scrollable-list {
  height: 100%;
  overflow-y: auto;
}

.hw-scrollable-list h1 {
  color: var(--violet-2);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 8px;
  margin-top: 16px;
}

.hw-scrollable-list h1:first-child {
  margin-top: 0;
}

.hw-scrollable-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hw-scrollable-list li {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.8;
  padding-left: 16px;
  position: relative;
}

.hw-scrollable-list li::before {
  content: '•';
  color: var(--violet-2);
  left: 0;
  position: absolute;
}

.hw-input-group {
  margin-bottom: 14px;
  position: relative;
}

.hw-input-group input {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font-body);
  outline: none;
  padding: 16px 18px;
  transition: 0.25s ease;
  width: 100%;
  box-sizing: border-box;
}

.hw-input-group input:focus {
  border-color: var(--violet-2);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
  background: var(--panel-strong);
}

.hw-input-group input::placeholder {
  color: transparent;
}

.hw-input-group label {
  color: var(--dim);
  font-size: 0.85rem;
  left: 18px;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  transition: 0.2s ease;
  background: transparent;
  padding: 0 4px;
}

.hw-input-group input:focus + label,
.hw-input-group input:not(:placeholder-shown) + label {
  font-size: 0.7rem;
  top: -8px;
  transform: none;
  color: var(--violet-2);
  background: var(--panel);
  border-radius: 4px;
}

.hw-promo-btn {
  background: none;
  border: none;
  color: var(--violet-2);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding: 0;
  text-align: left;
}

.hw-promo-btn:hover { text-decoration: underline; }

.hw-payments-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.hw-payment-btn {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  display: flex;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 14px 18px;
  transition: 0.25s ease;
}

.hw-payment-btn:hover {
  border-color: var(--violet-2);
  background: rgba(139, 92, 246, 0.12);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.08);
}

.hw-payment-btn.active {
  background: rgba(139, 92, 246, 0.16);
  border-color: var(--violet-2);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.2);
}

.hw-payment-btn i {
  color: var(--violet-2);
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.hw-buy-btn {
  background: linear-gradient(135deg, var(--violet), var(--violet-2));
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  padding: 16px 24px;
  transition: 0.3s ease;
  width: 100%;
}

.hw-buy-btn:hover {
  box-shadow: 0 0 34px rgba(139, 92, 246, 0.4);
  transform: translateY(-2px);
}

.hw-info-pay {
  color: var(--dim);
  display: block;
  font-size: 0.75rem;
  line-height: 1.5;
  margin-top: 12px;
  text-align: center;
}

.hw-info-pay a {
  color: var(--violet-2);
  text-decoration: underline;
}

.hw-back-btn-wrap {
  left: 0;
  padding: 12px 24px;
  position: absolute;
  top: 0;
}

.hw-back-btn {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--dim);
  cursor: pointer;
  display: flex;
  gap: 6px;
  font-size: 0.85rem;
  font-family: var(--font-body);
  font-weight: 500;
  padding: 8px 14px;
  transition: 0.25s ease;
}

.hw-back-btn:hover {
  color: var(--text);
  border-color: var(--violet-2);
  background: rgba(139, 92, 246, 0.1);
}

.hw-back-btn i {
  font-size: 0.8rem;
}

@media (max-width: 768px) {
  .ms-prod-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ms-donate-header-inner > h1 {
    font-size: 1.6rem;
  }
}

@media (max-width: 480px) {
  .ms-prod-grid {
    grid-template-columns: 1fr;
  }

  .ms-server-tabs {
    align-items: center;
    flex-direction: column;
  }
}

/* --------------------------------------------
   6.  Hero
   -------------------------------------------- */

.hero {
  align-items: center;
  display: grid;
  gap: 42px;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
  min-height: calc(100vh - 110px);
  padding: 70px 0 48px;
}

.hero-badge,
.eyebrow {
  align-items: center;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #d9c7ff;
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 800;
  gap: 10px;
  letter-spacing: 0.08em;
  padding: 8px 14px;
  text-transform: uppercase;
  width: -moz-fit-content;
  width: fit-content;
}

.hero-badge,
.eyebrow,
.tag {
  font-family: var(--font-pixel);
  font-size: 0.58rem;
  letter-spacing: 0;
  line-height: 1.5;
}

[data-theme="light"] .hero-badge,
[data-theme="light"] .eyebrow {
  background: rgba(118, 82, 207, 0.075);
  color: #66508c;
}

.status-dot {
  animation: pulse 1.7s infinite;
  background: var(--green);
  border-radius: 999px;
  box-shadow: 0 0 18px var(--green);
  height: 8px;
  width: 8px;
}

@keyframes pulse {
  50% { opacity: 0.5; transform: scale(0.72); }
}

.hero h1 {
  font-size: clamp(3.4rem, 10vw, 8.7rem);
  margin-top: 22px;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.28rem);
  margin-top: 22px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-ip {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: flex;
  gap: 12px;
  margin-top: 22px;
  padding: 10px 12px 10px 16px;
  width: -moz-fit-content;
  width: fit-content;
}

.ip-value {
  background: rgba(55, 213, 255, 0.1);
  border-radius: 999px;
  color: var(--cyan);
  cursor: pointer;
  font-family: var(--font-mono);
  padding: 5px 10px;
  transition: 0.2s ease;
}

[data-copy]:hover {
  background: rgba(31, 241, 3, 0.18) !important;
  color: var(--green) !important;
}

[data-copy]:active {
  background: rgba(31, 241, 3, 0.3) !important;
  transform: scale(0.94) !important;
}

[data-copy].copied {
  animation: copyFlash 0.55s ease;
}

@keyframes copyFlash {
  0%   { background: rgba(31, 241, 3, 0.35); color: #fff; transform: scale(0.94); }
  40%  { background: rgba(31, 241, 3, 0.5);  color: #fff; transform: scale(1.06); }
  100% { background: rgba(31, 241, 3, 0.18); color: var(--green); transform: scale(1); }
}

.hero::after {
  animation: morph 10s ease-in-out infinite;
  aspect-ratio: 1;
  background:
    linear-gradient(135deg, rgba(139, 92, 246, 0.32), rgba(255, 79, 216, 0.06)),
    repeating-linear-gradient(45deg, transparent 0 16px, rgba(255, 255, 255, 0.04) 17px 18px);
  border: 1px solid var(--line-strong);
  border-radius: 36% 64% 50% 50% / 42% 35% 65% 58%;
  box-shadow: inset 0 0 70px rgba(255, 255, 255, 0.05), var(--glow);
  color: rgba(255, 255, 255, 0.08);
  content: 'MS';
  display: grid;
  font: 900 clamp(5rem, 18vw, 12rem)/1 var(--font-display);
  justify-self: center;
  place-items: center;
  width: min(430px, 84vw);
}

[data-theme="light"] .hero::after {
  background:
    linear-gradient(135deg, rgba(118, 82, 207, 0.13), rgba(196, 74, 165, 0.035)),
    repeating-linear-gradient(45deg, transparent 0 16px, rgba(70, 54, 95, 0.026) 17px 18px);
  box-shadow: inset 0 0 55px rgba(70, 54, 95, 0.035), var(--glow);
  color: rgba(70, 54, 95, 0.065);
}

@keyframes morph {
  50% {
    border-radius: 55% 45% 32% 68% / 58% 62% 38% 42%;
    transform: translateY(-12px) rotate(2deg);
  }
}

/* --------------------------------------------
   7.  Components
   -------------------------------------------- */

/* -- 7a. Buttons -- */

.btn,
.send-btn {
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  font-weight: 800;
  gap: 9px;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.btn:hover,
.send-btn:hover {
  border-color: var(--line-strong);
  box-shadow: var(--glow);
  transform: translateY(-2px);
}

.btn-primary,
.send-btn {
  background: linear-gradient(120deg, var(--violet), #6d28d9 52%, var(--pink));
  border-color: transparent;
  color: #fff;
}

.btn-discord {
  background: #5865f2;
  border-color: transparent;
  color: #fff;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  min-height: 42px;
  padding: 0 16px;
}

.btn-sm {
  font-size: 0.84rem;
  min-height: 38px;
  padding: 0 14px;
}

/* -- 7b. Cards -- */

.card {
  backdrop-filter: blur(20px) saturate(155%);
  -webkit-backdrop-filter: blur(20px) saturate(155%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  position: relative;
}

.card::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 38%, rgba(139, 92, 246, 0.09));
  border-radius: inherit;
  content: '';
  inset: 0;
  opacity: 0.7;
  pointer-events: none;
  position: absolute;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card-clickable { transition: 0.24s ease; }

.card-clickable:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow), var(--glow);
  transform: translateY(-5px);
}

.mode-card .icon {
  transition: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mode-card:hover .icon {
  transform: scale(1.14) rotate(6deg);
}

.mode-card .tag {
  transition: 0.3s ease;
}

.mode-card:hover .tag {
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.25);
}

.news-card {
  transition: 0.3s ease;
}

.news-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.read-link i:last-child {
  transition: 0.2s ease;
}

.news-card:hover .read-link i:last-child {
  transform: translateX(4px);
}

/* -- 7c. Grid Layouts -- */

.grid-modes,
.grid-features,
.grid-news {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(12, 1fr);
}

.mode-card,
.feat-card,
.news-card { padding: 24px; }

.mode-card {
  display: flex;
  flex-direction: column;
  grid-column: span 4;
  justify-content: space-between;
  min-height: 220px;
}

.mode-card.featured { grid-column: span 6; }

.mode-card .icon,
.feat-card .icon {
  align-items: center;
  background: linear-gradient(135deg, var(--violet), var(--pink));
  border-radius: 18px;
  box-shadow: var(--glow);
  color: #fff;
  display: grid;
  font-size: 1.35rem;
  height: 54px;
  place-items: center;
  width: 54px;
}

.mode-card h3,
.feat-card h3,
.news-card h3,
.donation-card h3,
.info-block h2 {
  font-family: var(--font-display);
  line-height: 1.08;
  margin: 14px 0 8px;
}

.mode-card p,
.feat-card p,
.news-card p,
.footer p {
  color: var(--muted);
  margin: 0;
}

.tag {
  background: rgba(55, 213, 255, 0.1);
  border: 1px solid rgba(55, 213, 255, 0.2);
  border-radius: 999px;
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-top: 16px;
  padding: 5px 10px;
  text-transform: uppercase;
  width: -moz-fit-content;
  width: fit-content;
}

.tag-premium {
  background: rgba(31, 241, 3, 0.1);
  border-color: rgba(3, 180, 98, 0.24);
  /* background: rgba(255, 209, 102, 0.1);
  border-color: rgba(255, 209, 102, 0.24); */
  color: var(--green);
}

.tag-event,
.tag-new {
  background: rgba(255, 79, 216, 0.1);
  border-color: rgba(255, 79, 216, 0.24);
  color: #ffb3f1;
}

.tag-soon { color: var(--dim); }

.feat-card { grid-column: span 3; }

.grid-news { grid-template-columns: repeat(3, 1fr); }

.date {
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 800;
}

.read-link {
  align-items: center;
  color: var(--violet-2);
  display: inline-flex;
  font-weight: 800;
  gap: 8px;
  margin-top: 16px;
}

/* -- 7d. Stats Bar -- */

.stats-bar {
  align-items: center;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.17), rgba(255, 255, 255, 0.04));
  border: 1px solid var(--line);
  border-radius: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 24px 48px;
  justify-content: center;
  margin: 22px auto 56px;
  padding: 32px 44px;
  width: min(100%, 980px);
}

.stat-item {
  align-items: center;
  display: flex;
  gap: 14px;
  min-width: 0;
}

.stat-num {
  color: var(--text);
  font: 900 clamp(2.4rem, 7vw, 3.6rem)/1 var(--font-display);
}

.stat-label {
  color: var(--muted);
  font-size: 1.15rem;
  font-weight: 700;
}

.stat-bar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
  height: 12px;
  overflow: hidden;
  position: relative;
  width: min(200px, 100%);
}

.stat-bar-fill {
  background: linear-gradient(90deg, var(--violet), var(--pink) 52%, var(--cyan));
  border-radius: inherit;
  box-shadow: 0 0 18px rgba(192, 132, 252, 0.5);
  height: 100%;
  transition: width 0.8s cubic-bezier(0.2, 0.72, 0.18, 1);
  width: 0;
}

.stat-bar-fill::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  content: '';
  display: block;
  height: 100%;
  opacity: 0.55;
}

/* -- 7e. Content Pages -- */

.page-head { padding: 70px 0 34px; }

.page-head h1 { font-size: clamp(2.5rem, 7vw, 6rem); }

.page-head p { font-size: 1.1rem; margin-top: 14px; }

.grid-two {
  align-items: start;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.82fr);
}

.info-block h2 {
  align-items: center;
  display: flex;
  font-size: 1.35rem;
  gap: 10px;
  margin-top: 0;
}

.icon-wrap {
  align-items: center;
  background: rgba(139, 92, 246, 0.18);
  border-radius: 14px;
  color: var(--violet-2);
  display: grid;
  height: 42px;
  place-items: center;
  width: 42px;
}

.steps-list { display: grid; gap: 10px; }

.steps-list li {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  padding: 14px 14px 14px 42px;
  position: relative;
}

.steps-list li::before {
  background: var(--cyan);
  border-radius: 999px;
  box-shadow: 0 0 14px var(--cyan);
  content: '';
  height: 10px;
  left: 16px;
  position: absolute;
  top: 22px;
  width: 10px;
}

.mode-info {
  background: rgba(139, 92, 246, 0.09);
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  margin-top: 18px;
  padding: 14px;
}

.plugins-list { display: grid; gap: 12px; }

.plugin-item {
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 18px;
  display: flex;
  gap: 12px;
  padding: 12px;
}

.plugin-item i {
  color: var(--cyan);
  margin-top: 4px;
}

.plugin-name { font-weight: 900; }

.plugin-desc {
  color: var(--muted);
  font-size: 0.88rem;
}

.donation-card { padding: 26px; }

/* -- 7f. Forms -- */

.field {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.field label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  min-width: 110px;
}

.field input,
.field select,
.field textarea {
  flex: 1;
  min-width: 140px;
  width: auto;
}

.field input,
.field select,
.field textarea,
.modal-form input,
.modal-form textarea,
.modal-form select {
  background: rgba(4, 5, 13, 0.58);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  outline: none;
  padding: 12px 14px;
  transition: 0.2s ease;
  width: 100%;
}

[data-theme="light"] .field input,
[data-theme="light"] .field select,
[data-theme="light"] .field textarea,
[data-theme="light"] .modal-form input,
[data-theme="light"] .modal-form textarea,
[data-theme="light"] .modal-form select {
  background: rgba(255, 255, 255, 0.72);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.modal-form input:focus,
.modal-form textarea:focus,
.modal-form select:focus {
  border-color: var(--violet-2);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.16);
}

.donation-note {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 14px;
  text-align: center;
}

.event-block {
  margin-top: 24px;
  padding: 24px;
}

/* -- 7g. Gallery -- */

.gallery-wrap h2 { font-family: var(--font-display); }

.grid-screenshots {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(5, 1fr);
}

.ss-card img {
  height: 150px;
  object-fit: cover;
  width: 100%;
}

.ss-card {
  padding: 0;
  text-align: left;
  width: 100%;
}

.ss-card p {
  color: var(--muted);
  margin: 0;
  padding: 10px 12px;
}

.image-modal {
  background: rgba(0, 0, 0, 0.84);
  display: none;
  inset: 0;
  place-items: center;
  position: fixed;
  z-index: 4000;
}

.image-modal.open { display: grid; }

.modal-img {
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  max-height: 82vh;
  max-width: 88vw;
}

.close-img,
.modal-prev,
.modal-next {
  align-items: center;
  background: var(--panel-strong);
  border-radius: 999px;
  color: var(--text);
  display: grid;
  height: 42px;
  place-items: center;
  position: absolute;
  width: 42px;
}

.close-img {
  right: 24px;
  top: 24px;
}

.modal-prev {
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
}

.modal-next {
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
}

/* -- 7h. Rules & Accordion -- */

.rules-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.rules-nav button {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  min-height: 42px;
  padding: 0 16px;
  transition: 0.2s ease;
}

.rules-nav button i {
  transition: 0.25s ease;
}

.rules-nav button:hover i {
  transform: scale(1.18);
}

.rules-nav button.active,
.rules-nav button:hover {
  background: rgba(139, 92, 246, 0.18);
  border-color: var(--line-strong);
  color: var(--text);
}

.rule-detail {
  display: none;
  padding: 28px;
}

.rule-detail.active {
  animation: ruleFadeIn 0.6s ease both;
  display: block;
}

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

.rule-detail h2 {
  font-family: var(--font-display);
  margin: 0 0 18px;
}

.rule-detail h3 { color: var(--violet-2); }

.rule-detail li {
  color: var(--muted);
  margin: 10px 0;
}

.accordion-trigger {
  background: transparent;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  display: flex;
  font-weight: 900;
  gap: 12px;
  justify-content: space-between;
  padding: 14px 0;
  text-align: left;
  transition: 0.2s ease;
  width: 100%;
}

.accordion-trigger:hover {
  color: var(--violet-2);
}

.accordion-trigger i {
  transition: 0.3s ease;
}

.accordion-item.open .accordion-trigger i {
  transform: rotate(180deg);
}

.accordion-panel {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0;
  transition: max-height 0.35s ease, opacity 0.35s ease, padding 0.35s ease;
}

.accordion-item.open .accordion-panel {
  max-height: 2000px;
  opacity: 1;
  padding: 12px 0;
}

.accordion-item.open .accordion-trigger {
  border-bottom-color: var(--line-strong);
}

.subrule {
  color: var(--dim);
  display: block;
  margin-top: 4px;
}

/* --------------------------------------------
   8.  Overlays (Toast, Modal, Support)
   -------------------------------------------- */

.toast {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  bottom: 26px;
  box-shadow: var(--shadow);
  color: var(--text);
  left: 50%;
  max-width: min(92vw, 560px);
  opacity: 0;
  padding: 12px 18px;
  pointer-events: none;
  position: fixed;
  transform: translateX(-50%) translateY(10px);
  transition: 0.2s ease;
  z-index: 2600;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.modal-overlay {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(1, 1, 8, 0.78);
  display: flex;
  inset: 0;
  justify-content: center;
  align-items: center;
  opacity: 0;
  padding: 20px;
  pointer-events: none;
  position: fixed;
  transition: 0.6s ease;
  visibility: hidden;
  z-index: 4000;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.modal-box {
  background: var(--panel-strong);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow), var(--glow);
  max-height: 74vh;
  overflow: auto;
  padding: 26px;
  transform: scale(0.88);
  transition: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 460px;
  width: 100%;
}

.modal-overlay.open .modal-box {
  transform: scale(1);
}

.modal-box h2 {
  font-family: var(--font-display);
  margin: 0 0 18px;
}

.modal-close {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  color: var(--muted);
  float: right;
  height: 36px;
  width: 36px;
}

.email-group {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.email-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 999px;
  min-height: 42px;
}

.email-btn.selected {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--violet-2);
}

.support-success {
  color: var(--green);
  display: none;
  text-align: center;
}

.modal-form [aria-hidden="true"],
.modal-form .field[aria-hidden="true"] {
  height: 1px;
  left: -9999px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

/* --------------------------------------------
   9.  Footer
   -------------------------------------------- */

.footer {
  border-top: 1px solid var(--line);
  margin-top: 64px;
  padding: 34px 0;
}

.footer-inner {
  display: flex;
  gap: 24px;
  justify-content: space-between;
}

.footer-col h4 {
  font-family: var(--font-display);
  margin: 0 0 10px;
}

.footer-logo {
  align-items: center;
  color: var(--text);
  display: inline-flex;
  gap: 8px;
  transition: color 0.2s ease;
}

.footer-logo:hover { color: var(--violet-2); }

.footer-social {
  display: flex;
  gap: 8px;
}

.footer-social a {
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  display: grid;
  height: 40px;
  place-items: center;
  width: 40px;
}

.footer-social a {
  transition: 0.2s ease;
}

.footer-social a:hover {
  border-color: var(--line-strong);
  color: var(--text);
  scale: 1.12;
  translate: 0 -2px;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  color: var(--dim);
  display: flex;
  font-size: 0.84rem;
  gap: 16px;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 20px;
}

/* --------------------------------------------
   10.  Page Transitions
   -------------------------------------------- */

.page-transition {
  background:
    radial-gradient(circle at 50% 50%, rgba(192, 132, 252, 0.3), transparent 22rem),
    radial-gradient(circle at 50% 50%, rgba(55, 213, 255, 0.16), transparent 16rem),
    rgba(4, 4, 13, 0.78);
  backdrop-filter: blur(12px) saturate(135%);
  -webkit-backdrop-filter: blur(12px) saturate(135%);
  contain: paint;
  display: grid;
  inset: 0;
  isolation: isolate;
  opacity: 0;
  overflow: hidden;
  place-items: center;
  pointer-events: none;
  position: fixed;
  transform: translateZ(0);
  visibility: hidden;
  z-index: 5000;
}

.page-transition::before,
.page-transition::after {
  content: '';
  inset: -20%;
  opacity: 0;
  position: absolute;
}

.page-transition::before {
  background: conic-gradient(from 90deg at 50% 50%, transparent 0 18%, rgba(192, 132, 252, 0.34) 24%, transparent 32%, rgba(255, 79, 216, 0.28) 48%, transparent 62%, rgba(55, 213, 255, 0.26) 76%, transparent 100%);
  filter: blur(20px);
}

.page-transition::after {
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.86) 0 1px, transparent 1.8px),
    radial-gradient(circle, rgba(192, 132, 252, 0.72) 0 1px, transparent 1.6px);
  background-position: 0 0, 38px 52px;
  background-size: 88px 88px, 142px 142px;
}

.page-transition__rift {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.16), transparent 9rem),
    linear-gradient(135deg, rgba(139, 92, 246, 0.26), rgba(255, 79, 216, 0.08));
  border: 1px solid rgba(192, 132, 252, 0.26);
  border-radius: 42% 58% 48% 52% / 45% 35% 65% 55%;
  box-shadow: inset 0 0 58px rgba(255, 255, 255, 0.06), 0 0 72px rgba(139, 92, 246, 0.34);
  height: min(72vw, 520px);
  transform: scale(0.68) rotate(-6deg);
  width: min(72vw, 520px);
}

.page-transition__label {
  background: rgba(12, 11, 28, 0.7);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  bottom: max(36px, env(safe-area-inset-bottom));
  box-shadow: var(--glow);
  color: #f3eaff;
  font-family: var(--font-pixel);
  font-size: 0.56rem;
  left: 50%;
  line-height: 1.6;
  opacity: 0;
  padding: 9px 14px;
  position: absolute;
  transform: translateX(-50%) translateY(10px);
  white-space: nowrap;
}

/* -- 10a. Exit states -- */

html.page-leaving .page-transition {
  animation: pageVeilIn 0.42s cubic-bezier(0.2, 0.72, 0.18, 1) both;
  opacity: 1;
  visibility: visible;
  will-change: opacity;
}

html.page-leaving .page-transition::before,
html.page-leaving .page-transition::after,
html.page-leaving .page-transition__rift,
html.page-leaving .page-transition__label,
html.page-entering .navbar,
html.page-entering main,
html.page-entering .footer {
  will-change: opacity, transform;
}

html.page-leaving .page-transition::before {
  animation: pageSpiralIn 0.42s cubic-bezier(0.2, 0.72, 0.18, 1) both;
}

html.page-leaving .page-transition::after {
  animation: pageStarsIn 0.42s ease both;
}

html.page-leaving .page-transition__rift {
  animation: pageRiftIn 0.42s cubic-bezier(0.16, 1, 0.3, 1) both;
}

html.page-leaving .page-transition__label {
  animation: pageLabelIn 0.28s ease 0.08s both;
}

html.page-leaving body { cursor: progress; }

/* -- 10b. Entry states -- */

html.page-entering .navbar,
html.page-entering main,
html.page-entering .footer {
  animation: pageContentIn 0.58s cubic-bezier(0.2, 0.72, 0.18, 1) both;
}

html.page-entering main { animation-delay: 0.04s; }
html.page-entering .footer { animation-delay: 0.1s; }

/* -- 10c. Transition keyframes -- */

@keyframes pageVeilIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pageSpiralIn {
  from { opacity: 0; transform: scale(0.72) rotate(-18deg); }
  to   { opacity: 0.9; transform: scale(1.08) rotate(12deg); }
}

@keyframes pageStarsIn {
  from { opacity: 0; transform: translate3d(70px, -50px, 0) scale(1.05); }
  to   { opacity: 0.28; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes pageRiftIn {
  from { opacity: 0; transform: scale(0.52) rotate(-8deg); }
  68%  { opacity: 1; transform: scale(1.04) rotate(2deg); }
  to   { opacity: 1; transform: scale(1.32) rotate(4deg); }
}

@keyframes pageLabelIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes pageContentIn {
  from { opacity: 0; transform: translate3d(0, 16px, 0) scale(0.988); }
  to   { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

/* --------------------------------------------
   11.  Utilities
   -------------------------------------------- */

.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.text-center { text-align: center; }
.text-muted { color: var(--muted); }

/* --------------------------------------------
   12.  Responsive
   -------------------------------------------- */

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero::after { order: -1; width: min(320px, 72vw); }
  .mode-card,
  .mode-card.featured { grid-column: span 6; }
  .feat-card { grid-column: span 6; }
  .grid-two { grid-template-columns: 1fr; }
  .grid-news { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-screenshots { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .container { width: min(100% - 28px, 1180px); }
  .navbar { border-radius: 24px; flex-wrap: wrap; top: 10px; }
  .nav-toggle { display: grid; }
  .nav-links {
    display: none;
    flex-direction: column;
    order: 4;
    width: 100%;
  }
  .nav-links.open { display: flex; }
  .nav-links a,
  .nav-links .support-link,
  .dropdown-btn { justify-content: center; }
  .dropdown-menu {
    background: rgba(255, 255, 255, 0.04);
    box-shadow: none;
    min-width: 0;
    position: static;
  }
  .mobile-bottom-nav {
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    background: rgba(7, 8, 18, 0.9);
    border-top: 1px solid var(--line);
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    left: 0;
    position: fixed;
    right: 0;
    z-index: 120;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-bottom-nav a,
  .mobile-bottom-nav button {
    align-items: center;
    background: transparent;
    color: var(--muted);
    display: grid;
    font-size: 0.68rem;
    gap: 2px;
    padding: 8px 4px;
    padding-bottom: 8px;
    place-items: center;
  }
  .mobile-bottom-nav i { font-size: 1.1rem; }
  .hero { padding-top: 42px; }
  .hero h1 { font-size: clamp(3rem, 18vw, 5.4rem); }
  .section { padding: 48px 0; }
  .mode-card,
  .mode-card.featured,
  .feat-card { grid-column: span 12; }
  .footer-inner,
  .footer-bottom { flex-direction: column; align-items: stretch; }
  .stats-bar { grid-template-columns: 1fr; padding: 24px 20px; width: 100%; }
  .stat-item { justify-content: flex-start; }
}

@media (max-width: 430px) {
  .hero-actions,
  .hero-ip { width: 100%; }
  .btn { width: 100%; }
  .hero-ip { border-radius: 22px; flex-direction: column; }
  .email-group { grid-template-columns: 1fr; }
}

/* --------------------------------------------
   13.  @supports Fallbacks
   -------------------------------------------- */

@supports not selector(:focus-visible) {
  button:focus,
  a:focus,
  input:focus,
  textarea:focus,
  select:focus {
    outline: 2px solid var(--violet-2);
    outline-offset: 3px;
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .navbar,
  .dropdown-menu,
  .card,
  .modal-overlay,
  .page-transition,
  .mobile-bottom-nav {
    background-color: var(--panel-strong);
  }
}

@supports not (display: grid) {
  .grid-modes,
  .grid-features,
  .grid-news,
  .stats-bar,
  .grid-two,
  .grid-screenshots,
  .email-group {
    display: block;
  }

  .mode-card,
  .feat-card,
  .news-card,
  .stat-item,
  .grid-two > *,
  .ss-card,
  .email-btn {
    margin-bottom: 16px;
  }
}

/* --------------------------------------------
   14.  Print
   -------------------------------------------- */

@media print {
  .bg-gradient,
  .noise,
  #particleCanvas,
  .bg-orbs,
  .navbar,
  .mobile-bottom-nav,
  .footer,
  .modal-overlay,
  .toast {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .card {
    border-color: #ccc;
    box-shadow: none;
  }
}

/* --------------------------------------------
   15. Performance and mobile safeguards
   -------------------------------------------- */

/* Static layers retain the visual direction without continuous GPU compositing. */
.noise,
.bg-orbs,
body::before,
body::after {
  display: none;
}

.bg-gradient::before {
  display: none;
}

.bg-gradient::after {
  animation: none;
  filter: none;
  opacity: 0.16;
}

.gradient-text,
.hero::after,
.status-dot {
  animation: none;
}

.navbar,
.dropdown-menu,
.card,
.modal-overlay,
.mobile-bottom-nav {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.card {
  background: var(--panel-strong);
}

body.modal-open {
  overflow: hidden;
}

@supports (content-visibility: auto) {
  .section,
  .footer {
    contain-intrinsic-size: auto 680px;
    content-visibility: auto;
  }
}

@media (max-width: 1024px) {
  .hw-modal {
    max-height: calc(100dvh - 24px);
  }

  .hw-modal-content {
    min-height: 0;
    overflow-y: auto;
  }

  .hw-responsive-wrapper,
  .hw-left-panel,
  .hw-right-panel,
  .hw-info-body,
  .hw-scrollable-list {
    min-height: 0;
  }

  .hw-responsive-wrapper,
  .hw-left-panel,
  .hw-right-panel {
    max-width: 100%;
    width: 100%;
  }

  .hw-info-body,
  .hw-scrollable-list {
    height: auto;
    overflow: visible;
  }
}

@media (max-width: 980px) {
  .hero {
    gap: 24px;
  }

  .hero::after {
    order: initial;
    width: min(240px, 60vw);
  }
}

@media (max-width: 760px), (hover: none) and (pointer: coarse) {
  .bg-gradient::after,
  .hero::after,
  #particleCanvas {
    display: none;
  }

  .navbar,
  .mobile-bottom-nav {
    background: var(--panel-strong);
  }

  .modal-overlay {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .hero {
    padding-top: 32px;
  }

  .toast {
    bottom: calc(84px + env(safe-area-inset-bottom));
  }

  .mobile-bottom-nav a,
  .mobile-bottom-nav button {
    min-height: 56px;
  }
}

@media (max-width: 430px) {
  .grid-screenshots {
    grid-template-columns: 1fr;
  }

  .ss-card img {
    aspect-ratio: 16 / 9;
    height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
  }
}
