/* EtherealPE Portal Styles
   Theme: dark space / purple-black / white highlights
*/

:root {
  --bg: #05040b;
  --bg-2: #090617;
  --panel: rgba(18, 12, 34, 0.72);
  --panel-strong: rgba(24, 16, 48, 0.92);
  --border: rgba(194, 162, 255, 0.22);
  --border-strong: rgba(194, 162, 255, 0.45);
  --text: #f7f3ff;
  --muted: #bcb1d8;
  --dim: #82789e;
  --purple: #8d5cff;
  --purple-2: #b38cff;
  --purple-3: #5d32d6;
  --cyan: #7ee7ff;
  --ice: #dff9ff;
  --white: #ffffff;
  --danger: #ff5c9a;
  --good: #57ffc3;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --glow-purple: 0 0 28px rgba(141, 92, 255, 0.45);
  --glow-cyan: 0 0 28px rgba(126, 231, 255, 0.25);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --max: 1180px;
  --nav-h: 76px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 16% 12%, rgba(141, 92, 255, 0.20), transparent 32rem),
    radial-gradient(circle at 82% 8%, rgba(126, 231, 255, 0.10), transparent 28rem),
    radial-gradient(circle at 50% 88%, rgba(77, 45, 172, 0.18), transparent 34rem),
    linear-gradient(180deg, #05040b 0%, #080614 48%, #030207 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.52) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(179,140,255,.36) 0 1px, transparent 1.5px);
  background-size: 110px 110px, 170px 170px;
  background-position: 10px 30px, 50px 80px;
  mask-image: linear-gradient(to bottom, black, transparent 90%);
}

body::after {
  content: "";
  position: fixed;
  inset: -25%;
  pointer-events: none;
  background: conic-gradient(from 90deg at 50% 50%, transparent, rgba(141, 92, 255, 0.12), transparent, rgba(126, 231, 255, 0.08), transparent);
  filter: blur(70px);
  opacity: 0.6;
  animation: driftGlow 18s linear infinite;
}

@keyframes driftGlow { to { transform: rotate(360deg); } }

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
img { max-width: 100%; display: block; }
.container { width: min(var(--max), calc(100% - 36px)); margin: 0 auto; }


/* Access Gate */
body.gate-locked {
  overflow: hidden;
}

body.gate-locked .site-header,
body.gate-locked main,
body.gate-locked .footer {
  opacity: 0.28;
  transform: scale(.995);
  pointer-events: none;
  user-select: none;
  transition: opacity .18s var(--ease), transform .18s var(--ease);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.access-gate {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  padding: 26px;
  background:
    radial-gradient(circle at 50% 18%, rgba(141, 92, 255, .28), transparent 28rem),
    radial-gradient(circle at 75% 70%, rgba(126, 231, 255, .10), transparent 25rem),
    rgba(3, 2, 8, .92);
  backdrop-filter: blur(8px);
  transition: opacity .55s var(--ease), visibility .55s var(--ease);
}

.access-gate.unlocked {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.gate-bg::before {
  content: "";
  position: absolute;
  inset: -20%;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.48) 0 1px, transparent 1.4px),
    linear-gradient(115deg, transparent 0 47%, rgba(126,231,255,.08) 48% 49%, transparent 50%);
  background-size: 120px 120px, 260px 260px;
  opacity: .45;
  animation: gateStars 18s linear infinite;
}

.gate-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,.035) 0 1px,
    transparent 1px 6px
  );
  opacity: .18;
}

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

.gate-card {
  position: relative;
  width: min(520px, 100%);
  padding: 28px;
  border: 1px solid rgba(194, 162, 255, .32);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(25, 15, 54, .86), rgba(8, 6, 20, .92)),
    var(--panel-strong);
  box-shadow: var(--shadow), 0 0 55px rgba(141, 92, 255, .32);
  text-align: center;
  overflow: hidden;
}

.gate-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,.5), rgba(141,92,255,.24), rgba(126,231,255,.44));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.gate-logo {
  width: 92px;
  height: 92px;
  margin: 0 auto 18px;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid rgba(126, 231, 255, .30);
  box-shadow: var(--glow-cyan);
}

.gate-kicker {
  display: inline-flex;
  padding: 7px 11px;
  border: 1px solid rgba(141,92,255,.35);
  border-radius: 999px;
  color: var(--purple-2);
  background: rgba(141,92,255,.12);
  text-transform: uppercase;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .14em;
}

.gate-card h1 {
  margin: 16px 0 10px;
  font-size: clamp(2.2rem, 7vw, 4.1rem);
  line-height: .9;
  letter-spacing: -.06em;
  background: linear-gradient(90deg, #fff, #d8c9ff, #8d5cff, #7ee7ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gate-card p {
  color: var(--muted);
  line-height: 1.65;
}

.gate-form {
  display: grid;
  gap: 12px;
  margin: 22px 0 12px;
}

.gate-form input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(194, 162, 255, .26);
  border-radius: 999px;
  color: var(--white);
  outline: none;
  background: rgba(0,0,0,.28);
  -webkit-appearance: none;
  appearance: none;
  will-change: border-color, box-shadow, background;
  transform: translateZ(0);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}

.gate-form input:focus {
  border-color: rgba(126, 231, 255, .52);
  background: rgba(0,0,0,.38);
  box-shadow: 0 0 0 4px rgba(126, 231, 255, .08), var(--glow-cyan);
}

.gate-status {
  min-height: 1.5em;
  margin: 8px 0 0;
  color: var(--dim) !important;
  font-size: .95rem;
}

.gate-status.accepted {
  color: var(--good) !important;
}

.gate-status.denied {
  color: var(--danger) !important;
}

.gate-card.shake {
  animation: gateShake .33s var(--ease);
}

@keyframes gateShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(194, 162, 255, 0.13);
  background: rgba(5, 4, 11, 0.72);
  backdrop-filter: blur(16px);
}

.nav { display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  object-fit: cover;
  box-shadow: var(--glow-cyan);
  border: 1px solid rgba(255,255,255,.18);
}
.brand-text { display: grid; line-height: 1.02; }
.brand-name { font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.brand-sub { color: var(--muted); font-size: .78rem; margin-top: 4px; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { color: var(--muted); padding: 10px 12px; border-radius: 999px; transition: .18s var(--ease); }
.nav-links a:hover, .nav-links a.active { color: var(--white); background: rgba(141, 92, 255, .14); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.mobile-menu-btn { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 12px 17px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  transition: transform .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
  user-select: none;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, var(--purple), var(--purple-3)); box-shadow: var(--glow-purple); }
.btn-primary:hover { box-shadow: 0 0 42px rgba(141, 92, 255, 0.55); }
.btn-ghost { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.12); }
.btn-ghost:hover { background: rgba(141, 92, 255, .14); border-color: var(--border-strong); }
.btn-ice { background: rgba(126, 231, 255, .10); border-color: rgba(126, 231, 255, .32); box-shadow: var(--glow-cyan); }
.btn[disabled], .btn.disabled { opacity: .48; cursor: not-allowed; transform: none; }

.hero { position: relative; padding: 86px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.04fr .96fr; gap: 54px; align-items: center; }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--purple-2);
  background: rgba(141, 92, 255, .10);
  font-weight: 700;
  font-size: .88rem;
}
.kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 16px rgba(87, 255, 195, .75); }
.hero h1 { margin: 22px 0 16px; font-size: clamp(3rem, 7vw, 6.5rem); letter-spacing: -.07em; line-height: .86; }
.gradient-text { background: linear-gradient(90deg, #fff, #d9c9ff 38%, #9b6cff 72%, #80eaff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-copy { max-width: 650px; color: var(--muted); font-size: clamp(1.05rem, 1.8vw, 1.25rem); line-height: 1.72; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 32px; max-width: 680px; }
.stat-card { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-md); background: rgba(255,255,255,.035); }
.stat-value { font-weight: 900; font-size: 1.4rem; }
.stat-label { color: var(--dim); font-size: .9rem; margin-top: 4px; }

.logo-card {
  position: relative;
  padding: 14px;
  border: 1px solid rgba(126, 231, 255, .25);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(141, 92, 255, .18), rgba(126, 231, 255, .08)), rgba(255,255,255,.04);
  box-shadow: var(--shadow), var(--glow-cyan);
  transform: perspective(1000px) rotateY(-5deg) rotateX(3deg);
}
.logo-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,.5), rgba(141,92,255,.2), rgba(126,231,255,.5));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}
.logo-card img { border-radius: calc(var(--radius-xl) - 10px); aspect-ratio: 1 / 1; object-fit: cover; }
.orbit { position: absolute; inset: -28px; border: 1px solid rgba(194, 162, 255, .16); border-radius: 50%; pointer-events: none; animation: orbit 16s linear infinite; }
.orbit::after { content: ""; position: absolute; top: 16%; left: 14%; width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 22px var(--cyan); }
@keyframes orbit { to { transform: rotate(360deg); } }

.section { padding: 74px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 26px; }
.section-title { margin: 0; font-size: clamp(2rem, 4vw, 3.5rem); letter-spacing: -.045em; }
.section-copy { color: var(--muted); line-height: 1.7; max-width: 660px; margin: 12px 0 0; }
.realm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.realm-card {
  position: relative;
  min-height: 320px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at 70% 8%, rgba(126,231,255,.16), transparent 11rem), linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.02)), var(--panel);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .24s var(--ease), border-color .24s var(--ease), background .24s var(--ease);
}
.realm-card:hover { transform: translateY(-6px); border-color: var(--border-strong); }
.realm-card.locked { filter: grayscale(.65); }
.realm-card.locked::after { content: "LOCKED"; position: absolute; right: 18px; top: 18px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; color: var(--dim); background: rgba(0,0,0,.28); font-size: .8rem; font-weight: 800; letter-spacing: .1em; }
.realm-tag { color: var(--cyan); font-weight: 800; font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; }
.realm-title { margin: 14px 0 8px; font-size: 2rem; letter-spacing: -.04em; }
.realm-desc { color: var(--muted); line-height: 1.65; }
.realm-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 22px; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; color: var(--muted); border: 1px solid rgba(255,255,255,.11); border-radius: 999px; background: rgba(255,255,255,.04); font-size: .88rem; }
.pill.online::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 12px var(--good); }
.platform-panel { border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 22px; background: var(--panel); box-shadow: var(--shadow); }
.platform-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.tab-btn { min-height: 42px; padding: 10px 14px; color: var(--muted); border: 1px solid rgba(255,255,255,.12); border-radius: 999px; background: rgba(255,255,255,.04); cursor: pointer; transition: .18s var(--ease); }
.tab-btn.active, .tab-btn:hover { color: var(--white); background: rgba(141, 92, 255, .18); border-color: var(--border-strong); }
.platform-view { display: none; }
.platform-view.active { display: block; }
.server-box { display: grid; gap: 12px; margin-top: 14px; }
.copy-row { display: grid; grid-template-columns: 130px 1fr auto; gap: 10px; align-items: center; padding: 12px; border: 1px solid rgba(255,255,255,.105); border-radius: var(--radius-md); background: rgba(0,0,0,.18); }
.copy-label { color: var(--dim); font-weight: 700; }
.copy-value { min-width: 0; overflow-wrap: anywhere; color: var(--ice); }
.copy-btn { border: 1px solid rgba(126, 231, 255, .26); color: var(--ice); border-radius: 999px; background: rgba(126, 231, 255, .08); padding: 9px 12px; cursor: pointer; transition: .18s var(--ease); }
.copy-btn:hover { background: rgba(126, 231, 255, .16); }
.vote-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.vote-card { display: grid; gap: 10px; padding: 18px; min-height: 148px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: linear-gradient(180deg, rgba(141,92,255,.11), rgba(255,255,255,.025)), var(--panel); transition: transform .2s var(--ease), border-color .2s var(--ease); }
.vote-card:hover { transform: translateY(-5px); border-color: var(--border-strong); }
.vote-name { font-size: 1.05rem; font-weight: 900; }
.vote-reward { color: var(--muted); line-height: 1.45; font-size: .95rem; }
.news-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; }
.panel { padding: 22px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--panel); box-shadow: var(--shadow); }
.panel h3 { margin: 0 0 10px; font-size: 1.5rem; }
.panel p, .panel li { color: var(--muted); line-height: 1.7; }
.panel ul { padding-left: 20px; margin-bottom: 0; }
.footer { padding: 44px 0; border-top: 1px solid rgba(194, 162, 255, 0.12); color: var(--dim); }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 100; transform: translate(-50%, 18px); opacity: 0; pointer-events: none; padding: 12px 16px; border: 1px solid rgba(126, 231, 255, .35); border-radius: 999px; color: var(--ice); background: rgba(8, 6, 20, .92); backdrop-filter: blur(12px); box-shadow: var(--glow-cyan); transition: .22s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.hidden { display: none !important; }

@media (max-width: 920px) {
  .hero-grid, .news-grid { grid-template-columns: 1fr; }
  .logo-card { transform: none; max-width: 560px; margin: 0 auto; }
  .realm-grid, .vote-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { position: fixed; left: 18px; right: 18px; top: calc(var(--nav-h) + 10px); display: none; flex-direction: column; align-items: stretch; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: rgba(8, 6, 20, .96); box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-links a { border-radius: var(--radius-md); }
  .mobile-menu-btn { display: inline-flex; }
}
@media (max-width: 640px) {
  :root { --nav-h: 68px; }
  .container { width: min(100% - 26px, var(--max)); }
  .hero { padding-top: 54px; }
  .hero-stats, .realm-grid, .vote-grid { grid-template-columns: 1fr; }
  .section-head { display: block; }
  .copy-row { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
  .nav-actions .btn-primary { display: none; }
}
