/* DOMINION OF ARKENFOLD — COMMUNITY PORTAL STYLESHEET */

/* ── Theme Variables (Dark) ── */
:root {
  --bg-primary: #07060a;
  --bg-secondary: #0c0b10;
  --bg-panel: rgba(12, 11, 16, 0.8);
  --bg-panel-solid: rgba(14, 13, 18, 0.98);
  --bg-header: rgba(7, 6, 10, 0.85);
  --bg-header-scrolled: rgba(7, 6, 10, 0.96);
  --bg-input: rgba(7, 6, 10, 0.8);
  --bg-card: rgba(14, 13, 20, 0.75);
  --text-gold: #d4af37;
  --text-gold-light: #f5e6a3;
  --text-gold-dark: #b8860b;
  --text-secondary: #a0926e;
  --text-body: #c8bfa3;
  --text-muted: #7a6d55;
  --text-white: #ede8d8;
  --border-gold: rgba(212, 175, 55, 0.15);
  --border-gold-hover: rgba(212, 175, 55, 0.35);
  --border-subtle: rgba(212, 175, 55, 0.08);
  --shadow-color: rgba(0, 0, 0, 0.5);
  --error-bg: rgba(212, 175, 55, 0.06);
  --error-border: rgba(212, 175, 55, 0.12);
  --success-color: #5cb85c;
  --danger-color: #e05a5a;
  --link-color: #d4af37;
}

/* ── Theme Variables (Light) ── */
[data-theme="light"] {
  --bg-primary: #f5f2eb;
  --bg-secondary: #ebe7de;
  --bg-panel: rgba(235, 231, 222, 0.85);
  --bg-panel-solid: rgba(245, 242, 235, 0.98);
  --bg-header: rgba(245, 242, 235, 0.88);
  --bg-header-scrolled: rgba(245, 242, 235, 0.96);
  --bg-input: rgba(235, 231, 222, 0.9);
  --bg-card: rgba(245, 242, 235, 0.8);
  --text-gold: #6b5210;
  --text-gold-light: #8a6e0e;
  --text-gold-dark: #5a450d;
  --text-secondary: #5a4d38;
  --text-body: #3a3020;
  --text-muted: #7a6d55;
  --text-white: #1a150d;
  --border-gold: rgba(107, 82, 16, 0.2);
  --border-gold-hover: rgba(107, 82, 16, 0.4);
  --border-subtle: rgba(107, 82, 16, 0.1);
  --shadow-color: rgba(0, 0, 0, 0.12);
  --error-bg: rgba(107, 82, 16, 0.08);
  --error-border: rgba(107, 82, 16, 0.15);
  --success-color: #3a8a3a;
  --danger-color: #c04040;
  --link-color: #6b5210;
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: 'Playfair Display', Georgia, serif;
  background: var(--bg-primary);
  color: var(--text-body);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
  transition: background 0.4s, color 0.4s;
}

body.splash-active { overflow: hidden; }
a { color: var(--link-color); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--text-gold-light); }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input { font-family: 'Playfair Display', Georgia, serif; }
::selection { background: rgba(212, 175, 55, 0.25); color: var(--text-gold); }

/* ── Ambient Background ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, rgba(212, 175, 55, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 80%, rgba(139, 0, 0, 0.03) 0%, transparent 60%);
  z-index: -2;
  animation: ambientShift 12s ease-in-out infinite alternate;
}
[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, rgba(154, 123, 26, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 80%, rgba(139, 0, 0, 0.02) 0%, transparent 60%);
}
@keyframes ambientShift {
  0% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.05); }
}

/* ── Particles ── */
#particles { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.particle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.6) 0%, transparent 70%);
  pointer-events: none;
  animation: floatUp linear infinite;
}
[data-theme="light"] .particle {
  background: radial-gradient(circle, rgba(154, 123, 26, 0.4) 0%, transparent 70%);
}
@keyframes floatUp {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* ── Scroll Progress ── */
#scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: linear-gradient(90deg, #d4af37, #f5e6a3, #d4af37);
  z-index: 1001; transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

/* ══════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════ */
header {
  position: fixed; top: 0; width: 100%; z-index: 1000;
  background: var(--bg-header);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border-gold);
  padding: 14px 0;
  transition: all 0.35s ease;
}
header.scrolled {
  padding: 10px 0;
  background: var(--bg-header-scrolled);
  box-shadow: 0 4px 24px var(--shadow-color);
}
.header-content {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo {
  font-family: 'Cinzel', serif; font-size: 1.5em; font-weight: 700;
  color: var(--text-gold); letter-spacing: 0.1em; text-transform: uppercase;
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
  text-decoration: none; transition: all 0.3s; flex-shrink: 0;
}
.logo:hover { color: var(--text-gold-light); text-shadow: 0 0 30px rgba(212, 175, 55, 0.4); }

/* ── Main Nav ── */
.main-nav {
  display: flex; gap: 4px; align-items: center;
}
.nav-link {
  font-family: 'Cinzel', serif; font-size: 0.78em; font-weight: 600;
  color: var(--text-secondary); letter-spacing: 0.06em; text-transform: uppercase;
  padding: 8px 16px; border-radius: 8px; text-decoration: none;
  transition: all 0.3s; border: 1px solid transparent;
}
.nav-link:hover, .nav-link.active {
  color: var(--text-gold); background: rgba(212, 175, 55, 0.06);
  border-color: var(--border-subtle);
}
.nav-link.active { border-color: var(--border-gold); }

/* ── Header Right ── */
.header-right { display: flex; align-items: center; gap: 10px; }
#theme-toggle {
  background: rgba(12, 11, 16, 0.5); border: 1px solid var(--border-gold);
  color: var(--text-gold); width: 36px; height: 36px; padding: 0;
  border-radius: 50%; font-size: 0.95em; display: flex;
  align-items: center; justify-content: center; transition: all 0.3s;
}
#theme-toggle:hover {
  background: rgba(212, 175, 55, 0.1); border-color: var(--border-gold-hover);
  transform: translateY(-1px);
}
[data-theme="light"] #theme-toggle {
  background: rgba(235, 231, 222, 0.7); border-color: var(--border-gold); color: var(--text-gold);
}

/* ── Auth Area ── */
#auth-area { display: flex; align-items: center; gap: 10px; }
#login-btn {
  background: rgba(12, 11, 16, 0.5); border: 1px solid var(--border-gold);
  color: var(--text-gold); padding: 7px 18px; border-radius: 8px;
  font-family: 'Cinzel', serif; font-size: 0.72em; letter-spacing: 0.06em;
  cursor: pointer; transition: all 0.3s; text-transform: uppercase;
}
#login-btn:hover {
  background: rgba(212, 175, 55, 0.1); border-color: var(--border-gold-hover);
  transform: translateY(-1px);
}
[data-theme="light"] #login-btn {
  background: rgba(235, 231, 222, 0.7); border-color: var(--border-gold); color: var(--text-gold);
}

/* ── User Menu ── */
.user-menu { position: relative; }
.user-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, #d4af37, #b8860b);
  color: #07060a; font-family: 'Cinzel', serif; font-weight: 700; font-size: 0.9em;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  border: 2px solid rgba(212, 175, 55, 0.3); transition: all 0.3s;
}
.user-avatar:hover { transform: scale(1.08); border-color: rgba(212, 175, 55, 0.6); }
.user-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0; width: 250px;
  background: var(--bg-panel-solid); backdrop-filter: blur(30px);
  border: 1px solid var(--border-gold); border-radius: 14px; padding: 6px 0;
  box-shadow: 0 20px 50px var(--shadow-color);
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(0.96);
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1); z-index: 200;
}
.user-menu:hover .user-dropdown, .user-dropdown.show {
  opacity: 1; visibility: visible; transform: translateY(0) scale(1);
}
.dropdown-header { padding: 16px 18px; text-align: center; }
.dropdown-avatar {
  width: 50px; height: 50px; border-radius: 50%;
  background: linear-gradient(135deg, #d4af37, #b8860b);
  color: #07060a; font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.3em;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 10px;
  border: 2px solid rgba(212, 175, 55, 0.3);
}
.dropdown-name {
  font-family: 'Cinzel', serif; font-size: 0.95em; color: var(--text-gold);
  font-weight: 600; letter-spacing: 0.04em; margin-bottom: 2px;
}
.dropdown-email {
  font-size: 0.75em; color: var(--text-muted); word-break: break-all;
}
.dropdown-divider { height: 1px; background: var(--border-subtle); margin: 4px 14px; }
.dropdown-item {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 18px;
  background: none; border: none; color: var(--text-body);
  font-family: 'Playfair Display', Georgia, serif; font-size: 0.88em;
  cursor: pointer; transition: all 0.2s; text-align: left;
}
.dropdown-item:hover { background: rgba(212, 175, 55, 0.06); color: var(--text-gold); }
.dropdown-item.dropdown-logout { color: var(--danger-color); }
.dropdown-item.dropdown-logout:hover { background: rgba(224, 90, 90, 0.08); }
.dropdown-icon { font-size: 1em; width: 18px; text-align: center; }

/* ── Mobile Menu Toggle ── */
.mobile-menu-toggle {
  display: none; background: none; border: none; padding: 8px;
  flex-direction: column; gap: 5px; cursor: pointer;
}
.hamburger-line {
  display: block; width: 22px; height: 2px; background: var(--text-gold);
  border-radius: 2px; transition: all 0.3s;
}
.mobile-menu-toggle.open .hamburger-line:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-toggle.open .hamburger-line:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.open .hamburger-line:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── Mobile Nav Overlay ── */
.mobile-nav-overlay {
  position: fixed; inset: 0; z-index: 1500;
  background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  animation: fadeIn 0.3s ease;
}
.mobile-nav-overlay.open { display: flex; }
.mobile-nav-content {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: 100%; max-width: 300px; padding: 20px;
}
.mobile-nav-close {
  position: absolute; top: 20px; right: 24px; background: none; border: none;
  color: var(--text-secondary); font-size: 2em; cursor: pointer; transition: color 0.3s;
}
.mobile-nav-close:hover { color: var(--text-gold); }
.mobile-nav-link {
  font-family: 'Cinzel', serif; font-size: 1.1em; font-weight: 600;
  color: var(--text-secondary); padding: 14px 24px; border-radius: 10px;
  text-decoration: none; width: 100%; text-align: center; transition: all 0.3s;
  background: none; border: 1px solid transparent;
}
.mobile-nav-link:hover, .mobile-nav-link.active {
  color: var(--text-gold); background: rgba(212, 175, 55, 0.06);
  border-color: var(--border-subtle);
}
.mobile-nav-divider { width: 60px; height: 1px; background: var(--border-subtle); margin: 10px 0; }

/* ══════════════════════════════════════════════
   PAGES
   ══════════════════════════════════════════════ */
.page {
  display: none; min-height: 100vh; padding-top: 72px;
  position: relative;
}
.page.active { display: block; animation: pageIn 0.5s ease; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.page-inner { max-width: 900px; margin: 0 auto; padding: 40px 24px 100px; }
.page-header { text-align: center; margin-bottom: 40px; }
.page-title {
  font-family: 'Cinzel', serif; font-size: clamp(2em, 5vw, 3em);
  font-weight: 700; color: var(--text-gold); letter-spacing: 0.06em;
}
.page-subtitle { color: var(--text-secondary); font-size: 1.05em; margin-top: 8px; }

/* ══════════════════════════════════════════════
   HOME PAGE (Original Layout)
   ══════════════════════════════════════════════ */
.page.active#home {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 140px 30px 200px;
  justify-content: flex-start;
}
.vista-valley {
  font-family: 'Cinzel', serif; font-size: 1.2rem; color: var(--text-secondary);
  margin-bottom: 15px; letter-spacing: 0.25em; text-transform: uppercase;
  animation: fadeUp 0.8s ease-out 0.2s both;
}
.arkenfold-con {
  font-family: 'Cinzel', serif; font-size: clamp(3.5rem, 10vw, 7rem); font-weight: 700;
  margin-bottom: 10px; letter-spacing: 0.06em; text-transform: uppercase;
  background: linear-gradient(135deg, #d4af37 0%, #f5e6a3 25%, #d4af37 50%, #b8860b 75%, #d4af37 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; filter: drop-shadow(0 4px 30px rgba(212, 175, 55, 0.3));
  animation: fadeUp 0.8s ease-out 0.4s both, shimmerText 4s ease-in-out infinite;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes shimmerText {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 200% center; }
}
.title-divider {
  width: 120px; height: 1px; margin: 20px auto 50px;
  background: linear-gradient(90deg, transparent, var(--text-gold), transparent);
  position: relative; animation: fadeUp 0.8s ease-out 0.6s both;
}
.title-divider::after {
  content: '\25C6'; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%); color: var(--text-gold); font-size: 0.6em;
  background: var(--bg-primary); padding: 0 10px;
}

/* ── Leadership Container ── */
.leadership-container {
  background: var(--bg-card); backdrop-filter: blur(30px);
  border: 1px solid var(--border-gold); border-radius: 20px;
  padding: 50px 40px; margin: 20px 0 40px;
  box-shadow: 0 25px 60px var(--shadow-color);
  position: relative; overflow: hidden;
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  animation: fadeUp 0.8s ease-out 0.6s both;
  max-width: 700px; width: 100%;
}
.leadership-container:hover {
  border-color: var(--border-gold-hover);
  box-shadow: 0 30px 70px var(--shadow-color), 0 0 40px rgba(212, 175, 55, 0.05);
  transform: translateY(-4px);
}
.leader-name {
  font-family: 'Cinzel', serif; font-size: clamp(2em, 5vw, 3em); font-weight: 700;
  margin-bottom: 25px; letter-spacing: 0.08em; text-transform: uppercase;
  background: linear-gradient(135deg, #d4af37, #f5e6a3, #d4af37);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; background-size: 200% auto;
  animation: shimmerText 5s ease-in-out infinite;
}
.leader-name::after {
  content: '\2726  SUPREME ARCHON  \2726'; display: block;
  font-family: 'Cinzel', serif; font-size: 0.45em;
  -webkit-text-fill-color: var(--text-secondary); letter-spacing: 0.25em;
  margin-top: 12px; background: none; -webkit-background-clip: unset;
}
.assistants-name {
  font-family: 'Cinzel', serif; font-size: 1.4em; color: var(--text-secondary);
  font-weight: 600; margin: 30px 0 10px; letter-spacing: 0.08em; text-transform: uppercase;
}
.assistants-name::before { content: '\2694'; margin-right: 12px; font-size: 1.1em; }
.assistants-list {
  display: inline-block; font-size: 1.15em; color: var(--text-white);
  background: rgba(212, 175, 55, 0.04); padding: 18px 30px;
  border-radius: 12px; border-left: 3px solid rgba(212, 175, 55, 0.3);
  margin-top: 12px; transition: all 0.3s;
}
.assistants-list:hover { background: rgba(212, 175, 55, 0.07); border-left-color: rgba(212, 175, 55, 0.5); }
.assistants-list span {
  color: var(--text-gold); font-weight: 600; font-family: 'Cinzel', serif;
  letter-spacing: 0.02em; transition: all 0.3s;
}
.assistants-list span:hover { text-shadow: 0 0 12px rgba(212, 175, 55, 0.4); }

/* ── Members List ── */
.members-list {
  background: var(--bg-card); backdrop-filter: blur(20px);
  border: 1px solid var(--border-gold); border-radius: 16px;
  padding: 35px 40px; margin: 10px 0 40px;
  max-height: 320px; overflow-y: auto; list-style: none;
  display: inline-block; text-align: left; width: 100%; max-width: 600px;
  animation: fadeUp 0.8s ease-out 0.8s both;
}
.members-list::-webkit-scrollbar { width: 5px; }
.members-list::-webkit-scrollbar-track { background: transparent; }
.members-list::-webkit-scrollbar-thumb { background: rgba(212, 175, 55, 0.25); border-radius: 10px; }
.members-list li {
  font-family: 'Playfair Display', Georgia, serif; font-size: 1.05em;
  color: var(--text-body); padding: 10px 15px;
  border-bottom: 1px solid var(--border-subtle);
  transition: all 0.3s; border-radius: 8px; margin: 2px 0;
}
.members-list li:hover {
  color: var(--text-gold); padding-left: 25px;
  background: rgba(212, 175, 55, 0.04);
}

/* ── Constitution Button ── */
.constitution-btn + .constitution-btn {
  margin-top: 16px;
}
.constitution-btn {
  display: inline-block; font-family: 'Cinzel', serif; font-size: 1.3em; font-weight: 600;
  color: var(--text-gold); background: var(--bg-card);
  backdrop-filter: blur(20px); border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 22px 55px; border-radius: 12px; text-decoration: none;
  letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer;
  position: relative; overflow: hidden; margin-bottom: 40px;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  animation: fadeUp 0.8s ease-out 1s both;
}
.constitution-btn::after {
  content: ''; position: absolute; top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
  transition: left 0.6s ease;
}
.constitution-btn:hover {
  transform: translateY(-4px) scale(1.03); border-color: rgba(212, 175, 55, 0.5);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(212, 175, 55, 0.1);
}
.constitution-btn:hover::after { left: 100%; }
.constitution-btn:active { transform: translateY(-1px) scale(0.98); }
.btn-ripple {
  position: absolute; border-radius: 50%;
  background: rgba(212, 175, 55, 0.3); transform: scale(0);
  animation: rippleExpand 0.6s ease-out forwards; pointer-events: none;
}
@keyframes rippleExpand { to { transform: scale(4); opacity: 0; } }
.btn-label { position: relative; z-index: 1; }

/* ── Designer Credit ── */
.designer-credit {
  position: absolute; bottom: 30px; left: 0; right: 0;
  margin: 0 auto; width: fit-content;
  font-family: 'Cinzel', serif; font-size: 0.85em;
  color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--bg-card); backdrop-filter: blur(20px);
  padding: 12px 28px; border: 1px solid var(--border-subtle);
  border-radius: 30px; box-shadow: 0 8px 25px var(--shadow-color);
  transition: all 0.4s; opacity: 0.7; z-index: 10;
}
.designer-credit:hover {
  color: var(--text-gold); border-color: var(--border-gold-hover);
  box-shadow: 0 12px 35px rgba(212, 175, 55, 0.08);
  transform: translateY(-3px); opacity: 1;
}
.designer-credit span {
  color: var(--text-gold); font-weight: 700;
  background: linear-gradient(135deg, #d4af37, #f5e6a3, #d4af37);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; font-size: 1.1em;
}

/* ══════════════════════════════════════════════
   CONSTITUTION PAGE
   ══════════════════════════════════════════════ */
.const-page-container { max-width: 860px; margin: 0 auto; padding: 40px 24px 100px; }
.const-header { text-align: center; margin-bottom: 24px; }
.const-title {
  font-family: 'Cinzel', serif; font-size: clamp(2em, 5vw, 3em);
  font-weight: 700; color: var(--text-gold); letter-spacing: 0.04em;
}
.const-subtitle { color: var(--text-secondary); font-size: 1.05em; margin-top: 6px; }

/* ── Constitution Toolbar ── */
.const-toolbar {
  display: flex; gap: 8px; justify-content: center; align-items: center;
  margin-top: 20px; flex-wrap: wrap;
}
.const-search-wrap {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-card); border: 1px solid var(--border-gold);
  border-radius: 10px; padding: 8px 14px; flex: 1; max-width: 400px;
  transition: border-color 0.3s;
}
.const-search-wrap:focus-within { border-color: var(--border-gold-hover); }
.search-icon { color: var(--text-muted); font-size: 1.1em; flex-shrink: 0; }
.const-search-wrap input {
  flex: 1; background: none; border: none; color: var(--text-body);
  font-size: 0.9em; outline: none; min-width: 0;
}
.const-search-wrap input::placeholder { color: var(--text-muted); }
.search-count { font-size: 0.75em; color: var(--text-muted); white-space: nowrap; }
.const-tool-btn {
  background: var(--bg-card); border: 1px solid var(--border-gold);
  color: var(--text-gold); width: 38px; height: 38px; border-radius: 10px;
  font-size: 1em; display: flex; align-items: center; justify-content: center;
  transition: all 0.3s; flex-shrink: 0;
}
.const-tool-btn:hover { border-color: var(--border-gold-hover); background: rgba(212, 175, 55, 0.08); }

/* ── Reading Progress ── */
.const-progress-wrap {
  width: 100%; height: 3px; background: var(--border-subtle); border-radius: 2px;
  margin-bottom: 24px; overflow: hidden;
}
.const-progress-bar {
  height: 100%; width: 0%; background: linear-gradient(90deg, #d4af37, #f5e6a3);
  border-radius: 2px; transition: width 0.15s linear;
}

/* ── Table of Contents ── */
.const-toc {
  background: var(--bg-card); backdrop-filter: blur(20px);
  border: 1px solid var(--border-gold); border-radius: 14px;
  padding: 20px; margin-bottom: 24px;
}
.const-toc.hidden { display: none; }
.toc-header {
  font-family: 'Cinzel', serif; font-size: 0.8em; font-weight: 700;
  color: var(--text-gold); letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border-subtle);
}
.const-toc nav { display: flex; flex-direction: column; gap: 2px; }
.toc-link {
  font-size: 0.88em; color: var(--text-secondary); padding: 6px 10px;
  border-radius: 6px; transition: all 0.2s; text-decoration: none;
  border-left: 2px solid transparent;
}
.toc-link:hover { color: var(--text-gold); background: rgba(212, 175, 55, 0.04); }
.toc-link.active { color: var(--text-gold); border-left-color: var(--text-gold); background: rgba(212, 175, 55, 0.06); }

/* ── Constitution Body ── */
.const-body {
  background: var(--bg-card); backdrop-filter: blur(20px);
  border: 1px solid var(--border-gold); border-radius: 18px;
  padding: 48px 40px; position: relative; overflow: hidden;
}
.const-body::before {
  content: ''; position: absolute; top: 0; left: 0; width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.03) 0%, transparent 70%);
  pointer-events: none;
}
.const-doc-header { text-align: center; margin-bottom: 40px; padding-bottom: 30px; border-bottom: 1px solid var(--border-subtle); }
.const-doc-seal { font-size: 2.5em; color: var(--text-gold); margin-bottom: 16px; text-shadow: 0 0 30px rgba(212, 175, 55, 0.3); }
.const-doc-title {
  font-family: 'Cinzel', serif; font-size: 1.6em; font-weight: 700;
  color: var(--text-gold); letter-spacing: 0.04em; margin-bottom: 8px;
}
.const-doc-subtitle { font-style: italic; color: var(--text-secondary); font-size: 0.95em; }
.const-doc-meta { margin-top: 12px; font-size: 0.82em; color: var(--text-muted); }
.meta-sep { margin: 0 8px; }

/* ── Constitution Sections ── */
.const-section {
  padding: 28px 0; border-bottom: 1px solid var(--border-subtle);
  scroll-margin-top: 80px; position: relative;
}
.const-section:last-of-type { border-bottom: none; }
.const-section-title {
  font-family: 'Cinzel', serif; font-size: 1.3em; font-weight: 700;
  color: var(--text-gold); margin-bottom: 16px; padding-left: 24px; position: relative;
}
.const-section-title::before {
  content: '§'; position: absolute; left: 0; color: var(--text-muted); font-size: 1.1em;
}
.const-clause {
  display: flex; gap: 12px; margin-bottom: 12px; padding-left: 24px;
}
.clause-num {
  font-family: 'Cinzel', serif; font-size: 0.78em; font-weight: 700;
  color: var(--text-muted); flex-shrink: 0; padding-top: 2px; min-width: 36px;
}
.const-text {
  margin-bottom: 10px; color: var(--text-body); font-size: 1em; line-height: 1.85;
}
.const-seal-text { font-style: italic; }
.const-list { padding-left: 20px; margin: 10px 0; }
.const-list li { margin-bottom: 8px; color: var(--text-body); line-height: 1.7; }
.const-list li strong { color: var(--text-gold); }
.const-section-actions {
  margin-top: 12px; padding-left: 24px;
}
.copy-link-btn {
  background: none; border: none; font-size: 0.85em; color: var(--text-muted);
  cursor: pointer; padding: 4px 8px; border-radius: 6px; transition: all 0.3s;
}
.copy-link-btn:hover { color: var(--text-gold); background: rgba(212, 175, 55, 0.06); }
.copy-link-btn.copied { color: var(--success-color); }

/* ── Amendments ── */
.const-amendments .const-section-title { margin-bottom: 20px; }
.amendment-entry {
  display: flex; gap: 14px; align-items: flex-start; padding: 14px;
  background: rgba(212, 175, 55, 0.03); border-radius: 10px; border: 1px solid var(--border-subtle);
}
.amendment-badge {
  font-family: 'Cinzel', serif; font-size: 0.65em; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 10px;
  border-radius: 6px; background: rgba(212, 175, 55, 0.1); color: var(--text-gold);
  white-space: nowrap; flex-shrink: 0;
}
.amendment-info strong { color: var(--text-gold); font-size: 0.95em; }
.amendment-info p { font-size: 0.88em; color: var(--text-secondary); margin-top: 4px; }

/* ── Enactment ── */
.const-enactment {
  text-align: center; margin-top: 40px; padding-top: 30px;
  border-top: 1px solid var(--border-subtle);
}
.const-enactment-seal { font-size: 2em; color: var(--text-gold); margin-bottom: 12px; }
.const-enactment-label {
  font-family: 'Cinzel', serif; font-size: 0.8em; font-weight: 700;
  color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase;
}
.const-enactment-name {
  font-family: 'Cinzel', serif; font-size: 1.4em; font-weight: 700;
  color: var(--text-gold); margin: 8px 0 4px;
}
.const-enactment-title { font-style: italic; color: var(--text-secondary); font-size: 0.92em; }

/* Search highlight */
.search-highlight { background: rgba(212, 175, 55, 0.3); border-radius: 2px; padding: 0 2px; }
.const-section.search-hidden { display: none; }
.const-clause.search-hidden { display: none; }

/* ══════════════════════════════════════════════
   COUNCIL PAGE
   ══════════════════════════════════════════════ */
.council-controls {
  display: flex; gap: 12px; margin-bottom: 32px; flex-wrap: wrap; align-items: center;
}
.council-controls .const-search-wrap { max-width: 320px; }
.filter-group { display: flex; gap: 4px; flex-wrap: wrap; }
.filter-btn {
  font-family: 'Cinzel', serif; font-size: 0.72em; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase; padding: 7px 14px;
  border-radius: 8px; background: var(--bg-card); border: 1px solid var(--border-gold);
  color: var(--text-secondary); cursor: pointer; transition: all 0.3s;
}
.filter-btn:hover { border-color: var(--border-gold-hover); color: var(--text-gold); }
.filter-btn.active {
  background: rgba(212, 175, 55, 0.1); color: var(--text-gold); border-color: var(--border-gold-hover);
}
.council-section { margin-bottom: 32px; }
.council-section-title {
  font-family: 'Cinzel', serif; font-size: 1.2em; font-weight: 700;
  color: var(--text-gold); margin-bottom: 16px; display: flex;
  align-items: center; gap: 12px; flex-wrap: wrap;
}
.council-badge {
  font-family: 'Cinzel', serif; font-size: 0.65em; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; padding: 5px 14px;
  border-radius: 8px; display: inline-block;
}
.council-badge.archon { background: rgba(212, 175, 55, 0.15); color: var(--text-gold); border: 1px solid rgba(212, 175, 55, 0.3); }
.council-badge.council { background: rgba(212, 175, 55, 0.08); color: var(--text-gold); border: 1px solid var(--border-gold); }
.council-badge.citizen { background: rgba(212, 175, 55, 0.04); color: var(--text-secondary); border: 1px solid var(--border-subtle); }
.council-count { font-size: 0.75em; color: var(--text-muted); font-family: 'Playfair Display', Georgia, serif; }
.member-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px;
}
.member-card {
  background: var(--bg-card); backdrop-filter: blur(20px);
  border: 1px solid var(--border-gold); border-radius: 14px;
  padding: 20px; text-align: center; transition: all 0.3s;
}
.member-card:hover {
  border-color: var(--border-gold-hover); transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow-color);
}
.member-card.archon-card { border-color: rgba(212, 175, 55, 0.3); }
.member-avatar-lg {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, #d4af37, #b8860b);
  color: #07060a; font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.3em;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px; border: 2px solid rgba(212, 175, 55, 0.3);
}
.member-card-name {
  font-family: 'Cinzel', serif; font-size: 1em; font-weight: 600;
  color: var(--text-gold); margin-bottom: 4px;
}
.member-card-role {
  font-size: 0.78em; color: var(--text-muted); letter-spacing: 0.04em;
}
.member-card-desc {
  font-size: 0.85em; color: var(--text-secondary); margin-top: 8px; line-height: 1.5;
}
.empty-state {
  text-align: center; padding: 40px 20px; color: var(--text-muted);
  font-style: italic;
}

/* ══════════════════════════════════════════════
   UPDATES PAGE
   ══════════════════════════════════════════════ */
.updates-controls { margin-bottom: 28px; }
.updates-timeline { position: relative; padding-left: 24px; }
.updates-timeline::before {
  content: ''; position: absolute; left: 7px; top: 0; bottom: 0;
  width: 1px; background: var(--border-gold);
}
.update-item {
  position: relative; margin-bottom: 24px; padding: 20px 20px 20px 24px;
  background: var(--bg-card); backdrop-filter: blur(20px);
  border: 1px solid var(--border-gold); border-radius: 14px; transition: all 0.3s;
}
.update-item::before {
  content: ''; position: absolute; left: -21px; top: 24px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--text-gold); border: 2px solid var(--bg-primary);
}
.update-item:hover { border-color: var(--border-gold-hover); transform: translateX(4px); }
.update-item.pinned { border-color: rgba(212, 175, 55, 0.3); }
.update-meta {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap;
}
.update-date { font-size: 0.8em; color: var(--text-muted); }
.update-category {
  font-family: 'Cinzel', serif; font-size: 0.62em; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 8px;
  border-radius: 4px; background: rgba(212, 175, 55, 0.08); color: var(--text-gold);
}
.update-pin {
  font-size: 0.62em; font-family: 'Cinzel', serif; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 8px;
  border-radius: 4px; background: rgba(212, 175, 55, 0.15); color: var(--text-gold);
}
.update-title {
  font-family: 'Cinzel', serif; font-size: 1.1em; font-weight: 700;
  color: var(--text-gold); margin-bottom: 6px;
}
.update-body { font-size: 0.92em; color: var(--text-secondary); line-height: 1.65; }

/* ══════════════════════════════════════════════
   ACCOUNT PAGE
   ══════════════════════════════════════════════ */
.account-guest { text-align: center; padding: 60px 20px; }
.account-guest-icon { font-size: 3em; color: var(--text-gold); margin-bottom: 16px; }
.account-guest h2 {
  font-family: 'Cinzel', serif; font-size: 1.6em; color: var(--text-gold); margin-bottom: 8px;
}
.account-guest p { color: var(--text-secondary); margin-bottom: 24px; max-width: 400px; margin-left: auto; margin-right: auto; }
.account-card {
  display: flex; align-items: center; gap: 20px; padding: 28px;
  background: var(--bg-card); border: 1px solid var(--border-gold); border-radius: 16px;
  margin-bottom: 24px; flex-wrap: wrap;
}
.account-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, #d4af37, #b8860b);
  color: #07060a; font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.6em;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  border: 2px solid rgba(212, 175, 55, 0.3);
}
.account-info h2 {
  font-family: 'Cinzel', serif; font-size: 1.3em; color: var(--text-gold); font-weight: 700;
}
.account-email { color: var(--text-secondary); font-size: 0.9em; }
.account-role {
  display: inline-block; margin-top: 6px; font-family: 'Cinzel', serif;
  font-size: 0.7em; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 6px; background: rgba(212, 175, 55, 0.1);
  color: var(--text-gold); border: 1px solid var(--border-gold);
}
.account-details {
  background: var(--bg-card); border: 1px solid var(--border-gold); border-radius: 16px;
  padding: 24px 28px; margin-bottom: 24px;
}
.account-section-title {
  font-family: 'Cinzel', serif; font-size: 0.85em; font-weight: 700;
  color: var(--text-gold); letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border-subtle);
}
.account-detail-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border-subtle);
}
.account-detail-row:last-child { border-bottom: none; }
.detail-label { font-size: 0.88em; color: var(--text-secondary); }
.detail-value { font-size: 0.88em; color: var(--text-gold); font-weight: 600; }
.account-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.account-action-btn {
  flex: 1; min-width: 160px; padding: 12px 20px; border-radius: 10px;
  font-family: 'Cinzel', serif; font-size: 0.82em; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase; border: 1px solid var(--border-gold);
  background: var(--bg-card); color: var(--text-gold); cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.3s;
}
.account-action-btn:hover { border-color: var(--border-gold-hover); background: rgba(212, 175, 55, 0.06); }
.account-action-btn.logout { color: var(--danger-color); border-color: rgba(224, 90, 90, 0.2); }
.account-action-btn.logout:hover { border-color: rgba(224, 90, 90, 0.4); background: rgba(224, 90, 90, 0.06); }

/* ══════════════════════════════════════════════
   MODALS
   ══════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px); display: flex; align-items: center;
  justify-content: center; z-index: 2000; padding: 20px;
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: var(--bg-panel-solid); backdrop-filter: blur(30px);
  border: 1px solid var(--border-gold); border-radius: 16px;
  padding: 40px 36px; width: 100%; max-width: 400px;
  position: relative; text-align: center;
  box-shadow: 0 30px 60px var(--shadow-color);
  animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92) translateY(16px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-box h2 {
  font-family: 'Cinzel', serif; color: var(--text-gold); margin-bottom: 20px;
  letter-spacing: 0.06em; font-size: 1.3em;
}
.modal-box input, .modal-box textarea {
  width: 100%; background: var(--bg-input); border: 1px solid var(--border-gold);
  color: var(--text-white); padding: 12px 14px; margin-bottom: 12px;
  border-radius: 10px; font-size: 0.92em; transition: all 0.3s;
  font-family: 'Playfair Display', Georgia, serif; resize: vertical; box-sizing: border-box;
}
.modal-box input::placeholder, .modal-box textarea::placeholder { color: var(--text-muted); }
.modal-box input:focus, .modal-box textarea:focus {
  outline: none; border-color: var(--border-gold-hover);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.06);
}
.modal-close {
  position: absolute; top: 12px; right: 16px; background: none; border: none;
  color: var(--text-muted); font-size: 1.5em; cursor: pointer;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: all 0.3s;
}
.modal-close:hover { color: var(--text-gold); background: rgba(212, 175, 55, 0.08); }
.modal-description {
  color: var(--text-secondary); font-size: 0.88em; line-height: 1.5;
  margin-bottom: 18px; text-align: center;
}
.auth-error {
  color: var(--text-gold-light); font-size: 0.82em; min-height: 18px;
  margin-bottom: 4px; text-align: left; padding: 8px 12px; border-radius: 8px;
  background: var(--error-bg); border: 1px solid var(--error-border);
  line-height: 1.5; word-break: break-word;
}
.auth-error:empty { background: none; border: none; padding: 0; }
.auth-success {
  color: var(--success-color); font-size: 0.85em; min-height: 18px;
  margin-bottom: 4px; text-align: left; line-height: 1.5;
}

/* Auth submit buttons */
.modal-box button[type="submit"],
#auth-submit-btn, #setup-submit-btn, #change-password-submit-btn,
#reset-submit-btn, #confirm-yes-btn, #join-submit-btn {
  width: 100%; background: linear-gradient(135deg, #d4af37, #b8960b);
  color: #0a0a0a; border: none; padding: 13px; border-radius: 10px;
  font-family: 'Cinzel', serif; font-weight: 700; font-size: 0.9em;
  letter-spacing: 0.06em; cursor: pointer; margin-top: 6px;
  transition: all 0.3s; text-transform: uppercase; position: relative; overflow: hidden;
}
.modal-box button[type="submit"]:hover,
#auth-submit-btn:hover, #setup-submit-btn:hover, #change-password-submit-btn:hover,
#reset-submit-btn:hover, #confirm-yes-btn:hover, #join-submit-btn:hover {
  transform: translateY(-2px); box-shadow: 0 6px 20px rgba(212, 175, 55, 0.25);
}
#confirm-yes-btn { background: linear-gradient(135deg, #4caf50, #388e3c); color: #fff; }
#confirm-yes-btn:hover { box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3); }
.confirm-edit-btn {
  background: none; border: none; color: var(--text-secondary); font-size: 0.85em;
  cursor: pointer; padding: 8px 0 0; transition: color 0.3s;
}
.confirm-edit-btn:hover { color: var(--text-gold); }

.auth-toggle-text { color: var(--text-secondary); font-size: 0.85em; margin-top: 16px; }
.auth-toggle-text a { color: var(--link-color); border-bottom: 1px solid transparent; }
.auth-toggle-text a:hover { border-bottom-color: var(--link-color); }
.auth-forgot-text { margin-top: 10px; margin-bottom: 0; text-align: right; }
.auth-forgot-text a {
  color: var(--text-muted); font-size: 0.82em; border-bottom: 1px solid transparent;
}
.auth-forgot-text a:hover { color: var(--link-color); border-bottom-color: var(--link-color); }
.change-forgot-text { margin: -4px 0 12px; text-align: right; }
.change-forgot-text a {
  color: var(--text-muted); font-size: 0.82em; border-bottom: 1px solid transparent;
}
.change-forgot-text a:hover { color: var(--link-color); border-bottom-color: var(--link-color); }

.confirm-email-display {
  background: var(--bg-input); border: 1px solid var(--border-gold);
  border-radius: 10px; padding: 14px 18px; margin-bottom: 18px;
}
.confirm-label {
  display: block; font-size: 0.72em; color: var(--text-muted);
  letter-spacing: 0.06em; text-transform: uppercase; font-family: 'Cinzel', serif;
  margin-bottom: 4px;
}
.confirm-email { color: var(--text-gold); font-size: 1em; font-weight: 600; }

/* ── Password Strength ── */
.password-strength { margin-bottom: 12px; text-align: left; }
.strength-bar-container {
  width: 100%; height: 3px; background: var(--border-subtle);
  border-radius: 2px; overflow: hidden; margin-bottom: 4px;
}
.strength-bar {
  height: 100%; width: 0; border-radius: 2px; transition: width 0.3s, background 0.3s;
}
.strength-text { font-size: 0.72em; font-family: 'Cinzel', serif; letter-spacing: 0.04em; text-transform: uppercase; }

/* ── Button Spinner ── */
.btn-spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(10, 10, 10, 0.3); border-top-color: #0a0a0a;
  border-radius: 50%; animation: spin 0.7s linear infinite;
  margin-left: 6px; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════
   SPLASH SCREEN
   ══════════════════════════════════════════════ */
#splash-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg-primary);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity 0.5s, visibility 0.5s;
}
#splash-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-emblem {
  font-size: 3em; color: var(--text-gold); margin-bottom: 20px;
  opacity: 0; transform: scale(0.5);
  animation: splashIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s forwards;
  text-shadow: 0 0 40px rgba(212, 175, 55, 0.5);
}
@keyframes splashIn {
  from { opacity: 0; transform: scale(0.5) rotate(-10deg); }
  to { opacity: 1; transform: scale(1) rotate(0deg); }
}
.splash-title {
  font-family: 'Cinzel', serif; font-size: clamp(3rem, 10vw, 5rem); font-weight: 700;
  letter-spacing: 0.15em; color: transparent;
  background: linear-gradient(135deg, #d4af37 0%, #f5e6a3 30%, #d4af37 50%, #b8860b 70%, #d4af37 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  opacity: 0; transform: translateY(30px);
  animation: splashTitle 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards, shimmerText 4s ease-in-out 1.2s infinite;
}
@keyframes splashTitle {
  from { opacity: 0; transform: translateY(30px); filter: blur(10px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.splash-subtitle {
  font-size: 1.05em; color: var(--text-secondary); letter-spacing: 0.2em;
  margin-top: 12px; opacity: 0;
  animation: splashFade 0.5s ease 0.6s forwards;
}
@keyframes splashFade { from { opacity: 0; } to { opacity: 0.7; } }
.splash-loader {
  width: 100px; height: 2px; background: var(--border-subtle);
  border-radius: 2px; overflow: hidden; margin-top: 36px;
  opacity: 0; animation: splashFade 0.3s ease 0.75s forwards;
}
.splash-loader-bar {
  height: 100%; width: 0;
  background: linear-gradient(90deg, #d4af37, #f5e6a3, #d4af37);
  border-radius: 2px; animation: loadBar 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.8s forwards;
}
@keyframes loadBar { to { width: 100%; } }

/* ══════════════════════════════════════════════
   BACK TO TOP
   ══════════════════════════════════════════════ */
#back-to-top {
  position: fixed; bottom: 28px; right: 28px; z-index: 500;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg-card); backdrop-filter: blur(20px);
  border: 1px solid var(--border-gold); color: var(--text-gold);
  font-size: 1.1em; display: flex; align-items: center; justify-content: center;
  transition: all 0.3s; opacity: 0; transform: translateY(16px);
  pointer-events: none; box-shadow: 0 4px 16px var(--shadow-color);
}
#back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
#back-to-top:hover { border-color: var(--border-gold-hover); transform: translateY(-3px); }

/* ══════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════ */
footer {
  background: var(--bg-header); backdrop-filter: blur(15px);
  border-top: 1px solid var(--border-gold); margin-top: auto; width: 100%;
}
.footer-inner { max-width: 1000px; margin: 0 auto; padding: 40px 24px 28px; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; margin-bottom: 28px;
}
.footer-logo {
  font-family: 'Cinzel', serif; font-size: 1.2em; font-weight: 700;
  color: var(--text-gold); letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 6px;
}
.footer-tagline { color: var(--text-muted); font-size: 0.88em; }
.footer-nav-title {
  font-family: 'Cinzel', serif; font-size: 0.72em; font-weight: 700;
  color: var(--text-gold); letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 12px;
}
.footer-link {
  display: block; color: var(--text-secondary); font-size: 0.88em;
  padding: 3px 0; transition: color 0.3s;
}
.footer-link:hover { color: var(--text-gold); }
.footer-bottom {
  border-top: 1px solid var(--border-subtle); padding-top: 18px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
}
.footer-copy { font-size: 0.82em; color: var(--text-muted); }
.footer-credit { font-size: 0.82em; color: var(--text-muted); }
.footer-credit strong { color: var(--text-gold); }

/* ══════════════════════════════════════════════
   SCROLLBAR
   ══════════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(7, 6, 10, 0.3); }
::-webkit-scrollbar-thumb { background: rgba(212, 175, 55, 0.2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(212, 175, 55, 0.4); }
[data-theme="light"] ::-webkit-scrollbar-track { background: rgba(235, 231, 222, 0.5); }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(107, 82, 16, 0.2); }

/* ══════════════════════════════════════════════
   CUSTOM CURSOR — THEME MATCHED
   ══════════════════════════════════════════════ */

body.has-custom-cursor { cursor: none; }
body.has-custom-cursor a,
body.has-custom-cursor button,
body.has-custom-cursor input,
body.has-custom-cursor [role="button"] { cursor: none; }

/* Main cursor dot */
.cursor-main {
  position: fixed; pointer-events: none; z-index: 9999;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--text-gold);
  box-shadow: 0 0 6px var(--text-gold);
  transform: translate(-50%, -50%);
  transition: width 0.25s ease, height 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
[data-theme="light"] .cursor-main {
  background: var(--text-gold);
  box-shadow: 0 0 4px var(--text-gold);
}
.cursor-main.hovering {
  width: 16px; height: 16px;
  background: var(--text-gold-light);
  box-shadow: 0 0 14px var(--text-gold), 0 0 28px var(--text-gold-dark);
}

/* Outer ring */
.cursor-ring {
  position: fixed; pointer-events: none; z-index: 9998;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1.5px solid var(--text-gold);
  opacity: 0.35;
  transform: translate(-50%, -50%);
  transition: width 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              height 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              border-color 0.25s, opacity 0.25s;
}
[data-theme="light"] .cursor-ring {
  border-color: var(--text-gold);
  opacity: 0.3;
}
.cursor-ring.hovering {
  width: 48px; height: 48px;
  border-color: var(--text-gold-light);
  opacity: 0.55;
}

/* Trail particle */
.cursor-trail {
  position: fixed; pointer-events: none; z-index: 9997;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--text-gold);
  transform: translate(-50%, -50%);
}
[data-theme="light"] .cursor-trail { background: var(--text-gold); }

/* Click burst */
.cursor-burst {
  position: fixed; pointer-events: none; z-index: 9999;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--text-gold-light);
  transform: translate(-50%, -50%);
}
[data-theme="light"] .cursor-burst { background: var(--text-gold); }

/* ══════════════════════════════════════════════
   GLITCH TEXT EFFECT
   ══════════════════════════════════════════════ */
.glitch-text {
  position: relative;
}
.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: var(--bg-primary);
}
.glitch-text::before {
  left: 2px; text-shadow: -2px 0 rgba(212, 175, 55, 0.5);
  clip-path: inset(0 0 65% 0);
  animation: glitch1 3s infinite linear alternate-reverse;
}
.glitch-text::after {
  left: -2px; text-shadow: 2px 0 rgba(139, 0, 0, 0.4);
  clip-path: inset(60% 0 0 0);
  animation: glitch2 2.5s infinite linear alternate-reverse;
}
@keyframes glitch1 {
  0%, 92% { clip-path: inset(0 0 100% 0); }
  93% { clip-path: inset(20% 0 50% 0); transform: translate(-2px, 1px); }
  94% { clip-path: inset(60% 0 10% 0); transform: translate(2px, -1px); }
  95% { clip-path: inset(0 0 100% 0); transform: translate(0); }
  96% { clip-path: inset(40% 0 30% 0); transform: translate(-1px, 2px); }
  97%, 100% { clip-path: inset(0 0 100% 0); transform: translate(0); }
}
@keyframes glitch2 {
  0%, 90% { clip-path: inset(0 0 100% 0); }
  91% { clip-path: inset(50% 0 20% 0); transform: translate(2px, -1px); }
  92% { clip-path: inset(10% 0 60% 0); transform: translate(-2px, 1px); }
  93% { clip-path: inset(0 0 100% 0); transform: translate(0); }
  94% { clip-path: inset(70% 0 5% 0); transform: translate(1px, -2px); }
  95%, 100% { clip-path: inset(0 0 100% 0); transform: translate(0); }
}

/* ══════════════════════════════════════════════
   GLOW PULSE ANIMATIONS
   ══════════════════════════════════════════════ */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(212, 175, 55, 0.1); }
  50% { box-shadow: 0 0 40px rgba(212, 175, 55, 0.25), 0 0 80px rgba(212, 175, 55, 0.08); }
}
@keyframes borderGlow {
  0%, 100% { border-color: rgba(212, 175, 55, 0.15); }
  50% { border-color: rgba(212, 175, 55, 0.4); }
}
@keyframes textGlow {
  0%, 100% { text-shadow: 0 0 10px rgba(212, 175, 55, 0.3); }
  50% { text-shadow: 0 0 30px rgba(212, 175, 55, 0.6), 0 0 60px rgba(212, 175, 55, 0.2); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes rotateGlow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes pulseRing {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes typewriter {
  from { width: 0; }
  to { width: 100%; }
}
@keyframes blinkCaret {
  0%, 100% { border-right-color: transparent; }
  50% { border-right-color: var(--text-gold); }
}
@keyframes rippleOut {
  0% { transform: scale(0); opacity: 0.5; }
  100% { transform: scale(4); opacity: 0; }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
  20%, 40%, 60%, 80% { transform: translateX(3px); }
}
@keyframes wobble {
  0%, 100% { transform: rotate(0deg); }
  15% { transform: rotate(-3deg); }
  30% { transform: rotate(2deg); }
  45% { transform: rotate(-2deg); }
  60% { transform: rotate(1deg); }
  75% { transform: rotate(-1deg); }
}
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.15); }
  28% { transform: scale(1); }
  42% { transform: scale(1.08); }
  56% { transform: scale(1); }
}
@keyframes neonFlicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% { opacity: 1; }
  20%, 24%, 55% { opacity: 0.6; }
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes borderDance {
  0% { border-image-source: linear-gradient(0deg, var(--text-gold), transparent); }
  25% { border-image-source: linear-gradient(90deg, var(--text-gold), transparent); }
  50% { border-image-source: linear-gradient(180deg, var(--text-gold), transparent); }
  75% { border-image-source: linear-gradient(270deg, var(--text-gold), transparent); }
  100% { border-image-source: linear-gradient(360deg, var(--text-gold), transparent); }
}
@keyframes starTwinkle {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* ══════════════════════════════════════════════
   ANIMATION UTILITY CLASSES
   ══════════════════════════════════════════════ */
.anim-float { animation: float 3s ease-in-out infinite; }
.anim-glow-pulse { animation: glowPulse 3s ease-in-out infinite; }
.anim-border-glow { animation: borderGlow 2.5s ease-in-out infinite; }
.anim-text-glow { animation: textGlow 2.5s ease-in-out infinite; }
.anim-heartbeat { animation: heartbeat 1.5s ease-in-out infinite; }
.anim-neon { animation: neonFlicker 4s linear infinite; }
.anim-gradient { background-size: 200% 200%; animation: gradientShift 4s ease infinite; }
.anim-wobble { animation: wobble 0.6s ease; }
.anim-shake { animation: shake 0.5s ease; }
.anim-scale-in { animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.anim-slide-left { animation: slideInLeft 0.5s ease forwards; }
.anim-slide-right { animation: slideInRight 0.5s ease forwards; }

/* Scroll reveal base */
.reveal-up { opacity: 0; transform: translateY(40px); transition: all 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.reveal-up.visible { opacity: 1; transform: translateY(0); }
.reveal-left { opacity: 0; transform: translateX(-40px); transition: all 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(40px); transition: all 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.reveal-right.visible { opacity: 1; transform: translateX(0); }
.reveal-scale { opacity: 0; transform: scale(0.85); transition: all 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.reveal-scale.visible { opacity: 1; transform: scale(1); }

/* ══════════════════════════════════════════════
   ENHANCED HOVER EFFECTS
   ══════════════════════════════════════════════ */

/* Tilt card effect */
.tilt-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
  perspective: 1000px;
}
.tilt-card:hover {
  box-shadow: 0 20px 60px rgba(212, 175, 55, 0.15), 0 0 30px rgba(212, 175, 55, 0.05);
}

/* Magnetic button */
.magnetic-btn {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Ring pulse on click */
.ring-pulse {
  position: relative; overflow: hidden;
}
.ring-pulse::before {
  content: '';
  position: absolute; top: 50%; left: 50%;
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--text-gold);
  transform: translate(-50%, -50%) scale(0);
  opacity: 0; pointer-events: none;
}
.ring-pulse.pulsing::before {
  animation: pulseRing 0.6s ease-out;
}

/* ══════════════════════════════════════════════
   ENHANCED CONSTITUTION ANIMATIONS
   ══════════════════════════════════════════════ */
.const-section.reveal-section {
  opacity: 0; transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.const-section.reveal-section.visible {
  opacity: 1; transform: translateY(0);
}
.const-section.reveal-section.visible .const-clause {
  animation: clauseReveal 0.5s ease forwards;
  opacity: 0;
}
.const-section.reveal-section.visible .const-clause:nth-child(1) { animation-delay: 0.1s; }
.const-section.reveal-section.visible .const-clause:nth-child(2) { animation-delay: 0.2s; }
.const-section.reveal-section.visible .const-clause:nth-child(3) { animation-delay: 0.3s; }
.const-section.reveal-section.visible .const-clause:nth-child(4) { animation-delay: 0.4s; }
@keyframes clauseReveal {
  from { opacity: 0; transform: translateX(-15px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Active section glow */
.const-section.in-view .const-section-title {
  animation: textGlow 1.5s ease-in-out 1;
}

/* ══════════════════════════════════════════════
   ENHANCED SPLASH
   ══════════════════════════════════════════════ */
#splash-screen .splash-emblem {
  filter: drop-shadow(0 0 40px rgba(212, 175, 55, 0.6));
}
#splash-screen .splash-title {
  filter: drop-shadow(0 0 60px rgba(212, 175, 55, 0.4));
}

/* ══════════════════════════════════════════════
   ENHANCED MEMBERS LIST
   ══════════════════════════════════════════════ */
.members-list li {
  position: relative;
}
.members-list li::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0; background: rgba(212, 175, 55, 0.06);
  transition: width 0.3s ease;
  border-radius: 8px;
}
.members-list li:hover::before {
  width: 100%;
}

/* ══════════════════════════════════════════════
   ENHANCED LEADERSHIP CONTAINER
   ══════════════════════════════════════════════ */
.leadership-container {
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.leadership-container:hover {
  transform: translateY(-6px) scale(1.01);
}
.leadership-container::before {
  content: '';
  position: absolute; inset: -1px; border-radius: 20px; padding: 1px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.3), transparent 40%, transparent 60%, rgba(212, 175, 55, 0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none; opacity: 0; transition: opacity 0.5s;
}
.leadership-container:hover::before { opacity: 1; }

/* ══════════════════════════════════════════════
   ENHANCED CONSTITUTION BUTTON
   ══════════════════════════════════════════════ */
.constitution-btn {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.constitution-btn::before {
  content: '';
  position: absolute; inset: -2px; border-radius: 14px; padding: 2px;
  background: linear-gradient(135deg, #d4af37, transparent, transparent, #d4af37);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.4s;
}
.constitution-btn:hover::before { opacity: 1; }
.constitution-btn:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(212, 175, 55, 0.15);
}

/* ══════════════════════════════════════════════
   ENHANCED NAV LINKS
   ══════════════════════════════════════════════ */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute; bottom: 2px; left: 50%; width: 0; height: 1px;
  background: var(--text-gold); transition: all 0.3s;
  transform: translateX(-50%);
}
.nav-link:hover::after, .nav-link.active::after {
  width: 60%;
}

/* ══════════════════════════════════════════════
   ENHANCED MODAL ANIMATIONS
   ══════════════════════════════════════════════ */
.modal-box {
  animation: modalIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.88) translateY(24px); filter: blur(4px); }
  to { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}
.modal-overlay {
  animation: overlayIn 0.3s ease;
}
@keyframes overlayIn {
  from { opacity: 0; backdrop-filter: blur(0); }
  to { opacity: 1; backdrop-filter: blur(8px); }
}

/* ══════════════════════════════════════════════
   ENHANCED PAGE TRANSITION
   ══════════════════════════════════════════════ */
.page.active {
  animation: pageIn 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(30px); filter: blur(3px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* ══════════════════════════════════════════════
   ENHANCED SPLASH SCREEN
   ══════════════════════════════════════════════ */
#splash-screen .splash-emblem {
  animation: splashIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s forwards,
             heartbeat 1.5s ease-in-out 1s infinite;
}
#splash-screen .splash-title {
  animation: splashTitle 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards,
             shimmerText 4s ease-in-out 1.2s infinite;
}

/* ══════════════════════════════════════════════
   ENHANCED STAT CARDS
   ══════════════════════════════════════════════ */
.stat-card {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.08), transparent 70%);
  opacity: 0; transition: opacity 0.4s;
}
.stat-card:hover::before { opacity: 1; }
.stat-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(212, 175, 55, 0.1);
}
.stat-number {
  transition: all 0.3s;
}
.stat-card:hover .stat-number {
  transform: scale(1.1);
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

/* ══════════════════════════════════════════════
   ENHANCED MEMBER CARDS
   ══════════════════════════════════════════════ */
.member-card {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.member-card:hover .member-avatar-lg {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}
.member-avatar-lg {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ══════════════════════════════════════════════
   ENHANCED UPDATE ITEMS
   ══════════════════════════════════════════════ */
.update-item {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.update-item::before {
  transition: all 0.3s;
}
.update-item:hover::before {
  transform: scale(1.5);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

/* ══════════════════════════════════════════════
   ENHANCED THEME TOGGLE
   ══════════════════════════════════════════════ */
#theme-toggle {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
#theme-toggle:hover {
  animation: wobble 0.5s ease;
}

/* ══════════════════════════════════════════════
   ENHANCED USER AVATAR
   ══════════════════════════════════════════════ */
.user-avatar {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.user-avatar:hover {
  animation: heartbeat 0.8s ease;
}

/* ══════════════════════════════════════════════
   ENHANCED DROPDOWN
   ══════════════════════════════════════════════ */
.user-dropdown {
  animation: dropdownIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.95); filter: blur(2px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
.dropdown-item {
  transition: all 0.25s ease;
}
.dropdown-item:hover {
  padding-left: 24px;
}

/* ══════════════════════════════════════════════
   LOADING SKELETON
   ══════════════════════════════════════════════ */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, rgba(212, 175, 55, 0.05) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}
@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

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

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 768px) {
  .main-nav { display: none; }
  .mobile-menu-toggle { display: flex; }
  .page.active#home { padding: 120px 20px 180px; }
  .leadership-container { padding: 35px 25px; border-radius: 14px; }
  .members-list { padding: 25px 20px; }
  .constitution-btn { font-size: 1.1em; padding: 18px 40px; }
  .const-body { padding: 28px 20px; }
  .const-section { padding: 20px 0; }
  .const-section-title { font-size: 1.1em; padding-left: 0; }
  .const-section-title::before { display: none; }
  .const-clause { padding-left: 0; gap: 8px; }
  .clause-num { min-width: 28px; font-size: 0.72em; }
  .const-page-container { padding: 24px 16px 80px; }
  .page-inner { padding: 28px 16px 80px; }
  .member-cards { grid-template-columns: 1fr; }
  .account-card { flex-direction: column; text-align: center; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .council-controls { flex-direction: column; }
  .council-controls .const-search-wrap { max-width: 100%; }
  .const-toolbar { gap: 6px; }
  .const-search-wrap { max-width: 100%; }
}

@media (max-width: 480px) {
  .arkenfold-con { font-size: 2.8rem; }
  .leadership-container { padding: 28px 20px; }
  .leader-name { font-size: 1.8em; }
  .constitution-btn { font-size: 1em; padding: 16px 30px; }
  .modal-box { padding: 28px 20px; }
}

/* ================================================
   ADMIN PANEL
   ================================================ */

/* Password Gate */
.admin-password-gate {
  display: flex; align-items: center; justify-content: center;
  padding: 60px 20px;
}
.admin-password-card {
  background: var(--bg-card); border: 1px solid var(--border-gold);
  border-radius: 20px; padding: 44px 40px; text-align: center;
  max-width: 420px; width: 100%; position: relative; overflow: hidden;
}
.admin-password-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, rgba(212,175,55,0.5), transparent);
}
.admin-password-seal {
  font-size: 2.4em; color: var(--text-gold); margin-bottom: 16px;
  text-shadow: 0 0 20px rgba(212,175,55,0.3);
}
.admin-password-title {
  font-family: 'Cinzel', serif; font-size: 1.15em; font-weight: 700;
  color: var(--text-gold); letter-spacing: 0.06em; margin: 0 0 8px;
}
.admin-password-desc {
  color: var(--text-secondary); font-size: 0.9em; margin: 0 0 24px;
}
.admin-password-card input[type='password'] {
  width: 100%; background: var(--bg-input); border: 1px solid var(--border-gold);
  color: var(--text-white); padding: 13px 16px; border-radius: 12px;
  font-size: 1em; font-family: 'Playfair Display', Georgia, serif;
  text-align: center; letter-spacing: 0.15em; box-sizing: border-box;
  transition: all 0.3s;
}
.admin-password-card input[type='password']:focus {
  outline: none; border-color: var(--text-gold);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.08), 0 2px 12px rgba(0,0,0,0.2);
}
.admin-password-card .admin-submit-btn {
  width: 100%; margin-top: 16px; justify-content: center;
}

/* Gate (access denied / not logged in) */
.admin-gate {
  text-align: center; padding: 60px 24px; color: var(--text-secondary);
  font-size: 1.05em; background: var(--bg-card);
  border: 1px solid var(--border-gold); border-radius: 18px;
  position: relative; overflow: hidden;
}
.admin-gate::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(212,175,55,0.03) 0%, transparent 70%);
  pointer-events: none;
}

/* Dashboard Overview Cards */
.admin-dashboard {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin-bottom: 28px;
}
.admin-stat-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-card); border: 1px solid var(--border-gold);
  border-radius: 16px; padding: 20px 22px;
  position: relative; overflow: hidden; transition: all 0.35s ease;
}
.admin-stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(212,175,55,0.3), transparent);
  opacity: 0; transition: opacity 0.35s;
}
.admin-stat-card:hover {
  border-color: var(--border-gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.admin-stat-card:hover::before { opacity: 1; }
.admin-stat-icon {
  font-size: 1.8em; width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(212,175,55,0.06); border: 1px solid var(--border-gold);
  border-radius: 14px; flex-shrink: 0;
  transition: all 0.35s;
}
.admin-stat-card:hover .admin-stat-icon {
  background: rgba(212,175,55,0.12);
  border-color: var(--border-gold-hover);
}
.admin-stat-info { min-width: 0; }
.admin-stat-value {
  font-family: 'Cinzel', serif; font-size: 1.6em; font-weight: 900;
  color: var(--text-gold); line-height: 1.1; letter-spacing: 0.02em;
}
.admin-stat-label {
  font-size: 0.78em; color: var(--text-muted); margin-top: 4px;
  text-transform: uppercase; letter-spacing: 0.08em; font-family: 'Cinzel', serif;
  font-weight: 600;
}

/* Seed Button */
.admin-seed-btn {
  margin-bottom: 24px; display: inline-flex; align-items: center; gap: 8px;
  background: rgba(212,175,55,0.06) !important; border-style: dashed !important;
}
.admin-seed-btn::before { content: '📥'; }

/* Tabs */
.admin-tabs {
  display: flex; gap: 0; margin-bottom: 0;
  background: var(--bg-card); border: 1px solid var(--border-gold);
  border-bottom: none; border-radius: 16px 16px 0 0;
  padding: 6px 6px 0 6px; position: relative;
}
.admin-tab-btn {
  font-family: 'Cinzel', serif; font-size: 0.78em; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 14px 28px; border-radius: 12px 12px 0 0;
  background: transparent; border: 1px solid transparent;
  border-bottom: none; color: var(--text-muted); cursor: pointer;
  transition: all 0.3s; position: relative;
  display: flex; align-items: center; gap: 8px;
}
.admin-tab-btn:hover { color: var(--text-gold); background: rgba(212,175,55,0.04); }
.admin-tab-btn.active {
  color: var(--text-gold); background: var(--bg-panel-solid);
  border-color: var(--border-gold); border-bottom: 2px solid var(--bg-panel-solid);
  margin-bottom: -1px; z-index: 2;
}
.admin-tab-icon { font-size: 1.15em; }

/* Tab Panels */
.admin-tab-panel {
  display: none; background: var(--bg-panel-solid);
  border: 1px solid var(--border-gold); border-top: none;
  border-radius: 0 0 16px 16px; padding: 28px;
}
.admin-tab-panel.active { display: block; }

/* Form */
.admin-form {
  background: rgba(212,175,55,0.02);
  border: 1px solid var(--border-gold); border-radius: 14px;
  padding: 24px 28px; margin-bottom: 28px;
  position: relative; overflow: hidden;
}
.admin-form::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(212,175,55,0.4), transparent);
}
.admin-form-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}
.admin-form-title {
  font-family: 'Cinzel', serif; font-size: 0.88em; font-weight: 700; color: var(--text-gold);
  letter-spacing: 0.08em; text-transform: uppercase; margin: 0;
}
.admin-form-seal {
  color: var(--text-gold); font-size: 1.1em; opacity: 0.5;
}
.admin-form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.admin-field { margin-bottom: 14px; }
.admin-field:last-child { margin-bottom: 0; }
.admin-field-label {
  display: block; font-family: 'Cinzel', serif; font-size: 0.68em;
  font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-secondary); margin-bottom: 6px;
}
.admin-optional { font-weight: 400; color: var(--text-muted); text-transform: none; letter-spacing: 0; }
.admin-form input, .admin-form select, .admin-form textarea {
  width: 100%; background: var(--bg-input); border: 1px solid var(--border-gold);
  color: var(--text-white); padding: 12px 16px; border-radius: 10px;
  font-size: 0.9em; font-family: 'Playfair Display', Georgia, serif;
  transition: all 0.3s; resize: vertical; box-sizing: border-box;
}
.admin-form input::placeholder, .admin-form textarea::placeholder {
  color: var(--text-muted); opacity: 0.7;
}
.admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus {
  outline: none; border-color: var(--text-gold);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.08), 0 2px 12px rgba(0,0,0,0.2);
}

/* Submit Button */
.admin-submit-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Cinzel', serif; font-size: 0.82em; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 13px 28px; border-radius: 12px; border: 1px solid var(--border-gold-hover);
  background: rgba(212,175,55,0.1); color: var(--text-gold);
  cursor: pointer; transition: all 0.3s; margin-top: 4px;
}
.admin-submit-btn:hover {
  background: rgba(212,175,55,0.18); border-color: var(--text-gold);
  box-shadow: 0 4px 20px rgba(212,175,55,0.12);
  transform: translateY(-1px);
}
.admin-submit-btn:active { transform: translateY(0); }
.admin-submit-icon {
  font-size: 1.2em; font-weight: 400; line-height: 1;
}

/* Checkbox */
.admin-checkbox-label {
  display: flex; align-items: center; gap: 10px; color: var(--text-secondary);
  font-size: 0.88em; cursor: pointer; padding: 8px 0;
}
.admin-checkbox-label input {
  width: auto !important; margin: 0;
  accent-color: var(--text-gold);
}

/* List Header */
.admin-list-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 4px; margin-bottom: 12px;
}
.admin-list-title {
  font-family: 'Cinzel', serif; font-size: 0.72em; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted);
}

/* List */
.admin-list { display: flex; flex-direction: column; gap: 10px; }
.admin-empty {
  color: var(--text-muted); font-style: italic; text-align: center;
  padding: 32px 20px; background: rgba(212,175,55,0.02);
  border: 1px dashed var(--border-gold); border-radius: 12px;
  font-size: 0.92em;
}

/* Rows */
.admin-row {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 12px; background: var(--bg-card); border: 1px solid var(--border-gold);
  border-radius: 14px; padding: 16px 20px; transition: all 0.35s ease;
  position: relative; overflow: hidden;
}
.admin-row::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, rgba(212,175,55,0.3), rgba(212,175,55,0.05));
  opacity: 0; transition: opacity 0.3s;
}
.admin-row:hover {
  border-color: var(--border-gold-hover);
  transform: translateX(3px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.admin-row:hover::before { opacity: 1; }
.admin-row-main { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-row-name {
  color: var(--text-white); font-weight: 600; font-size: 0.95em;
}
.admin-row-role-badge {
  font-family: 'Cinzel', serif; font-size: 0.62em; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 8px;
  background: rgba(212,175,55,0.06); color: var(--text-gold);
  border: 1px solid var(--border-gold); white-space: nowrap;
}
.admin-row-role-badge.role-archon {
  background: rgba(212,175,55,0.14); border-color: rgba(212,175,55,0.35);
  box-shadow: 0 0 12px rgba(212,175,55,0.08);
}
.admin-row-role-badge.role-council {
  background: rgba(100,160,255,0.08); border-color: rgba(100,160,255,0.2);
  color: #7ab4ff;
}
.admin-row-role-badge.role-governance {
  background: rgba(100,160,255,0.08); border-color: rgba(100,160,255,0.2);
  color: #7ab4ff;
}
.admin-row-role-badge.role-community {
  background: rgba(80,200,120,0.08); border-color: rgba(80,200,120,0.2);
  color: #5cb85c;
}
.admin-row-role-badge.role-military {
  background: rgba(255,100,100,0.08); border-color: rgba(255,100,100,0.2);
  color: #e07a5a;
}
.admin-row-pin {
  font-size: 0.78em; color: var(--text-gold); display: flex; align-items: center; gap: 4px;
}
.admin-row-actions { display: flex; align-items: center; gap: 8px; }
.admin-role-select {
  background: var(--bg-input); border: 1px solid var(--border-gold); color: var(--text-white);
  padding: 7px 12px; border-radius: 8px; font-size: 0.8em; margin: 0;
  cursor: pointer; transition: all 0.3s;
}
.admin-role-select:focus {
  outline: none; border-color: var(--text-gold);
}
.admin-btn-small {
  font-family: 'Cinzel', serif; font-size: 0.68em; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 8px 16px; border-radius: 8px; border: 1px solid var(--border-gold);
  background: var(--bg-card); color: var(--text-gold); cursor: pointer;
  transition: all 0.3s; white-space: nowrap;
}
.admin-btn-small:hover {
  border-color: var(--border-gold-hover); background: rgba(212,175,55,0.08);
  transform: translateY(-1px);
}
.admin-btn-delete {
  color: var(--danger-color); border-color: rgba(224,90,90,0.2);
}
.admin-btn-delete:hover {
  border-color: rgba(224,90,90,0.5); background: rgba(224,90,90,0.08);
}

/* Mobile Responsive */
@media (max-width: 900px) {
  .admin-dashboard { grid-template-columns: 1fr; gap: 12px; }
  .admin-stat-card { padding: 16px 18px; }
  .admin-stat-value { font-size: 1.3em; }
}
@media (max-width: 768px) {
  .admin-tabs { padding: 4px 4px 0 4px; border-radius: 12px 12px 0 0; }
  .admin-tab-btn { padding: 11px 16px; font-size: 0.7em; gap: 6px; }
  .admin-tab-panel { padding: 20px 16px; border-radius: 0 0 12px 12px; }
  .admin-form { padding: 18px 16px; }
  .admin-form-grid { grid-template-columns: 1fr; }
  .admin-row {
    flex-direction: column; align-items: flex-start; gap: 10px;
    padding: 14px 16px;
  }
  .admin-row-actions { width: 100%; justify-content: space-between; }
  .admin-submit-btn { width: 100%; justify-content: center; }
}

/* ================================================
   NOTIFICATION BELL
   ================================================ */
.notif-bell {
  position: relative; background: none; border: 1px solid var(--border-gold);
  color: var(--text-gold); width: 40px; height: 40px; border-radius: 12px;
  font-size: 1.1em; cursor: pointer; transition: all 0.3s;
  display: flex; align-items: center; justify-content: center;
}
.notif-bell:hover { border-color: var(--border-gold-hover); background: rgba(212,175,55,0.06); }
.notif-badge {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px;
  padding: 0 4px; background: var(--danger-color); color: #fff;
  border-radius: 9px; font-size: 0.65em; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cinzel', serif; border: 2px solid var(--bg-panel-solid);
}
.notif-dropdown {
  position: absolute; top: 50px; right: 0; width: 320px; max-height: 400px;
  overflow-y: auto; background: var(--bg-panel-solid); backdrop-filter: blur(30px);
  border: 1px solid var(--border-gold); border-radius: 16px; padding: 8px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35); z-index: 200;
}
.notif-dropdown-header {
  font-family: 'Cinzel', serif; font-size: 0.75em; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-gold);
  padding: 10px 12px 8px;
}
.notif-list { display: flex; flex-direction: column; gap: 4px; }
.notif-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px;
  border-radius: 10px; font-size: 0.85em; color: var(--text-secondary);
}
.notif-item.unread { background: rgba(212,175,55,0.06); color: var(--text-white); }
.notif-item-icon { color: var(--text-gold); flex-shrink: 0; }

@media (max-width: 480px) {
  .notif-dropdown { width: 280px; right: -60px; }
}

/* ================================================
   JOIN THE DOMINION MODAL
   ================================================ */
.join-status-icon {
  font-size: 2.2em; color: var(--text-gold); margin-bottom: 12px;
  text-shadow: 0 0 20px rgba(212,175,55,0.3);
}

/* ================================================
   APPLICANTS (ADMIN PANEL)
   ================================================ */
.admin-tab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px;
  background: var(--danger-color); color: #fff; border-radius: 9px;
  font-size: 0.7em; font-weight: 700; font-family: 'Cinzel', serif;
}
.admin-applicant-row { flex-direction: column; align-items: stretch; }
.admin-applicant-body { width: 100%; }
.admin-applicant-meta { margin-bottom: 12px; }
.admin-applicant-message {
  color: var(--text-secondary); font-size: 0.85em; font-style: italic;
  margin: 6px 0 0; line-height: 1.5;
}
.admin-applicant-decline-field { margin-top: 6px; }
.admin-applicant-error {
  color: var(--danger-color); font-size: 0.82em; min-height: 1.2em; margin: 6px 0;
}
.admin-row-view { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; width: 100%; }
.admin-row-edit { width: 100%; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border-subtle); }

@media (max-width: 768px) {
  .admin-applicant-row .admin-form-grid { grid-template-columns: 1fr; }
}

/* Applicant review fields (were unstyled -- same theme as other admin form fields) */
.admin-applicant-name, .admin-applicant-title, .admin-applicant-role,
.admin-applicant-decline-reason {
  width: 100%; background: var(--bg-input); border: 1px solid var(--border-gold);
  color: var(--text-white); padding: 12px 16px; border-radius: 10px;
  font-size: 0.9em; font-family: 'Playfair Display', Georgia, serif;
  transition: all 0.3s; resize: vertical; box-sizing: border-box; cursor: auto;
}
.admin-applicant-role { cursor: pointer; }
.admin-applicant-name:focus, .admin-applicant-title:focus, .admin-applicant-role:focus,
.admin-applicant-decline-reason:focus {
  outline: none; border-color: var(--text-gold);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.08), 0 2px 12px rgba(0,0,0,0.2);
}

/* Roster search bar */
.admin-search-input {
  width: 100%; background: var(--bg-input); border: 1px solid var(--border-gold);
  color: var(--text-white); padding: 11px 16px; border-radius: 10px;
  font-size: 0.88em; font-family: 'Playfair Display', Georgia, serif;
  margin-bottom: 14px; transition: all 0.3s; box-sizing: border-box;
}
.admin-search-input::placeholder { color: var(--text-muted); }
.admin-search-input:focus {
  outline: none; border-color: var(--text-gold);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.08);
}
