/* ==========================================================================
   NezoSMP — Official Web Portal Stylesheet
   Strictly Minecraft Java Edition (Fabric 26.3)
   Theme: Obsidian Glassmorphism, Deep Space, Amethyst & Emerald Neon Accents
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@500;700;800&display=swap');

/* --- Design Tokens --- */
:root {
  /* Surfaces */
  --bg-deep: #06080e;
  --bg-surface: #0c101a;
  --bg-card: rgba(15, 21, 35, 0.75);
  --bg-card-hover: rgba(22, 30, 48, 0.9);
  --bg-header: rgba(8, 11, 18, 0.92);

  /* Neon Accents */
  --amethyst: #a855f7;
  --amethyst-dark: #7c3aed;
  --amethyst-glow: rgba(168, 85, 247, 0.35);
  
  --emerald: #10b981;
  --emerald-dark: #059669;
  --emerald-glow: rgba(16, 185, 129, 0.35);

  --cyan: #06b6d4;
  --cyan-glow: rgba(6, 182, 212, 0.35);

  --amber: #f59e0b;
  --amber-glow: rgba(245, 158, 11, 0.35);

  --discord: #5865F2;

  /* Typography */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Borders & Shadows */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.12);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.6);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 9999px;

  /* Fonts */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Transitions */
  --ease-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --ease-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Global Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  color-scheme: dark;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Bulletproof Image Safety: Never Allow Images to Explode */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: #1b2336;
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--amethyst);
}

/* Canvas & Ambient Lighting */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

.ambient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  opacity: 0.18;
  z-index: 0;
}
.ambient-orb-1 {
  width: 550px;
  height: 550px;
  top: -150px;
  right: -100px;
  background: var(--amethyst);
}
.ambient-orb-2 {
  width: 500px;
  height: 500px;
  top: 45%;
  left: -150px;
  background: var(--emerald);
}

/* Main Container */
.container {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   MASTER NAVBAR (Brand + Center Tab Switcher + Right Action Buttons)
   ========================================================================== */
.master-header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
  background: var(--bg-header);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 0;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

.master-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Brand */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-crest-img {
  width: 44px;
  height: 44px;
  min-width: 44px;
  max-width: 44px;
  min-height: 44px;
  max-height: 44px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 2px solid rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.35);
  transition: transform var(--ease-normal), border-color var(--ease-normal);
}

.nav-brand:hover .brand-crest-img {
  transform: rotate(4deg) scale(1.05);
  border-color: var(--emerald);
  box-shadow: 0 0 20px var(--emerald-glow);
}

.brand-title-wrap {
  display: flex;
  flex-direction: column;
}

.brand-title-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 40%, #e2e8f0 70%, var(--amethyst) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-edition-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--emerald);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Center Interactive Tabs */
.portal-tabs-cluster {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(14, 19, 31, 0.85);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  padding: 0.35rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.portal-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  border: none;
  cursor: pointer;
  transition: all var(--ease-fast);
  white-space: nowrap;
}

.portal-nav-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

.portal-nav-btn.active {
  background: linear-gradient(135deg, var(--amethyst), var(--amethyst-dark));
  color: #ffffff;
  box-shadow: 0 4px 18px var(--amethyst-glow);
}

.portal-nav-btn i {
  font-size: 0.9rem;
}

/* Nav Right Actions */
.nav-actions-cluster {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  border-radius: var(--radius-md);
  transition: var(--ease-fast);
  cursor: pointer;
  text-decoration: none;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--emerald), var(--emerald-dark));
  color: #032b1f;
  box-shadow: 0 4px 16px var(--emerald-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.45);
}

.btn-amethyst {
  background: linear-gradient(135deg, var(--amethyst), var(--amethyst-dark));
  color: #ffffff;
  box-shadow: 0 4px 16px var(--amethyst-glow);
}
.btn-amethyst:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(168, 85, 247, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--border-card);
  backdrop-filter: blur(10px);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.btn-discord {
  background: var(--discord);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(88, 101, 242, 0.35);
}
.btn-discord:hover {
  background: #4752c4;
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(88, 101, 242, 0.5);
}

.btn-copy-nav {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-card);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 0.55rem 0.95rem;
}
.btn-copy-nav:hover {
  background: rgba(168, 85, 247, 0.15);
  border-color: var(--amethyst);
  color: #e9d5ff;
}

.btn-sm {
  padding: 0.5rem 0.95rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.85rem 1.6rem;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

/* Shimmer */
.shimmer {
  position: relative;
  overflow: hidden;
}
.shimmer::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    60deg,
    transparent 20%,
    rgba(255, 255, 255, 0.22) 25%,
    transparent 30%
  );
  transform: rotate(25deg);
  animation: shimmerMove 5s infinite;
  pointer-events: none;
}
@keyframes shimmerMove {
  0% { transform: translateX(-100%) rotate(25deg); }
  25%, 100% { transform: translateX(100%) rotate(25deg); }
}

/* ==========================================================================
   TAB PANES (Actual Views with Zero Extra Page Length)
   ========================================================================== */
.main-portal-content {
  padding: 2rem 0 5rem;
}

.tab-pane {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.tab-pane.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   TAB 1: OVERVIEW
   ========================================================================== */
.hero-hub-card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-lg);
  background: #080b12;
  margin-bottom: 2.5rem;
}

.hero-hub-bg {
  position: absolute;
  inset: 0;
  background: url('../images/hero.jpg') no-repeat center center;
  background-size: cover;
  filter: brightness(0.35) saturate(1.2);
  transform: scale(1.02);
  z-index: 0;
}

.hero-hub-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(8, 11, 18, 0.6) 0%,
    rgba(8, 11, 18, 0.85) 60%,
    rgba(8, 11, 18, 0.98) 100%
  );
  z-index: 1;
}

.hero-hub-body {
  position: relative;
  z-index: 2;
  padding: 3.5rem 2rem;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.hero-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-pill);
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #e9d5ff;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(10px);
}

.beacon-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
  animation: beaconPulse 2s infinite;
}
@keyframes beaconPulse {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.2); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-hub-title {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  color: #ffffff;
}

.gradient-title-accent {
  background: linear-gradient(135deg, #ffffff 10%, #d8b4fe 55%, var(--emerald) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-hub-subtitle {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: #cbd5e1;
  margin-bottom: 2.25rem;
  line-height: 1.65;
  max-width: 660px;
  margin-left: auto;
  margin-right: auto;
}

/* Master Server IP Card */
.master-server-card {
  background: rgba(14, 19, 31, 0.85);
  border: 1px solid var(--border-card);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.85rem;
  margin: 0 auto 2.25rem;
  max-width: 640px;
  box-shadow: var(--shadow-lg), 0 0 30px rgba(168, 85, 247, 0.15);
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.server-address-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(8, 11, 18, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem 0.65rem 1.25rem;
  gap: 1rem;
}

.server-address-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  overflow: hidden;
}

.server-address-text {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.18rem;
  color: #ffffff;
  letter-spacing: 0.04em;
  user-select: all;
}

.server-edition-badge {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--cyan);
  background: rgba(6, 182, 212, 0.15);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.btn-copy-master {
  background: linear-gradient(135deg, var(--emerald), var(--emerald-dark));
  color: #032b1f;
  font-weight: 800;
  font-size: 0.88rem;
  padding: 0.65rem 1.3rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  transition: var(--ease-fast);
}
.btn-copy-master:hover {
  transform: scale(1.03);
  box-shadow: 0 0 20px var(--emerald-glow);
}

/* Status Row */
.server-telemetry-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.88rem;
}

.telemetry-status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
}

.status-beacon {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 12px var(--emerald);
}
.status-beacon.sleeping {
  background: var(--amber);
  box-shadow: 0 0 12px var(--amber);
}

.telemetry-chips {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.telemetry-chip {
  background: rgba(255, 255, 255, 0.06);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Sleep Alert Card */
.server-sleep-notice {
  font-size: 0.82rem;
  color: var(--amber);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-align: left;
}

/* Hero Action Buttons */
.hero-hub-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

/* Highlights Grid */
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.highlight-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--ease-normal);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.highlight-box:hover {
  transform: translateY(-4px);
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.5), 0 0 20px rgba(168, 85, 247, 0.15);
}

.highlight-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  background: rgba(168, 85, 247, 0.12);
  color: var(--amethyst);
  border: 1px solid rgba(168, 85, 247, 0.25);
  flex-shrink: 0;
}

.highlight-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: #ffffff;
}

.highlight-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Section Header */
.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 2.5rem;
}
.section-badge-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--amethyst);
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.25);
  padding: 0.25rem 0.85rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.75rem;
}
.section-head-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.5vw, 2.5rem);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.65rem;
}
.section-head-desc {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 1.85rem;
  backdrop-filter: blur(16px);
  transition: var(--ease-normal);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--amethyst), transparent);
  opacity: 0;
  transition: var(--ease-normal);
}

.feature-card:hover {
  transform: translateY(-5px);
  background: var(--bg-card-hover);
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow: var(--shadow-lg), 0 0 25px rgba(168, 85, 247, 0.18);
}
.feature-card:hover::before {
  opacity: 1;
}

.feature-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.15rem;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: var(--amethyst);
  transition: var(--ease-normal);
}

.feature-card:hover .feature-icon {
  transform: scale(1.08) rotate(4deg);
  background: var(--amethyst);
  color: #ffffff;
  box-shadow: 0 0 18px var(--amethyst-glow);
}

.feature-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.feature-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.6rem;
}

.feature-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Server Specs Box */
.server-specs-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 1.85rem 2.25rem;
  margin-bottom: 2rem;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.spec-name {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}
.spec-value {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  color: #ffffff;
}

/* ==========================================================================
   TAB 2: HOW TO JOIN (JAVA ONLY)
   ========================================================================== */
.join-hub-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  box-shadow: var(--shadow-lg);
}

.launcher-selector-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 2.25rem;
  flex-wrap: wrap;
}

.launcher-choice-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1.3rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: var(--ease-fast);
}

.launcher-choice-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.launcher-choice-btn.active {
  background: linear-gradient(135deg, var(--amethyst), var(--amethyst-dark));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 18px var(--amethyst-glow);
}

.launcher-flow-panel {
  display: none;
  animation: panelFade 0.3s ease;
}
.launcher-flow-panel.active {
  display: block;
}
@keyframes panelFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.flow-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.flow-step-card {
  background: rgba(14, 19, 29, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  position: relative;
  display: flex;
  flex-direction: column;
}

.flow-step-index {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.05);
}

.flow-step-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--emerald);
  font-size: 1.2rem;
  margin-bottom: 1.15rem;
}

.flow-step-title {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.45rem;
}

.flow-step-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.sleep-tip-card {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-top: 1.25rem;
}
.sleep-tip-card i {
  color: var(--amber);
  font-size: 1.35rem;
  margin-top: 0.15rem;
}
.sleep-tip-card h5 {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.2rem;
}
.sleep-tip-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ==========================================================================
   TAB 3: FABRIC MODS
   ========================================================================== */
.mods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.mod-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.65rem;
  backdrop-filter: blur(14px);
  transition: var(--ease-normal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.mod-item-card:hover {
  transform: translateY(-4px);
  border-color: rgba(6, 182, 212, 0.45);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.5), 0 0 20px rgba(6, 182, 212, 0.15);
}

.mod-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.mod-item-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
}

.mod-badge-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
  background: rgba(6, 182, 212, 0.15);
  color: var(--cyan);
  border: 1px solid rgba(6, 182, 212, 0.35);
}

.mod-item-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.mod-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.82rem;
}

/* ==========================================================================
   TAB 4: RULES
   ========================================================================== */
.rules-search-wrap {
  max-width: 500px;
  margin: 0 auto 2.25rem;
  position: relative;
}

.rules-search-field {
  width: 100%;
  padding: 0.85rem 1.25rem 0.85rem 3rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: var(--ease-fast);
}
.rules-search-field:focus {
  border-color: var(--amethyst);
  box-shadow: 0 0 20px var(--amethyst-glow);
}

.rules-search-icon {
  position: absolute;
  top: 50%;
  left: 1.25rem;
  transform: translateY(-50%);
  color: var(--text-dim);
}

.rules-accordion-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 820px;
  margin: 0 auto;
}

.rule-accordion-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--ease-normal);
}
.rule-accordion-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}
.rule-accordion-card.active {
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.rule-card-header {
  padding: 1.2rem 1.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  width: 100%;
  background: transparent;
  border: none;
  text-align: left;
}

.rule-card-title-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.rule-card-index {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--amethyst);
  background: rgba(168, 85, 247, 0.12);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
}

.rule-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  color: #ffffff;
}

.rule-card-chevron {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: transform var(--ease-normal);
}
.rule-accordion-card.active .rule-card-chevron {
  transform: rotate(180deg);
  color: var(--amethyst);
}

.rule-card-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--ease-normal) ease-out;
  padding: 0 1.6rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}
.rule-accordion-card.active .rule-card-content {
  padding-bottom: 1.4rem;
}

/* ==========================================================================
   TAB 5: COMMUNITY & STAFF
   ========================================================================== */
.staff-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.staff-member-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 1.85rem 1.4rem;
  text-align: center;
  backdrop-filter: blur(14px);
  transition: var(--ease-normal);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.staff-member-card:hover {
  transform: translateY(-5px);
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow: var(--shadow-lg), 0 0 25px rgba(168, 85, 247, 0.2);
}

.staff-avatar-ring {
  position: relative;
  width: 86px;
  height: 86px;
  margin-bottom: 1.15rem;
}

.staff-avatar-img {
  width: 86px;
  height: 86px;
  border-radius: var(--radius-md);
  image-rendering: pixelated;
  border: 2px solid var(--amethyst);
  box-shadow: 0 0 18px var(--amethyst-glow);
  background: #1a202c;
  object-fit: cover;
}

.staff-role-badge {
  position: absolute;
  bottom: -6px;
  right: -6px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--amethyst);
  color: #ffffff;
  text-transform: uppercase;
}
.staff-role-badge.owner { background: var(--amber); color: #451a03; }
.staff-role-badge.admin { background: #ef4444; color: #ffffff; }
.staff-role-badge.community { background: var(--emerald); color: #022c22; }
.staff-role-badge.builder { background: var(--cyan); color: #083344; }

.staff-member-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.2rem;
}

.staff-member-role {
  font-size: 0.82rem;
  color: var(--amethyst);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.staff-member-quote {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.5;
}

/* Gallery Grid */
.gallery-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.gallery-tile {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 260px;
  cursor: pointer;
  border: 1px solid var(--border-card);
  transition: var(--ease-normal);
}
.gallery-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.6), 0 0 25px rgba(168, 85, 247, 0.25);
}

.gallery-tile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-tile:hover .gallery-tile-img {
  transform: scale(1.06);
}

.gallery-tile-caption {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(8, 11, 18, 0.95) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.35rem;
}

.gallery-tile-title {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  color: #ffffff;
}

.gallery-tile-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Discord Banner */
.discord-portal-banner {
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.16) 0%, rgba(14, 19, 31, 0.85) 100%);
  border: 1px solid rgba(88, 101, 242, 0.35);
  border-radius: var(--radius-xl);
  padding: 3.25rem 2rem;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 40px rgba(88, 101, 242, 0.2);
  margin-bottom: 3rem;
}

.discord-portal-icon {
  font-size: 3.2rem;
  color: var(--discord);
  margin-bottom: 0.85rem;
  filter: drop-shadow(0 0 15px rgba(88, 101, 242, 0.5));
}

.discord-portal-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.65rem;
}

.discord-portal-desc {
  max-width: 580px;
  margin: 0 auto 1.85rem;
  color: #cbd5e1;
  font-size: 1rem;
}

/* FAQ Box */
.faq-wrap-box {
  max-width: 820px;
  margin: 0 auto 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Lightbox Modal */
.lightbox-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(20px);
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox-modal.active {
  display: flex;
}
.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  position: relative;
}
.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.85);
}
.lightbox-caption-text {
  text-align: center;
  margin-top: 1rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: #ffffff;
}
.lightbox-exit-btn {
  position: absolute;
  top: -45px;
  right: 0;
  font-size: 2rem;
  color: #ffffff;
  background: transparent;
  border: none;
  cursor: pointer;
}

/* Toast */
.toast-box {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  pointer-events: none;
}
.toast-card {
  background: rgba(14, 20, 32, 0.96);
  border: 1px solid var(--emerald);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 25px var(--emerald-glow);
  backdrop-filter: blur(16px);
  color: #ffffff;
  padding: 0.85rem 1.35rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  transform: translateY(30px);
  opacity: 0;
  transition: var(--ease-normal);
}
.toast-card.show {
  transform: translateY(0);
  opacity: 1;
}
.toast-card i {
  color: var(--emerald);
  font-size: 1.15rem;
}

/* Footer */
.portal-footer {
  background: #040609;
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0 2rem;
  position: relative;
  z-index: 2;
}

.footer-inner-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.25rem;
}

.footer-copy-sub {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 0.85rem 0 1.15rem;
  max-width: 320px;
}

.footer-col-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1.15rem;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-links-list a, .footer-links-list button {
  color: var(--text-muted);
  font-size: 0.88rem;
  text-decoration: none;
  background: transparent;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  transition: var(--ease-fast);
}

.footer-links-list a:hover, .footer-links-list button:hover {
  color: var(--emerald);
  transform: translateX(3px);
}

.footer-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.82rem;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 1rem;
}

.cloudflare-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  background: rgba(243, 128, 32, 0.1);
  color: #f38020;
  border: 1px solid rgba(243, 128, 32, 0.25);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
}

/* Responsive Design */
@media (max-width: 960px) {
  .master-nav-row {
    flex-wrap: wrap;
    justify-content: center;
  }
  .portal-tabs-cluster {
    order: 3;
    width: 100%;
    justify-content: center;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .portal-tabs-cluster::-webkit-scrollbar {
    display: none;
  }
  .footer-inner-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  .hero-hub-body {
    padding: 2.5rem 1rem;
  }
  .server-address-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 0.85rem;
  }
  .btn-copy-master {
    width: 100%;
    justify-content: center;
  }
  .portal-nav-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.78rem;
    gap: 0.35rem;
  }
  .hero-hub-actions {
    flex-direction: column;
    width: 100%;
  }
  .hero-hub-actions .btn {
    width: 100%;
  }
}
