:root {
  --bg: #060911;
  --bg-elevated: rgba(11, 16, 28, 0.78);
  --card: rgba(13, 19, 34, 0.68);
  --card-solid: #0f1626;
  --card-hover: rgba(19, 28, 48, 0.84);
  --text: #f3f7ff;
  --muted: #93a0b8;
  --accent: #4effff;
  --accent-deep: #00b8d9;
  --accent-glow: rgba(78, 255, 255, 0.22);
  --ruby: #ff5c7c;
  --ruby-glow: rgba(255, 92, 124, 0.24);
  --border: rgba(160, 215, 255, 0.11);
  --border-glow: rgba(78, 255, 255, 0.38);
  --shadow: 0 18px 42px rgba(2, 5, 12, 0.55);
  --whatsapp: #25D366;
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100%;
}

a {
  color: inherit;
}

code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.87em;
  background: rgba(78, 255, 255, 0.1);
  border: 1px solid rgba(78, 255, 255, 0.16);
  color: var(--accent);
  padding: 2px 7px;
  border-radius: 6px;
}

/* Scroll Progress Hairline */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: linear-gradient(90deg, var(--accent), #7dd3fc 52%, var(--ruby));
  box-shadow: 0 0 12px rgba(78, 255, 255, 0.65);
  transform-origin: left center;
  transform: scaleX(0);
  z-index: 260;
  pointer-events: none;
}

/* Living Black Shores Background Stage */
.bg-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 95% 70% at 50% -10%, rgba(16, 40, 74, 0.52), transparent 70%),
    radial-gradient(circle at 80% 90%, rgba(45, 16, 36, 0.28), transparent 55%),
    #060911;
}

body:not([data-page="home"]) .bg-stage::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 58vh;
  background: url('/assets/hero.jpg') 22% 20% / cover no-repeat;
  opacity: 0.16;
  filter: blur(18px) saturate(1.25);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9) 0%, transparent 92%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9) 0%, transparent 92%);
  transform: scale(1.06);
}

.bg-aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(75px);
  opacity: 0.55;
  will-change: transform;
}

.bg-aurora-cyan {
  width: min(58vw, 680px);
  height: min(58vw, 680px);
  top: -18vh;
  right: -10vw;
  background: radial-gradient(circle, rgba(78, 255, 255, 0.18) 0%, rgba(14, 165, 233, 0.08) 45%, transparent 72%);
  animation: auroraDriftA 22s ease-in-out infinite alternate;
}

.bg-aurora-indigo {
  width: min(64vw, 760px);
  height: min(64vw, 760px);
  bottom: -24vh;
  left: -14vw;
  background: radial-gradient(circle, rgba(56, 114, 255, 0.2) 0%, rgba(15, 32, 82, 0.12) 48%, transparent 74%);
  animation: auroraDriftB 28s ease-in-out infinite alternate;
}

.bg-aurora-ruby {
  width: min(44vw, 520px);
  height: min(44vw, 520px);
  top: 40vh;
  left: 34vw;
  background: radial-gradient(circle, rgba(255, 92, 124, 0.12) 0%, rgba(190, 24, 93, 0.05) 45%, transparent 72%);
  animation: auroraDriftC 25s ease-in-out infinite alternate;
}

.bg-grid {
  position: absolute;
  inset: -40px;
  background-image:
    linear-gradient(rgba(78, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(78, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 68px 68px;
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 30%, rgba(0, 0, 0, 0.65), transparent 88%);
  mask-image: radial-gradient(ellipse 85% 75% at 50% 30%, rgba(0, 0, 0, 0.65), transparent 88%);
  transform: translate3d(calc(var(--mx-global, 0px) * -0.35), calc(var(--my-global, 0px) * -0.35), 0);
}

.bg-grid::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 160px;
  background: linear-gradient(180deg, transparent, rgba(78, 255, 255, 0.06), transparent);
  animation: scanSweep 11s linear infinite;
}

#shoreCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Layer stacking above background stage */
.navbar,
.hero,
.container,
.footer {
  position: relative;
  z-index: 2;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 9, 17, 0.56);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(160, 215, 255, 0.08);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
  background: rgba(6, 9, 17, 0.88);
  border-bottom-color: rgba(78, 255, 255, 0.18);
  box-shadow: 0 12px 32px rgba(2, 6, 14, 0.55);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.7px;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  box-shadow: 0 0 14px var(--accent-glow);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.brand:hover img {
  transform: scale(1.08) rotate(-4deg);
  box-shadow: 0 0 22px rgba(78, 255, 255, 0.55);
}

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

.nav-links a {
  position: relative;
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 0;
  transition: color 0.22s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), #80d8ff);
  box-shadow: 0 0 8px rgba(78, 255, 255, 0.55);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

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

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(37, 211, 102, 0.11);
  border: 1px solid rgba(37, 211, 102, 0.35);
  color: #87eba9;
}

.status-badge.offline {
  background: rgba(245, 158, 11, 0.11);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fcd34d;
}

.status-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.status-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  animation: statusPing 2.2s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.menu-toggle {
  display: none;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 1.2rem;
  cursor: pointer;
}

/* Hero Showcase — Shorekeeper & Ruby Framed Clearly on Left, Copy Over Night Sky on Right */
.hero {
  position: relative;
  width: 100%;
  min-height: clamp(500px, 68vh, 650px);
  display: flex;
  justify-content: center;
  align-items: stretch;
  margin-bottom: 42px;
  overflow: hidden;
  border-bottom: none;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-media-drift {
  position: absolute;
  inset: -4%;
  animation: heroBreathe 16s ease-in-out infinite alternate;
  will-change: transform;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 18% 24%;
  filter: saturate(1.1) contrast(1.04);
  transform: translate3d(
    calc(var(--mx-global, 0px) * -0.85),
    calc(var(--my-global, 0px) * -0.65 + var(--hero-scroll-y, 0px)),
    0
  );
  will-change: transform;
}

.hero-prism-ring {
  position: absolute;
  width: 560px;
  height: 560px;
  right: 7%;
  top: 50%;
  margin-top: -280px;
  border-radius: 50%;
  border: 1px dashed rgba(78, 255, 255, 0.14);
  box-shadow: inset 0 0 80px rgba(78, 255, 255, 0.05);
  animation: orbitSpin 56s linear infinite;
  pointer-events: none;
}

.hero-prism-ring::before {
  content: '';
  position: absolute;
  inset: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 92, 124, 0.12);
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6, 9, 17, 0.22) 0%, rgba(6, 9, 17, 0) 24%, rgba(6, 9, 17, 0.78) 88%, #060911 100%),
    linear-gradient(270deg, rgba(6, 9, 17, 0.94) 0%, rgba(6, 9, 17, 0.8) 38%, rgba(6, 9, 17, 0.22) 64%, rgba(6, 9, 17, 0.04) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1280px;
  padding: 64px 24px 72px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.hero-content {
  max-width: 560px;
  animation: heroRise 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(12, 22, 38, 0.72);
  border: 1px solid rgba(78, 255, 255, 0.34);
  backdrop-filter: blur(10px);
  margin-bottom: 18px;
  box-shadow: 0 0 22px rgba(78, 255, 255, 0.14);
}

.pulse-star {
  display: inline-block;
  color: var(--ruby);
  animation: starSpin 6s linear infinite;
}

.hero-content h1 {
  font-size: clamp(2.35rem, 5vw, 4rem);
  font-weight: 800;
  margin: 0 0 16px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.08;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.85);
}

.hero-title-accent {
  background: linear-gradient(110deg, #ffffff 0%, #4effff 36%, #d9ffff 54%, #ff6b8b 82%, #ffffff 100%);
  background-size: 240% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmerFlow 8s linear infinite;
}

.hero-content p {
  font-size: clamp(1.02rem, 1.65vw, 1.16rem);
  color: #cad5e8;
  font-weight: 400;
  margin: 0 0 30px 0;
  line-height: 1.65;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.9);
}

.hero-content p strong {
  color: var(--accent);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.btn.hero-ghost {
  width: auto;
  margin-top: 0;
  border-radius: 999px;
  padding: 14px 24px;
  background: rgba(13, 19, 34, 0.72);
  border-color: rgba(160, 215, 255, 0.24);
  backdrop-filter: blur(10px);
}

/* Main App Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 72px;
}

.page-header {
  padding-top: 48px;
}

.section-header {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 28px 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.section-header::after {
  content: '';
  flex-grow: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(78, 255, 255, 0.35), rgba(255, 92, 124, 0.14), transparent);
}

/* Glass Card Spotlight & Tilt Base */
.stat-card,
.feature-panel,
.comm-card,
.panel-card,
.cmd-card {
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), var(--shadow);
  --mx: 50%;
  --my: 50%;
}

.stat-card::before,
.feature-panel::before,
.comm-card::before,
.panel-card::before,
.cmd-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    280px circle at var(--mx) var(--my),
    rgba(78, 255, 255, 0.16),
    transparent 72%
  );
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: none;
  z-index: 0;
}

.stat-card.is-ruby::before,
.feature-panel.ruby-accent::before {
  background: radial-gradient(
    280px circle at var(--mx) var(--my),
    rgba(255, 92, 124, 0.2),
    transparent 72%
  );
}

.stat-card:hover::before,
.feature-panel:hover::before,
.comm-card:hover::before,
.panel-card:hover::before,
.cmd-card:hover::before {
  opacity: 1;
}

.stat-card > *,
.feature-panel > *,
.comm-card > *,
.panel-card > *,
.cmd-card > * {
  position: relative;
  z-index: 1;
}

/* Stats Row */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.stat-card {
  background: var(--card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px 24px;
  text-align: center;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.28s ease, background 0.28s ease, box-shadow 0.28s ease;
  transform-style: preserve-3d;
}

.stat-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glow);
  background: var(--card-hover);
}

.stat-card.is-tilting {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-5px);
}

.stat-card.is-ruby:hover {
  border-color: rgba(255, 92, 124, 0.45);
}

.stat-value {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--accent);
  margin: 0;
  line-height: 1;
  text-shadow: 0 4px 18px var(--accent-glow);
}

.stat-value.ruby {
  color: var(--ruby);
  text-shadow: 0 4px 18px var(--ruby-glow);
}

.stat-label {
  font-size: 0.86rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 12px;
  font-weight: 600;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 24px;
}

.feature-panel {
  background: var(--card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.28s ease, background 0.28s ease, box-shadow 0.28s ease;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-panel:hover {
  background: var(--card-hover);
  border-color: var(--border-glow);
  box-shadow: 0 18px 42px rgba(2, 6, 15, 0.65), 0 0 26px rgba(78, 255, 255, 0.08);
  transform: translateY(-5px);
}

.feature-panel.is-tilting {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-5px);
}

.feature-panel.ruby-accent:hover {
  border-color: rgba(255, 92, 124, 0.45);
  box-shadow: 0 18px 42px rgba(2, 6, 15, 0.65), 0 0 26px rgba(255, 92, 124, 0.12);
}

.card-ruby-prism {
  position: absolute !important;
  top: 14px;
  right: 16px;
  width: 68px;
  height: 68px;
  object-fit: contain;
  opacity: 0.72;
  filter: drop-shadow(0 0 16px rgba(255, 92, 124, 0.48));
  animation: rubyFloat 5.5s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

.feature-icon {
  font-size: 2.2rem;
  background: rgba(255, 255, 255, 0.04);
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid var(--border);
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.feature-panel:hover .feature-icon {
  transform: scale(1.08) rotate(-3deg);
  border-color: var(--accent);
  background: var(--accent-glow);
  box-shadow: 0 0 20px rgba(78, 255, 255, 0.22);
}

.feature-panel.ruby-accent:hover .feature-icon {
  border-color: var(--ruby);
  background: var(--ruby-glow);
  box-shadow: 0 0 20px rgba(255, 92, 124, 0.25);
}

.feature-title {
  font-size: 1.32rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.feature-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.6;
  flex: 1;
}

/* Communities Grid */
.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.comm-card {
  background: var(--card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 34px 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

.comm-card.whatsapp:hover {
  border-color: var(--whatsapp);
  box-shadow: 0 14px 36px rgba(37, 211, 102, 0.18);
  transform: translateY(-5px);
}

.comm-card.cyan:hover {
  border-color: var(--accent);
  box-shadow: 0 14px 36px rgba(78, 255, 255, 0.18);
  transform: translateY(-5px);
}

.comm-card.is-tilting {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-5px);
}

.comm-avatar {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 18px;
  border: 2px solid rgba(78, 255, 255, 0.35);
  box-shadow: 0 0 20px rgba(78, 255, 255, 0.16);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.comm-card:hover .comm-avatar {
  transform: scale(1.06);
  box-shadow: 0 0 28px rgba(78, 255, 255, 0.36);
}

.comm-platform {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
  margin-bottom: 6px;
}

.comm-card.whatsapp .comm-platform {
  color: #87eba9;
}

.comm-card.cyan .comm-platform {
  color: var(--accent);
}

.comm-name {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 8px 0;
}

.comm-desc {
  color: var(--muted);
  font-size: 0.94rem;
  margin: 0 0 24px 0;
  line-height: 1.55;
}

/* Buttons */
.btn {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  padding: 12px 20px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  transition: all 0.24s ease;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
  width: 100%;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 65%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: skewX(-20deg);
  transition: left 0.55s ease;
  pointer-events: none;
}

.btn:hover::after {
  left: 140%;
}

.btn:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 18px rgba(78, 255, 255, 0.18);
}

.btn.primary {
  background: linear-gradient(135deg, rgba(78, 255, 255, 0.22), rgba(0, 184, 217, 0.28));
  border-color: var(--accent);
  color: #e6ffff;
  padding: 14px 30px;
  font-size: 1rem;
  border-radius: 999px;
  width: auto;
  margin-top: 0;
  box-shadow: 0 0 24px rgba(78, 255, 255, 0.2);
}

.btn.primary:hover {
  background: var(--accent);
  color: #050911;
  box-shadow: 0 0 32px rgba(78, 255, 255, 0.55);
  transform: translateY(-2px);
}

.btn.nav-cta {
  background: var(--accent);
  border-color: var(--accent);
  color: #050911;
  padding: 8px 18px;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 999px;
  width: auto;
  margin-top: 0;
}

.btn.nav-cta:hover {
  box-shadow: 0 0 22px rgba(78, 255, 255, 0.45);
  background: #84ffff;
  color: #050911;
}

.comm-card.whatsapp .btn:hover {
  background: var(--whatsapp);
  border-color: var(--whatsapp);
  color: #000;
  box-shadow: 0 0 20px rgba(37, 211, 102, 0.35);
}

/* Subpages Shared UI */
.subpage-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding-top: 44px;
}

.subpage-title {
  margin: 0 0 6px;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-weight: 800;
}

.subpage-desc {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.tabs-bar {
  display: inline-flex;
  background: var(--card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 5px;
  gap: 4px;
}

.tab-btn {
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 10px 18px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: var(--accent);
  color: #050911;
  box-shadow: 0 0 16px rgba(78, 255, 255, 0.35);
}

.panel-card {
  background: var(--card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
}

.lb-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.lb-row:hover {
  transform: translateX(4px);
  border-color: rgba(78, 255, 255, 0.32);
  background: rgba(78, 255, 255, 0.045);
}

.lb-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lb-rank {
  min-width: 54px;
  font-weight: 800;
  font-size: 1rem;
  color: var(--accent);
}

.lb-rank.shame {
  color: var(--ruby);
}

.lb-name {
  font-weight: 700;
  font-size: 1.02rem;
}

.lb-sub {
  font-size: 0.82rem;
  color: var(--muted);
}

.lb-val {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--ruby);
  font-size: 1rem;
  white-space: nowrap;
}

.tier-legend {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tier-chip {
  font-size: 0.82rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
}

/* Lottery Subpage */
.lottery-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}

.progress-wrap {
  margin: 18px 0 22px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.92rem;
  color: var(--muted);
}

.progress-meta strong {
  color: var(--accent);
}

.progress-bar {
  height: 12px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  position: relative;
  height: 100%;
  background: linear-gradient(90deg, #00c6ff, var(--accent), #a5f3fc);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 14px rgba(78, 255, 255, 0.45);
}

.slots-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.slot-pill {
  background: rgba(78, 255, 255, 0.1);
  border: 1px solid rgba(78, 255, 255, 0.32);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
}

.timer-box {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  text-shadow: 0 0 20px var(--accent-glow);
}

/* Commands Subpage (translucent surface without costly list blur for 60fps scroll) */
.cmd-search {
  width: 340px;
  max-width: 100%;
  background: var(--card);
  backdrop-filter: blur(12px);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cmd-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.cat-pill {
  background: var(--card);
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 8px 15px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: capitalize;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cat-pill.active,
.cat-pill:hover {
  background: var(--accent-glow);
  color: var(--accent);
  border-color: var(--accent);
}

.cmd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

.cmd-card {
  background: rgba(14, 20, 35, 0.78);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.cmd-card:hover {
  transform: translateY(-3px);
  border-color: rgba(78, 255, 255, 0.45);
  background: rgba(20, 29, 50, 0.88);
}

.cmd-card.is-tilting {
  transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-3px);
}

.cmd-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.cmd-name {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent);
}

.cmd-cat {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--muted);
}

.cmd-desc {
  margin: 0 0 8px;
  font-size: 0.88rem;
  color: #cbd5e1;
}

.cmd-usage {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--accent);
  color: #050911;
  font-weight: 700;
  padding: 9px 20px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 200;
  box-shadow: 0 0 24px rgba(78, 255, 255, 0.45);
}

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

.empty-note {
  color: var(--muted);
  font-style: italic;
}

/* Auth / WhatsApp Account Linking */
.auth-wrap {
  padding-top: 56px;
  display: flex;
  justify-content: center;
}

.auth-card {
  width: 100%;
  max-width: 480px;
  padding: 36px 30px;
}

.auth-head {
  text-align: center;
  margin-bottom: 24px;
}

.auth-title {
  margin: 0 0 8px;
  font-size: 1.7rem;
  font-weight: 800;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.auth-input {
  width: 100%;
  background: rgba(6, 9, 17, 0.78);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.otp-input {
  text-align: center;
  font-size: 1.5rem;
  letter-spacing: 0.35em;
  font-weight: 700;
}

.field-hint {
  font-size: 0.82rem;
  color: var(--muted);
}

.full-btn {
  width: 100% !important;
  margin-top: 6px !important;
}

.auth-alert {
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 92, 124, 0.45);
  background: rgba(255, 92, 124, 0.12);
  color: #fecdd3;
}

.auth-alert.success {
  border-color: rgba(37, 211, 102, 0.45);
  background: rgba(37, 211, 102, 0.12);
  color: #a7f3d0;
}

.otp-sent-note {
  background: rgba(78, 255, 255, 0.08);
  border: 1px solid rgba(78, 255, 255, 0.3);
  color: var(--accent);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.86rem;
  text-align: center;
}

.otp-actions-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.btn-sm-ghost {
  padding: 8px 12px;
  font-size: 0.82rem;
  border-radius: 9px;
}

.linked-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #87eba9;
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.35);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.logout-btn {
  width: auto;
  margin-top: 0;
  border-color: rgba(255, 92, 124, 0.4);
  color: #fda4af;
}

.logout-btn:hover {
  background: rgba(255, 92, 124, 0.15);
  border-color: var(--ruby);
  color: #fff;
}

.lb-row.viewer-row {
  border-color: var(--accent);
  background: rgba(78, 255, 255, 0.06);
}

.you-tag {
  font-size: 0.72rem;
  background: var(--accent);
  color: #050911;
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 700;
  margin-left: 6px;
}

/* Scroll & Dynamic Motion Reveals */
.has-motion .reveal-ready {
  opacity: 0;
  transform: translateY(22px) scale(0.985);
  transition:
    opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.28s ease,
    background 0.28s ease,
    box-shadow 0.28s ease;
}

.has-motion .reveal-ready.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.pop-item {
  animation: cardPopIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Keyframes */
@keyframes auroraDriftA {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-7vw, 6vh, 0) scale(1.16); }
}

@keyframes auroraDriftB {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(8vw, -7vh, 0) scale(1.14); }
}

@keyframes auroraDriftC {
  0% { transform: translate3d(0, 0, 0) scale(0.95); }
  100% { transform: translate3d(-6vw, -5vh, 0) scale(1.12); }
}

@keyframes scanSweep {
  0% { transform: translateY(-20vh); opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translateY(115vh); opacity: 0; }
}

@keyframes heroBreathe {
  0% { transform: scale(1) translate3d(0, 0, 0); }
  100% { transform: scale(1.055) translate3d(-0.6%, -0.8%, 0); }
}

@keyframes heroRise {
  0% { opacity: 0; transform: translateY(24px); }
  100% { opacity: 1; transform: translateY(0); }
}

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

@keyframes orbitSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes starSpin {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.18); }
  100% { transform: rotate(360deg) scale(1); }
}

@keyframes rubyFloat {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-7px) rotate(4deg); }
}

@keyframes statusPing {
  0% { transform: scale(1); opacity: 0.75; }
  80%, 100% { transform: scale(2.4); opacity: 0; }
}

@keyframes cardPopIn {
  0% { opacity: 0; transform: translateY(14px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Responsive Frame Adjustments */
@media (max-width: 900px) {
  .hero {
    min-height: 590px;
  }
  .hero-bg-img {
    object-position: 22% 18%;
  }
  .hero-prism-ring {
    width: 340px;
    height: 340px;
    margin-top: -170px;
    right: -60px;
    top: 32%;
  }
  .hero-scrim {
    background:
      linear-gradient(180deg, rgba(6, 9, 17, 0.14) 0%, rgba(6, 9, 17, 0.08) 32%, rgba(6, 9, 17, 0.8) 60%, rgba(6, 9, 17, 0.96) 86%, #060911 100%);
  }
  .hero-inner {
    padding: 36px 20px 30px;
    align-items: flex-end;
    justify-content: flex-start;
  }
  .hero-content {
    max-width: 100%;
  }
  .container {
    gap: 56px;
  }
  .lottery-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(10, 14, 26, 0.96);
    backdrop-filter: blur(18px);
    flex-direction: column;
    padding: 18px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open {
    display: flex;
  }
  .menu-toggle {
    display: inline-block;
  }
  .nav-right .nav-cta {
    display: none;
  }
  .hero {
    min-height: 540px;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .features-grid, .community-grid {
    grid-template-columns: 1fr;
  }
  .card-ruby-prism {
    width: 54px;
    height: 54px;
  }
}

/* Reduced Motion Respect */
@media (prefers-reduced-motion: reduce) {
  .bg-aurora,
  .bg-grid::after,
  .hero-media-drift,
  .hero-prism-ring,
  .hero-content,
  .hero-title-accent,
  .pulse-star,
  .card-ruby-prism,
  .status-dot::after,
  .pop-item {
    animation: none !important;
  }
  .has-motion .reveal-ready {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .hero-bg-img {
    transform: none !important;
  }
}
