/* ═══════════════════════════════════════════════════
   LEGACYGAMERS RO — Dark Fantasy Theme v2
   ═══════════════════════════════════════════════════ */

/* ── Custom Properties ── */
:root {
  --void: #080510;
  --deep: #100e1e;
  --panel: #0c0a17;
  --panel-hover: #110e1c;
  --purple-shadow: #1a1432;
  --gold: #c9a84c;
  --gold-bright: #ffd700;
  --gold-pale: #e8d5a3;
  --gold-dim: #8b7635;
  --gold-02: rgba(201, 168, 76, 0.02);
  --gold-03: rgba(201, 168, 76, 0.03);
  --gold-04: rgba(201, 168, 76, 0.04);
  --gold-05: rgba(201, 168, 76, 0.05);
  --gold-06: rgba(201, 168, 76, 0.06);
  --gold-07: rgba(201, 168, 76, 0.07);
  --gold-08: rgba(201, 168, 76, 0.08);
  --gold-10: rgba(201, 168, 76, 0.10);
  --gold-12: rgba(201, 168, 76, 0.12);
  --gold-15: rgba(201, 168, 76, 0.15);
  --gold-20: rgba(201, 168, 76, 0.20);
  --gold-25: rgba(201, 168, 76, 0.25);
  --gold-30: rgba(201, 168, 76, 0.30);
  --gold-35: rgba(201, 168, 76, 0.35);
  --gold-40: rgba(201, 168, 76, 0.40);
  --gold-50: rgba(201, 168, 76, 0.50);
  --gold-60: rgba(201, 168, 76, 0.60);
  --discord: #5865F2;
  --discord-hover: #7289da;
  --error: #b06060;
  --ember: #ff9d2e;
  --text: #d4cfc0;
  --text-dim: #7a7568;
  --text-muted: #4a4565;

  --tag-new-bg: #1a2e1e;
  --tag-new-text: #5fbf6e;
  --tag-new-border: #264a2e;
  --tag-update-bg: #162030;
  --tag-update-text: #5ea8cf;
  --tag-update-border: #1e3a52;
  --tag-event-bg: #28220e;
  --tag-event-text: #d4b85c;
  --tag-event-border: #3d3418;
  --tag-info-bg: #1a1830;
  --tag-info-text: #8a84b8;
  --tag-info-border: #2a2548;

  --online: #4aad5b;
  --online-glow: rgba(74, 173, 91, 0.6);
  --offline: #8b3a3a;
  --offline-glow: rgba(139, 58, 58, 0.6);

  --section-pad: clamp(4rem, 8vw, 7rem);
  --container-max: 1100px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Skip to Content (accessibility) ── */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dim) 100%);
  color: var(--void) !important;
  -webkit-text-fill-color: var(--void) !important;
  padding: 0.5rem 1.5rem;
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  z-index: 9999;
  transition: top 0.3s var(--ease-out);
  text-decoration: none;
  border-radius: 0 0 3px 3px;
  box-shadow: 0 2px 12px var(--gold-30);
}

.skip-to-content:focus {
  top: 0;
  outline: none;
}

/* ── Reset ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

body {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1rem, 1.1vw, 1.15rem);
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
  background: var(--void);
  overflow-x: clip;
  min-height: 100vh;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.3s;
}

a:hover { color: var(--gold-bright); }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

::selection {
  background: var(--gold-30);
  color: var(--gold-pale);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--gold-50);
  outline-offset: 2px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--void); }
::-webkit-scrollbar-thumb { background: var(--gold-15); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-30); }

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.05em;
}

.text-gold {
  background: linear-gradient(180deg, var(--gold-pale) 0%, var(--gold) 45%, var(--gold-dim) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Layout ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: var(--section-pad) 0;
  position: relative;
  z-index: 3;
}

/* ── Atmospheric Layers ── */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Film grain / noise texture */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 998;
  opacity: 0.028;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

.fog {
  position: fixed;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
}

.fog-1 {
  background: radial-gradient(ellipse at 25% 50%, rgba(26, 20, 50, 0.18), transparent 60%);
  animation: fade-in 3s ease forwards, fog-drift-1 38s ease-in-out infinite alternate;
}

.fog-2 {
  background: radial-gradient(ellipse at 75% 30%, rgba(20, 15, 40, 0.12), transparent 55%);
  animation: fade-in 3s ease 0.5s forwards, fog-drift-2 52s ease-in-out infinite alternate;
}

.fog-3 {
  background: radial-gradient(ellipse at 50% 70%, rgba(30, 22, 55, 0.15), transparent 65%);
  animation: fade-in 3s ease 1s forwards, fog-drift-3 45s ease-in-out infinite alternate;
}

.vignette {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(8, 5, 16, 0.6) 100%);
  pointer-events: none;
  z-index: 2;
}

/* ── Scroll Progress ── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold), var(--gold-bright));
  z-index: 1001;
  pointer-events: none;
  transition: width 0.05s linear;
}

/* ── Header & Navigation ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(8, 5, 16, 0.6);
  border-bottom: 1px solid var(--gold-08);
  transition: background 0.4s, border-color 0.4s;
}

.site-header.scrolled {
  background: rgba(8, 5, 16, 0.92);
  border-bottom-color: var(--gold-20);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1400px;
}

.nav-brand {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--gold-pale) !important;
  -webkit-text-fill-color: var(--gold-pale) !important;
  text-shadow: 0 0 20px var(--gold-15);
  transition: text-shadow 0.3s;
}

.nav-brand:hover {
  text-shadow: 0 0 30px var(--gold-30);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-wrap: nowrap;
}

.nav-minimal {
  flex: 1;
  margin-left: 0;
  padding-left: 2rem;
}

.nav-push-right {
  margin-left: auto;
}

.nav-links li {
  list-style: none;
  flex-shrink: 0;
}

.nav-links a {
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0.5rem 0.55rem;
  position: relative;
  transition: color 0.3s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 1px;
  background: var(--gold);
  transform: translateX(-50%);
  transition: width 0.3s var(--ease-out);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold-pale);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 60%;
}

/* Nav Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown > a::before {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-top: 3.5px solid currentColor;
  margin-left: 6px;
  vertical-align: middle;
  transition: transform 0.35s var(--ease-out);
  opacity: 0.6;
}

.nav-dropdown:hover > a::before {
  transform: rotate(180deg);
  opacity: 1;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: -8px;
  min-width: 200px;
  background: rgba(10, 8, 20, 0.97);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border: 1px solid var(--gold-12);
  border-top: 1px solid var(--gold-25);
  padding: 0.6rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.98);
  transform-origin: top right;
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s var(--ease-out);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.5),
    0 20px 60px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 var(--gold-04);
  z-index: 1002;
}

/* Gold accent line on top */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-30), transparent);
}

/* Small caret pointing up */
.nav-dropdown-menu::after {
  content: '';
  position: absolute;
  top: -4px;
  right: 24px;
  width: 7px;
  height: 7px;
  background: rgba(10, 8, 20, 0.97);
  border-top: 1px solid var(--gold-25);
  border-left: 1px solid var(--gold-12);
  transform: rotate(45deg);
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1.25rem !important;
  font-size: 0.7rem !important;
  white-space: nowrap;
  transition: background 0.25s, color 0.3s, padding-left 0.25s var(--ease-out);
}

.nav-dropdown-menu a::after {
  display: none !important;
}

.nav-dropdown-menu a:hover {
  background: linear-gradient(90deg, var(--gold-08), transparent);
  padding-left: 1.5rem !important;
}

.nav-dropdown-menu a svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  fill: currentColor;
  opacity: 0.5;
  transition: opacity 0.3s;
}

.nav-dropdown-menu a:hover svg {
  opacity: 0.9;
}

.nav-dropdown-menu .dropdown-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-10), transparent);
  margin: 0.4rem 1rem;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--gold-dim);
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  z-index: 3;
  overflow: hidden;
}

.hero-aura {
  position: absolute;
  top: 45%;
  left: 50%;
  width: 700px;
  height: 500px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, var(--gold-04) 0%, transparent 65%);
  pointer-events: none;
}

/* SVG crest watermark behind hero */
.hero-crest {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(280px, 38vw, 440px);
  height: auto;
  transform: translate(-50%, -52%);
  color: var(--gold);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  animation: fade-in 2s ease 0.8s forwards;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 40px var(--gold-10);
  background: linear-gradient(
    90deg,
    var(--gold-dim) 0%,
    var(--gold-pale) 20%,
    var(--gold) 40%,
    var(--gold-pale) 55%,
    var(--gold-dim) 70%,
    var(--gold-pale) 85%,
    var(--gold-dim) 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fade-rise 1.2s var(--ease-out) both, text-shimmer 8s ease-in-out 2s infinite;
}

.hero-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  animation: fade-rise 1.2s var(--ease-out) 0.2s both;
}

/* ── Beta Badge (hero) — clickable with glow pulse ── */
.hero-beta {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold) !important;
  -webkit-text-fill-color: var(--gold) !important;
  border: 1px solid var(--gold-15);
  padding: 0.3rem 1rem;
  margin-top: 0.5rem;
  animation: fade-rise 1.2s var(--ease-out) 0.35s both;
  cursor: pointer;
  position: relative;
  transition: border-color 0.4s, box-shadow 0.4s, color 0.4s, transform 0.3s var(--ease-out);
}

/* Persistent glow pulse — signals interactivity */
.hero-beta::before {
  content: '';
  position: absolute;
  inset: -1px;
  pointer-events: none;
  border: 1px solid var(--gold-40);
  box-shadow:
    0 0 24px var(--gold-20),
    0 0 8px var(--gold-12),
    inset 0 0 12px var(--gold-06);
  animation: beta-glow 3.5s ease-in-out 2.5s infinite;
  opacity: 0;
}

.hero-beta:hover {
  border-color: var(--gold-60);
  color: var(--gold-bright) !important;
  -webkit-text-fill-color: var(--gold-bright) !important;
  transform: translateY(-1px);
  box-shadow: 0 0 28px var(--gold-20), 0 0 8px var(--gold-10);
}

.hero-beta:hover::before {
  animation: none;
  opacity: 1;
  border-color: var(--gold-50);
  box-shadow:
    0 0 28px var(--gold-20),
    0 0 8px var(--gold-10),
    inset 0 0 14px var(--gold-05);
}

/* ── Ornament Divider ── */
.ornament-divider {
  position: relative;
  width: clamp(200px, 40vw, 320px);
  height: 20px;
  margin: 1.5rem auto;
  display: flex;
  align-items: center;
  animation: fade-rise 1.2s var(--ease-out) 0.4s both;
}

.ornament-divider::before,
.ornament-divider::after {
  content: '';
  flex: 1;
  height: 1px;
}

.ornament-divider::before {
  background: linear-gradient(90deg, transparent, var(--gold-dim));
}

.ornament-divider::after {
  background: linear-gradient(90deg, var(--gold-dim), transparent);
}

.ornament-divider .diamond {
  width: 7px;
  height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
  flex-shrink: 0;
  margin: 0 12px;
  box-shadow: 0 0 6px var(--gold-40);
}

/* ── Section Title ── */
.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 3rem;
}

.section-title::before,
.section-title::after {
  content: '';
  width: clamp(40px, 8vw, 100px);
  height: 1px;
}

.section-title::before {
  background: linear-gradient(90deg, transparent, var(--gold-dim));
}

.section-title::after {
  background: linear-gradient(90deg, var(--gold-dim), transparent);
}

/* ── Hero Scroll Hint ── */
.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  animation: fade-in 1s ease 2.5s forwards, scroll-hint-bob 2.8s ease-in-out 2.5s infinite;
  transition: opacity 0.5s;
}

.hero-scroll-hint svg {
  width: 18px;
  height: auto;
  color: var(--gold-dim);
  opacity: 0.35;
  filter: drop-shadow(0 0 4px var(--gold-10));
}

.hero-scroll-hint.hidden {
  opacity: 0 !important;
  pointer-events: none;
}

/* ── Server Status ── */
.server-status {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1.5rem;
  background: rgba(12, 10, 23, 0.7);
  border: 1px solid var(--gold-12);
  border-radius: 2px;
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  animation: fade-rise 1.2s var(--ease-out) 0.6s both;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.online {
  background: var(--online);
  box-shadow: 0 0 8px var(--online-glow);
  animation: pulse-green 2s ease-in-out infinite;
}

.status-dot.offline {
  background: var(--offline);
  box-shadow: 0 0 8px var(--offline-glow);
  animation: pulse-red 2.5s ease-in-out infinite;
}

.status-separator {
  color: var(--text-muted);
  font-size: 0.6rem;
}

.status-players {
  color: var(--gold);
}

/* ── Info Bar (HUD) ── */
.info-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 1.2rem 2rem;
  background: rgba(12, 10, 23, 0.4);
  border-top: 1px solid var(--gold-06);
  border-bottom: 1px solid var(--gold-06);
  position: relative;
  z-index: 3;
  animation: fade-rise 1.2s var(--ease-out) 0.8s both;
}

.info-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  transition: transform 0.3s var(--ease-out);
  cursor: default;
}

.info-item:hover {
  transform: scale(1.08);
}

.info-label {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.info-value {
  font-family: 'Cinzel', serif;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--gold-pale);
  transition: color 0.3s, text-shadow 0.3s;
}

.info-item:hover .info-value {
  color: var(--gold-bright);
  text-shadow: 0 0 12px var(--gold-15);
}

.info-sep {
  color: var(--gold-dim);
  font-size: 0.45rem;
  opacity: 0.4;
  align-self: center;
}

/* ── News Section ── */
.news-section {
  position: relative;
  z-index: 3;
}

.news-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent, rgba(16, 14, 30, 0.3) 30%, rgba(16, 14, 30, 0.3) 70%, transparent);
  pointer-events: none;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.news-card {
  position: relative;
  background: rgba(12, 10, 23, 0.6);
  border: 1px solid var(--gold-08);
  border-radius: 3px;
  padding: 1.5rem;
  transition: border-color 0.4s, transform 0.4s var(--ease-out), box-shadow 0.4s;
  overflow: hidden;
}

/* Top gold line with sweep animation */
.news-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-dim) 50%, transparent);
  background-size: 200% 100%;
  background-position: 100% 0;
  opacity: 0.4;
  transition: background-position 0.8s ease, opacity 0.4s;
}

.news-card:hover {
  border-color: var(--gold-20);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.news-card:hover::before {
  background-position: 0% 0;
  opacity: 1;
}

/* Featured news card — full width, gold left accent */
.news-card-featured {
  grid-column: 1 / -1;
  border-left: 3px solid var(--gold-dim);
  transition: border-color 0.4s, border-left-color 0.4s, transform 0.4s var(--ease-out), box-shadow 0.4s;
}

.news-card-featured:hover {
  border-left-color: var(--gold);
}

.news-card-featured .news-title {
  font-size: 1.25rem;
}

.news-card-featured .news-body {
  font-size: 1rem;
  max-width: 720px;
}

.news-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.tag {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  border: 1px solid;
}

.tag-new { background: var(--tag-new-bg); color: var(--tag-new-text); border-color: var(--tag-new-border); }
.tag-update { background: var(--tag-update-bg); color: var(--tag-update-text); border-color: var(--tag-update-border); }
.tag-event { background: var(--tag-event-bg); color: var(--tag-event-text); border-color: var(--tag-event-border); }
.tag-info { background: var(--tag-info-bg); color: var(--tag-info-text); border-color: var(--tag-info-border); }

.news-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.news-title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--gold-pale);
  margin-bottom: 0.5rem;
}

.news-body {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.news-body-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-body-clamped.expanded {
  -webkit-line-clamp: unset;
  overflow: visible;
}

.news-read-more {
  background: none;
  border: none;
  color: var(--gold-dim);
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.4rem 0;
  margin-top: 0.4rem;
  transition: color 0.3s;
  display: none;
}

.news-read-more.visible {
  display: inline-block;
}

.news-read-more:hover {
  color: var(--gold-bright);
}

/* ── Features Section ── */
.features-section {
  position: relative;
  z-index: 3;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.feature-card {
  position: relative;
  background: rgba(12, 10, 23, 0.5);
  border: 1px solid var(--gold-08);
  border-radius: 3px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  transition: border-color 0.4s, box-shadow 0.4s;
  overflow: hidden;
}

/* Corner brackets */
.feature-card::before,
.feature-card::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--gold-20);
  border-style: solid;
  transition: all 0.4s var(--ease-out);
}

.feature-card::before {
  top: 12px;
  left: 12px;
  border-width: 1px 0 0 1px;
}

.feature-card::after {
  bottom: 12px;
  right: 12px;
  border-width: 0 1px 1px 0;
}

.feature-card:hover {
  border-color: var(--gold-15);
  box-shadow: inset 0 0 30px var(--gold-03);
}

.feature-card:hover::before,
.feature-card:hover::after {
  width: 28px;
  height: 28px;
  border-color: var(--gold-40);
}

.feature-diamond {
  width: 20px;
  height: 20px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, var(--gold-pale), var(--gold-dim));
  transform: rotate(45deg);
  opacity: 0.5;
  transition: opacity 0.4s, box-shadow 0.4s;
}

.feature-card:hover .feature-diamond {
  opacity: 0.8;
  box-shadow: 0 0 12px var(--gold-30);
}

.feature-icon {
  width: 28px;
  height: 28px;
  margin: 0 auto 1.5rem;
  color: var(--gold);
  opacity: 0.4;
  transition: opacity 0.4s, filter 0.4s;
}

.feature-icon svg {
  width: 100%;
  height: 100%;
}

.feature-card:hover .feature-icon {
  opacity: 0.75;
  filter: drop-shadow(0 0 8px var(--gold-30));
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--gold-pale);
  margin-bottom: 0.75rem;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.feature-badge {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--gold-10);
  border-radius: 2px;
}

.feature-link {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 0.4rem 1rem;
  border: 1px solid var(--gold-30);
  border-radius: 2px;
  transition: all 0.3s;
}

.feature-link:hover {
  background: var(--gold-08);
  border-color: var(--gold);
  color: var(--gold-bright);
}

/* ── Page Hero (subpages) ── */
.page-hero {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10rem 2rem 3rem;
}

.page-hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  animation: fade-rise 1s var(--ease-out) both;
}

.page-hero-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  margin-top: 0.4rem;
  animation: fade-rise 1s var(--ease-out) 0.15s both;
}

.page-hero .ornament-divider {
  animation: fade-rise 1s var(--ease-out) 0.3s both;
}

/* ── Feature Detail Sections ── */
.features-detail-section {
  position: relative;
  z-index: 3;
}

.features-detail-alt::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(16, 14, 30, 0.25) 30%, rgba(16, 14, 30, 0.25) 70%, transparent);
  pointer-events: none;
}

.feature-detail {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 2rem;
  align-items: start;
}

.feature-detail-reverse {
  grid-template-columns: 1fr 80px;
}

.feature-detail-reverse .feature-detail-icon {
  order: 2;
}

.feature-detail-reverse .feature-detail-content {
  order: 1;
}

.feature-detail-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  opacity: 0.5;
  margin-top: 0.25rem;
}

.feature-detail-icon svg {
  width: 48px;
  height: 48px;
}

.feature-detail-content h2 {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gold-pale);
  margin-bottom: 0.75rem;
}

.feature-detail-content p {
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 1.25rem;
  max-width: 620px;
}

.feature-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.feature-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.feature-stat-value {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--gold-pale);
}

.feature-stat-label {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.feature-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.feature-list li {
  position: relative;
  padding-left: 1.25rem;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.5;
}

.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  background: var(--gold-dim);
  transform: rotate(45deg);
  opacity: 0.6;
}

/* ── CTA Section ── */
.cta-section {
  text-align: center;
  position: relative;
  z-index: 3;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(20, 16, 35, 0.2) 30%, rgba(20, 16, 35, 0.2) 70%, transparent);
  pointer-events: none;
}

.cta-text {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--text-dim);
  max-width: 500px;
  margin: 0 auto 2rem;
  font-style: italic;
  line-height: 1.7;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.discord-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  transition: color 0.3s;
}

.discord-link:hover {
  color: var(--discord-hover);
}

.discord-link svg {
  width: 18px;
  height: 14px;
  fill: currentColor;
  transition: fill 0.3s;
}

/* ── Download Modal ── */
.download-modal-panel {
  max-width: 540px;
  text-align: center;
}

.download-modal-desc {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.7;
  font-style: italic;
  margin-bottom: 2rem;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.download-modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 2.25rem;
  padding: 0.85rem 3rem;
  font-size: 0.85rem;
}

.download-modal-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

.download-modal-divider {
  position: relative;
  width: 70%;
  height: 1px;
  margin: 0 auto 1.75rem;
  background: linear-gradient(90deg, transparent, var(--gold-15), transparent);
}

.download-modal-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: var(--gold-dim);
  transform: translate(-50%, -50%) rotate(45deg);
  opacity: 0.5;
}

.download-specs-label {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  display: block;
}

/* ── CTA Links Row ── */
.cta-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.cta-link-sep {
  color: var(--text-muted);
  font-size: 0.5rem;
  opacity: 0.5;
}

/* ── System Specs / Beta Modal ── */
.specs-link {
  display: inline-block;
  margin-top: 1.5rem;
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted) !important;
  transition: color 0.3s;
}

.specs-link:hover {
  color: var(--gold-pale) !important;
}

.specs-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 2, 8, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.specs-modal.open {
  opacity: 1;
  visibility: visible;
}

.specs-modal-panel {
  position: relative;
  background: rgba(12, 10, 23, 0.95);
  border: 1px solid var(--gold-15);
  padding: 2.5rem 2.5rem 2rem;
  max-width: 500px;
  width: 90%;
  transform: translateY(16px) scale(0.97);
  transition: transform 0.35s var(--ease-out);
}

.specs-modal.open .specs-modal-panel {
  transform: translateY(0) scale(1);
}

.specs-modal-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-30), transparent);
}

.specs-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.3s;
}

.specs-modal-close:hover {
  color: var(--gold-pale);
}

.specs-title {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.5rem;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.spec-item {
  text-align: center;
  padding: 0.5rem 0.25rem;
}

.spec-label {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 0.25rem;
}

.spec-value {
  display: block;
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.4;
}

.specs-note {
  text-align: center;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--text-muted);
  margin-top: 1.25rem;
}

.beta-modal-panel {
  text-align: center;
  max-width: 420px;
}

.beta-modal-text {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.beta-modal-text strong {
  color: var(--gold-pale);
}

.beta-modal-btn {
  display: inline-flex;
  align-items: center;
  margin-top: 0.75rem;
}

@media (max-width: 480px) {
  .specs-grid { grid-template-columns: repeat(2, 1fr); }
  .specs-modal-panel { padding: 2rem 1.5rem 1.5rem; }
}

/* ── Footer ── */
.site-footer {
  position: relative;
  z-index: 3;
  padding: 3.5rem 0 2rem;
  border-top: 1px solid var(--gold-08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  text-align: left;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--gold-06);
}

.footer-about .footer-brand {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  color: var(--gold-dim);
  margin-bottom: 0.75rem;
}

.footer-desc {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.footer-rates {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.footer-heading {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 1rem;
}

.footer-links-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links-col a {
  font-size: 0.88rem;
  color: var(--text-dim);
  transition: color 0.3s;
}

.footer-links-col a:hover {
  color: var(--gold);
}

.footer-bottom {
  text-align: center;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-copy .heart {
  color: var(--gold-dim);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.btn-gold {
  font-size: 0.8rem;
  padding: 0.75rem 2.5rem;
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dim) 100%);
  color: var(--void);
  box-shadow: 0 0 20px var(--gold-15);
}

.btn-gold:hover {
  box-shadow: 0 0 30px var(--gold-30);
  color: var(--void);
  transform: translateY(-1px);
}

.btn-gold::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.25), transparent);
  transition: left 0.5s;
}

.btn-gold:hover::after {
  left: 100%;
}

.btn-outline {
  font-size: 0.75rem;
  padding: 0.65rem 1.8rem;
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold-30);
}

.btn-outline:hover {
  background: var(--gold-08);
  border-color: var(--gold);
  color: var(--gold-bright);
}

/* ── Form Elements ── */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
}

.form-input,
.form-select {
  width: 100%;
  padding: 0.7rem 1rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  color: var(--text);
  background: rgba(8, 5, 16, 0.6);
  border: 1px solid var(--gold-12);
  border-radius: 2px;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-input::placeholder {
  color: var(--text-muted);
  font-style: italic;
}

.form-input:focus,
.form-select:focus {
  border-color: var(--gold-40);
  box-shadow: 0 0 0 3px var(--gold-06), inset 0 0 10px var(--gold-03);
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%237a7568'%3E%3Cpath d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-select option {
  background: var(--deep);
  color: var(--text);
}

.form-error {
  font-size: 0.8rem;
  color: var(--error);
  margin-top: 0.3rem;
  display: none;
}

.form-error.visible {
  display: block;
}

/* ── Registration Panel ── */
.register-page {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem 4rem;
}

.register-panel {
  width: 100%;
  max-width: 440px;
  background: rgba(12, 10, 23, 0.75);
  border: 1px solid var(--gold-10);
  border-radius: 3px;
  padding: 2.5rem 2rem;
  position: relative;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.register-panel::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  width: 8px;
  height: 8px;
  background: var(--gold);
  transform: translateX(-50%) rotate(45deg);
  box-shadow: 0 0 8px var(--gold-40);
}

.register-panel::after {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}

.register-title {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  margin-bottom: 0.3rem;
}

.register-subtitle {
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-dim);
  font-style: italic;
  margin-bottom: 2rem;
}

.strength-meter {
  height: 3px;
  background: var(--gold-08);
  border-radius: 2px;
  margin-top: 0.5rem;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: width 0.4s var(--ease-out), background-color 0.4s;
}

.strength-label {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  margin-top: 0.25rem;
  min-height: 1em;
  transition: color 0.3s;
  color: var(--text-muted);
  font-family: 'Cinzel', serif;
  text-transform: uppercase;
}

.captcha-area {
  border: 1px dashed var(--gold-15);
  border-radius: 2px;
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
  margin-bottom: 1.25rem;
}

/* ── Login Page ── */
.login-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.login-icon svg {
  width: 48px;
  height: 48px;
  color: var(--gold-dim);
  opacity: 0.4;
  filter: drop-shadow(0 0 8px var(--gold-15));
}

.login-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: none;
  position: relative;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.login-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-12), transparent);
}

.login-footer p {
  font-style: italic;
}

/* ── Nav Login Button ── */
.nav-login {
  font-family: 'Cinzel', serif;
  font-size: 0.63rem !important;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold) !important;
  padding: 0.4rem 1.1rem;
  border: 1px solid var(--gold-20);
  margin-left: 0.25rem;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s, color 0.4s, box-shadow 0.4s;
}

.nav-login::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, var(--gold-10) 50%, transparent 100%);
  background-size: 200% 100%;
  background-position: -100% 0;
  transition: background-position 0.5s var(--ease-out);
}

.nav-login:hover::before {
  background-position: 100% 0;
}

.nav-login:hover {
  border-color: var(--gold-50);
  color: var(--gold-bright) !important;
  box-shadow: 0 0 15px var(--gold-08);
}

.nav-login::after {
  display: none !important;
}

/* ── 404 Page ── */
.error-page {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.error-code {
  font-family: 'Cinzel', serif;
  font-size: clamp(8rem, 22vw, 16rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.05em;
  background: linear-gradient(180deg, rgba(232, 213, 163, 0.15) 0%, rgba(139, 118, 53, 0.06) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  user-select: none;
}

.error-title {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  margin-top: -1rem;
}

.error-text {
  font-size: 1.1rem;
  color: var(--text-dim);
  font-style: italic;
  max-width: 400px;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

/* ── Rules Page ── */
.rules-section {
  position: relative;
  z-index: 3;
  padding: 0 0 var(--section-pad);
}

.rules-content {
  max-width: 780px;
  margin: 0 auto;
}

.rule-category {
  margin-bottom: 3.5rem;
  position: relative;
}

/* Subtle connecting line between sections */
.rule-category::after {
  content: '';
  position: absolute;
  bottom: -1.75rem;
  left: 1.5rem;
  right: 80%;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-12), transparent);
}

.rule-category:last-of-type::after {
  display: none;
}

.rule-category-header {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--gold-07);
  position: relative;
}

/* Accent dot at start of header line */
.rule-category-header::before {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 5px;
  height: 5px;
  background: var(--gold-dim);
  transform: rotate(45deg);
  opacity: 0.5;
}

.rule-category-number {
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(180deg, var(--gold-20) 0%, rgba(139, 118, 53, 0.08) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  min-width: 2.5rem;
  user-select: none;
}

.rule-category-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gold-pale);
  letter-spacing: 0.04em;
}

.rule-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-left: 3.75rem;
}

.rule-item {
  display: flex;
  gap: 0.85rem;
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--text);
  padding: 0.35rem 0;
  position: relative;
  transition: color 0.3s;
}

.rule-item::before {
  content: '\25C7';
  color: var(--gold-dim);
  flex-shrink: 0;
  margin-top: 3px;
  font-size: 0.6rem;
  opacity: 0.7;
  transition: opacity 0.3s, color 0.3s;
}

.rule-item:hover {
  color: var(--gold-pale);
}

.rule-item:hover::before {
  opacity: 1;
  color: var(--gold);
}

.rule-note {
  margin-top: 3rem;
  padding: 1.75rem 2rem;
  background: var(--gold-02);
  border: 1px solid var(--gold-06);
  border-left: none;
  position: relative;
  font-style: italic;
  color: var(--text-dim);
  line-height: 1.75;
}

/* Ornate left accent on note */
.rule-note::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, var(--gold-dim), rgba(139, 118, 53, 0.2), var(--gold-dim));
}

.rule-note::after {
  content: '\2666';
  position: absolute;
  top: -0.5em;
  left: -0.35em;
  font-size: 0.65rem;
  color: var(--gold-dim);
}

.rule-note strong {
  color: var(--gold);
  font-style: normal;
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

@media (max-width: 768px) {
  .rule-list { padding-left: 1.25rem; }
  .rule-category-number { font-size: 1.5rem; min-width: 2rem; }
  .rule-note { padding: 1.25rem 1.5rem; }
}

/* ── Animations ── */
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fade-rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes text-shimmer {
  0%, 100% { background-position: 100% 0; }
  50% { background-position: 0% 0; }
}

@keyframes beta-glow {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

@keyframes scroll-hint-bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 4px var(--online-glow); }
  50% { box-shadow: 0 0 12px var(--online-glow), 0 0 20px rgba(74, 173, 91, 0.2); }
}

@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 4px var(--offline-glow); }
  50% { box-shadow: 0 0 12px var(--offline-glow); }
}

@keyframes fog-drift-1 {
  from { transform: translateX(0); }
  to { transform: translateX(8%); }
}

@keyframes fog-drift-2 {
  from { transform: translateX(0); }
  to { transform: translateX(-6%); }
}

@keyframes fog-drift-3 {
  from { transform: translateX(0); }
  to { transform: translateX(5%); }
}

/* ── Scroll Reveal ── */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s var(--ease-out);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal-delay="1"] { transition-delay: 0.1s; }
[data-reveal-delay="2"] { transition-delay: 0.2s; }
[data-reveal-delay="3"] { transition-delay: 0.3s; }
[data-reveal-delay="4"] { transition-delay: 0.4s; }
[data-reveal-delay="5"] { transition-delay: 0.5s; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .container { padding-left: 1.5rem; padding-right: 1.5rem; }
  .hero-title { font-size: clamp(1.8rem, 4.5vw, 2.8rem); }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }

  /* Reduce particle/effect layers on tablets */
  .fog-3 { display: none; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(8, 5, 16, 0.97);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 999;
  }

  .nav-links.open { opacity: 1; visibility: visible; }
  .nav-links a { font-size: 1rem; padding: 0.75rem 1.5rem; }

  .nav-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
    padding: 0;
    min-width: 0;
  }

  .nav-dropdown-menu::before,
  .nav-dropdown-menu::after { display: none; }

  .nav-dropdown-menu a {
    justify-content: center;
    padding: 0.5rem 1.5rem !important;
    font-size: 0.85rem !important;
  }

  .nav-dropdown-menu a:hover {
    background: none;
    padding-left: 1.5rem !important;
  }

  .nav-dropdown-menu .dropdown-divider { display: none; }
  .nav-dropdown > a::before { display: none; }

  .nav-login { margin-left: 0; }

  .nav-user {
    font-size: 0.82rem;
    color: var(--gold-dim);
    opacity: 0.6;
  }

  .news-grid { grid-template-columns: 1fr; }
  .news-card-featured { grid-column: 1; }

  .features-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .hero { padding: 5rem 1.5rem 3rem; }

  .feature-detail,
  .feature-detail-reverse {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .feature-detail-reverse .feature-detail-icon { order: 0; }
  .feature-detail-reverse .feature-detail-content { order: 0; }

  .feature-stats { gap: 1.25rem; }

  .page-hero { padding: 8rem 1.5rem 2rem; }

  .info-bar {
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    padding: 1rem 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-links-col { align-items: center; }

  .cta-buttons { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 1.25rem; }
  .register-panel { padding: 2rem 1.5rem; }

  .server-status {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.7rem;
  }
}

/* ── Back to Top ── */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 10, 23, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--gold-12);
  color: var(--gold-dim);
  cursor: pointer;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.4s, visibility 0.4s, transform 0.4s var(--ease-out), border-color 0.3s, color 0.3s, box-shadow 0.3s;
  padding: 0;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  border-color: var(--gold-40);
  color: var(--gold);
  box-shadow: 0 0 16px var(--gold-10);
}

.back-to-top svg {
  width: 14px;
  height: 14px;
}

/* Fix: Modal overlay z-index with nav backdrop-filter stacking context */
body:has(.specs-modal.open) .site-header {
  z-index: auto;
}

/* Nav user greeting (logged in) */
.nav-user {
  font-family: 'Cinzel', serif;
  font-size: 0.63rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--gold-dim);
  padding: 0.5rem 0.25rem;
  white-space: nowrap;
}

/* CAPTCHA */
.captcha-group {
  margin-bottom: 1.25rem;
}

.captcha-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.captcha-image {
  border: 1px solid var(--gold-12);
  border-radius: 2px;
  cursor: pointer;
  height: 50px;
}

.captcha-refresh {
  background: none;
  border: 1px solid var(--gold-15);
  color: var(--gold-dim);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  border-radius: 2px;
  transition: border-color 0.3s, color 0.3s;
}

.captcha-refresh:hover {
  border-color: var(--gold-40);
  color: var(--gold);
}

/* Form messages */
.form-success {
  text-align: center;
  padding: 1rem;
  margin-bottom: 1rem;
  background: rgba(74, 173, 91, 0.08);
  border: 1px solid rgba(74, 173, 91, 0.2);
  color: var(--online);
  font-size: 0.9rem;
  border-radius: 2px;
}

.form-error-global {
  text-align: center;
  padding: 1rem;
  margin-bottom: 1rem;
  background: rgba(176, 96, 96, 0.08);
  border: 1px solid rgba(176, 96, 96, 0.2);
  color: var(--error);
  font-size: 0.9rem;
  border-radius: 2px;
}

/* ── Admin Sidebar Layout ── */
.admin-layout {
  display: flex;
  min-height: calc(100vh - 64px);
}

.admin-sidebar {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(12, 10, 23, 0.95) 0%, rgba(8, 5, 16, 0.98) 100%);
  border-right: 1px solid var(--gold-10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10;
  overflow-y: auto;
}

/* Ornamental top edge — thin gold inlay */
.admin-sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--gold-25) 20%,
    var(--gold-40) 50%,
    var(--gold-25) 80%,
    transparent 100%
  );
}

.admin-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1.25rem 1.25rem 1rem;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-dim);
  border-bottom: 1px solid var(--gold-06);
  margin-bottom: 0.5rem;
}

.admin-sidebar-icon {
  width: 18px;
  height: 18px;
  stroke: var(--gold-dim);
  flex-shrink: 0;
  opacity: 0.7;
}

.admin-sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 0.25rem 0.75rem;
  gap: 2px;
  flex: 1;
}

.admin-sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 2px;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition:
    color 0.3s,
    background 0.3s,
    border-color 0.3s,
    box-shadow 0.3s;
  position: relative;
}

.admin-sidebar-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: currentColor;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.admin-sidebar-link:hover {
  color: var(--gold-pale);
  background: var(--gold-04);
  border-left-color: var(--gold-20);
}

.admin-sidebar-link:hover svg {
  opacity: 1;
}

.admin-sidebar-link.active {
  color: var(--gold);
  background: var(--gold-07);
  border-left-color: var(--gold);
  box-shadow: inset 0 0 20px var(--gold-03);
}

.admin-sidebar-link.active svg {
  opacity: 1;
  stroke: var(--gold);
}

/* Faint glow behind active link */
.admin-sidebar-link.active::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 2px;
  box-shadow: 0 0 12px var(--gold-06);
  pointer-events: none;
}

.admin-sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid var(--gold-06);
  margin-top: auto;
}

.admin-sidebar-back {
  font-size: 0.65rem !important;
  color: var(--text-muted) !important;
  letter-spacing: 0.08em !important;
}

.admin-sidebar-back:hover {
  color: var(--text-dim) !important;
}

/* Admin sidebar mobile toggle */
.admin-sidebar-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 24px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
}

.admin-sidebar-toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--gold-dim);
  transition: transform 0.3s, opacity 0.3s;
}

.admin-sidebar-toggle.active span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.admin-sidebar-toggle.active span:nth-child(2) { opacity: 0; }
.admin-sidebar-toggle.active span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.admin-content {
  flex: 1;
  min-width: 0;
  padding: 2rem 2.5rem 4rem;
  max-width: 960px;
}

/* Responsive: sidebar collapses to horizontal strip */
@media (max-width: 768px) {
  .admin-layout {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    top: 0;
    flex-direction: row;
    align-items: center;
    border-right: none;
    border-bottom: 1px solid var(--gold-10);
    overflow-x: auto;
    overflow-y: hidden;
  }

  .admin-sidebar::before {
    display: none;
  }

  .admin-sidebar-brand {
    padding: 0.75rem 1rem;
    border-bottom: none;
    margin-bottom: 0;
    white-space: nowrap;
  }

  .admin-sidebar-nav {
    flex-direction: row;
    padding: 0 0.5rem;
    gap: 0;
    flex: none;
  }

  .admin-sidebar-link {
    white-space: nowrap;
    border-left: none;
    border-bottom: 3px solid transparent;
    padding: 0.75rem 0.85rem;
    font-size: 0.68rem;
  }

  .admin-sidebar-link:hover {
    border-left-color: transparent;
    border-bottom-color: var(--gold-20);
  }

  .admin-sidebar-link.active {
    border-left-color: transparent;
    border-bottom-color: var(--gold);
  }

  .admin-sidebar-footer {
    border-top: none;
    border-left: 1px solid var(--gold-06);
    margin-top: 0;
    margin-left: auto;
    padding: 0.5rem 0.75rem;
  }

  /* Admin sidebar → collapsible hamburger on mobile */
  .admin-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    top: 0;
    flex-direction: column;
    border-right: none;
    border-bottom: 1px solid var(--gold-10);
    overflow: visible;
    padding: 0;
  }

  .admin-sidebar::before { display: none; }

  .admin-sidebar-brand {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: none;
    margin-bottom: 0;
    white-space: nowrap;
  }

  .admin-sidebar-toggle { display: flex; }

  .admin-sidebar-nav,
  .admin-sidebar-footer {
    display: none;
  }

  .admin-sidebar.open .admin-sidebar-nav,
  .admin-sidebar.open .admin-sidebar-footer {
    display: flex;
  }

  .admin-sidebar-nav {
    flex-direction: column;
    padding: 0 0.5rem 0.5rem;
    gap: 0;
    flex: none;
  }

  .admin-sidebar-link {
    white-space: nowrap;
    border-left: 3px solid transparent;
    border-bottom: none;
    padding: 0.5rem 0.85rem;
    font-size: 0.75rem;
  }

  .admin-sidebar-link:hover {
    border-left-color: var(--gold-20);
    border-bottom-color: transparent;
  }

  .admin-sidebar-link.active {
    border-left-color: var(--gold);
    border-bottom-color: transparent;
  }

  .admin-sidebar-footer {
    flex-direction: column;
    border-top: none;
    border-left: none;
    margin-top: 0;
    margin-left: 0;
    padding: 0 0.5rem 0.5rem;
  }

  .admin-content {
    padding: 1.5rem 1.25rem 3rem;
  }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .admin-panel {
    padding: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-table { min-width: 500px; }

  .admin-form-actions {
    flex-direction: column;
  }

  .admin-form-actions .btn { width: 100%; }

  .form-row { flex-direction: column; gap: 0; }

  .settings-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }

  .settings-info { padding-right: 0; }

  /* Quill editor mobile */
  .ql-toolbar.ql-snow { padding: 4px; }
  .ql-toolbar button { width: 24px; height: 24px; }
}

/* ── Admin Panel ── */
.admin-page {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  padding-top: 64px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.admin-title {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.15em;
}

.btn-sm {
  font-size: 0.7rem;
  padding: 0.5rem 1.5rem;
}

.admin-panel {
  background: rgba(12, 10, 23, 0.75);
  border: 1px solid var(--gold-10);
  border-radius: 3px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.admin-panel-title {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 1.25rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table thead th {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-dim);
  text-align: left;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--gold-15);
}

.admin-table tbody td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--gold-05);
  vertical-align: middle;
}

.admin-table tbody tr:hover {
  background: var(--gold-03);
}

.admin-id {
  color: var(--text-muted);
  font-size: 0.8rem;
  width: 40px;
}

.admin-title-cell {
  color: var(--gold-pale);
  font-weight: 500;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-date {
  color: var(--text-muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.admin-empty {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 2rem 0.5rem !important;
}

.admin-actions {
  white-space: nowrap;
}

.btn-edit,
.btn-delete {
  background: none;
  border: 1px solid var(--gold-15);
  color: var(--text-dim);
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  border-radius: 2px;
  font-size: 0.85rem;
  transition: border-color 0.3s, color 0.3s, background 0.3s;
  margin-right: 0.25rem;
}

.btn-edit:hover {
  border-color: var(--gold-40);
  color: var(--gold);
  background: var(--gold-06);
}

.btn-delete:hover {
  border-color: rgba(176, 96, 96, 0.4);
  color: var(--error);
  background: rgba(176, 96, 96, 0.06);
}

.admin-featured-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: color 0.3s, text-shadow 0.3s;
  padding: 0.2rem;
}

.admin-featured-toggle:hover {
  color: var(--gold);
}

.admin-featured-toggle.is-featured {
  color: var(--gold);
  text-shadow: 0 0 8px var(--gold-40);
}

/* Admin form row */
.form-row {
  display: flex;
  gap: 1rem;
}

.form-group-half {
  flex: 1;
}

.admin-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  cursor: pointer;
  padding-top: 0.7rem;
}

.admin-checkbox input[type="checkbox"] {
  display: none;
}

.admin-checkbox-mark {
  width: 18px;
  height: 18px;
  border: 1px solid var(--gold-20);
  border-radius: 2px;
  background: rgba(8, 5, 16, 0.6);
  position: relative;
  flex-shrink: 0;
  transition: border-color 0.3s, background 0.3s;
}

.admin-checkbox input:checked + .admin-checkbox-mark {
  border-color: var(--gold);
  background: var(--gold-15);
}

.admin-checkbox input:checked + .admin-checkbox-mark::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 5px;
  height: 9px;
  border: solid var(--gold);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.admin-form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Delete modal */
.admin-modal-panel {
  max-width: 400px;
  text-align: center;
}

.admin-modal-text {
  font-size: 0.95rem;
  color: var(--text-dim);
  margin: 1rem 0 1.5rem;
  line-height: 1.6;
}

.admin-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.btn-danger {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
  font-size: 0.7rem;
  padding: 0.5rem 1.5rem;
  background: linear-gradient(180deg, #b06060 0%, #8b3a3a 100%);
  color: #fff;
}

.btn-danger:hover {
  box-shadow: 0 0 20px rgba(176, 96, 96, 0.3);
  transform: translateY(-1px);
}

/* Settings panel */
.settings-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--gold-06);
}

.settings-row:last-child {
  border-bottom: none;
}

.settings-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.settings-label {
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-pale);
}

.settings-desc {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.4;
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
  margin-left: 1.5rem;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  border-radius: 13px;
  background: rgba(74, 69, 101, 0.3);
  border: 1px solid var(--gold-10);
  transition: background 0.35s, border-color 0.35s, box-shadow 0.35s;
}

.toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text-dim);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), background 0.35s, box-shadow 0.35s;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--gold-20);
  border-color: var(--gold-35);
}

.toggle-switch input:checked + .toggle-slider::after {
  transform: translateX(22px);
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold-40);
}

.toggle-switch:hover .toggle-slider {
  border-color: var(--gold-25);
}

/* Quill dark theme overrides */
.ql-toolbar.ql-snow {
  border: 1px solid var(--gold-12) !important;
  border-bottom: none !important;
  border-radius: 2px 2px 0 0;
  background: rgba(8, 5, 16, 0.4);
}

.ql-container.ql-snow {
  border: 1px solid var(--gold-12) !important;
  border-radius: 0 0 2px 2px;
  background: rgba(8, 5, 16, 0.6);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  color: var(--text);
  min-height: 150px;
}

.ql-editor {
  min-height: 150px;
  line-height: 1.6;
}

.ql-editor.ql-blank::before {
  color: var(--text-muted) !important;
  font-style: italic !important;
}

.ql-snow .ql-stroke {
  stroke: var(--text-dim) !important;
}

.ql-snow .ql-fill {
  fill: var(--text-dim) !important;
}

.ql-snow .ql-picker-label {
  color: var(--text-dim) !important;
}

.ql-snow .ql-picker-options {
  background: var(--deep) !important;
  border-color: var(--gold-15) !important;
}

.ql-snow .ql-picker-item {
  color: var(--text) !important;
}

.ql-snow .ql-picker-item:hover {
  color: var(--gold) !important;
}

.ql-snow button:hover .ql-stroke,
.ql-snow .ql-picker-label:hover .ql-stroke {
  stroke: var(--gold) !important;
}

.ql-snow button:hover .ql-fill,
.ql-snow .ql-picker-label:hover .ql-fill {
  fill: var(--gold) !important;
}

.ql-snow button.ql-active .ql-stroke {
  stroke: var(--gold-bright) !important;
}

.ql-snow button.ql-active .ql-fill {
  fill: var(--gold-bright) !important;
}

.ql-snow .ql-tooltip {
  background: var(--deep) !important;
  border-color: var(--gold-15) !important;
  color: var(--text) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
}

.ql-snow .ql-tooltip input[type="text"] {
  background: rgba(8, 5, 16, 0.6) !important;
  border-color: var(--gold-20) !important;
  color: var(--text) !important;
}

.ql-snow .ql-tooltip a {
  color: var(--gold) !important;
}

/* ── Toast Notifications ── */
.toast-container {
  position: fixed;
  top: 1.2rem;
  right: 1.2rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  background: var(--panel);
  border: 1px solid var(--gold-15);
  color: var(--text);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), opacity 0.3s ease;
  max-width: 340px;
}

.toast-visible {
  transform: translateX(0);
  opacity: 1;
}

.toast-exit {
  transform: translateX(120%);
  opacity: 0;
}

.toast-icon {
  flex-shrink: 0;
  width: 1.3rem;
  height: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
}

.toast-success .toast-icon {
  background: rgba(60,160,90,0.15);
  color: #60a070;
}

.toast-error .toast-icon {
  background: rgba(160,60,60,0.15);
  color: #c06060;
}

.toast-success {
  border-color: rgba(60,160,90,0.2);
}

.toast-error {
  border-color: rgba(160,60,60,0.2);
}

/* ── Toggle Loading State ── */
.toggle-loading {
  opacity: 0.5;
  pointer-events: none;
  position: relative;
}

.toggle-loading::after {
  content: '';
  position: absolute;
  right: -1.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0.9rem;
  height: 0.9rem;
  border: 2px solid var(--gold-20);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

/* ── Row Animations ── */
.row-flash {
  animation: rowFlash 0.8s ease;
}

@keyframes rowFlash {
  0% { background: var(--gold-12); }
  100% { background: transparent; }
}

.row-removing {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] { opacity: 1; transform: none; }
  #particles-canvas, .fog, .fog-1, .fog-2, .fog-3, .noise { display: none; }
  .scroll-progress { display: none; }
}
