/* ============================================
   StarField Cosmic Overhaul — Immersive Universe
   Added on top of redesign.css
   ============================================ */

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

/* =============================================
   GALAXY LAYER — Scattered cosmic layout
   ============================================= */
.galaxies-space {
  position: relative; width: 100%; height: 100%;
  overflow: auto; -webkit-overflow-scrolling: touch;
}

.galaxies-scatter {
  position: relative;
  width: 100%;
  min-height: 900px;
  padding: 10px 10px 40px;
}

.galaxy-node {
  position: absolute;
  text-align: center;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
  opacity: 0;
  animation: nodeAppear 0.6s ease-out forwards;
}
.galaxy-node:active {
  transform: scale(1.15) !important;
}

/* Procedural galaxy visual */
.galaxy-visual {
  position: relative;
  margin: 0 auto;
  border-radius: 50%;
}

.galaxy-core {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 3;
}

.galaxy-disk {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotateX(60deg);
  border-radius: 50%;
  z-index: 2;
}

.galaxy-halo {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
}

.galaxy-label-cosmic {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
  margin-top: 8px;
  white-space: nowrap;
  text-shadow: 0 0 12px rgba(0,0,0,0.9);
  text-align: center;
}

.galaxy-sub-cosmic {
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  margin-top: 2px;
  text-align: center;
}

@keyframes galaxyFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

@keyframes galaxySpin {
  from { transform: translate(-50%, -50%) rotateX(60deg) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotateX(60deg) rotate(360deg); }
}

@keyframes galaxyCorePulse {
  0%, 100% { opacity: 0.9; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
}

@keyframes nodeAppear {
  from { opacity: 0; transform: scale(0.5) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* =============================================
   NEBULA LAYER — Gas cloud effects
   ============================================= */
.nebulae-scatter {
  position: relative;
  width: 100%;
  min-height: 800px;
  padding: 80px 10px 40px;
}

.nebula-node {
  position: absolute;
  text-align: center;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
  opacity: 0;
  animation: nodeAppear 0.6s ease-out forwards;
}
.nebula-node:active {
  transform: scale(1.12) !important;
}

.nebula-cloud {
  position: relative;
  margin: 0 auto;
  border-radius: 50%;
}

.nebula-gas {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  opacity: 0.5;
  animation: nebulaGasPulse 5s ease-in-out infinite;
}

.nebula-gas-inner {
  position: absolute;
  border-radius: 50%;
  filter: blur(4px);
  opacity: 0.7;
  animation: nebulaGasPulse 4s ease-in-out infinite reverse;
}

.nebula-gas-core {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  filter: blur(2px);
  z-index: 2;
}

.nebula-stars {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 4px; height: 4px;
  border-radius: 50%;
  z-index: 3;
}

.nebula-label-cosmic {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
  margin-top: 6px;
  white-space: nowrap;
  text-shadow: 0 0 12px rgba(0,0,0,0.9);
  text-align: center;
}

.nebula-sub-cosmic {
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  margin-top: 2px;
  text-align: center;
}

@keyframes nebulaGasPulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.15); opacity: 0.6; }
}

@keyframes nebulaCoreBreathe {
  0%, 100% { opacity: 0.7; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.9; transform: translate(-50%, -50%) scale(1.1); }
}

/* =============================================
   PLANET LAYER — 3D spheres
   ============================================= */
.planets-orbital {
  position: relative;
  width: 100%;
  min-height: 800px;
  padding: 70px 10px 40px;
}

.planet-node {
  position: absolute;
  text-align: center;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
  opacity: 0;
  animation: nodeAppear 0.5s ease-out forwards;
  overflow: visible;
}
.planet-node:active {
  transform: scale(1.15) !important;
}

.planet-3d {
  position: relative;
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;
  transform-style: preserve-3d;
}

.planet-surface {
  position: absolute;
  top: 0; left: 0;
  width: 200%; height: 100%;
  border-radius: 0;
  animation: planetSurfaceRotate 20s linear infinite;
}

.planet-atmosphere {
  position: absolute;
  top: -10%; left: -10%;
  width: 120%; height: 120%;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
}

.planet-light {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, 
    rgba(255,255,255,0.35) 0%, 
    rgba(255,255,255,0.1) 20%, 
    transparent 50%);
  z-index: 3;
  pointer-events: none;
}

.planet-shadow {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border-radius: 50%;
  background: linear-gradient(105deg, 
    transparent 40%, 
    rgba(0,0,0,0.3) 55%, 
    rgba(0,0,0,0.6) 70%, 
    rgba(0,0,0,0.8) 100%);
  z-index: 4;
  pointer-events: none;
}

.planet-label-cosmic {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.95);
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(0,0,0,1), 0 0 12px rgba(0,0,0,0.9);
  text-align: center;
  max-width: 80px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 20;
}

.planet-sub-cosmic {
  font-size: 9px;
  color: rgba(255,255,255,0.45);
  margin-top: 2px;
  text-align: center;
  position: relative;
  z-index: 20;
}

.planet-ring {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotateX(75deg);
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  pointer-events: none;
  z-index: 5;
}

.planet-ice-shimmer {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, rgba(200,230,255,0.3), transparent 40%);
  z-index: 3;
  pointer-events: none;
  animation: iceShimmer 3s ease-in-out infinite;
}

@keyframes planetSurfaceRotate {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes planetOrbitFloat {
  0%, 100% { transform: translateY(0px); }
  25% { transform: translateY(-4px); }
  50% { transform: translateY(-2px); }
  75% { transform: translateY(-5px); }
}

@keyframes iceShimmer {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.8; }
}

/* =============================================
   TRANSITION ANIMATIONS
   ============================================= */
.starmap-level {
  will-change: transform, opacity;
}

.starmap-level.zoom-in-enter {
  animation: zoomInEnter 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes zoomInEnter {
  from { opacity: 0; transform: scale(0.3) translateY(30px); filter: blur(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}

.starmap-level.zoom-in-exit {
  animation: zoomInExit 0.35s ease-in forwards;
  pointer-events: none;
}
@keyframes zoomInExit {
  from { opacity: 1; transform: scale(1); filter: blur(0); }
  to { opacity: 0; transform: scale(2); filter: blur(4px); }
}

.starmap-level.zoom-out-enter {
  animation: zoomOutEnter 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes zoomOutEnter {
  from { opacity: 0; transform: scale(2); filter: blur(4px); }
  to { opacity: 1; transform: scale(1); filter: blur(0); }
}

.starmap-level.zoom-out-exit {
  animation: zoomOutExit 0.35s ease-in forwards;
  pointer-events: none;
}
@keyframes zoomOutExit {
  from { opacity: 1; transform: scale(1); filter: blur(0); }
  to { opacity: 0; transform: scale(0.3); filter: blur(6px); }
}

/* =============================================
   LANDING ANIMATION
   ============================================= */
.landing-cinematic {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 9999;
  background: radial-gradient(ellipse at center, #0a0e1a 0%, #000 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.landing-streak {
  position: absolute;
  background: linear-gradient(to bottom, transparent, rgba(100,180,255,0.8), transparent);
  width: 2px;
  animation: streakFall 0.8s ease-in forwards;
  opacity: 0;
}

@keyframes streakFall {
  0% { opacity: 0; transform: translateY(-100vh) scaleY(0.5); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translateY(100vh) scaleY(1.5); }
}

.landing-flash {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 0; height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.9), rgba(100,180,255,0.5), transparent);
  animation: landingFlashAnim 0.6s 0.6s ease-out forwards;
}

@keyframes landingFlashAnim {
  0% { width: 0; height: 0; opacity: 1; }
  50% { width: 300px; height: 300px; opacity: 0.8; }
  100% { width: 600px; height: 600px; opacity: 0; }
}

.landing-radial-streak {
  position: absolute;
  top: 50%; left: 50%;
  width: 3px;
  height: 150px;
  transform-origin: center 300px;
  opacity: 0;
  animation: radialStreakIn 0.8s ease-in forwards;
}

@keyframes radialStreakIn {
  0% { opacity: 0; height: 30px; }
  30% { opacity: 0.8; }
  100% { opacity: 0; height: 200px; transform-origin: center 50px; }
}

.landing-planet-name {
  position: absolute;
  bottom: 30%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
  font-weight: 700;
  color: white;
  text-shadow: 0 0 30px rgba(100,180,255,0.8);
  opacity: 0;
  animation: landingNameFade 1.2s 0.3s ease-out forwards;
  white-space: nowrap;
}

@keyframes landingNameFade {
  0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
  40% { opacity: 1; transform: translateX(-50%) translateY(0); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

.landing-whiteout {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: white;
  opacity: 0;
  animation: whiteoutFlash 0.6s 1.0s ease-out forwards;
}

@keyframes whiteoutFlash {
  0% { opacity: 0; }
  50% { opacity: 0.7; }
  100% { opacity: 0; }
}

@keyframes screenShake {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-2px, 1px); }
  20% { transform: translate(2px, -1px); }
  30% { transform: translate(-1px, 2px); }
  40% { transform: translate(1px, -2px); }
  50% { transform: translate(-2px, 0); }
  60% { transform: translate(2px, 1px); }
  70% { transform: translate(-1px, -1px); }
  80% { transform: translate(0, 2px); }
  90% { transform: translate(1px, 0); }
}

.screen-shake {
  animation: screenShake 0.5s ease-out;
}

/* =============================================
   Override old grid layouts
   ============================================= */
.galaxies-grid,
.nebulae-grid,
.planets-grid {
  /* When our scatter divs are present, hide grids */
  display: none !important;
}

/* Ensure scatter layouts show properly */
.galaxies-scatter,
.nebulae-scatter,
.planets-orbital {
  display: block !important;
}

/* Performance: GPU layers for animated items */
.galaxy-node,
.nebula-node,
.planet-node {
  will-change: transform, opacity;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.galaxy-disk,
.planet-surface {
  will-change: transform;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* =============================================
   WORMHOLE PORTAL — Search Redesign
   ============================================= */
.wormhole-portal {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 65px auto 0;
  width: 200px;
  z-index: 10;
}

.wormhole-ring {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid rgba(100, 140, 255, 0.5);
  box-shadow: 0 0 14px rgba(80, 120, 255, 0.4), inset 0 0 14px rgba(80, 120, 255, 0.15);
  animation: wormholeRingSpin 8s linear infinite;
  pointer-events: none;
}

.wormhole-ring.inner {
  width: 52px;
  height: 52px;
  top: 2px;
  border-color: rgba(160, 120, 255, 0.45);
  box-shadow: 0 0 10px rgba(140, 100, 255, 0.35), inset 0 0 10px rgba(140, 100, 255, 0.12);
  animation: wormholeRingSpinReverse 6s linear infinite;
}

.wormhole-core {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(140, 180, 255, 0.7), rgba(80, 100, 200, 0.3), transparent 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}

.wormhole-icon {
  width: 16px;
  height: 16px;
  color: rgba(200, 220, 255, 0.9);
  filter: drop-shadow(0 0 4px rgba(150, 180, 255, 0.6));
}

.wormhole-input {
  margin-top: 60px;
  width: 180px;
  padding: 8px 14px;
  background: rgba(10, 15, 40, 0.65);
  border: 1px solid rgba(100, 140, 255, 0.25);
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  text-align: center;
  outline: none;
  transition: all 0.3s ease;
  box-shadow: 0 0 8px rgba(80, 120, 255, 0.15);
}

.wormhole-input::placeholder {
  color: rgba(150, 170, 220, 0.5);
  font-size: 11px;
}

.wormhole-input:focus {
  border-color: rgba(120, 160, 255, 0.55);
  box-shadow: 0 0 16px rgba(80, 120, 255, 0.35);
  background: rgba(10, 15, 40, 0.8);
}

.wormhole-input:focus ~ .wormhole-ring,
.wormhole-portal:focus-within .wormhole-ring {
  animation-duration: 3s;
  box-shadow: 0 0 22px rgba(80, 120, 255, 0.6), inset 0 0 22px rgba(80, 120, 255, 0.25);
}

.wormhole-portal:focus-within .wormhole-ring.inner {
  animation-duration: 2s;
  box-shadow: 0 0 18px rgba(140, 100, 255, 0.55), inset 0 0 18px rgba(140, 100, 255, 0.2);
}

.wormhole-portal:focus-within .wormhole-core {
  background: radial-gradient(circle, rgba(160, 200, 255, 0.9), rgba(100, 130, 255, 0.5), transparent 70%);
}

.wormhole-results {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  max-height: 280px;
  overflow-y: auto;
  background: rgba(8, 12, 30, 0.92);
  border: 1px solid rgba(100, 140, 255, 0.3);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(60, 100, 255, 0.2), 0 0 12px rgba(80, 120, 255, 0.1);
  z-index: 100;
  display: none;
  margin-top: 6px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.wormhole-results .search-result-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(100, 140, 255, 0.08);
  transition: background 0.2s;
}

.wormhole-results .search-result-item:hover,
.wormhole-results .search-result-item:active {
  background: rgba(80, 120, 255, 0.12);
}

.wormhole-results .search-result-item:last-child {
  border-bottom: none;
}

.wormhole-results .search-result-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 500;
}

.wormhole-results .search-result-sub {
  font-size: 11px;
  color: rgba(150, 170, 220, 0.5);
  margin-top: 2px;
}

.wormhole-results .search-no-result {
  padding: 16px;
  text-align: center;
  color: rgba(150, 170, 220, 0.4);
  font-size: 12px;
}

@keyframes wormholeRingSpin {
  from { transform: translateX(-50%) rotate(0deg); }
  to { transform: translateX(-50%) rotate(360deg); }
}

@keyframes wormholeRingSpinReverse {
  from { transform: translateX(-50%) rotate(0deg); }
  to { transform: translateX(-50%) rotate(-360deg); }
}

/* =============================================
   WORMHOLE JUMP ANIMATION
   ============================================= */
.wormhole-jump-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 9998;
  background: radial-gradient(ellipse at center, #0a0e2a 0%, #000 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.wormhole-jump-ring {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 3px solid transparent;
  opacity: 0;
  animation: wormholeJumpRing 0.7s ease-out forwards;
}

@keyframes wormholeJumpRing {
  0% { width: 10px; height: 10px; opacity: 0.9; border-color: rgba(100, 160, 255, 0.8); }
  100% { width: 500px; height: 500px; opacity: 0; border-color: rgba(100, 160, 255, 0); }
}

.wormhole-jump-flash {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 0; height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(120, 180, 255, 0.9), rgba(80, 120, 255, 0.4), transparent);
  animation: wormholeJumpFlash 0.5s 0.2s ease-out forwards;
}

@keyframes wormholeJumpFlash {
  0% { width: 0; height: 0; opacity: 1; }
  60% { width: 200px; height: 200px; opacity: 0.7; }
  100% { width: 400px; height: 400px; opacity: 0; }
}

/* ── Performance Optimizations ── */
.galaxy-visual, .nebula-cloud, .planet-3d {
  contain: layout style paint;
}
.galaxy-disk, .galaxy-halo, .nebula-gas, .nebula-gas-inner {
  will-change: transform, opacity;
  contain: layout style paint;
}
/* Reduce blur on mobile for performance */
@media (max-width: 480px) {
  .galaxy-disk { filter: none !important; }
  .galaxy-halo { filter: none !important; }
  .nebula-gas { filter: blur(4px) !important; }
  .nebula-gas-inner { filter: blur(2px) !important; }
}

/* =============================================
   SPACE STATION — Full Redesign
   ============================================= */

/* ── Station Header ── */
.station-header {
  padding: 16px 16px 12px;
  background: linear-gradient(180deg, rgba(10,14,26,0.95) 0%, rgba(0,0,0,0.8) 100%);
  border-bottom: 1px solid rgba(100,140,255,0.12);
  position: relative;
}
.station-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(100,140,255,0.3), transparent);
}
.station-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary, #E7E9EA);
  margin-bottom: 12px;
}
.station-title i, .station-title svg {
  color: var(--accent, #1D9BF0);
  width: 22px;
  height: 22px;
}

/* ── Station My Info ── */
.station-my-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.station-login-hint {
  color: var(--text-tertiary, #536471);
  font-size: 13px;
  text-align: center;
  padding: 8px 0;
}
.station-info-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.station-level-badge {
  background: linear-gradient(135deg, var(--accent, #1D9BF0), #8B5CF6);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  display: inline-block;
}
.station-title-text {
  color: var(--text-secondary, #71767B);
  font-size: 13px;
  font-weight: 500;
}
.station-exp-bar {
  position: relative;
  height: 16px;
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  overflow: hidden;
}
.station-exp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent, #1D9BF0), #8B5CF6);
  border-radius: 8px;
  transition: width 0.5s ease;
  min-width: 4px;
}
.station-exp-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  color: rgba(255,255,255,0.7);
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.station-res-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.station-res {
  font-size: 12px;
  color: var(--text-secondary, #71767B);
  font-weight: 500;
}

/* ── Station Tabs ── */
.station-tabs {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 16px;
  gap: 4px;
  background: rgba(0,0,0,0.5);
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
}
.station-tabs::-webkit-scrollbar { display: none; }
.station-tab {
  flex-shrink: 0;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary, #71767B);
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
  white-space: nowrap;
}
.station-tab.active {
  color: var(--text-primary, #E7E9EA);
  font-weight: 600;
}
.station-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--accent, #1D9BF0);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(29,155,240,0.5);
}

/* ── Station Content / Panels ── */
.station-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 80px;
}
.station-panel {
  display: none;
  padding: 12px 16px;
}
.station-panel.active {
  display: block;
}

/* ── Hall List ── */
.station-hall-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Quest Cards ── */
.quest-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quest-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--bg-secondary, #16181C);
  border-radius: var(--radius-md, 12px);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  transition: border-color 0.2s;
}
.quest-card.quest-claimable {
  border-color: var(--success, #00BA7C);
  box-shadow: 0 0 12px rgba(0,186,124,0.1);
}
.quest-card.quest-done {
  opacity: 0.6;
}
.quest-icon {
  font-size: 28px;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
}
.quest-info {
  flex: 1;
  min-width: 0;
}
.quest-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary, #E7E9EA);
  margin-bottom: 2px;
}
.quest-desc {
  font-size: 12px;
  color: var(--text-secondary, #71767B);
  margin-bottom: 6px;
}
.quest-progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}
.quest-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent, #1D9BF0), #8B5CF6);
  border-radius: 2px;
  transition: width 0.4s ease;
}
.quest-claimable .quest-progress-fill {
  background: linear-gradient(90deg, var(--success, #00BA7C), #2ECC71);
}
.quest-rewards {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.quest-reward {
  font-size: 11px;
  color: var(--gold, #FFD700);
  background: var(--gold-soft, rgba(255,215,0,0.1));
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 500;
}
.quest-action {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.quest-status {
  font-size: 12px;
  font-weight: 500;
}
.quest-status.claimed {
  color: var(--success, #00BA7C);
}
.quest-status.pending {
  color: var(--text-tertiary, #536471);
}
.quest-claim-btn {
  background: linear-gradient(135deg, var(--success, #00BA7C), #2ECC71);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
  white-space: nowrap;
}
.quest-claim-btn:active {
  transform: scale(0.95);
}
.quest-claim-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Leaderboard ── */
.rank-sub-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-full, 9999px);
  padding: 3px;
}
.rank-sub-tab {
  flex: 1;
  text-align: center;
  padding: 6px 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary, #71767B);
  border-radius: var(--radius-full, 9999px);
  cursor: pointer;
  transition: all 0.2s;
}
.rank-sub-tab.active {
  background: var(--accent, #1D9BF0);
  color: #fff;
  font-weight: 600;
}
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-secondary, #16181C);
  border-radius: var(--radius-md, 12px);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  transition: border-color 0.2s;
}
.rank-item.rank-top {
  border-color: rgba(255,215,0,0.15);
}
.rank-item.rank-1 {
  background: linear-gradient(135deg, rgba(255,215,0,0.08), rgba(255,215,0,0.02));
  border-color: rgba(255,215,0,0.25);
}
.rank-item.rank-2 {
  background: linear-gradient(135deg, rgba(192,192,192,0.08), rgba(192,192,192,0.02));
  border-color: rgba(192,192,192,0.2);
}
.rank-item.rank-3 {
  background: linear-gradient(135deg, rgba(205,127,50,0.08), rgba(205,127,50,0.02));
  border-color: rgba(205,127,50,0.2);
}
.rank-num {
  width: 28px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-secondary, #71767B);
  flex-shrink: 0;
}
.rank-top .rank-num {
  font-size: 20px;
}
.rank-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent, #1D9BF0), #8B5CF6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rank-avatar span {
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}
.rank-info {
  flex: 1;
  min-width: 0;
}
.rank-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary, #E7E9EA);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-title {
  font-size: 11px;
  color: var(--text-tertiary, #536471);
}
.rank-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent, #1D9BF0);
  flex-shrink: 0;
}
.rank-1 .rank-value { color: #FFD700; }
.rank-2 .rank-value { color: #C0C0C0; }
.rank-3 .rank-value { color: #CD7F32; }

/* ── Achievements Grid ── */
.achieve-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.achieve-card {
  background: var(--bg-secondary, #16181C);
  border-radius: var(--radius-md, 12px);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  padding: 16px 12px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}
.achieve-card:active {
  transform: scale(0.97);
}
.achieve-card.achieve-locked {
  opacity: 0.45;
  filter: grayscale(0.5);
}
.achieve-card.rarity-rare {
  border-color: rgba(29,155,240,0.2);
}
.achieve-card.rarity-legendary {
  border-color: rgba(255,215,0,0.2);
}
.achieve-card.rarity-rare::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent, #1D9BF0), transparent);
}
.achieve-card.rarity-legendary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold, #FFD700), transparent);
}
.achieve-icon {
  font-size: 36px;
  margin-bottom: 8px;
  line-height: 1;
}
.achieve-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #E7E9EA);
  margin-bottom: 4px;
}
.achieve-desc {
  font-size: 11px;
  color: var(--text-secondary, #71767B);
  margin-bottom: 8px;
  line-height: 1.4;
}
.achieve-rarity-tag {
  display: inline-block;
  font-size: 10px;
  padding: 1px 8px;
  border-radius: 10px;
  font-weight: 500;
}
.rarity-common .achieve-rarity-tag {
  background: rgba(113,118,123,0.15);
  color: var(--text-secondary, #71767B);
}
.rarity-rare .achieve-rarity-tag {
  background: rgba(29,155,240,0.12);
  color: var(--accent, #1D9BF0);
}
.rarity-legendary .achieve-rarity-tag {
  background: rgba(255,215,0,0.12);
  color: var(--gold, #FFD700);
}

/* ── page-fleet layout fix ── */
#page-fleet {
  flex-direction: column;
  overflow: hidden;
}
#page-fleet.active {
  display: flex !important;
}

/* ── Tab Bar Click Fix ── */
.tab-item {
  min-width: 56px !important;
  min-height: 44px !important;
  padding: 4px 8px !important;
  -webkit-tap-highlight-color: transparent;
}
.tab-item * {
  pointer-events: none;
}
.tab-icon, .tab-label, .tab-icon svg, .tab-icon i {
  pointer-events: none !important;
}

/* ── Layout: absolute positioning for nodes ── */
.galaxy-node, .nebula-node, .planet-node {
  position: absolute;
}


/* =============================================
   MY LIKES (我的注能) PANEL
   ============================================= */
.profile-sub-panel {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--bg-primary, #000);
  z-index: 10;
  flex-direction: column;
  overflow-y: auto;
}
.my-likes-list {
  padding: 12px;
  flex: 1;
  overflow-y: auto;
}
