/* ============================================
   StarField 星际信息社区 - Main Stylesheet
   ============================================ */

/* ── Reset & Base ── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; background: #050510; font-family: 'Noto Sans SC', sans-serif; color: #E0E6F0; overflow: hidden; display: flex; justify-content: center; align-items: center; }

/* ── Phone Frame ── */
.phone-frame {
  width: 390px; height: 844px; border-radius: 50px; border: 4px solid #2A2A3A;
  background: #0A0E1A; overflow: hidden; position: relative;
  box-shadow: 0 0 80px rgba(0,212,255,0.1), 0 0 200px rgba(74,26,138,0.1), inset 0 0 30px rgba(0,0,0,0.5);
}
.phone-notch {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 150px; height: 32px; background: #0A0E1A; border-radius: 0 0 20px 20px; z-index: 100;
}
.phone-screen { width: 100%; height: 100%; position: relative; overflow: hidden; }
.phone-home-bar {
  position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  width: 134px; height: 5px; background: rgba(255,255,255,0.3); border-radius: 3px; z-index: 100;
}

/* ── Star Canvas ── */
#starCanvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* ── Screens ── */
.screen, .app-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.screen { display: none; z-index: 10; }
.screen.active { display: flex; }

/* ============================================
   SPLASH SCREEN
   ============================================ */
#splash {
  background: radial-gradient(ellipse at 50% 30%, #0F1328 0%, #060810 50%, #020204 100%);
  flex-direction: column; align-items: center; justify-content: center;
}
.splash-content { text-align: center; z-index: 2; }
.splash-stars {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.8), transparent),
              radial-gradient(1px 1px at 40% 70%, rgba(255,255,255,0.5), transparent),
              radial-gradient(1px 1px at 60% 20%, rgba(255,255,255,0.7), transparent),
              radial-gradient(1px 1px at 80% 60%, rgba(255,255,255,0.6), transparent),
              radial-gradient(1.5px 1.5px at 10% 80%, rgba(100,180,255,0.8), transparent),
              radial-gradient(1.5px 1.5px at 70% 40%, rgba(180,100,255,0.7), transparent),
              radial-gradient(1px 1px at 50% 50%, rgba(255,255,255,0.4), transparent),
              radial-gradient(1px 1px at 90% 10%, rgba(255,255,255,0.6), transparent);
  animation: twinkle 4s ease-in-out infinite alternate;
}
@keyframes twinkle { 0% { opacity: 0.6; } 100% { opacity: 1; } }

/* Ship */
.splash-ship { margin-bottom: 40px; animation: shipFloat 3s ease-in-out infinite; }
@keyframes shipFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }
.ship-body { position: relative; width: 80px; height: 100px; margin: 0 auto; }
.ship-core {
  width: 30px; height: 60px; background: linear-gradient(180deg, #00D4FF, #0088AA);
  border-radius: 15px 15px 8px 8px; margin: 0 auto; position: relative; z-index: 2;
  box-shadow: 0 0 20px rgba(0,212,255,0.5);
}
.ship-wing {
  position: absolute; top: 25px; width: 25px; height: 35px;
  background: linear-gradient(180deg, #4A6ACA, #2A3A7A); z-index: 1;
}
.ship-wing.left { left: 0; border-radius: 10px 0 0 5px; transform: skewY(10deg); }
.ship-wing.right { right: 0; border-radius: 0 10px 5px 0; transform: skewY(-10deg); }
.ship-engine { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); display: flex; gap: 3px; }
.engine-flame {
  width: 6px; border-radius: 0 0 3px 3px;
  background: linear-gradient(180deg, #FFD700, #FF6B00, transparent);
  animation: flameFlicker 0.3s ease-in-out infinite alternate;
}
.engine-flame.f1 { height: 20px; animation-delay: 0s; }
.engine-flame.f2 { height: 28px; animation-delay: 0.1s; }
.engine-flame.f3 { height: 20px; animation-delay: 0.2s; }
@keyframes flameFlicker { 0% { height: 100%; opacity: 0.8; } 100% { height: 120%; opacity: 1; } }

/* Logo */
.splash-logo { margin-bottom: 50px; }
.logo-text {
  font-family: 'Orbitron', monospace; font-size: 36px; font-weight: 900;
  background: linear-gradient(135deg, #00D4FF, #FFD700, #FF3366);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  letter-spacing: 6px; animation: logoGlow 2s ease-in-out infinite alternate;
  text-shadow: none;
}
@keyframes logoGlow {
  0% { filter: drop-shadow(0 0 10px rgba(0,212,255,0.3)); }
  100% { filter: drop-shadow(0 0 25px rgba(0,212,255,0.6)); }
}
.logo-sub { font-size: 14px; letter-spacing: 12px; color: rgba(255,255,255,0.5); margin-top: 8px; }

/* Loading */
.splash-loading { width: 200px; margin: 0 auto; }
.loading-bar { width: 100%; height: 3px; background: rgba(255,255,255,0.1); border-radius: 2px; overflow: hidden; }
.loading-fill {
  width: 0%; height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, #00D4FF, #FFD700);
  animation: loadProgress 3s ease-in-out forwards;
}
@keyframes loadProgress { 0% { width: 0%; } 100% { width: 100%; } }
.loading-text { font-size: 12px; color: rgba(255,255,255,0.4); margin-top: 10px; }

/* ============================================
   APP CONTAINER
   ============================================ */
.app-container { background: #0A0E1A; }

/* ── Pages ── */
.page { display: none; position: absolute; top: 0; left: 0; width: 100%; height: calc(100% - 70px); overflow: hidden; }
.page.active { display: flex; flex-direction: column; }
.page-scroll { flex: 1; overflow-y: auto; padding: 0 16px; -webkit-overflow-scrolling: touch; }
.page-scroll::-webkit-scrollbar { display: none; }
.page-bottom-spacer { height: 20px; }

/* Page Header */
.page-header { padding: 50px 16px 12px; }
.page-header h2 { font-size: 22px; font-weight: 700; }

/* Section Header */
.section-header {
  display: flex; align-items: center; gap: 8px; padding: 16px 0 10px;
  font-size: 15px; font-weight: 600;
}
.section-icon { font-size: 18px; }
.section-badge {
  margin-left: auto; font-size: 11px; padding: 2px 8px;
  background: rgba(0,212,255,0.15); color: #00D4FF; border-radius: 10px;
}

/* ============================================
   COCKPIT PAGE
   ============================================ */
.status-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 48px 16px 10px; background: rgba(10,14,26,0.9);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.status-ship { display: flex; align-items: center; gap: 6px; }
.ship-icon { font-size: 18px; }
.ship-name { font-size: 15px; font-weight: 600; }
.ship-level {
  font-size: 11px; padding: 2px 6px; border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,215,0,0.2), rgba(255,165,0,0.2));
  color: #FFD700; font-weight: 600;
}
.status-resources { display: flex; gap: 12px; }
.resource { display: flex; align-items: center; gap: 4px; font-size: 13px; }
.res-val { font-weight: 600; }
.energy-icon { color: #00D4FF; }

/* Viewport */
.cockpit-viewport {
  height: 200px; margin: 12px 0; border-radius: 16px; overflow: hidden;
  position: relative; border: 1px solid rgba(0,212,255,0.15);
  background: radial-gradient(ellipse at 50% 50%, #0F1328 0%, #060810 100%);
}
#viewportCanvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.viewport-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 2; }
.viewport-planet {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.3), transparent);
  animation: planetPulse 3s ease-in-out infinite;
}
@keyframes planetPulse { 0%,100% { box-shadow: 0 0 15px var(--glow, rgba(0,212,255,0.4)); } 50% { box-shadow: 0 0 30px var(--glow, rgba(0,212,255,0.6)); } }
.vp1 { --glow: rgba(155,89,182,0.5); width: 28px; height: 28px; top: 40px; left: 60px; background: radial-gradient(circle at 35% 35%, #C084FC, #7C3AED); }
.vp2 { --glow: rgba(230,126,34,0.5); width: 20px; height: 20px; top: 80px; right: 80px; background: radial-gradient(circle at 35% 35%, #FB923C, #C2410C); }
.vp3 { --glow: rgba(46,204,113,0.5); width: 24px; height: 24px; bottom: 50px; left: 45%; background: radial-gradient(circle at 35% 35%, #4ADE80, #16A34A); }
.vp4 { --glow: rgba(0,212,255,0.5); width: 16px; height: 16px; top: 60px; right: 40px; background: radial-gradient(circle at 35% 35%, #22D3EE, #0891B2); }
.viewport-planet::after {
  content: attr(data-name); position: absolute; bottom: -18px; left: 50%;
  transform: translateX(-50%); font-size: 10px; white-space: nowrap;
  color: rgba(255,255,255,0.6);
}
.viewport-hud { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.hud-circle {
  position: absolute; top: 50%; left: 50%; width: 120px; height: 120px;
  border: 1px solid rgba(0,212,255,0.1); border-radius: 50%;
  transform: translate(-50%, -50%);
}
.hud-line {
  position: absolute; background: rgba(0,212,255,0.08);
}
.hud-line.h1 { top: 50%; left: 0; width: 100%; height: 1px; }
.hud-line.h2 { top: 0; left: 50%; width: 1px; height: 100%; }
.hud-text {
  position: absolute; bottom: 10px; right: 12px;
  font-size: 10px; color: rgba(0,212,255,0.4); font-family: 'Orbitron', monospace;
}

/* Scout Cards */
.scout-cards { display: flex; flex-direction: column; gap: 10px; }
.scout-card {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px; padding: 14px; cursor: pointer;
  transition: all 0.3s; backdrop-filter: blur(10px);
}
.scout-card:hover, .scout-card:active {
  background: rgba(255,255,255,0.08); border-color: rgba(0,212,255,0.2);
  transform: translateY(-1px);
}
.scout-planet-tag {
  display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px;
  background: rgba(var(--tag-color), 0.15); margin-bottom: 8px;
  border: 1px solid color-mix(in srgb, var(--tag-color) 30%, transparent);
}
.scout-planet-tag { background: rgba(155,89,182,0.15); border-color: rgba(155,89,182,0.3); }
.scout-card[data-planet="cs2"] .scout-planet-tag { background: rgba(230,126,34,0.15); border-color: rgba(230,126,34,0.3); }
.scout-card[data-planet="football"] .scout-planet-tag { background: rgba(46,204,113,0.15); border-color: rgba(46,204,113,0.3); }
.scout-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.scout-summary { font-size: 13px; color: rgba(255,255,255,0.6); line-height: 1.5; }
.scout-meta { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11px; color: rgba(255,255,255,0.35); }

/* Feed */
.feed-list { display: flex; flex-direction: column; gap: 2px; }
.feed-item {
  display: flex; gap: 12px; padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.feed-avatar { flex-shrink: 0; }
.avatar-ring {
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700;
  background: linear-gradient(135deg, var(--ring-color, #4A1A8A), color-mix(in srgb, var(--ring-color, #4A1A8A) 60%, #000));
  border: 2px solid color-mix(in srgb, var(--ring-color, #4A1A8A) 50%, transparent);
}
.feed-body { flex: 1; min-width: 0; }
.feed-user { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.feed-planet { font-weight: 400; color: rgba(255,255,255,0.4); font-size: 12px; }
.feed-text { font-size: 14px; line-height: 1.5; color: rgba(255,255,255,0.8); }
.feed-actions { display: flex; gap: 16px; margin-top: 8px; font-size: 12px; color: rgba(255,255,255,0.4); }

/* ============================================
   STAR MAP PAGE — Immersive Space UI
   ============================================ */
#page-starmap { overflow: hidden; background: #040810; }
#page-starmap.active { display: block; } /* override flex from .page.active */
#starmapCanvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; }

.starmap-level { display: none; position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 2; }
.starmap-level.active { display: block; }

/* HUD overlay */
.starmap-hud-top {
  position: absolute; top: 44px; left: 0; width: 100%; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 16px; pointer-events: none;
}
.hud-location {
  font-family: 'Orbitron', monospace; font-size: 12px; color: rgba(0,212,255,0.7);
  letter-spacing: 1px; pointer-events: none;
}
.hud-coords {
  font-family: 'Orbitron', monospace; font-size: 10px; color: rgba(255,255,255,0.2);
}
.hud-back {
  font-size: 14px; color: rgba(0,212,255,0.8); cursor: pointer; pointer-events: auto;
  padding: 6px 12px; border-radius: 8px; background: rgba(0,0,0,0.4);
  backdrop-filter: blur(10px); border: 1px solid rgba(0,212,255,0.15);
  transition: all 0.2s;
}
.hud-back:active { background: rgba(0,212,255,0.15); }

/* ── Level 1: Nebulae Space ── */
.nebulae-space {
  position: relative; width: 100%; height: 100%; overflow: hidden;
}
.nebula-connections {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0;
  pointer-events: none;
}

/* Nebula Blob */
.nebula-blob {
  position: absolute; width: 110px; text-align: center; cursor: pointer;
  z-index: 2; transform: translate(-50%, -50%);
  transition: transform 0.3s ease;
}
.nebula-blob:active { transform: translate(-50%, -50%) scale(1.1); }

/* The outer glow — big, soft, atmospheric */
.blob-glow {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, var(--nc) 0%, transparent 70%);
  opacity: 0.12; filter: blur(20px);
  animation: nebulaBreath 4s ease-in-out infinite;
}
@keyframes nebulaBreath {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.10; }
  50% { transform: translate(-50%, -50%) scale(1.25); opacity: 0.18; }
}

/* The core sphere */
.blob-core {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto;
  background: radial-gradient(circle at 30% 30%,
    rgba(255,255,255,0.35) 0%,
    var(--nc) 40%,
    rgba(0,0,0,0.3) 100%
  );
  box-shadow:
    0 0 20px var(--nc),
    0 0 60px var(--nc),
    inset 0 -8px 20px rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 2;
  animation: coreFloat 6s ease-in-out infinite;
  filter: saturate(1.2);
}
@keyframes coreFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.blob-icon { font-size: 26px; filter: drop-shadow(0 0 4px rgba(255,255,255,0.5)); }

/* Orbiting particles around nebula */
.blob-particles {
  position: absolute; top: 50%; left: 50%;
  width: 90px; height: 90px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px dashed rgba(255,255,255,0.08);
  animation: orbitSpin 20s linear infinite;
  z-index: 1;
}
.blob-particles::before, .blob-particles::after {
  content: ''; position: absolute; border-radius: 50%;
  background: var(--nc); box-shadow: 0 0 6px var(--nc);
}
.blob-particles::before { width: 4px; height: 4px; top: -2px; left: 50%; }
.blob-particles::after { width: 3px; height: 3px; bottom: -1px; left: 30%; }
@keyframes orbitSpin { 0% { transform: translate(-50%, -50%) rotate(0deg); } 100% { transform: translate(-50%, -50%) rotate(360deg); } }

.blob-label {
  margin-top: 8px; font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,0.85); text-shadow: 0 0 10px rgba(0,0,0,0.8);
  position: relative; z-index: 2;
}
.blob-sub {
  font-size: 10px; color: rgba(255,255,255,0.35);
  font-family: 'Orbitron', monospace; letter-spacing: 0.5px;
  position: relative; z-index: 2;
}
.blob-hot {
  position: absolute; top: 0; right: 10px; font-size: 14px;
  animation: hotPulse 1.5s ease-in-out infinite;
  z-index: 3;
}
@keyframes hotPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.3); } }

/* ── Level 2: Planets floating in space ── */
.nebula-ambient {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0;
  pointer-events: none; opacity: 0.5;
}
.planets-space {
  position: relative; width: 100%; height: 100%; z-index: 2;
  overflow: hidden;
}

/* Individual planet in space */
.space-planet {
  position: absolute; cursor: pointer; text-align: center;
  transform: translate(-50%, -50%);
  transition: transform 0.3s ease;
}
.space-planet:active { transform: translate(-50%, -50%) scale(1.15); }

.space-planet .planet-sphere {
  border-radius: 50%; margin: 0 auto; position: relative;
  background-size: 200% 100%;
  animation: planetRotate 12s linear infinite;
  box-shadow:
    inset -8px -4px 16px rgba(0,0,0,0.6),
    0 0 15px var(--pc, rgba(100,100,255,0.3));
}
@keyframes planetRotate { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }

/* Planet surface texture (pseudo gradient stripes) */
.space-planet .planet-sphere::after {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.25) 0%, transparent 50%);
}

/* Planet ring (for big planets) */
.space-planet .planet-ring {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotateX(75deg);
  border: 2px solid var(--pc, rgba(100,100,255,0.2));
  border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 8px var(--pc, rgba(100,100,255,0.1));
}

.space-planet .planet-name-tag {
  margin-top: 6px; font-size: 11px; font-weight: 500;
  color: rgba(255,255,255,0.75);
  text-shadow: 0 0 8px rgba(0,0,0,0.9);
}
.space-planet .planet-sub-count {
  font-size: 9px; color: rgba(255,255,255,0.4);
  margin-top: 2px;
}
}
.space-planet .planet-pop-tag {
  font-size: 9px; color: rgba(255,255,255,0.3);
  font-family: 'Orbitron', monospace;
}
.space-planet .planet-joined-marker {
  position: absolute; top: -4px; right: -4px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #2ECC71; border: 2px solid #0A0E1A;
  box-shadow: 0 0 6px rgba(46,204,113,0.5);
  font-size: 7px; display: flex; align-items: center; justify-content: center;
  color: white;
}

/* ── Planet Preview (bottom sheet, redesigned) ── */
.planet-preview {
  position: absolute; bottom: 70px; left: 0; width: 100%; z-index: 50;
  background: linear-gradient(180deg, rgba(10,14,26,0.95), rgba(15,20,40,0.98));
  border-radius: 20px 20px 0 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  padding: 16px 20px 20px;
  animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.preview-handle {
  width: 36px; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,0.15); margin: 0 auto 14px;
}
.preview-close {
  position: absolute; top: 14px; right: 16px; font-size: 16px; cursor: pointer;
  color: rgba(255,255,255,0.4); width: 28px; height: 28px; display: flex;
  align-items: center; justify-content: center; border-radius: 50%;
  background: rgba(255,255,255,0.05);
}
.preview-close:active { background: rgba(255,255,255,0.1); }
.preview-planet-visual {
  position: relative; width: 80px; height: 80px; margin: 0 auto 14px;
}
.preview-orbit-ring {
  position: absolute; top: 50%; left: 50%;
  width: 76px; height: 76px;
  transform: translate(-50%, -50%) rotateX(75deg);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%; animation: orbitSpin 8s linear infinite;
}
.preview-sphere {
  width: 52px; height: 52px; border-radius: 50%;
  margin: 14px auto 0;
  background-size: 200% 100%;
  animation: planetRotate 8s linear infinite;
  box-shadow: inset -6px -3px 12px rgba(0,0,0,0.5), 0 0 25px var(--sphere-glow, rgba(100,100,255,0.3));
}
.preview-sphere::after {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.3) 0%, transparent 50%);
}
.preview-glow-ring {
  position: absolute; top: 50%; left: 50%; width: 90px; height: 90px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--sphere-glow, rgba(100,100,255,0.15)) 0%, transparent 70%);
  pointer-events: none;
}

.preview-info { text-align: center; }
.preview-info h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.preview-stats {
  display: flex; justify-content: center; gap: 24px; margin-bottom: 10px;
}
.preview-stat-item { text-align: center; }
.stat-num { display: block; font-size: 18px; font-weight: 700; color: #FFD700; }
.stat-lbl { font-size: 10px; color: rgba(255,255,255,0.4); }
.preview-desc { font-size: 12px; color: rgba(255,255,255,0.45); margin-bottom: 16px; line-height: 1.4; }
.btn-land {
  width: 100%; padding: 14px; border: none; border-radius: 14px; font-size: 16px; font-weight: 700;
  background: linear-gradient(135deg, #00D4FF, #0088CC); color: white; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.2s; position: relative; overflow: hidden;
}
.btn-land::before {
  content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  animation: btnShimmer 2s ease-in-out infinite;
}
@keyframes btnShimmer { 0% { left: -100%; } 100% { left: 100%; } }
.btn-land:active { transform: scale(0.97); }
.land-icon { font-size: 20px; }

/* ── Warp Transition ── */
.warp-overlay {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 100; background: #040810;
  display: flex; align-items: center; justify-content: center;
}
.warp-streaks {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background:
    repeating-conic-gradient(
      from 0deg at 50% 50%,
      transparent 0deg, rgba(0,212,255,0.03) 1deg, transparent 2deg
    );
  animation: warpSpin 0.6s linear forwards;
}
@keyframes warpSpin {
  0% { transform: scale(1) rotate(0deg); opacity: 1; }
  100% { transform: scale(3) rotate(180deg); opacity: 0; }
}
.warp-text {
  font-family: 'Orbitron', monospace; font-size: 14px;
  color: rgba(0,212,255,0.8); z-index: 1;
  animation: warpTextFade 1s ease-in-out;
}
@keyframes warpTextFade { 0% { opacity: 0; } 30% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }

/* ============================================
   PLANET DETAIL PAGE
   ============================================ */
.planet-header { position: relative; }
.planet-back {
  position: absolute; top: 48px; left: 16px; z-index: 10; font-size: 14px;
  color: white; cursor: pointer; padding: 4px 10px; border-radius: 8px;
  background: rgba(0,0,0,0.4); backdrop-filter: blur(10px);
}
.planet-banner-area { width: 100%; height: 160px; position: relative; overflow: hidden; }
.planet-banner-bg {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #4A1A8A, #1A3A8A, #0D2B5C);
  background-size: 200% 200%; animation: bannerShift 8s ease-in-out infinite;
}
@keyframes bannerShift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.planet-info-overlay {
  position: absolute; bottom: 0; left: 0; width: 100%; padding: 16px;
  background: linear-gradient(transparent, rgba(10,14,26,0.95));
}
.planet-title-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.planet-title-row h2 { font-size: 20px; }
.btn-subscribe {
  padding: 6px 14px; border-radius: 20px; font-size: 12px; border: 1px solid rgba(0,212,255,0.4);
  background: transparent; color: #00D4FF; cursor: pointer; transition: all 0.2s;
}
.btn-subscribe.subscribed { background: rgba(0,212,255,0.15); }
.planet-stats-row { display: flex; gap: 14px; font-size: 12px; color: rgba(255,255,255,0.5); }

/* Planet Tabs */
.planet-tabs {
  display: flex; border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(10,14,26,0.95); position: sticky; top: 0; z-index: 5;
}
.planet-tab {
  flex: 1; text-align: center; padding: 12px 0; font-size: 13px;
  color: rgba(255,255,255,0.4); cursor: pointer; position: relative;
  transition: color 0.2s;
}
.planet-tab.active { color: #00D4FF; }
.planet-tab.active::after {
  content: ''; position: absolute; bottom: 0; left: 20%; width: 60%; height: 2px;
  background: #00D4FF; border-radius: 1px;
}
.planet-content { display: none; padding-top: 12px; }
.planet-content.active { display: block; }
.planet-content-scroll { padding: 0 16px; }

/* Posts */
.post-card {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05);
  border-radius: 14px; padding: 16px; margin-bottom: 10px;
}
.post-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.post-avatar {
  width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; background: linear-gradient(135deg, #9B59B6, #6C3483);
}
.post-user-info { flex: 1; }
.post-username { font-size: 14px; font-weight: 600; }
.user-badge { font-size: 11px; color: #FFD700; font-weight: 400; }
.user-badge.official { color: #00D4FF; }
.post-time { font-size: 11px; color: rgba(255,255,255,0.35); }
.post-body { margin-bottom: 12px; }
.post-body p { font-size: 14px; line-height: 1.6; color: rgba(255,255,255,0.85); margin-bottom: 6px; }
.post-image-placeholder {
  width: 100%; height: 120px; border-radius: 10px; margin-top: 8px;
  background: linear-gradient(135deg, rgba(0,212,255,0.1), rgba(155,89,182,0.1));
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: rgba(255,255,255,0.3);
  border: 1px dashed rgba(255,255,255,0.1);
}
.post-actions { display: flex; gap: 6px; }
.post-action {
  flex: 1; padding: 8px; border: none; border-radius: 8px; font-size: 13px;
  background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.5);
  cursor: pointer; transition: all 0.2s; text-align: center;
}
.post-action.liked { color: #FF3366; background: rgba(255,51,102,0.1); }
.post-action:active { background: rgba(255,255,255,0.1); }

/* Tavern */
.tavern-topic {
  padding: 16px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05);
  border-radius: 14px; margin-bottom: 10px; cursor: pointer; transition: all 0.2s;
}
.tavern-topic:active { background: rgba(255,255,255,0.06); }
.tavern-topic.hot { border-color: rgba(255,51,102,0.2); }
.topic-heat {
  display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 6px;
  background: rgba(255,51,102,0.15); color: #FF3366; margin-bottom: 8px;
}
.topic-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.topic-meta { display: flex; gap: 14px; font-size: 12px; color: rgba(255,255,255,0.4); }
.topic-preview { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.05); }
.topic-reply { font-size: 13px; color: rgba(255,255,255,0.6); }
.reply-user { color: #00D4FF; font-weight: 500; }

/* Arena */
.arena-event {
  padding: 16px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05);
  border-radius: 14px; margin-bottom: 12px;
}
.arena-event.live { border-color: rgba(255,51,102,0.3); }
.arena-live-badge {
  display: inline-block; font-size: 11px; padding: 3px 10px; border-radius: 8px;
  background: rgba(255,51,102,0.2); color: #FF3366; margin-bottom: 10px;
  animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse { 0%,100% { opacity: 1; } 50% { opacity: 0.6; } }
.arena-title { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.arena-odds { display: flex; flex-direction: column; gap: 8px; }
.odds-option { display: flex; align-items: center; gap: 10px; }
.odds-team { font-size: 13px; width: 50px; font-weight: 500; }
.odds-bar { flex: 1; height: 24px; background: rgba(255,255,255,0.06); border-radius: 6px; overflow: hidden; }
.odds-fill {
  height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; border-radius: 6px;
  background: linear-gradient(90deg, #00D4FF, #0099CC);
}
.odds-stardust { font-size: 11px; color: #FFD700; width: 60px; text-align: right; }
.arena-meta { font-size: 12px; color: rgba(255,255,255,0.4); margin-top: 10px; }
.arena-options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.arena-option {
  padding: 12px; text-align: center; border-radius: 10px; font-size: 14px; font-weight: 500;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer; transition: all 0.2s;
}
.arena-option span { display: block; font-size: 18px; font-weight: 700; color: #FFD700; margin-top: 4px; }
.arena-option:active { background: rgba(0,212,255,0.1); border-color: rgba(0,212,255,0.3); }

/* Intel */
.intel-card {
  padding: 16px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05);
  border-radius: 14px; margin-bottom: 10px; cursor: pointer; transition: all 0.2s;
}
.intel-card:active { background: rgba(255,255,255,0.06); }
.intel-badge {
  display: inline-block; font-size: 11px; padding: 3px 8px; border-radius: 6px;
  background: rgba(0,212,255,0.15); color: #00D4FF; margin-bottom: 8px;
}
.intel-title { font-size: 15px; font-weight: 600; margin-bottom: 8px; line-height: 1.4; }
.intel-author { display: flex; align-items: center; gap: 6px; font-size: 12px; color: rgba(255,255,255,0.4); margin-bottom: 8px; }
.intel-avatar { font-size: 16px; }
.intel-summary { font-size: 13px; color: rgba(255,255,255,0.5); line-height: 1.5; }

/* ============================================
   FLEET PAGE
   ============================================ */
.fleet-my-card {
  display: flex; align-items: center; gap: 16px; padding: 20px;
  background: linear-gradient(135deg, rgba(0,212,255,0.08), rgba(155,89,182,0.08));
  border: 1px solid rgba(0,212,255,0.15); border-radius: 18px; margin-top: 8px;
}
.fleet-emblem { position: relative; width: 60px; height: 60px; flex-shrink: 0; }
.emblem-ring {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  border: 2px solid rgba(0,212,255,0.4); border-radius: 50%;
  animation: emblemRotate 10s linear infinite;
}
@keyframes emblemRotate { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.emblem-icon { font-size: 28px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.fleet-my-info { flex: 1; }
.fleet-my-info h3 { font-size: 18px; margin-bottom: 4px; }
.fleet-my-info p { font-size: 12px; color: rgba(255,255,255,0.5); margin-bottom: 8px; }
.fleet-my-stats { display: flex; gap: 14px; font-size: 12px; color: rgba(255,255,255,0.6); }

/* Members */
.fleet-members { display: flex; flex-direction: column; gap: 2px; }
.member-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.member-avatar {
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; background: linear-gradient(135deg, #4A6ACA, #2A3A7A);
}
.member-avatar.admiral { background: linear-gradient(135deg, #FFD700, #CC8800); }
.member-info { flex: 1; }
.member-name { font-size: 14px; font-weight: 500; }
.member-rank {
  font-size: 10px; padding: 1px 6px; border-radius: 4px;
  background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.6); margin-left: 4px;
}
.member-rank.admiral { background: rgba(255,215,0,0.2); color: #FFD700; }
.member-contribution { font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 2px; }
.member-status { font-size: 11px; padding: 3px 8px; border-radius: 10px; }
.member-status.online { background: rgba(46,204,113,0.15); color: #2ECC71; }
.member-status.away { background: rgba(255,215,0,0.15); color: #FFD700; }
.member-status.offline { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.3); }

/* Expeditions */
.expedition-card {
  padding: 16px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px; margin-bottom: 10px;
}
.exp-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.exp-target { font-size: 14px; font-weight: 600; }
.exp-status {
  font-size: 11px; padding: 3px 10px; border-radius: 8px;
  background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.5);
}
.exp-status.active { background: rgba(46,204,113,0.15); color: #2ECC71; }
.exp-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.exp-bar { flex: 1; height: 8px; background: rgba(255,255,255,0.06); border-radius: 4px; overflow: hidden; }
.exp-fill {
  height: 100%; border-radius: 4px; transition: width 1s ease;
  background: linear-gradient(90deg, #00D4FF, #00FF88);
}
.exp-percent { font-size: 14px; font-weight: 700; color: #00D4FF; width: 40px; text-align: right; }
.exp-meta { display: flex; justify-content: space-between; font-size: 12px; color: rgba(255,255,255,0.4); }

/* Leaderboard */
.leaderboard { display: flex; flex-direction: column; gap: 4px; }
.lb-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: rgba(255,255,255,0.03); border-radius: 10px;
}
.lb-item.rank1 { background: rgba(255,215,0,0.08); border: 1px solid rgba(255,215,0,0.15); }
.lb-item.rank2 { background: rgba(192,192,192,0.06); border: 1px solid rgba(192,192,192,0.1); }
.lb-item.rank3 { background: rgba(205,127,50,0.06); border: 1px solid rgba(205,127,50,0.1); }
.lb-item.highlight { background: rgba(0,212,255,0.08); border: 1px solid rgba(0,212,255,0.15); }
.lb-rank { font-size: 16px; width: 30px; text-align: center; }
.lb-name { flex: 1; font-size: 14px; font-weight: 500; }
.lb-score { font-size: 13px; color: #FFD700; }

/* ============================================
   COMMS PAGE
   ============================================ */
.comms-tabs {
  display: flex; border-bottom: 1px solid rgba(255,255,255,0.06); margin-bottom: 12px;
}
.comms-tab {
  flex: 1; text-align: center; padding: 10px; font-size: 14px;
  color: rgba(255,255,255,0.4); cursor: pointer; position: relative;
}
.comms-tab.active { color: #00D4FF; }
.comms-tab.active::after {
  content: ''; position: absolute; bottom: 0; left: 20%; width: 60%; height: 2px;
  background: #00D4FF; border-radius: 1px;
}
.comms-content { display: none; }
.comms-content.active { display: block; }

/* Chat Items */
.chat-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04); cursor: pointer;
}
.chat-item:active { opacity: 0.7; }
.chat-item.unread { }
.chat-avatar {
  width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; background: linear-gradient(135deg, #9B59B6, #6C3483); flex-shrink: 0;
}
.chat-info { flex: 1; min-width: 0; }
.chat-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.chat-time { font-size: 11px; font-weight: 400; color: rgba(255,255,255,0.3); float: right; }
.chat-preview { font-size: 13px; color: rgba(255,255,255,0.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-badge {
  width: 20px; height: 20px; border-radius: 50%; font-size: 11px; font-weight: 700;
  background: #FF3366; color: white; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Fleet Chat */
.fleet-chat-room { display: flex; flex-direction: column; gap: 12px; padding-bottom: 12px; }
.chat-bubble {
  max-width: 80%; padding: 10px 14px; border-radius: 14px; position: relative;
}
.chat-bubble.other {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.05);
  align-self: flex-start; border-bottom-left-radius: 4px;
}
.chat-bubble.self {
  background: linear-gradient(135deg, rgba(0,212,255,0.15), rgba(0,136,204,0.15));
  border: 1px solid rgba(0,212,255,0.2);
  align-self: flex-end; border-bottom-right-radius: 4px;
}
.bubble-name { font-size: 11px; color: #00D4FF; font-weight: 500; display: block; margin-bottom: 4px; }
.chat-bubble p { font-size: 14px; line-height: 1.5; }
.bubble-time { font-size: 10px; color: rgba(255,255,255,0.3); display: block; margin-top: 4px; text-align: right; }
.chat-input-area {
  display: flex; gap: 8px; padding: 12px 0; border-top: 1px solid rgba(255,255,255,0.06);
}
.chat-input {
  flex: 1; padding: 10px 14px; border-radius: 20px; font-size: 14px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
  color: white; outline: none;
}
.chat-input::placeholder { color: rgba(255,255,255,0.3); }
.chat-input:focus { border-color: rgba(0,212,255,0.3); }
.chat-send {
  padding: 10px 18px; border-radius: 20px; font-size: 14px; font-weight: 600;
  background: linear-gradient(135deg, #00D4FF, #0088CC); color: white;
  border: none; cursor: pointer;
}

/* System Messages */
.sys-msg {
  display: flex; gap: 12px; padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.sys-icon { font-size: 24px; width: 40px; text-align: center; }
.sys-info { flex: 1; }
.sys-title { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.sys-desc { font-size: 13px; color: rgba(255,255,255,0.5); }
.sys-time { font-size: 11px; color: rgba(255,255,255,0.3); margin-top: 4px; }

/* ============================================
   PROFILE PAGE
   ============================================ */
.profile-header {
  padding: 40px 16px 0; text-align: center;
  background: linear-gradient(180deg, rgba(74,26,138,0.2), transparent);
}
.profile-ship-preview { height: 80px; position: relative; margin-bottom: 10px; }
.profile-ship { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); animation: shipFloat 3s ease-in-out infinite; }
.p-ship-body { position: relative; width: 60px; height: 40px; }
.p-ship-core {
  width: 20px; height: 35px; background: linear-gradient(180deg, #00D4FF, #0088AA);
  border-radius: 10px 10px 5px 5px; margin: 0 auto; position: relative; z-index: 2;
  box-shadow: 0 0 15px rgba(0,212,255,0.4);
}
.p-ship-wing {
  position: absolute; top: 12px; width: 18px; height: 22px;
  background: linear-gradient(180deg, #4A6ACA, #2A3A7A); z-index: 1;
}
.p-ship-wing.left { left: 2px; border-radius: 8px 0 0 3px; transform: skewY(10deg); }
.p-ship-wing.right { right: 2px; border-radius: 0 8px 3px 0; transform: skewY(-10deg); }
.ship-name-display { font-size: 11px; color: rgba(0,212,255,0.6); font-family: 'Orbitron', monospace; margin-top: 45px; }

.profile-avatar-area { margin-bottom: 16px; }
.profile-avatar {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; position: relative;
  background: linear-gradient(135deg, #FFD700, #FF8C00);
}
.profile-avatar-ring {
  position: absolute; top: -4px; left: -4px; width: calc(100% + 8px); height: calc(100% + 8px);
  border: 2px solid rgba(255,215,0,0.5); border-radius: 50%;
  animation: emblemRotate 8s linear infinite;
}
.profile-name { font-size: 20px; font-weight: 700; }
.profile-bio { font-size: 13px; color: rgba(255,255,255,0.5); margin-top: 4px; }

/* Stats Grid */
.profile-stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  padding: 0 16px; margin-bottom: 16px;
}
.profile-stat {
  text-align: center; padding: 12px 4px;
  background: rgba(255,255,255,0.03); border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
}
.stat-value { font-size: 16px; font-weight: 700; margin-bottom: 2px; }
.stat-value.gold { color: #FFD700; }
.stat-value.blue { color: #00D4FF; }
.stat-label { font-size: 11px; color: rgba(255,255,255,0.4); }

/* XP Bar */
.xp-section { padding: 0 16px; margin-bottom: 16px; }
.xp-label { display: flex; justify-content: space-between; font-size: 12px; color: rgba(255,255,255,0.4); margin-bottom: 6px; }
.xp-bar { height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; }
.xp-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, #FFD700, #FF8C00);
}

/* Profile Planets */
.profile-planets { display: flex; flex-direction: column; gap: 4px; }
.profile-planet-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.pp-icon {
  width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.pp-info { flex: 1; }
.pp-name { font-size: 14px; font-weight: 500; }
.pp-scout { font-size: 11px; color: rgba(0,212,255,0.6); }

/* Achievements */
.achievements-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.achievement {
  text-align: center; padding: 12px 4px; border-radius: 12px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05);
}
.achievement.unlocked { border-color: rgba(255,215,0,0.2); }
.achievement.locked { opacity: 0.35; }
.ach-icon { font-size: 24px; margin-bottom: 4px; }
.ach-name { font-size: 10px; color: rgba(255,255,255,0.6); }

/* Profile Menu */
.profile-menu { margin-top: 16px; }
.menu-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 14px; cursor: pointer;
}
.menu-arrow { color: rgba(255,255,255,0.3); }

/* ============================================
   TAB BAR
   ============================================ */
.tab-bar {
  position: absolute; bottom: 0; left: 0; width: 100%; height: 70px;
  display: flex; justify-content: space-around; align-items: flex-start; padding-top: 8px;
  background: rgba(10,14,26,0.95); border-top: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(20px); z-index: 20;
}
.tab-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer; position: relative; padding: 4px 12px;
  transition: all 0.2s;
}
.tab-icon { font-size: 22px; transition: transform 0.2s; }
.tab-label { font-size: 10px; color: rgba(255,255,255,0.4); transition: color 0.2s; }
.tab-item.active .tab-label { color: #00D4FF; }
.tab-item.active .tab-icon { transform: scale(1.15); }
.tab-badge {
  position: absolute; top: 0; right: 2px; width: 16px; height: 16px; border-radius: 50%;
  font-size: 9px; font-weight: 700; background: #FF3366; color: white;
  display: flex; align-items: center; justify-content: center;
}

/* ============================================
   LANDING ANIMATION OVERLAY
   ============================================ */
.landing-overlay {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  width: 390px; height: 844px; z-index: 200;
  background: #0A0E1A; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  animation: landingFade 1.8s ease-in-out forwards;
}
@keyframes landingFade {
  0% { opacity: 1; }
  60% { opacity: 1; }
  100% { opacity: 0; pointer-events: none; }
}
.landing-overlay .landing-lines {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent, transparent 48%,
    rgba(0,212,255,0.05) 48%, rgba(0,212,255,0.05) 50%,
    transparent 50%, transparent 100%
  );
  animation: warpSpeed 0.8s ease-in forwards;
}
@keyframes warpSpeed {
  0% { transform: scaleY(1); }
  100% { transform: scaleY(30); opacity: 0; }
}
.landing-text {
  font-family: 'Orbitron', monospace; font-size: 14px; color: rgba(0,212,255,0.8);
  z-index: 1; animation: landTextFade 1.8s ease-in-out;
}
@keyframes landTextFade { 0% { opacity: 0; } 30% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }

/* ============================================
   AUTH SCREEN
   ============================================ */
#auth {
  background: radial-gradient(ellipse at 50% 30%, #0F1328 0%, #060810 50%, #020204 100%);
  flex-direction: column; align-items: center; justify-content: center;
}
.auth-bg {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.8), transparent),
              radial-gradient(1px 1px at 60% 70%, rgba(255,255,255,0.5), transparent),
              radial-gradient(1.5px 1.5px at 80% 20%, rgba(100,180,255,0.7), transparent);
  animation: twinkle 4s ease-in-out infinite alternate;
}
.auth-container {
  position: relative; z-index: 2; width: 320px;
}
.auth-form {
  display: none;
}
.auth-form.active {
  display: block;
}
.auth-logo {
  text-align: center; margin-bottom: 40px;
}
.auth-fields {
  display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px;
}
.auth-field input {
  width: 100%; padding: 14px 16px; border-radius: 12px; font-size: 14px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  color: white; outline: none; transition: all 0.2s;
}
.auth-field input::placeholder {
  color: rgba(255,255,255,0.3);
}
.auth-field input:focus {
  border-color: rgba(0,212,255,0.5); background: rgba(255,255,255,0.12);
}
.auth-btn {
  width: 100%; padding: 14px; border-radius: 12px; font-size: 15px; font-weight: 600;
  border: none; cursor: pointer; transition: all 0.2s; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.auth-btn.primary {
  background: linear-gradient(135deg, #00D4FF, #0088CC); color: white;
}
.auth-btn.primary:active {
  transform: scale(0.98);
}
.auth-btn:disabled {
  opacity: 0.5; cursor: not-allowed;
}
.auth-btn-loader {
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white; border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.auth-switch {
  text-align: center; margin-top: 20px; font-size: 13px; color: rgba(255,255,255,0.5);
}
.auth-switch span {
  color: #00D4FF; cursor: pointer; text-decoration: underline;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  padding: 12px 20px; border-radius: 10px; font-size: 13px;
  background: rgba(10,14,26,0.95); border: 1px solid rgba(255,255,255,0.1);
  color: white; z-index: 1000; max-width: 320px;
  backdrop-filter: blur(10px);
  animation: toastSlide 0.3s ease-out;
}
@keyframes toastSlide {
  from { transform: translate(-50%, 20px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}
.toast.error {
  border-color: rgba(255,51,102,0.3); background: rgba(255,51,102,0.15);
}
.toast.success {
  border-color: rgba(46,204,113,0.3); background: rgba(46,204,113,0.15);
}

/* ============================================
   GLOBAL LOADING OVERLAY
   ============================================ */
.global-loading {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.7); z-index: 9999;
  display: flex; align-items: center; justify-content: center;
}
.loading-spinner {
  width: 40px; height: 40px; border: 3px solid rgba(255,255,255,0.2);
  border-top-color: #00D4FF; border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ============================================
   EMPTY STATES
   ============================================ */
.empty-state {
  text-align: center; padding: 60px 20px; color: rgba(255,255,255,0.4);
}
.empty-state-icon {
  font-size: 48px; margin-bottom: 16px; opacity: 0.3;
}
.empty-state-text {
  font-size: 14px; line-height: 1.6;
}

/* ============================================
   AUTH SCREEN (auth-screen)
   ============================================ */
#auth-screen {
  background: radial-gradient(ellipse at 50% 30%, #0F1328 0%, #060810 50%, #020204 100%);
  flex-direction: column; align-items: center; justify-content: center;
  z-index: 10;
}
#authStarCanvas {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0;
}
.auth-view {
  display: none; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 2; align-items: center; justify-content: center;
}
.auth-view.active {
  display: flex;
}
.auth-content {
  width: 320px; padding: 0 16px; position: relative; z-index: 3;
}
.auth-logo {
  text-align: center; margin-bottom: 36px;
}
.auth-logo-text {
  font-family: 'Orbitron', monospace; font-size: 32px; font-weight: 900;
  background: linear-gradient(135deg, #00D4FF, #FFD700, #FF3366);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  letter-spacing: 5px;
}
.auth-logo-sub {
  font-size: 13px; color: rgba(255,255,255,0.5); margin-top: 8px; letter-spacing: 2px;
}
.auth-form {
  display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px;
}
.auth-input-group {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px; padding: 0 14px; transition: all 0.2s;
}
.auth-input-group:focus-within {
  border-color: rgba(0,212,255,0.5); background: rgba(255,255,255,0.1);
}
.auth-input-icon {
  font-size: 16px; flex-shrink: 0;
}
.auth-input {
  width: 100%; padding: 14px 0; font-size: 14px;
  background: transparent; border: none; color: white; outline: none;
}
.auth-input::placeholder {
  color: rgba(255,255,255,0.3);
}
.auth-btn {
  width: 100%; padding: 14px; border-radius: 12px; font-size: 15px; font-weight: 600;
  border: none; cursor: pointer; transition: all 0.2s; position: relative;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.auth-btn.primary {
  background: linear-gradient(135deg, #00D4FF, #0088CC); color: white;
}
.auth-btn.primary:active { transform: scale(0.97); }
.auth-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.auth-btn-loading {
  display: inline-flex; align-items: center;
}
.spinner {
  width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white; border-radius: 50%;
  animation: authSpin 0.6s linear infinite; display: inline-block;
}
@keyframes authSpin { to { transform: rotate(360deg); } }
.auth-footer {
  text-align: center; font-size: 13px; color: rgba(255,255,255,0.45);
}
.auth-link {
  color: #00D4FF; cursor: pointer; text-decoration: none; margin-left: 4px;
}
.auth-link:hover { text-decoration: underline; }

/* Onboarding */
.onboarding-content { width: 350px; }
.onboarding-header { text-align: center; margin-bottom: 20px; }
.onboarding-header h2 { font-size: 18px; margin-bottom: 6px; }
.onboarding-header p { font-size: 13px; color: rgba(255,255,255,0.5); }
.onboarding-planets {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  max-height: 400px; overflow-y: auto; margin-bottom: 20px;
}
.onboarding-planet-card {
  padding: 14px 10px; border-radius: 12px; text-align: center; cursor: pointer;
  background: rgba(255,255,255,0.04); border: 2px solid rgba(255,255,255,0.08);
  transition: all 0.2s;
}
.onboarding-planet-card.selected {
  border-color: #00D4FF; background: rgba(0,212,255,0.1);
}
.onboarding-planet-icon { font-size: 28px; margin-bottom: 6px; }
.onboarding-planet-name { font-size: 13px; font-weight: 500; }
.onboarding-actions { text-align: center; }
.onboarding-actions .auth-link { display: block; margin-top: 14px; font-size: 13px; }

/* ============================================
   TOAST SYSTEM
   ============================================ */
.toast-container {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column; gap: 8px;
  align-items: center; pointer-events: none;
}
.toast-item {
  padding: 12px 20px; border-radius: 10px; font-size: 13px; max-width: 320px;
  background: rgba(10,14,26,0.95); color: white;
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  animation: toastIn 0.3s ease-out;
  pointer-events: auto;
}
.toast-item.error { border-color: rgba(255,51,102,0.4); background: rgba(255,51,102,0.2); }
.toast-item.success { border-color: rgba(46,204,113,0.4); background: rgba(46,204,113,0.2); }
.toast-item.fade-out { animation: toastOut 0.3s ease-in forwards; }
@keyframes toastIn { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@keyframes toastOut { from { opacity:1; } to { opacity:0; transform:translateY(-10px); } }

/* ============================================
   EMPTY STATES
   ============================================ */
.empty-state {
  text-align: center; padding: 40px 20px; color: rgba(255,255,255,0.35);
}
.empty-state-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.4; }
.empty-state-text { font-size: 13px; line-height: 1.8; }

/* ============================================
   FAB (Floating Action Button)
   ============================================ */
.fab-create-post {
  position: absolute; bottom: 86px; right: 20px; z-index: 15;
  width: 54px; height: 54px; border-radius: 50%;
  background: linear-gradient(135deg, #00D4FF, #0088CC);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,212,255,0.4), 0 0 40px rgba(0,212,255,0.15);
  transition: all 0.2s; border: none;
  animation: fabPulse 3s ease-in-out infinite;
}
.fab-create-post:active { transform: scale(0.92); }
@keyframes fabPulse {
  0%,100% { box-shadow: 0 4px 20px rgba(0,212,255,0.4); }
  50% { box-shadow: 0 4px 30px rgba(0,212,255,0.6), 0 0 50px rgba(0,212,255,0.2); }
}

/* ============================================
   MODAL OVERLAY & SHEETS
   ============================================ */
.modal-overlay {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6); z-index: 60;
  display: flex; align-items: flex-end; justify-content: center;
  backdrop-filter: blur(4px);
  animation: modalFadeIn 0.2s ease-out;
}
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-sheet {
  width: 100%; max-height: 85%;
  background: linear-gradient(180deg, rgba(15,20,35,0.98), rgba(10,14,26,0.99));
  border-radius: 20px 20px 0 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  padding: 12px 20px 20px;
  animation: sheetSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex; flex-direction: column;
}
.modal-sheet-tall { max-height: 70%; }
@keyframes sheetSlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.modal-handle {
  width: 36px; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,0.15); margin: 0 auto 12px;
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.modal-header h3 { font-size: 17px; font-weight: 700; }
.modal-close {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.05); display: flex;
  align-items: center; justify-content: center;
  font-size: 14px; color: rgba(255,255,255,0.4); cursor: pointer;
}
.modal-close:active { background: rgba(255,255,255,0.1); }

.modal-body { margin-bottom: 16px; }
.modal-input-group { margin-bottom: 12px; }
.modal-input {
  width: 100%; padding: 12px 14px; border-radius: 12px; font-size: 14px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: white; outline: none; transition: border-color 0.2s;
}
.modal-input:focus { border-color: rgba(0,212,255,0.4); }
.modal-input::placeholder { color: rgba(255,255,255,0.3); }
.modal-textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; font-size: 14px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: white; outline: none; resize: none; font-family: inherit;
  transition: border-color 0.2s; line-height: 1.6;
}
.modal-textarea:focus { border-color: rgba(0,212,255,0.4); }
.modal-textarea::placeholder { color: rgba(255,255,255,0.3); }

.modal-footer { }
.modal-btn {
  width: 100%; padding: 14px; border-radius: 12px; font-size: 15px; font-weight: 600;
  border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  gap: 8px; transition: all 0.2s;
}
.modal-btn.primary {
  background: linear-gradient(135deg, #00D4FF, #0088CC); color: white;
}
.modal-btn.primary:active { transform: scale(0.97); }
.modal-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============================================
   COMMENT ITEMS IN MODAL
   ============================================ */
.comment-item {
  display: flex; gap: 10px; padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.comment-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  background: linear-gradient(135deg, #9B59B6, #6C3483);
}
.comment-body { flex: 1; min-width: 0; }
.comment-user { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.comment-text { font-size: 13px; color: rgba(255,255,255,0.8); line-height: 1.5; }
.comment-meta { font-size: 11px; color: rgba(255,255,255,0.3); margin-top: 4px; }
.comment-input-area {
  display: flex; gap: 8px; padding: 12px 0 0; border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

/* ============================================
   LIKED / BOOKMARKED POST ACTIONS
   ============================================ */
.post-action.bookmarked { color: #FFD700; background: rgba(255,215,0,0.1); }

/* ============================================
   FLEET - NO FLEET STATE
   ============================================ */
.fleet-no-fleet {
  text-align: center; padding: 40px 20px;
}
.fleet-no-fleet-icon { font-size: 64px; margin-bottom: 16px; opacity: 0.4; }
.fleet-no-fleet-text { font-size: 14px; color: rgba(255,255,255,0.5); margin-bottom: 20px; line-height: 1.6; }
.btn-create-fleet {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 14px; font-size: 15px; font-weight: 600;
  background: linear-gradient(135deg, #00D4FF, #0088CC); color: white;
  border: none; cursor: pointer; transition: all 0.2s;
}
.btn-create-fleet:active { transform: scale(0.97); }

/* ============================================
   CHAT ROOM OVERLAY (DM Detail)
   ============================================ */
.chat-room-overlay {
  position: absolute; top: 0; left: 0; width: 100%; height: calc(100% - 70px);
  background: #0A0E1A; z-index: 25;
  display: flex; flex-direction: column;
  animation: slideInRight 0.25s ease-out;
}
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }

.chat-room-header {
  display: flex; align-items: center; gap: 12px;
  padding: 48px 16px 12px;
  background: rgba(10,14,26,0.95);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.chat-room-back {
  font-size: 14px; color: rgba(0,212,255,0.8); cursor: pointer;
  padding: 6px 12px; border-radius: 8px;
  background: rgba(0,0,0,0.3);
}
.chat-room-back:active { background: rgba(0,212,255,0.1); }
.chat-room-title { font-size: 16px; font-weight: 600; }

.chat-room-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  -webkit-overflow-scrolling: touch;
}
.chat-room-messages::-webkit-scrollbar { display: none; }

.chat-room-overlay .chat-input-area {
  padding: 12px 16px; border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(10,14,26,0.95);
}

/* ============================================
   MODALS
   ============================================ */
.modal {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 500; display: flex; align-items: center; justify-content: center;
}
.modal-backdrop {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
}
.modal-content {
  position: relative; z-index: 1; width: 350px; max-height: 80vh;
  background: #0F1328; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px; overflow: hidden; display: flex; flex-direction: column;
}
.modal.bottom-sheet { align-items: flex-end; justify-content: flex-end; }
.modal.bottom-sheet .sheet-content {
  width: 100%; max-width: 390px; border-radius: 18px 18px 0 0;
  max-height: 70vh; display: flex; flex-direction: column;
}
.sheet-handle {
  width: 36px; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,0.15); margin: 0 auto 8px;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.modal-header h3 { font-size: 16px; flex: 1; text-align: center; }
.modal-close {
  font-size: 16px; cursor: pointer; color: rgba(255,255,255,0.4);
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(255,255,255,0.05);
}
.modal-close:active { background: rgba(255,255,255,0.1); }
.modal-action-btn {
  padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
  background: linear-gradient(135deg, #00D4FF, #0088CC); color: white;
  border: none; cursor: pointer;
}
.modal-action-btn:disabled { opacity: 0.4; }
.modal-body { padding: 16px; flex: 1; overflow-y: auto; }
.modal-input {
  width: 100%; padding: 12px 14px; border-radius: 10px; font-size: 14px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: white; outline: none; margin-bottom: 10px;
}
.modal-input:focus { border-color: rgba(0,212,255,0.4); }
.modal-input::placeholder { color: rgba(255,255,255,0.3); }
.modal-textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; font-size: 14px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: white; outline: none; resize: none; font-family: inherit;
}
.modal-textarea:focus { border-color: rgba(0,212,255,0.4); }
.modal-textarea::placeholder { color: rgba(255,255,255,0.3); }
.comment-input-area {
  display: flex; gap: 8px; padding: 10px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.comment-input-area .modal-input { margin-bottom: 0; flex: 1; }

/* Comment item */
.comment-item {
  display: flex; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.comment-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #4A6ACA, #2A3A7A);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; flex-shrink: 0;
}
.comment-body { flex: 1; }
.comment-user { font-size: 12px; font-weight: 600; margin-bottom: 2px; }
.comment-text { font-size: 13px; color: rgba(255,255,255,0.75); line-height: 1.5; }
.comment-time { font-size: 11px; color: rgba(255,255,255,0.3); margin-top: 3px; }

/* FAB Button */
.fab-post {
  position: absolute; bottom: 80px; right: 16px; z-index: 15;
  width: 50px; height: 50px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, #00D4FF, #0088CC);
  box-shadow: 0 4px 20px rgba(0,212,255,0.4);
  font-size: 22px; display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s;
}
.fab-post:active { transform: scale(0.9); }

/* Fleet create card */
.fleet-create-card {
  text-align: center; padding: 30px 20px;
  background: rgba(255,255,255,0.03); border: 2px dashed rgba(255,255,255,0.1);
  border-radius: 18px; margin-top: 8px; cursor: pointer; transition: all 0.2s;
}
.fleet-create-card:active { background: rgba(0,212,255,0.05); border-color: rgba(0,212,255,0.2); }
.fleet-create-icon { font-size: 36px; margin-bottom: 10px; }
.fleet-create-text { font-size: 14px; color: rgba(255,255,255,0.5); }

/* Comment enhancements */
.comment-meta {
  display: flex; gap: 12px; align-items: center; margin-top: 4px;
}
.comment-time { font-size: 11px; color: rgba(255,255,255,0.3); }
.comment-reply-btn {
  font-size: 11px; color: rgba(0,212,255,0.6); cursor: pointer;
}
.comment-reply-btn:active { color: #00D4FF; }
.comment-like-btn {
  font-size: 11px; cursor: pointer; color: rgba(255,255,255,0.4);
}
.comment-like-btn.liked { color: #FF6B9D; }
.comment-level {
  font-size: 10px; color: rgba(0,212,255,0.6); margin-left: 4px;
}

/* Replies */
.comment-replies {
  margin-top: 8px; padding: 8px 10px;
  background: rgba(255,255,255,0.03); border-radius: 8px;
}
.reply-item {
  font-size: 12px; line-height: 1.8; color: rgba(255,255,255,0.7);
  padding: 2px 0;
}
.reply-user { font-weight: 600; color: rgba(0,212,255,0.8); }
.reply-arrow { margin: 0 3px; color: rgba(255,255,255,0.3); font-size: 10px; }
.reply-target { font-weight: 600; color: rgba(255,169,190,0.8); }
.reply-text { margin-left: 4px; }
.reply-time { font-size: 10px; color: rgba(255,255,255,0.25); margin-left: 6px; }

/* ============================================
   SCOUT POST (AI 情报帖) — 视觉区分
   ============================================ */
.scout-post {
  border: 1px solid rgba(0,212,255,0.15) !important;
  background: linear-gradient(135deg, rgba(0,212,255,0.04), rgba(100,50,255,0.04)) !important;
  position: relative;
  overflow: hidden;
}
.scout-post::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0,212,255,0.6), rgba(100,50,255,0.6), transparent);
}
.scout-badge {
  font-size: 10px; color: rgba(0,212,255,0.7); letter-spacing: 0.5px;
  padding: 6px 14px 2px; font-weight: 500;
  display: flex; align-items: center; gap: 4px;
}
.scout-avatar {
  background: linear-gradient(135deg, #00D4FF, #6432FF) !important;
}
.scout-avatar span { font-size: 16px; }

/* ============================================
   COSMIC / SPACE ELEMENTS
   ============================================ */

/* Animated star twinkle on cockpit */
.cockpit-planet-section {
  position: relative;
  margin-bottom: 16px;
}
.cockpit-planet-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; cursor: pointer;
  background: linear-gradient(90deg, rgba(0,212,255,0.06), transparent);
  border-left: 3px solid rgba(0,212,255,0.3);
  border-radius: 0 10px 10px 0;
  margin-bottom: 8px;
}
.cockpit-planet-name {
  font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.85);
}
.cockpit-planet-more {
  font-size: 11px; color: rgba(0,212,255,0.5);
}
.cockpit-planet-header:active {
  background: linear-gradient(90deg, rgba(0,212,255,0.12), transparent);
}

/* Section header space feel */
.section-header {
  position: relative;
  padding-left: 4px;
}
.section-header::after {
  content: '✦'; position: absolute; right: 8px; top: 50%;
  transform: translateY(-50%); font-size: 8px;
  color: rgba(255,255,255,0.1);
  animation: twinkle 3s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.1; }
  50% { opacity: 0.5; }
}

/* Cosmic divider */
.post-card + .post-card::before {
  content: ''; display: block; height: 1px; margin: 0 20px;
  background: linear-gradient(90deg, transparent, rgba(100,140,255,0.1), transparent);
}

/* Planet page cosmic banner */
.planet-banner-bg {
  background: linear-gradient(180deg,
    rgba(10,10,40,0.9) 0%,
    rgba(20,20,60,0.7) 50%,
    rgba(15,19,40,0.95) 100%
  ) !important;
  position: relative;
}
.planet-banner-bg::after {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 40% 70%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 60% 40%, rgba(255,255,255,0.2), transparent),
    radial-gradient(1px 1px at 80% 10%, rgba(255,255,255,0.3), transparent),
    radial-gradient(2px 2px at 10% 60%, rgba(0,212,255,0.3), transparent),
    radial-gradient(1px 1px at 90% 80%, rgba(255,255,255,0.2), transparent);
  pointer-events: none;
}

/* Nebula blob cosmic glow enhancement */
.nebula-blob::after {
  content: ''; position: absolute; width: 120%; height: 120%;
  top: -10%; left: -10%; border-radius: 50%;
  background: radial-gradient(circle, var(--nc, rgba(100,100,255,0.1)) 0%, transparent 70%);
  opacity: 0.15; pointer-events: none;
  animation: nebulaPulse 4s ease-in-out infinite;
}
@keyframes nebulaPulse {
  0%, 100% { transform: scale(1); opacity: 0.15; }
  50% { transform: scale(1.1); opacity: 0.25; }
}

/* Profile cosmic header */
.profile-header {
  position: relative;
  overflow: hidden;
}
.profile-header::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(0,212,255,0.08), transparent 60%),
    radial-gradient(ellipse at 80% 30%, rgba(100,50,255,0.06), transparent 60%);
  pointer-events: none;
}

/* Fleet card cosmic border */
.fleet-my-card {
  position: relative;
}
.fleet-my-card::before {
  content: ''; position: absolute; top: -1px; left: -1px; right: -1px; bottom: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(0,212,255,0.2), rgba(100,50,255,0.2), rgba(255,100,200,0.1));
  z-index: -1;
  animation: borderGlow 6s linear infinite;
}
@keyframes borderGlow {
  0% { opacity: 0.3; }
  50% { opacity: 0.6; }
  100% { opacity: 0.3; }
}

/* Toast cosmic style */
.toast {
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.05);
}

/* Tab bar space glass */
.tab-bar {
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,0.04);
  background: rgba(10,10,30,0.85) !important;
}

/* Modal cosmic backdrop */
.modal-overlay {
  backdrop-filter: blur(6px);
}
.modal-sheet {
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.5), 0 0 80px rgba(0,50,100,0.1);
}

/* Empty state cosmic */
.empty-state-icon {
  animation: float 4s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Intel card cosmic */
.intel-card {
  background: linear-gradient(135deg, rgba(0,212,255,0.04), rgba(100,50,255,0.03));
  border: 1px solid rgba(0,212,255,0.1);
  border-radius: 14px; padding: 14px; margin-bottom: 10px;
  position: relative; overflow: hidden;
}
.intel-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0,212,255,0.4), transparent);
}
.intel-badge {
  font-size: 10px; color: rgba(0,212,255,0.7);
  background: rgba(0,212,255,0.08); display: inline-block;
  padding: 2px 8px; border-radius: 6px; margin-bottom: 6px;
}
.intel-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.intel-summary { font-size: 13px; color: rgba(255,255,255,0.6); line-height: 1.6; }
.intel-author { font-size: 11px; color: rgba(255,255,255,0.3); margin-top: 8px; }

/* Shooting star on starmap */
@keyframes shootingStar {
  0% { transform: translateX(-100px) translateY(-100px); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translateX(400px) translateY(400px); opacity: 0; }
}

/* Intel page redesign */
.intel-header-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; margin-bottom: 8px;
  background: linear-gradient(90deg, rgba(0,212,255,0.08), rgba(100,50,255,0.05), transparent);
  border-radius: 12px;
}
.intel-header-icon { font-size: 18px; }
.intel-header-text { font-size: 15px; font-weight: 700; flex: 1; }
.intel-header-date { font-size: 11px; color: rgba(255,255,255,0.35); }

.intel-card {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px; margin-bottom: 8px;
  background: linear-gradient(135deg, rgba(0,212,255,0.03), rgba(100,50,255,0.02));
  border: 1px solid rgba(0,212,255,0.08);
  border-radius: 14px; cursor: pointer;
  transition: all 0.2s;
  position: relative; overflow: hidden;
}
.intel-card:active {
  background: linear-gradient(135deg, rgba(0,212,255,0.08), rgba(100,50,255,0.05));
}
.intel-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%;
  background: linear-gradient(180deg, rgba(0,212,255,0.6), rgba(100,50,255,0.3));
  border-radius: 3px 0 0 3px;
}
.intel-rank {
  font-size: 20px; font-weight: 900; font-family: 'Orbitron', monospace;
  color: rgba(0,212,255,0.25); min-width: 32px; text-align: center;
  line-height: 1.2; padding-top: 2px;
}
.intel-content { flex: 1; min-width: 0; }
.intel-title {
  font-size: 14px; font-weight: 600; margin-bottom: 6px;
  line-height: 1.4; color: rgba(255,255,255,0.9);
}
.intel-summary {
  font-size: 12px; color: rgba(255,255,255,0.5);
  line-height: 1.6; margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.intel-footer {
  display: flex; justify-content: space-between; align-items: center;
}
.intel-time { font-size: 10px; color: rgba(0,212,255,0.4); }
.intel-engage { font-size: 10px; color: rgba(255,255,255,0.3); }

/* Cockpit intel redesign */
.cockpit-intel-header {
  display: flex; align-items: center; gap: 8px;
  padding: 14px; margin-bottom: 4px;
  background: linear-gradient(90deg, rgba(0,212,255,0.06), transparent);
  border-radius: 14px;
}
.cockpit-intel-icon { font-size: 20px; }
.cockpit-intel-title { font-size: 16px; font-weight: 700; flex: 1; }
.cockpit-intel-date { font-size: 11px; color: rgba(255,255,255,0.3); }

.cockpit-intel-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 12px; margin-bottom: 4px;
  background: rgba(255,255,255,0.02);
  border-radius: 12px; cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
}
.cockpit-intel-item:active {
  border-color: rgba(0,212,255,0.15);
  background: rgba(0,212,255,0.04);
}
.cockpit-intel-rank {
  font-size: 22px; font-weight: 900; font-family: 'Orbitron', monospace;
  color: rgba(0,212,255,0.2); min-width: 32px; text-align: center;
}
.cockpit-intel-body { flex: 1; min-width: 0; }
.cockpit-intel-item-title {
  font-size: 14px; font-weight: 600; margin-bottom: 4px;
  line-height: 1.4; color: rgba(255,255,255,0.88);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cockpit-intel-excerpt {
  font-size: 12px; color: rgba(255,255,255,0.4); line-height: 1.5; margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cockpit-intel-meta {
  display: flex; justify-content: space-between;
  font-size: 10px; color: rgba(255,255,255,0.25);
}

/* Post card clickable */
.post-card { cursor: pointer; transition: border-color 0.2s; }
.post-card:active { border-color: rgba(0,212,255,0.2); }
.post-excerpt {
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.post-readmore {
  display: inline-block; margin-top: 4px;
  font-size: 12px; color: rgba(0,212,255,0.7); cursor: pointer;
}

/* Post detail page */
.postdetail-header {
  padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top));
  background: rgba(10,14,26,0.95); border-bottom: 1px solid rgba(255,255,255,0.06);
  position: sticky; top: 0; z-index: 10;
}
.postdetail-back {
  font-size: 14px; color: rgba(0,212,255,0.8); cursor: pointer;
}
.postdetail-scout-banner {
  padding: 10px 14px; margin-bottom: 16px;
  background: linear-gradient(90deg, rgba(0,212,255,0.08), rgba(100,50,255,0.05));
  border-radius: 10px; font-size: 12px; color: rgba(0,212,255,0.6);
}
.postdetail-author {
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px; margin-bottom: 16px;
}
.postdetail-title {
  font-size: 20px; font-weight: 700; line-height: 1.4;
  padding: 0 16px; margin-bottom: 12px;
}
.postdetail-body {
  padding: 0 16px; font-size: 15px; line-height: 1.8;
  color: rgba(255,255,255,0.85); word-break: break-word;
  margin-bottom: 16px;
}
.postdetail-body a.post-link {
  color: rgba(0,212,255,0.8); text-decoration: none; word-break: break-all;
}
.postdetail-media {
  padding: 0 16px; margin-bottom: 16px;
}
.postdetail-img {
  max-width: 100%; border-radius: 12px; margin-bottom: 8px;
  cursor: pointer;
}
.postdetail-video {
  width: 100%; border-radius: 12px; margin-bottom: 8px;
}
.postdetail-actions {
  display: flex; gap: 16px; padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 16px;
}
.postdetail-comments-section { padding: 0 16px; }
.postdetail-comments-title {
  font-size: 15px; font-weight: 600; margin-bottom: 12px;
  color: rgba(255,255,255,0.7);
}
.postdetail-input-bar {
  display: flex; gap: 8px; padding: 8px 16px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  background: rgba(10,14,26,0.95);
  border-top: 1px solid rgba(255,255,255,0.08);
  position: sticky; bottom: 0;
}
.postdetail-input-bar input {
  flex: 1; background: rgba(255,255,255,0.06); border: none;
  padding: 10px 14px; border-radius: 20px; color: #fff; font-size: 14px;
  outline: none;
}
.postdetail-input-bar button {
  background: linear-gradient(135deg, #00D4FF, #6432FF);
  border: none; color: #fff; padding: 10px 18px; border-radius: 20px;
  font-size: 13px; font-weight: 600; cursor: pointer;
}

/* Image preview overlay */
.image-preview-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.95); z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.image-preview-full { max-width: 95%; max-height: 90%; object-fit: contain; border-radius: 4px; }
.image-preview-close {
  position: absolute; top: 20px; right: 20px;
  font-size: 24px; color: #fff; cursor: pointer;
}

/* =============================================
   FRIENDS PAGE
   ============================================= */

/* Profile social stats (following/followers) */
.profile-social-stats {
  display: flex; justify-content: center; align-items: center; gap: 0;
  padding: 12px 16px; margin: 0 16px 12px;
  background: rgba(255,255,255,0.04); border-radius: 12px;
  cursor: pointer;
}
.social-stat-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 4px 24px;
}
.social-stat-num { font-size: 18px; font-weight: 700; color: #fff; }
.social-stat-label { font-size: 12px; color: rgba(255,255,255,0.5); }
.social-stat-divider {
  width: 1px; height: 30px; background: rgba(255,255,255,0.1);
}

/* Friends page header */
.friends-header-row {
  display: flex; align-items: center; gap: 12px; padding: 0 0 8px;
}
.friends-back {
  font-size: 14px; color: #00D4FF; cursor: pointer;
  padding: 4px 0;
}
.friends-header-row h2 { margin: 0; font-size: 18px; }

.friends-search-bar {
  padding: 4px 0 8px;
}
.friends-search-input {
  width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
  color: #fff; padding: 10px 14px; border-radius: 10px;
  font-size: 14px; outline: none;
  transition: border-color 0.2s;
}
.friends-search-input:focus {
  border-color: rgba(0,212,255,0.4);
}
.friends-search-input::placeholder { color: rgba(255,255,255,0.3); }

/* Friends tabs */
.friends-tabs {
  display: flex; border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 0 16px;
}
.friends-tab {
  flex: 1; text-align: center; padding: 10px 0; font-size: 14px;
  color: rgba(255,255,255,0.4); cursor: pointer;
  border-bottom: 2px solid transparent; transition: all 0.2s;
}
.friends-tab.active {
  color: #00D4FF; border-bottom-color: #00D4FF;
}
.friends-tab span {
  font-size: 12px; background: rgba(255,255,255,0.06);
  padding: 1px 6px; border-radius: 8px; margin-left: 4px;
}

/* Friends content */
.friends-content { display: none; padding: 8px 16px; }
.friends-content.active { display: block; }
.friends-content-scroll { flex: 1; overflow-y: auto; }

/* Friend item */
.friend-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.friend-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #6432FF, #00D4FF);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; flex-shrink: 0;
  cursor: pointer;
}
.friend-avatar span { color: #fff; }
.friend-info {
  flex: 1; min-width: 0; cursor: pointer;
}
.friend-name-row {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.friend-name {
  font-size: 15px; font-weight: 600; color: #fff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.friend-level {
  font-size: 11px; color: #00D4FF; background: rgba(0,212,255,0.1);
  padding: 1px 6px; border-radius: 6px;
}
.mutual-badge {
  font-size: 10px; color: #FFD700; background: rgba(255,215,0,0.12);
  padding: 1px 6px; border-radius: 6px;
}
.friend-bio {
  font-size: 12px; color: rgba(255,255,255,0.4); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Friend action buttons */
.friend-actions {
  display: flex; gap: 6px; flex-shrink: 0;
}
.friend-action-btn {
  background: linear-gradient(135deg, #00D4FF, #6432FF);
  border: none; color: #fff; padding: 6px 14px; border-radius: 16px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  white-space: nowrap; transition: all 0.2s;
}
.friend-action-btn.following {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.5);
}
.friend-action-btn.msg-btn {
  background: rgba(255,215,0,0.15);
  color: #FFD700; padding: 6px 10px;
}
.friend-action-btn.wide {
  padding: 10px 20px; font-size: 14px; border-radius: 20px;
}

/* User profile card modal */
.user-profile-card {
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 0 16px; gap: 8px;
}
.upc-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, #6432FF, #00D4FF);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; color: #fff;
}
.upc-name { font-size: 20px; font-weight: 700; color: #fff; }
.upc-username { font-size: 13px; color: rgba(255,255,255,0.4); margin-top: -4px; }
.upc-bio {
  font-size: 13px; color: rgba(255,255,255,0.5);
  text-align: center; padding: 0 16px; max-width: 280px;
}
.upc-stats {
  display: flex; gap: 16px; margin: 8px 0;
  padding: 12px 16px;
  background: rgba(255,255,255,0.04); border-radius: 12px;
}
.upc-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.upc-stat-num { font-size: 16px; font-weight: 700; color: #fff; }
.upc-stat-label { font-size: 11px; color: rgba(255,255,255,0.4); }
.upc-actions {
  display: flex; gap: 10px; margin-top: 8px; width: 100%; padding: 0 16px; box-sizing: border-box;
}
.upc-actions .friend-action-btn { flex: 1; text-align: center; }
