/* ==========================================================================
   ASTRO — Your AI Space Companion
   Master Stylesheet & Production Design System
   NASA Space Apps Challenge Shebeen El-Kom • Developed by CoreX Ai
   ========================================================================== */

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

/* ==========================================================================
   CSS Custom Properties / Design Tokens
   ========================================================================== */
:root {
  /* Brand Core Palette */
  --astro-primary: #7A5CFF;
  --astro-primary-hover: #6947FF;
  --astro-secondary: #B388FF;
  --astro-accent: #D6C4FF;
  --astro-cyan: #38BDF8;
  --astro-emerald: #10B981;
  --astro-amber: #F59E0B;
  --astro-rose: #F43F5E;

  /* Theme Surfaces (Dark Theme Default) */
  --astro-bg: #0B0B1A;
  --astro-bg-subtle: #0E0E24;
  --astro-surface: #13132B;
  --astro-surface-elevated: #1A1A38;
  --astro-surface-border: rgba(179, 136, 255, 0.16);
  --astro-surface-border-strong: rgba(179, 136, 255, 0.35);

  /* Typography Colors */
  --astro-text: #F5F5FF;
  --astro-text-muted: #A0A3B8;
  --astro-text-subtle: #686B82;
  --astro-text-inverse: #0B0B1A;

  /* Shadows & Glows */
  --astro-glow-primary: rgba(122, 92, 255, 0.32);
  --astro-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.28);
  --astro-shadow-md: 0 10px 28px rgba(0, 0, 0, 0.38);
  --astro-shadow-lg: 0 24px 54px rgba(0, 0, 0, 0.55);

  /* Fonts */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Poppins', var(--font-body);
  --font-arabic: 'Tajawal', var(--font-body);
  --font-mono: 'JetBrains Mono', Consolas, Monaco, monospace;

  /* Radii */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* Transitions */
  --trans-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --trans-normal: 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  --trans-spring: 0.48s cubic-bezier(0.175, 0.885, 0.32, 1.25);
}

/* Light Theme Variables */
body.light-theme {
  --astro-bg: #F5F5FF;
  --astro-bg-subtle: #EBEFFA;
  --astro-surface: #FFFFFF;
  --astro-surface-elevated: #F8F9FE;
  --astro-surface-border: rgba(122, 92, 255, 0.18);
  --astro-surface-border-strong: rgba(122, 92, 255, 0.38);

  --astro-text: #0E0E22;
  --astro-text-muted: #535670;
  --astro-text-subtle: #82859C;
  --astro-text-inverse: #FFFFFF;

  --astro-glow-primary: rgba(122, 92, 255, 0.18);
  --astro-shadow-sm: 0 4px 12px rgba(18, 18, 50, 0.06);
  --astro-shadow-md: 0 10px 28px rgba(18, 18, 50, 0.08);
  --astro-shadow-lg: 0 24px 54px rgba(18, 18, 50, 0.12);
}

/* ==========================================================================
   CSS Reset & Base
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--astro-bg);
  color: var(--astro-text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color var(--trans-normal), color var(--trans-normal);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--astro-primary);
  color: #FFFFFF;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font: inherit;
}

/* Top Scroll Progress Indicator */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--astro-primary), var(--astro-secondary), var(--astro-cyan));
  z-index: 99999;
  transition: width 0.1s ease-out;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--astro-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--astro-surface-elevated);
  border-radius: var(--radius-full);
  border: 2px solid var(--astro-bg);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--astro-primary);
}

/* ==========================================================================
   SVG Icon System (Consistent 20x20 / 24x24 stroke)
   ========================================================================== */
.svg-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.svg-icon.icon-sm { width: 16px; height: 16px; }
.svg-icon.icon-md { width: 20px; height: 20px; }
.svg-icon.icon-lg { width: 24px; height: 24px; stroke-width: 1.8; }
.svg-icon.icon-xl { width: 32px; height: 32px; stroke-width: 1.6; }

/* ==========================================================================
   Cosmic Initial Loader
   ========================================================================== */
.astro-loader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: radial-gradient(circle at center, #151532 0%, #070712 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.astro-loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-orbit-system {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-ring-dashed {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px dashed rgba(179, 136, 255, 0.35);
  animation: orbitRotate 14s linear infinite;
}

.loader-ring-pulse {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(122, 92, 255, 0.4);
  animation: orbitPulse 2.4s ease-in-out infinite;
}

.loader-orbit-planet {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--astro-secondary);
  box-shadow: 0 0 14px var(--astro-secondary);
}

.loader-center-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(122, 92, 255, 0.65));
}

.loader-meta {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.loader-brand-name {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 3px;
  background: linear-gradient(135deg, #FFFFFF, var(--astro-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.loader-subline {
  font-size: 0.82rem;
  color: var(--astro-text-muted);
  letter-spacing: 0.8px;
}

.loader-bar-wrap {
  width: 200px;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  margin-top: 0.5rem;
}

.loader-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--astro-primary), var(--astro-secondary), var(--astro-cyan));
  border-radius: 6px;
  animation: loadProgress 1.6s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes loadProgress {
  0% { width: 0%; }
  50% { width: 60%; }
  100% { width: 100%; }
}

@keyframes orbitRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes orbitPulse {
  0%, 100% { transform: scale(1); opacity: 0.35; }
  50% { transform: scale(1.1); opacity: 0.85; }
}

/* ==========================================================================
   Celestial Day / Night Toggle (Reference Implementation)
   ========================================================================== */
.switch {
  position: relative;
  display: inline-block;
  width: 76px;
  height: 36px;
  border: 1px solid var(--astro-surface-border-strong);
  border-radius: 22px;
  cursor: pointer;
  user-select: none;
  background: #0B0B1A;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch .slider {
  position: absolute;
  inset: 0;
  background-color: #0B0B1A;
  border-radius: 20px;
  transition: 0.4s;
  overflow: hidden;
  z-index: 2;
}

.switch .slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: #E2E8F0;
  transition: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.25);
  border-radius: 50%;
  overflow: hidden;
  box-shadow: inset -2px -2px 3px rgba(0, 0, 0, 0.4);
}

.switch .moons-hole {
  content: "";
  position: absolute;
  opacity: 1;
  transition: 0.5s;
}

.switch .moon-hole {
  position: absolute;
  border-radius: 50%;
  background-color: #94A3B8;
}

.switch .moon-hole:nth-child(1) { height: 4px; width: 4px; top: 22px; left: 16px; }
.switch .moon-hole:nth-child(2) { height: 7px; width: 7px; top: 13px; left: 8px; }
.switch .moon-hole:nth-child(3) { height: 3px; width: 3px; top: 9px; left: 18px; }

.switch input:checked + .slider {
  background-color: #38BDF8;
}

.switch input:checked + .slider:before {
  transform: translateX(41px);
  background-color: #F59E0B;
  box-shadow: 0 0 12px #F59E0B, inset -1px -1px 2px rgba(0, 0, 0, 0.2);
}

.switch input:checked + .slider .moons-hole {
  transform: translateX(41px);
  opacity: 0;
}

.switch .stars {
  position: absolute;
  right: 6px;
  top: 0;
  bottom: 0;
  transition: 0.4s;
}

.switch .star {
  position: absolute;
  fill: #FFFFFF;
  width: 8px;
  height: 8px;
  animation: starTwinkle 2s infinite ease-in-out;
}

.switch .star:nth-child(1) { top: 6px; right: 8px; }
.switch .star:nth-child(2) { top: 20px; right: 16px; animation-delay: 0.4s; width: 6px; height: 6px; }
.switch .star:nth-child(3) { top: 11px; right: 26px; animation-delay: 0.8s; width: 7px; height: 7px; }

.switch input:checked + .slider .stars {
  transform: translateY(35px);
  opacity: 0;
}

.switch .clouds {
  position: absolute;
  left: 6px;
  bottom: -20px;
  transition: 0.4s;
  opacity: 0;
}

.switch input:checked + .slider .clouds {
  bottom: 2px;
  opacity: 1;
}

.switch .cloud {
  position: absolute;
  background-color: #FFFFFF;
  border-radius: 50%;
}

.switch .cloud:nth-child(1) { width: 12px; height: 12px; bottom: 0px; left: 4px; }
.switch .cloud:nth-child(2) { width: 16px; height: 16px; bottom: 2px; left: 12px; }
.switch .cloud:nth-child(3) { width: 10px; height: 10px; bottom: 0px; left: 24px; }

@keyframes starTwinkle {
  0%, 100% { opacity: 0.35; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* ==========================================================================
   Magic Animation Button (Reference Implementation)
   ========================================================================== */
.magic-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  border: none;
  background: transparent;
  padding: 0;
  outline: none;
  transition: transform var(--trans-normal);
}

.magic-button:hover {
  transform: translateY(-2px) scale(1.03);
}

.magic-button:active {
  transform: translateY(0) scale(0.98);
}

.magic-button .button__content {
  position: relative;
  background: linear-gradient(135deg, var(--astro-primary) 0%, #8A64FF 50%, var(--astro-secondary) 100%);
  padding: 0.76rem 1.75rem;
  border-radius: var(--radius-full);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  overflow: hidden;
  box-shadow: 0 8px 24px var(--astro-glow-primary), inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.magic-button .button__text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.4px;
  position: relative;
  z-index: 2;
  white-space: nowrap;
}

.magic-button .button__icon {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
}

.magic-button .button__reflection-1,
.magic-button .button__reflection-2 {
  width: 8px;
  height: 120px;
  background-color: rgba(255, 255, 255, 0.45);
  transform: rotate(30deg);
  position: absolute;
  inset: 0;
  top: -20px;
  left: -180%;
  margin: auto;
  transition: left 0.65s cubic-bezier(0.2, 0.5, 0.2, 1.2);
  pointer-events: none;
}

.magic-button .button__reflection-1::after {
  content: "";
  width: 16px;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.25);
  position: absolute;
  top: -1rem;
  left: 1.15rem;
}

.magic-button:hover .button__reflection-1,
.magic-button:hover .button__reflection-2 {
  left: 180%;
}

.magic-button .magic-decor {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  transition: transform var(--trans-spring), opacity var(--trans-fast);
}

.magic-button:hover .magic-decor {
  opacity: 1;
}

.magic-button .star-1 {
  width: 16px;
  top: -10px;
  left: 14%;
  transform: scale(0.4) rotate(0deg);
}
.magic-button:hover .star-1 {
  transform: scale(1) translateY(-6px) rotate(45deg);
}

.magic-button .star-2 {
  width: 18px;
  bottom: -10px;
  right: 14%;
  transform: scale(0.4) rotate(0deg);
}
.magic-button:hover .star-2 {
  transform: scale(1) translateY(6px) rotate(-45deg);
}

.magic-button .circle-1 {
  width: 10px;
  top: -8px;
  right: 24%;
}
.magic-button:hover .circle-1 {
  transform: scale(1.2) translateY(-4px);
}

.magic-button .diamond-1 {
  width: 13px;
  bottom: -8px;
  left: 20%;
}
.magic-button:hover .diamond-1 {
  transform: scale(1.1) translateY(4px) rotate(20deg);
}

/* Secondary Button Component */
.astro-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.72rem 1.45rem;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--trans-fast);
  border: 1px solid transparent;
  outline: none;
  white-space: nowrap;
}

.btn-secondary {
  background: var(--astro-surface);
  color: var(--astro-text);
  border-color: var(--astro-surface-border-strong);
}
.btn-secondary:hover {
  background: var(--astro-surface-elevated);
  border-color: var(--astro-secondary);
  transform: translateY(-2px);
  box-shadow: var(--astro-shadow-sm);
}

.btn-primary {
  background: var(--astro-primary);
  color: #FFFFFF;
}
.btn-primary:hover {
  background: var(--astro-primary-hover);
  box-shadow: 0 6px 20px var(--astro-glow-primary);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--astro-text-muted);
}
.btn-ghost:hover {
  color: var(--astro-text);
  background: rgba(122, 92, 255, 0.08);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.12);
  color: var(--astro-rose);
  border-color: rgba(244, 63, 94, 0.3);
}
.btn-danger:hover {
  background: var(--astro-rose);
  color: #FFFFFF;
}

/* ==========================================================================
   Text Masking CSS (Selective Usage)
   ========================================================================== */
.text-mask-cosmic {
  font-family: var(--font-heading);
  font-weight: 900;
  background-image: linear-gradient(135deg, #FFFFFF 0%, #D6C4FF 35%, #7A5CFF 70%, #38BDF8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  animation: cosmicShine 7s linear infinite;
}

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

/* ==========================================================================
   PUBLIC LANDING PAGE — ASTRO Universe
   ========================================================================== */
.universe-view {
  display: block;
  position: relative;
  width: 100%;
}

.universe-view.view-hidden,
.workspace-view.view-hidden {
  display: none !important;
}

/* Elevated Floating Header Navigation */
.universe-nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 1280px;
  z-index: 900;
  padding: 0.75rem 1.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  background: rgba(15, 15, 36, 0.78);
  border: 1px solid var(--astro-surface-border-strong);
  border-radius: var(--radius-full);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4), 0 0 20px var(--astro-glow-primary);
  transition: all var(--trans-normal);
}

body.light-theme .universe-nav {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 30px rgba(18, 18, 50, 0.08), 0 0 20px rgba(122, 92, 255, 0.1);
}

.universe-nav.scrolled {
  top: 8px;
  background: rgba(11, 11, 26, 0.94);
  box-shadow: var(--astro-shadow-lg);
}

body.light-theme .universe-nav.scrolled {
  background: rgba(255, 255, 255, 0.96);
}

.brand-anchor {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(122, 92, 255, 0.45));
}

.brand-text-col {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 1.8px;
  line-height: 1.1;
  color: var(--astro-text);
}

.brand-tagline {
  font-size: 0.7rem;
  color: var(--astro-secondary);
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Center Interactive Navigation (Spotlight Style) */
.desktop-nav-menu {
  display: flex;
}

.nav-links-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.28rem 0.5rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--astro-surface-border);
}

.nav-link-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 1.05rem;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--astro-text-muted);
  border-radius: var(--radius-full);
  transition: all var(--trans-fast);
}

.nav-link-btn:hover {
  color: var(--astro-text);
  background: rgba(122, 92, 255, 0.14);
}

.nav-link-btn.active {
  color: #FFFFFF;
  background: var(--astro-primary);
  font-weight: 600;
  box-shadow: 0 2px 10px var(--astro-glow-primary);
}

.nav-actions-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Mobile Hamburger Button */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--astro-surface-elevated);
  border: 1px solid var(--astro-surface-border-strong);
  cursor: pointer;
  padding: 0;
  transition: background-color var(--trans-fast);
}

.hamburger-line {
  width: 18px;
  height: 2px;
  background: var(--astro-text);
  border-radius: 2px;
  transition: transform var(--trans-normal), opacity var(--trans-fast);
}

.hamburger-btn.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger-btn.active .hamburger-line:nth-child(2) {
  opacity: 0;
}
.hamburger-btn.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Navigation Drawer */
.mobile-menu-drawer {
  position: fixed;
  inset: 0;
  z-index: 890;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--trans-normal), visibility var(--trans-normal);
}

.mobile-menu-drawer.open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}

.mobile-menu-content {
  position: absolute;
  top: 80px;
  left: 20px;
  right: 20px;
  background: var(--astro-surface);
  border: 1px solid var(--astro-surface-border-strong);
  border-radius: var(--radius-xl);
  padding: 1.85rem;
  box-shadow: var(--astro-shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transform: translateY(-16px);
  transition: transform var(--trans-spring);
}

.mobile-menu-drawer.open .mobile-menu-content {
  transform: translateY(0);
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.mobile-nav-link {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--astro-text);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  transition: background var(--trans-fast);
}

.mobile-nav-link:hover {
  background: rgba(122, 92, 255, 0.12);
  color: var(--astro-secondary);
}

/* Hero Section (Using space-nebula.jpg strictly) */
.hero-universe {
  position: relative;
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 8.5rem 4rem 4.5rem;
  background-image: url('assets/images/space-nebula.jpg');
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
}

/* Subtle dark gradient on left: preserves mascot on right, text readability on left */
.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(11, 11, 26, 0.96) 0%,
    rgba(11, 11, 26, 0.90) 36%,
    rgba(11, 11, 26, 0.58) 64%,
    rgba(11, 11, 26, 0.15) 86%,
    rgba(11, 11, 26, 0.04) 100%
  );
  pointer-events: none;
  z-index: 1;
}

body.light-theme .hero-gradient-overlay {
  background: linear-gradient(
    90deg,
    rgba(245, 245, 255, 0.97) 0%,
    rgba(245, 245, 255, 0.91) 38%,
    rgba(245, 245, 255, 0.62) 65%,
    rgba(245, 245, 255, 0.20) 88%,
    rgba(245, 245, 255, 0.05) 100%
  );
}

.hero-inner-container {
  position: relative;
  z-index: 2;
  max-width: 660px;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  animation: heroReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.hero-event-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(122, 92, 255, 0.15);
  border: 1px solid var(--astro-surface-border-strong);
  padding: 0.38rem 1.05rem;
  border-radius: var(--radius-full);
  width: fit-content;
  backdrop-filter: blur(8px);
}

.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--astro-emerald);
  box-shadow: 0 0 10px var(--astro-emerald);
}

.pill-text {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.6px;
  color: var(--astro-secondary);
  text-transform: uppercase;
}

.hero-main-title {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 4.8vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: var(--astro-text);
}

.hero-description {
  font-size: 1.12rem;
  color: var(--astro-text-muted);
  line-height: 1.68;
}

.hero-cta-actions {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.hero-meta-strip {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--astro-surface-border);
}

.meta-stat {
  display: flex;
  flex-direction: column;
}

.meta-number {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--astro-text);
}

.meta-label {
  font-size: 0.74rem;
  color: var(--astro-text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Sections Common Layout with Parallax Depth */
.content-section {
  padding: 6rem 3.5rem;
  position: relative;
}

.section-container {
  max-width: 1240px;
  margin: 0 auto;
}

.section-header-centered {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3.5rem;
}

.section-eyebrow {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--astro-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.6rem;
}

.section-heading {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  font-weight: 700;
  color: var(--astro-text);
  line-height: 1.25;
}

.section-lead {
  font-size: 1.05rem;
  color: var(--astro-text-muted);
  margin-top: 0.85rem;
  line-height: 1.65;
}

/* Reveal-on-scroll animation classes */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* What is ASTRO — Split Presentation */
.info-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.info-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.info-card-item {
  background: var(--astro-surface);
  border: 1px solid var(--astro-surface-border);
  border-radius: var(--radius-md);
  padding: 1.65rem;
  display: flex;
  gap: 1.25rem;
  transition: transform var(--trans-normal), border-color var(--trans-normal), box-shadow var(--trans-normal);
}

.info-card-item:hover {
  transform: translateX(6px);
  border-color: var(--astro-surface-border-strong);
  box-shadow: var(--astro-shadow-md);
}

.card-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(122, 92, 255, 0.12);
  border: 1px solid var(--astro-surface-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--astro-secondary);
  flex-shrink: 0;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--astro-text);
  margin-bottom: 0.35rem;
}

.card-description {
  font-size: 0.92rem;
  color: var(--astro-text-muted);
  line-height: 1.55;
}

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

.feature-panel {
  background: var(--astro-surface);
  border: 1px solid var(--astro-surface-border);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  position: relative;
  overflow: hidden;
  transition: transform var(--trans-normal), border-color var(--trans-normal), box-shadow var(--trans-normal);
}

.feature-panel:hover {
  transform: translateY(-5px);
  border-color: var(--astro-secondary);
  box-shadow: 0 16px 36px var(--astro-glow-primary);
}

/* Supported Tech Stacks Bar with Official SVGs */
.tech-stacks-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding: 1.25rem 2rem;
  background: var(--astro-surface);
  border: 1px solid var(--astro-surface-border);
  border-radius: var(--radius-full);
  max-width: 820px;
  margin-inline: auto;
}

.stack-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--astro-text);
}

.tech-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* Code Snippet Tabs in Landing Page */
.code-showcase-card {
  background: #090916;
  border: 1px solid rgba(179, 136, 255, 0.28);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--astro-shadow-lg);
}

.code-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.code-tabs-nav {
  display: flex;
  gap: 0.5rem;
}

.code-tab-pill {
  background: transparent;
  border: 1px solid transparent;
  padding: 0.45rem 1.1rem;
  color: var(--astro-text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  transition: all var(--trans-fast);
}

.code-tab-pill:hover {
  color: var(--astro-text);
  background: rgba(255, 255, 255, 0.05);
}

.code-tab-pill.active {
  background: rgba(122, 92, 255, 0.24);
  border-color: rgba(179, 136, 255, 0.4);
  color: #FFFFFF;
}

.code-pre-box {
  padding: 1.6rem;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.65;
  color: #E2E8F0;
  overflow-x: auto;
}

/* Ecosystem & Partners Section (Preserving Brand Integrity) */
.ecosystem-section {
  background: var(--astro-bg-subtle);
  border-top: 1px solid var(--astro-surface-border);
  border-bottom: 1px solid var(--astro-surface-border);
}

.ecosystem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
}

.ecosystem-card {
  background: var(--astro-surface);
  border: 1px solid var(--astro-surface-border);
  border-radius: var(--radius-md);
  padding: 2.2rem 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  transition: all var(--trans-normal);
  position: relative;
}

.ecosystem-card:hover {
  transform: translateY(-5px);
  border-color: var(--astro-secondary);
  box-shadow: var(--astro-shadow-md);
}

.ecosystem-role-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--astro-secondary);
  background: rgba(122, 92, 255, 0.14);
  padding: 0.25rem 0.85rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ecosystem-logo-wrapper {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.ecosystem-logo-wrapper img {
  max-height: 100%;
  max-width: 190px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.25));
}

.ecosystem-entity-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--astro-text);
}

.ecosystem-entity-desc {
  font-size: 0.86rem;
  color: var(--astro-text-muted);
  line-height: 1.55;
}

.founder-profile-box {
  margin-top: 0.6rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--astro-surface-border);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.founder-title-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--astro-text);
  letter-spacing: 0.4px;
}

.social-links-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--astro-surface-elevated);
  border: 1px solid var(--astro-surface-border);
  color: var(--astro-text-muted);
  transition: all var(--trans-fast);
}

.social-btn:hover {
  color: #FFFFFF;
  background: var(--astro-primary);
  border-color: var(--astro-primary);
  transform: translateY(-2px);
}

/* Landing Footer with Comprehensive Links */
.universe-footer {
  padding: 4.5rem 3.5rem 2.5rem;
  border-top: 1px solid var(--astro-surface-border);
}

.footer-inner-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  text-align: left;
}

.footer-col-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--astro-text);
  margin-bottom: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

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

.footer-link-a {
  font-size: 0.88rem;
  color: var(--astro-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color var(--trans-fast);
}

.footer-link-a:hover {
  color: var(--astro-secondary);
}

.footer-bottom-bar {
  max-width: 1200px;
  margin: 3rem auto 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--astro-surface-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--astro-text-subtle);
}

/* ==========================================================================
   AUTHENTICATED WORKSPACE — ASTRO Workspace
   ========================================================================== */
.workspace-view {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  background-color: var(--astro-bg);
  padding-bottom: 130px; /* Space for the floating bottom navigation */
}

/* Workspace Top App Bar */
.workspace-top-bar {
  position: sticky;
  top: 0;
  z-index: 850;
  padding: 0.9rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(11, 11, 26, 0.88);
  border-bottom: 1px solid var(--astro-surface-border);
}

body.light-theme .workspace-top-bar {
  background: rgba(255, 255, 255, 0.92);
}

.ws-breadcrumb-trail {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.ws-badge-portal {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(122, 92, 255, 0.18);
  color: var(--astro-secondary);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-xs);
  letter-spacing: 0.6px;
}

.ws-active-section-label {
  font-family: var(--font-heading);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--astro-text);
}

.ws-user-actions-group {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.ws-user-badge {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--astro-surface);
  border: 1px solid var(--astro-surface-border);
  padding: 0.4rem 0.95rem;
  border-radius: var(--radius-full);
}

.user-avatar-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--astro-primary), var(--astro-secondary));
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.user-display-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--astro-text);
}

/* Workspace Main Container & Tab Modules */
.workspace-main-content {
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 2.5rem;
  flex: 1;
}

.workspace-pane {
  display: none;
  animation: paneTransition 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.workspace-pane.active-pane {
  display: block;
}

@keyframes paneTransition {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   WORKSPACE MODULE 1: DASHBOARD OVERVIEW & UPGRADED WELCOME CARD
   ========================================================================== */
.overview-dashboard-stack {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Premium High-Tech Space Mission Welcome Banner */
.participant-welcome-banner {
  background: radial-gradient(circle at 85% 25%, rgba(122, 92, 255, 0.45) 0%, rgba(20, 20, 50, 0.95) 65%),
              radial-gradient(circle at 20% 80%, rgba(56, 189, 248, 0.2) 0%, transparent 50%),
              linear-gradient(135deg, #10102b 0%, #151538 100%);
  border: 1px solid rgba(179, 136, 255, 0.35);
  border-radius: var(--radius-xl);
  padding: 2.75rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.welcome-banner-decor-circle {
  position: absolute;
  right: -60px;
  top: -60px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 1px dashed rgba(179, 136, 255, 0.25);
  pointer-events: none;
  animation: orbitRotate 30s linear infinite;
}

.welcome-text-col {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  position: relative;
  z-index: 2;
}

.participant-welcome-banner .welcome-title {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  color: #FFFFFF !important;
  line-height: 1.2;
}

.participant-welcome-banner .welcome-title .highlight-name {
  background: linear-gradient(135deg, #C4B5FD 0%, #38BDF8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.participant-welcome-banner .section-lead {
  color: #E2E8F0 !important;
  font-size: 1.02rem;
  line-height: 1.6;
}

.welcome-meta-chips-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.participant-welcome-banner .meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  padding: 0.32rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: #F8FAFC !important;
  backdrop-filter: blur(10px);
}

/* Light Theme Version for Welcome Banner */
body.light-theme .participant-welcome-banner {
  background: radial-gradient(circle at 85% 25%, rgba(122, 92, 255, 0.22) 0%, transparent 65%),
              linear-gradient(135deg, #EEF2FF 0%, #F5F3FF 50%, #E0F2FE 100%);
  border: 1px solid rgba(122, 92, 255, 0.3);
  box-shadow: 0 16px 36px rgba(99, 102, 241, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.9);
}

body.light-theme .participant-welcome-banner .welcome-title {
  color: #1E1B4B !important;
}

body.light-theme .participant-welcome-banner .welcome-title .highlight-name {
  background: linear-gradient(135deg, #6D28D9 0%, #0284C7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.light-theme .participant-welcome-banner .section-lead {
  color: #334155 !important;
}

body.light-theme .participant-welcome-banner .meta-chip {
  background: rgba(255, 255, 255, 0.85) !important;
  border: 1px solid rgba(122, 92, 255, 0.28) !important;
  color: #1E1B4B !important;
}

.metrics-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.metric-card {
  background: var(--astro-surface);
  border: 1px solid var(--astro-surface-border);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: transform var(--trans-fast), border-color var(--trans-fast);
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: var(--astro-surface-border-strong);
}

.metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--astro-text-muted);
}

.metric-title {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-number-display {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--astro-text);
  line-height: 1;
}

.metric-sub-detail {
  font-size: 0.82rem;
  color: var(--astro-text-muted);
}

.status-indicator-live {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--astro-emerald);
}

.status-indicator-live::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--astro-emerald);
  box-shadow: 0 0 8px var(--astro-emerald);
}

/* Usage Chart Card */
.chart-container-card {
  background: var(--astro-surface);
  border: 1px solid var(--astro-surface-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.chart-canvas-wrapper {
  width: 100%;
  height: 280px;
  position: relative;
}

/* ==========================================================================
   WORKSPACE MODULE 2: AI WORKSPACE (Chat Interface)
   ========================================================================== */
.chat-workspace-shell {
  background: var(--astro-surface);
  border: 1px solid var(--astro-surface-border);
  border-radius: var(--radius-xl);
  height: calc(100vh - 220px);
  min-height: 600px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--astro-shadow-lg);
}

.chat-app-header {
  padding: 1rem 1.75rem;
  background: var(--astro-surface-elevated);
  border-bottom: 1px solid var(--astro-surface-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.chat-bot-identity {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.bot-avatar-box {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(122, 92, 255, 0.16);
  border: 1px solid var(--astro-surface-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--astro-secondary);
}

.bot-name-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--astro-text);
}

.bot-status-sub {
  font-size: 0.74rem;
  color: var(--astro-secondary);
  font-weight: 500;
}

.chat-header-tools {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.active-key-selector-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--astro-text-muted);
}

.chat-key-select {
  background: var(--astro-bg);
  border: 1px solid var(--astro-surface-border);
  border-radius: var(--radius-xs);
  padding: 0.38rem 0.85rem;
  color: var(--astro-text);
  font-size: 0.82rem;
  outline: none;
  font-family: var(--font-mono);
}

.chat-inline-key-input {
  background: var(--astro-bg);
  border: 1px solid var(--astro-surface-border);
  border-radius: var(--radius-xs);
  padding: 0.38rem 0.85rem;
  color: var(--astro-text);
  font-size: 0.82rem;
  outline: none;
  font-family: var(--font-mono);
  max-width: 200px;
}

/* Inline Key Paste Input inside Chat Bar for 1-click verification */
.chat-key-inline-paste {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.chat-key-inline-input {
  background: var(--astro-bg);
  border: 1px dashed var(--astro-surface-border-strong);
  border-radius: var(--radius-xs);
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--astro-secondary);
  width: 170px;
}

/* Chat Messages Flow */
.chat-scroll-stream {
  flex: 1;
  overflow-y: auto;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.chat-row-item {
  display: flex;
  gap: 1rem;
  max-width: 85%;
  animation: messageSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes messageSlide {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-row-item.user-item {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-row-item.astro-item {
  align-self: flex-start;
}

.message-avatar-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-item .message-avatar-circle {
  background: var(--astro-primary);
  color: #FFFFFF;
}

.astro-item .message-avatar-circle {
  background: rgba(122, 92, 255, 0.15);
  border: 1px solid var(--astro-surface-border);
  color: var(--astro-secondary);
}

.chat-message-bubble {
  padding: 1.05rem 1.4rem;
  border-radius: var(--radius-lg);
  font-size: 0.94rem;
  line-height: 1.62;
  position: relative;
  word-break: break-word;
}

.user-item .chat-message-bubble {
  background: var(--astro-primary);
  color: #FFFFFF;
  border-bottom-right-radius: 4px;
}

.astro-item .chat-message-bubble {
  background: var(--astro-surface-elevated);
  border: 1px solid var(--astro-surface-border);
  color: var(--astro-text);
  border-bottom-left-radius: 4px;
}

/* Code block inside chat message */
.chat-message-bubble pre {
  background: #090915;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xs);
  padding: 1rem;
  margin: 0.75rem 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  position: relative;
}

.chat-message-bubble code {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.88em;
}

.chat-message-bubble pre code {
  background: transparent;
  padding: 0;
}

.code-block-copy-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: var(--astro-text-muted);
  padding: 0.25rem 0.6rem;
  font-size: 0.74rem;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.code-block-copy-btn:hover {
  background: var(--astro-primary);
  color: #FFFFFF;
}

/* Thinking Indicator */
.chat-thinking-bubble {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem 1.25rem;
}

.thinking-pulse-dot {
  width: 7px;
  height: 7px;
  background: var(--astro-secondary);
  border-radius: 50%;
  animation: thinkPulse 1.4s infinite ease-in-out both;
}

.thinking-pulse-dot:nth-child(1) { animation-delay: -0.32s; }
.thinking-pulse-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes thinkPulse {
  0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}

/* Chat Input Bar */
.chat-composer-strip {
  padding: 1rem 1.75rem;
  background: var(--astro-surface-elevated);
  border-top: 1px solid var(--astro-surface-border);
}

.chat-input-form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--astro-bg);
  border: 1px solid var(--astro-surface-border);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.6rem 0.35rem 1.35rem;
  transition: border-color var(--trans-fast), box-shadow var(--trans-fast);
}

.chat-input-form:focus-within {
  border-color: var(--astro-secondary);
  box-shadow: 0 0 16px var(--astro-glow-primary);
}

.chat-text-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--astro-text);
  font-size: 0.95rem;
  font-family: var(--font-body);
}

.chat-text-input::placeholder {
  color: var(--astro-text-subtle);
}

.chat-submit-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--astro-primary);
  border: none;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.chat-submit-btn:hover {
  background: var(--astro-primary-hover);
  transform: scale(1.05);
}

.chat-submit-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

/* ==========================================================================
   WORKSPACE MODULE 3: API PLAYGROUND
   ========================================================================== */
.playground-grid-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.pg-card-panel {
  background: var(--astro-surface);
  border: 1px solid var(--astro-surface-border);
  border-radius: var(--radius-lg);
  padding: 1.85rem;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.pg-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--astro-text-muted);
  margin-bottom: 0.45rem;
}

.form-control-input,
.form-control-select,
.form-control-textarea {
  width: 100%;
  background: var(--astro-bg);
  border: 1px solid var(--astro-surface-border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--astro-text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--trans-fast);
}

.form-control-textarea {
  min-height: 110px;
  resize: vertical;
}

.form-control-input:focus,
.form-control-select:focus,
.form-control-textarea:focus {
  border-color: var(--astro-secondary);
}

.pg-response-viewer {
  background: #090915;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--astro-cyan);
  max-height: 420px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.5;
}

/* ==========================================================================
   WORKSPACE MODULE 4: API KEYS MANAGEMENT
   ========================================================================== */
.keys-card-container {
  background: var(--astro-surface);
  border: 1px solid var(--astro-surface-border);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.85rem;
}

.keys-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.data-table-wrapper {
  overflow-x: auto;
}

.astro-data-table {
  width: 100%;
  border-collapse: collapse;
}

.astro-data-table th {
  text-align: left;
  padding: 0.9rem 1.15rem;
  font-size: 0.78rem;
  color: var(--astro-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 1px solid var(--astro-surface-border);
}

.astro-data-table td {
  padding: 1.1rem 1.15rem;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(179, 136, 255, 0.08);
  vertical-align: middle;
}

.key-prefix-badge {
  font-family: var(--font-mono);
  background: rgba(122, 92, 255, 0.12);
  border: 1px solid var(--astro-surface-border);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-xs);
  font-size: 0.82rem;
  color: var(--astro-secondary);
}

.badge-status-active {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--astro-emerald);
  font-weight: 600;
  font-size: 0.8rem;
}

.badge-status-revoked {
  color: var(--astro-rose);
  font-weight: 600;
  font-size: 0.8rem;
}

/* ==========================================================================
   WORKSPACE MODULE 5 & 6: PREFERENCES & ACCOUNT
   ========================================================================== */
.settings-form-shell {
  max-width: 820px;
  background: var(--astro-surface);
  border: 1px solid var(--astro-surface-border);
  border-radius: var(--radius-lg);
  padding: 2.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.char-counter-label {
  font-size: 0.76rem;
  color: var(--astro-text-subtle);
  align-self: flex-end;
  margin-top: 0.25rem;
}

/* ==========================================================================
   FLOATING BOTTOM NAVIGATION (LUXURY LIQUID GLASS EFFECT)
   ========================================================================== */
.floating-bottom-dock {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: auto;
  max-width: 95vw;
}

/* Liquid Glass Translucent Shell */
.liquidGlass-nav-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 44px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55), 
              0 0 35px rgba(122, 92, 255, 0.3),
              inset 0 1px 1px rgba(255, 255, 255, 0.45);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.2);
  overflow: hidden;
}

/* Liquid Glass Effect Layers (From Reference) */
.liquidGlass-effect {
  position: absolute;
  z-index: 0;
  inset: 0;
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  filter: url(#glass-distortion);
  overflow: hidden;
  isolation: isolate;
}

.liquidGlass-tint {
  z-index: 1;
  position: absolute;
  inset: 0;
  background: rgba(15, 15, 36, 0.72);
}

body.light-theme .liquidGlass-tint {
  background: rgba(255, 255, 255, 0.76);
}

.liquidGlass-shine {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 44px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: inset 1px 1px 2px 0 rgba(255, 255, 255, 0.4),
              inset -1px -1px 2px 0 rgba(179, 136, 255, 0.35);
}

body.light-theme .liquidGlass-shine {
  border: 1px solid rgba(122, 92, 255, 0.3);
  box-shadow: inset 1px 1px 2px 0 rgba(255, 255, 255, 0.8),
              inset -1px -1px 2px 0 rgba(122, 92, 255, 0.2);
}

/* Dock Tabs */
.dock-tabs-list {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.dock-tab-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.68rem 1.15rem;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--astro-text-muted);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--trans-fast);
  outline: none;
  white-space: nowrap;
}

.dock-tab-btn:hover {
  color: var(--astro-text);
  background: rgba(255, 255, 255, 0.08);
}

.dock-tab-btn.active {
  color: #FFFFFF;
  background: linear-gradient(135deg, var(--astro-primary) 0%, #8A64FF 50%, var(--astro-secondary) 100%);
  box-shadow: 0 4px 18px var(--astro-glow-primary), inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   MODALS (Sign In, Create Key, Reveal Key)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--trans-fast);
}

.modal-overlay.active-modal {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: var(--astro-surface);
  border: 1px solid var(--astro-surface-border-strong);
  border-radius: var(--radius-xl);
  padding: 2.4rem;
  max-width: 520px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  box-shadow: var(--astro-shadow-lg);
  animation: modalScaleUp 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalScaleUp {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--astro-text);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--astro-text-muted);
  cursor: pointer;
  padding: 0.3rem;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--trans-fast);
}

.modal-close-btn:hover {
  color: var(--astro-text);
}

.key-reveal-container {
  background: #080814;
  border: 1px dashed var(--astro-primary);
  border-radius: var(--radius-sm);
  padding: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.key-reveal-secret {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: var(--astro-secondary);
  word-break: break-all;
}

/* ==========================================================================
   CYBER-SPACE MISSION SIGN IN TERMINAL
   ========================================================================== */
.modal-cyber-terminal {
  position: relative;
  background: radial-gradient(circle at 50% 0%, rgba(122, 92, 255, 0.28) 0%, rgba(15, 15, 36, 0.97) 65%),
              linear-gradient(180deg, #11112b 0%, #0d0d21 100%);
  border: 1px solid rgba(179, 136, 255, 0.4);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.8), 0 0 35px rgba(122, 92, 255, 0.25);
  overflow: hidden;
  border-radius: var(--radius-xl);
}

body.light-theme .modal-cyber-terminal {
  background: radial-gradient(circle at 50% 0%, rgba(122, 92, 255, 0.12) 0%, rgba(255, 255, 255, 0.98) 65%),
              linear-gradient(180deg, #ffffff 0%, #f4f6ff 100%);
  border: 1px solid rgba(122, 92, 255, 0.35);
  box-shadow: 0 24px 60px rgba(79, 70, 229, 0.15);
}

.terminal-top-scanner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--astro-secondary), var(--astro-cyan), transparent);
  animation: cyberScan 3s linear infinite;
}

@keyframes cyberScan {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.terminal-badge-pulse {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(122, 92, 255, 0.15);
  border: 1px solid rgba(179, 136, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(122, 92, 255, 0.3);
  flex-shrink: 0;
}

.terminal-tagline {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--astro-secondary);
  text-transform: uppercase;
}

.terminal-mission-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--astro-cyan);
  letter-spacing: 0.5px;
  align-self: flex-start;
}

.terminal-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.terminal-input-wrap .input-icon-left {
  position: absolute;
  left: 14px;
  color: var(--astro-text-muted);
  pointer-events: none;
}

.terminal-field {
  padding-left: 44px !important;
  background: rgba(0, 0, 0, 0.25) !important;
  border: 1px solid rgba(179, 136, 255, 0.22) !important;
  transition: all var(--trans-fast);
}

body.light-theme .terminal-field {
  background: #ffffff !important;
  border: 1px solid rgba(122, 92, 255, 0.25) !important;
}

.terminal-field:focus {
  border-color: var(--astro-secondary) !important;
  box-shadow: 0 0 18px rgba(122, 92, 255, 0.35) !important;
}

.btn-toggle-pwd {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--astro-text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--trans-fast);
}

.btn-toggle-pwd:hover {
  color: var(--astro-text);
}

.btn-terminal-submit {
  box-shadow: 0 8px 24px rgba(122, 92, 255, 0.45) !important;
}

.terminal-security-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.76rem;
  color: var(--astro-text-subtle);
  font-family: var(--font-mono);
  margin-top: 0.25rem;
}

/* ==========================================================================
   OFFICIAL TECH STACK SVGS & FOUNDER STYLES
   ========================================================================== */
.tech-badge-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
  transition: transform var(--trans-fast);
}

.stack-badge:hover .tech-badge-img {
  transform: scale(1.15);
}

.tech-tab-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

.founder-avatar-frame {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--astro-secondary), var(--astro-glow), var(--astro-cyan));
  box-shadow: 0 0 20px rgba(122, 92, 255, 0.4);
  flex-shrink: 0;
}

.founder-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #181836;
}

.founder-verified-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  background: var(--astro-emerald);
  border: 2px solid var(--astro-surface);
  border-radius: 50%;
}

/* Workspace Theme Toggle */
.workspace-theme-toggle-wrap {
  transform: scale(0.85);
  margin-right: 0.25rem;
}

/* Parallax Scrolling Enhancements */
.hero-universe {
  background-attachment: scroll;
  will-change: background-position;
}

.hero-inner-container {
  will-change: transform, opacity;
}

.parallax-tilt-card {
  transition: transform 0.15s ease-out;
  will-change: transform;
}

/* Toast Notifications */
#astro-toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--astro-surface-elevated);
  border: 1px solid var(--astro-secondary);
  color: var(--astro-text);
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--astro-shadow-md);
  z-index: 999999;
  opacity: 0;
  pointer-events: none;
  transition: all var(--trans-normal);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

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

/* ==========================================================================
   RESPONSIVE DESIGN (Desktop / Tablet / Mobile)
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-universe {
    padding: 7.5rem 2.5rem 3.5rem;
  }
  .info-split-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .playground-grid-shell {
    grid-template-columns: 1fr;
  }
  .workspace-main-content {
    padding: 1.75rem 1.5rem;
  }
  .footer-inner-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 992px) {
  /* Header navigation adapts to tablet & mobile drawer */
  .desktop-nav-menu,
  .desktop-only-btn,
  .universe-nav nav,
  .universe-nav .magic-button.desktop-only-btn {
    display: none !important;
  }
  .hamburger-btn {
    display: flex !important;
  }
}

@media (max-width: 768px) {
  /* Header changes */
  .universe-nav {
    top: 12px;
    width: calc(100% - 24px);
    padding: 0.65rem 1.1rem;
    border-radius: var(--radius-lg);
  }
  .nav-actions-group {
    gap: 0.65rem;
  }

  /* Hero Mobile Layout: Solves text over mascot face */
  .hero-universe {
    background-position: 85% top;
    padding: 6.5rem 1.25rem 3rem;
    align-items: flex-start;
  }
  .hero-gradient-overlay {
    background: linear-gradient(
      180deg,
      rgba(11, 11, 26, 0.92) 0%,
      rgba(11, 11, 26, 0.82) 40%,
      rgba(11, 11, 26, 0.95) 100%
    );
  }
  .hero-inner-container {
    max-width: 100%;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(14, 14, 34, 0.65);
    border: 1px solid var(--astro-surface-border-strong);
    border-radius: var(--radius-xl);
    padding: 1.75rem 1.4rem;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
  }
  body.light-theme .hero-inner-container {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(122, 92, 255, 0.25);
  }
  .hero-main-title {
    font-size: 2.1rem;
  }
  .hero-meta-strip {
    flex-wrap: wrap;
    gap: 1.25rem;
  }
  .hero-cta-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-cta-actions .magic-button,
  .hero-cta-actions .astro-btn {
    width: 100%;
    justify-content: center;
  }
  .hero-cta-actions .button__content {
    width: 100%;
    justify-content: center;
  }

  .content-section {
    padding: 3.5rem 1.25rem;
  }
  .workspace-top-bar {
    padding: 0.8rem 1.1rem;
  }
  .workspace-main-content {
    padding: 1.25rem 0.85rem;
  }
  .participant-welcome-banner {
    padding: 1.85rem 1.4rem;
  }
  .welcome-title {
    font-size: 1.65rem;
  }
  .chat-workspace-shell {
    height: calc(100vh - 180px);
  }
  .footer-inner-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Mobile Bottom Navigation: Full-width adaptation */
  .floating-bottom-dock {
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    max-width: 100vw;
    width: 100vw;
  }
  .liquidGlass-nav-wrapper {
    border-radius: 22px 22px 0 0;
    padding: 8px 4px;
    justify-content: space-around;
  }
  .dock-tabs-list {
    width: 100%;
    justify-content: space-around;
    gap: 0;
  }
  .dock-tab-btn {
    padding: 0.5rem 0.4rem;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.68rem;
    border-radius: var(--radius-xs);
  }
  .dock-tab-label {
    font-size: 0.65rem;
  }
}

@media (max-width: 480px) {
  .universe-nav {
    top: 8px;
    width: calc(100% - 16px);
    padding: 0.45rem 0.8rem;
  }
  .brand-logo-img {
    height: 28px;
  }
  .brand-name {
    font-size: 1.05rem;
  }
  .brand-tagline {
    font-size: 0.64rem;
  }
  .universe-nav .switch {
    transform: scale(0.8);
    transform-origin: right center;
  }
  .hamburger-btn {
    width: 36px;
    height: 36px;
  }
  .hero-universe {
    padding: 5.5rem 1rem 2.5rem;
  }
  .hero-main-title {
    font-size: 1.85rem;
  }
  .welcome-title {
    font-size: 1.45rem;
  }
  .participant-welcome-banner {
    padding: 1.5rem 1.15rem;
  }
}



/* ==========================================================================
   ASTRO Public Bot & My Bots — Universal Hidden Reset
   ========================================================================== */
[hidden] {
  display: none !important;
}
.bots-loading[hidden],
.bots-empty[hidden],
#bots-dashboard[hidden],
#bots-notice[hidden],
#messages[hidden],
#composer[hidden],
#state[hidden] {
  display: none !important;
}

/* ==========================================================================
   ASTRO Public Bot — Cyber-Space Interactive Design System
   ========================================================================== */
body.astro-public-bot-page {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: radial-gradient(circle at 50% 5%, rgba(122, 92, 255, 0.28) 0%, transparent 60%),
              radial-gradient(circle at 10% 85%, rgba(56, 189, 248, 0.16) 0%, transparent 50%),
              linear-gradient(180deg, #070714 0%, #0B0B1A 45%, #0E0E22 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  font-family: var(--font-body);
  color: var(--astro-text);
  position: relative;
  overflow-x: hidden;
}

.bot-stars-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(1px 1px at 20px 30px, #ffffff, rgba(0,0,0,0)),
                    radial-gradient(1.5px 1.5px at 140px 180px, rgba(196, 181, 253, 0.9), rgba(0,0,0,0)),
                    radial-gradient(1px 1px at 260px 80px, #38BDF8, rgba(0,0,0,0)),
                    radial-gradient(1.5px 1.5px at 380px 290px, #ffffff, rgba(0,0,0,0)),
                    radial-gradient(1px 1px at 490px 150px, rgba(168, 85, 247, 0.8), rgba(0,0,0,0)),
                    radial-gradient(2px 2px at 620px 320px, #ffffff, rgba(0,0,0,0)),
                    radial-gradient(1.5px 1.5px at 780px 190px, #38BDF8, rgba(0,0,0,0)),
                    radial-gradient(1px 1px at 920px 90px, rgba(196, 181, 253, 0.9), rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 800px 500px;
  opacity: 0.45;
  z-index: 0;
}

.astro-public-bot-shell {
  width: min(1080px, 100%);
  height: min(850px, calc(100vh - 3rem));
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(122, 92, 255, 0.35);
  border-radius: var(--radius-xl);
  background: rgba(14, 14, 34, 0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.7), 0 0 50px rgba(122, 92, 255, 0.16), inset 0 1px 1px rgba(255, 255, 255, 0.15);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.bot-shell-scanner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--astro-primary), var(--astro-cyan), var(--astro-secondary), transparent);
  box-shadow: 0 0 12px var(--astro-primary);
  animation: botScanline 4s ease-in-out infinite;
  z-index: 10;
}

@keyframes botScanline {
  0% { transform: translateX(-100%); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}

.astro-public-bot-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(20, 20, 48, 0.6);
  backdrop-filter: blur(12px);
}

.astro-public-bot-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.astro-public-bot-brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px var(--astro-glow-primary));
}

.brand-title-wrap strong {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: #FFFFFF;
  display: block;
  line-height: 1.15;
}

.brand-title-wrap small {
  font-size: 0.7rem;
  color: var(--astro-text-muted);
  display: block;
}

.astro-public-top-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.astro-public-powered-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: rgba(122, 92, 255, 0.12);
  border: 1px solid rgba(122, 92, 255, 0.28);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--astro-secondary);
}

.powered-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--astro-secondary);
  box-shadow: 0 0 6px var(--astro-secondary);
}

.astro-public-bot-main {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}

.astro-public-bot-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 14, 34, 0.45);
  flex-wrap: wrap;
}

.bot-header-left {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  min-width: 0;
  flex: 1;
}

.astro-public-bot-avatar-frame {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  padding: 2.5px;
  background: linear-gradient(135deg, var(--astro-primary), var(--astro-cyan));
  box-shadow: 0 0 22px var(--astro-glow-primary);
  flex-shrink: 0;
}

.astro-public-bot-avatar {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  background: var(--astro-primary);
  color: #FFFFFF;
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.55rem;
  text-transform: uppercase;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

.bot-online-beacon {
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--astro-emerald);
  border: 2px solid var(--astro-surface);
  box-shadow: 0 0 10px var(--astro-emerald);
}

.astro-public-bot-identity {
  min-width: 0;
  flex: 1;
}

.bot-identity-chip-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.2rem;
}

.bot-type-chip {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  background: rgba(122, 92, 255, 0.18);
  color: var(--astro-secondary);
  border: 1px solid rgba(122, 92, 255, 0.3);
}

.astro-public-bot-identity h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  color: #FFFFFF;
  margin: 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.astro-public-bot-identity p {
  margin: 0.25rem 0 0;
  color: var(--astro-text-muted);
  font-size: 0.88rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.bot-header-tools {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.astro-public-live {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--astro-emerald);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.radar-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--astro-emerald);
  box-shadow: 0 0 10px var(--astro-emerald);
  animation: radarPulse 1.8s infinite;
}

@keyframes radarPulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.btn-bot-header-action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.85rem;
  border-radius: var(--radius-full);
  background: var(--astro-surface-elevated);
  border: 1px solid var(--astro-surface-border-strong);
  color: var(--astro-text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.btn-bot-header-action:hover {
  color: #FFFFFF;
  border-color: var(--astro-primary);
  background: rgba(122, 92, 255, 0.18);
  transform: translateY(-1px);
}

.astro-public-state {
  margin: auto;
  padding: 3rem 2rem;
  text-align: center;
  color: var(--astro-text-muted);
  max-width: 540px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.state-loader-ring {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(122, 92, 255, 0.2);
  border-top-color: var(--astro-primary);
  border-radius: 50%;
  animation: botsSpin 0.9s linear infinite;
}

.astro-public-state strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: #FFFFFF;
}

.astro-public-state span {
  font-size: 0.9rem;
  color: var(--astro-text-muted);
}

.astro-public-messages {
  flex: 1;
  min-height: 250px;
  overflow-y: auto;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  scroll-behavior: smooth;
}

.astro-public-messages::-webkit-scrollbar {
  width: 6px;
}

.astro-public-messages::-webkit-scrollbar-track {
  background: transparent;
}

.astro-public-messages::-webkit-scrollbar-thumb {
  background: rgba(122, 92, 255, 0.25);
  border-radius: 4px;
}

.astro-public-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(122, 92, 255, 0.45);
}

.astro-public-messages .chat-row-item {
  max-width: 86%;
  animation: messageFadeIn 0.3s ease-out;
}

@keyframes messageFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.bot-welcome-card {
  background: radial-gradient(circle at 10% 10%, rgba(122, 92, 255, 0.24) 0%, rgba(20, 20, 48, 0.8) 100%);
  border: 1px solid rgba(122, 92, 255, 0.32);
  border-radius: var(--radius-xl);
  padding: 1.6rem 1.85rem;
  margin-bottom: 0.5rem;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.welcome-card-header h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0;
}

.welcome-card-desc {
  color: #E2E8F0;
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0.4rem 0 1.15rem;
  max-width: 680px;
}

.welcome-suggestions-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.suggestions-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--astro-secondary);
}

.suggestions-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.suggestion-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.95rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #F8FAFC;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--trans-fast);
  backdrop-filter: blur(8px);
}

.suggestion-chip-btn:hover {
  background: var(--astro-primary);
  border-color: var(--astro-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px var(--astro-glow-primary);
  color: #FFFFFF;
}

.chat-code-block-wrap {
  margin: 0.6rem 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #090915;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.code-block-lang {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--astro-text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.code-block-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: none;
  background: transparent;
  color: var(--astro-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-xs);
  transition: color var(--trans-fast);
}

.code-block-copy-btn:hover {
  color: #FFFFFF;
}

.chat-code-block-wrap pre {
  margin: 0;
  padding: 0.85rem 1rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: #E2E8F0;
  line-height: 1.5;
}

.chat-inline-code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(122, 92, 255, 0.16);
  border: 1px solid rgba(122, 92, 255, 0.3);
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  color: var(--astro-cyan);
}

.chat-list-item {
  margin: 0.3rem 0;
  padding-left: 0.25rem;
}

.thinking-row .chat-thinking-bubble {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.75rem 1rem;
}

.thinking-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--astro-secondary);
  animation: thinkingWave 1.4s infinite ease-in-out;
}

.thinking-pulse-dot:nth-child(2) { animation-delay: 0.2s; }
.thinking-pulse-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes thinkingWave {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

.astro-public-composer {
  padding: 1.1rem 1.6rem 0.85rem;
  background: rgba(20, 20, 48, 0.75);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.composer-input-shell {
  display: flex;
  align-items: flex-end;
  gap: 0.85rem;
  background: rgba(11, 11, 26, 0.85);
  border: 1px solid var(--astro-surface-border-strong);
  border-radius: var(--radius-xl);
  padding: 0.6rem 0.85rem 0.6rem 1.25rem;
  transition: border-color var(--trans-fast), box-shadow var(--trans-fast);
}

.composer-input-shell:focus-within {
  border-color: var(--astro-primary);
  box-shadow: 0 0 20px var(--astro-glow-primary);
}

.astro-public-composer textarea {
  flex: 1;
  min-height: 38px;
  max-height: 160px;
  resize: none;
  background: transparent;
  border: none;
  padding: 0.4rem 0;
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.5;
  outline: none;
}

.astro-public-composer textarea::placeholder {
  color: var(--astro-text-subtle);
}

.astro-public-send {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--astro-primary), var(--astro-secondary));
  color: #FFFFFF;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform var(--trans-fast), box-shadow var(--trans-fast), opacity var(--trans-fast);
  box-shadow: 0 4px 14px var(--astro-glow-primary);
}

.astro-public-send:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px var(--astro-glow-primary);
}

.astro-public-send:active {
  transform: translateY(0) scale(0.96);
}

.astro-public-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.composer-bottom-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.45rem;
  padding: 0 0.5rem;
}

.composer-shortcut-hint {
  font-size: 0.7rem;
  color: var(--astro-text-subtle);
  font-family: var(--font-mono);
}

.composer-char-limit {
  font-size: 0.7rem;
  color: var(--astro-text-subtle);
  font-family: var(--font-mono);
}

.astro-public-bot-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(11, 11, 26, 0.6);
  color: var(--astro-text-subtle);
  font-size: 0.72rem;
  text-align: center;
}

.footer-security-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 500;
}

.footer-security-row .svg-icon {
  color: var(--astro-emerald);
}

.footer-disclaimer-sub {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
}

@media (max-width: 768px) {
  body.astro-public-bot-page {
    padding: 0;
  }
  .astro-public-bot-shell {
    width: 100vw;
    height: 100dvh;
    min-height: 100dvh;
    border-radius: 0;
    border: none;
  }
  .astro-public-bot-topbar {
    padding: 0.75rem 1rem;
  }
  .astro-public-bot-heading {
    padding: 1rem;
  }
  .astro-public-messages {
    padding: 1rem;
  }
  .astro-public-messages .chat-row-item {
    max-width: 95%;
  }
  .astro-public-composer {
    padding: 0.75rem 1rem 0.65rem;
  }
  .composer-shortcut-hint {
    display: none;
  }
}

/* ==========================================================================
   ASTRO BOTS — Workspace Management & Dashboard Tab
   ========================================================================== */
.bots-workspace {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 1.5rem 0 7rem;
}

.bots-page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.bots-page-heading .section-heading {
  margin: 0.2rem 0;
}

.bots-page-heading .section-lead {
  margin: 0;
  max-width: 620px;
}

.bots-plan-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--astro-surface-border-strong);
  background: var(--astro-surface-elevated);
  border-radius: var(--radius-full);
  color: var(--astro-secondary);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  font-weight: 800;
}

.bots-plan-chip span,
.bots-status:before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--astro-emerald);
  display: inline-block;
  box-shadow: 0 0 8px var(--astro-emerald);
}

.bots-loading,
.bots-empty {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.85rem;
  background: var(--astro-surface);
  border: 1px solid var(--astro-surface-border);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  box-shadow: var(--astro-shadow-sm);
}

.bots-loading {
  flex-direction: row;
  min-height: 160px;
  color: var(--astro-text-muted);
  gap: 1rem;
}

.bots-spinner {
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--astro-surface-border-strong);
  border-top-color: var(--astro-primary);
  border-radius: 50%;
  animation: botsSpin 0.8s linear infinite;
}

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

.bots-empty-orbit {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, var(--astro-surface-elevated), transparent 70%);
  border: 1px solid var(--astro-surface-border-strong);
  box-shadow: 0 0 24px var(--astro-glow-primary);
}

.bots-empty-orbit img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.bots-empty h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--astro-text);
  margin: 0;
}

.bots-empty p {
  max-width: 440px;
  color: var(--astro-text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

.bots-create-form {
  width: min(480px, 100%);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
  margin-top: 0.85rem;
}

.bots-create-form textarea {
  resize: vertical;
  min-height: 86px;
}

.bots-create-form button {
  margin-top: 0.5rem;
}

.bots-notice {
  padding: 0.85rem 1.15rem;
  border: 1px solid var(--astro-surface-border-strong);
  background: var(--astro-surface);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  color: var(--astro-text-muted);
  font-size: 0.88rem;
  animation: messageFadeIn 0.3s ease-out;
}

.bots-notice.error {
  border-color: rgba(244, 63, 94, 0.45);
  background: rgba(244, 63, 94, 0.1);
  color: var(--astro-rose);
}

.bots-overview-card,
.bots-editor-card,
.bots-publish-card,
.bots-preview-card {
  background: var(--astro-surface);
  border: 1px solid var(--astro-surface-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--astro-shadow-sm);
}

.bots-overview-card {
  padding: 1.5rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.bots-card-main {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-width: 0;
}

.bots-card-avatar {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 20px;
  background: var(--astro-primary);
  color: white;
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.65rem;
  box-shadow: 0 8px 24px var(--astro-glow-primary);
  transition: background var(--trans-fast), transform var(--trans-fast);
}

.bots-card-kicker,
.bots-step-label {
  font-size: 0.65rem;
  letter-spacing: 0.13em;
  color: var(--astro-text-subtle);
  font-weight: 800;
}

.bots-card-identity h3 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  margin: 0.15rem 0;
  color: var(--astro-text);
}

.bots-card-identity p {
  font-size: 0.88rem;
  color: var(--astro-text-muted);
  margin: 0 0 0.45rem;
}

.bots-card-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  font-size: 0.74rem;
  color: var(--astro-text-subtle);
}

.bots-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--astro-emerald);
  font-weight: 700;
}

.bots-status.offline {
  color: var(--astro-amber);
}

.bots-status.offline:before {
  background: var(--astro-amber);
  box-shadow: 0 0 8px var(--astro-amber);
}

.bots-card-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.bots-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 1.25rem;
}

.bots-editor-card,
.bots-publish-card {
  padding: 1.6rem;
}

.bots-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.bots-section-heading h3,
.bots-preview-card h3 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  margin: 0.15rem 0 0;
  color: var(--astro-text);
}

.bots-editor-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bots-editor-form .form-label {
  margin-top: 0.25rem;
}

.bots-editor-form textarea {
  resize: vertical;
  min-height: 90px;
}

.bots-color-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.65rem 0 1.25rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  background: var(--astro-surface-elevated);
  border: 1px solid var(--astro-surface-border);
}

.bots-color-row p {
  font-size: 0.78rem;
  color: var(--astro-text-subtle);
  margin: 0.15rem 0 0;
}

.bots-color-row input[type="color"] {
  width: 50px;
  height: 42px;
  border: 1px solid var(--astro-surface-border-strong);
  background: transparent;
  border-radius: 12px;
  padding: 2px;
  cursor: pointer;
  flex-shrink: 0;
}

.bots-color-presets {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.55rem;
  flex-wrap: wrap;
}

.color-swatch-btn {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--trans-fast), border-color var(--trans-fast);
  padding: 0;
}

.color-swatch-btn:hover {
  transform: scale(1.15);
}

.color-swatch-btn.active {
  border-color: #FFFFFF;
  box-shadow: 0 0 10px currentColor;
  transform: scale(1.1);
}

.bots-publish-card > p,
.bots-preview-card p {
  font-size: 0.88rem;
  color: var(--astro-text-muted);
  margin: 0 0 1.25rem;
  line-height: 1.5;
}

.bots-publish-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--astro-surface-border);
  border-bottom: 1px solid var(--astro-surface-border);
}

.bots-publish-row strong,
.bots-publish-row small {
  display: block;
}

.bots-publish-row strong {
  font-size: 0.95rem;
  color: var(--astro-text);
}

.bots-publish-row small {
  font-size: 0.75rem;
  color: var(--astro-text-subtle);
  margin-top: 0.2rem;
}

.bots-toggle {
  position: relative;
  width: 50px;
  height: 28px;
  flex: 0 0 50px;
}

.bots-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.bots-toggle span {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  background: var(--astro-surface-elevated);
  border: 1px solid var(--astro-surface-border-strong);
  cursor: pointer;
  transition: var(--trans-normal);
}

.bots-toggle span:before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: var(--astro-text-muted);
  transition: var(--trans-normal);
}

.bots-toggle input:checked + span {
  background: var(--astro-primary);
  border-color: var(--astro-primary);
  box-shadow: 0 0 12px var(--astro-glow-primary);
}

.bots-toggle input:checked + span:before {
  transform: translateX(22px);
  background: #FFFFFF;
}

.bots-link-field {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  background: var(--astro-bg);
  border: 1px solid var(--astro-surface-border-strong);
  border-radius: var(--radius-sm);
  margin-top: 1rem;
  min-width: 0;
}

.bots-link-field span {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  color: var(--astro-text-muted);
}

.bots-link-field button {
  border: none;
  background: rgba(122, 92, 255, 0.15);
  color: var(--astro-secondary);
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-xs);
  transition: all var(--trans-fast);
}

.bots-link-field button:hover {
  background: var(--astro-primary);
  color: #FFFFFF;
}

.bots-publish-footnote {
  font-size: 0.72rem;
  color: var(--astro-text-subtle);
  margin-top: 0.85rem;
}

.bots-delete-btn {
  margin-top: 1.25rem;
  color: var(--astro-rose) !important;
  border-color: rgba(244, 63, 94, 0.3) !important;
}

.bots-delete-btn:hover {
  background: rgba(244, 63, 94, 0.15) !important;
  border-color: var(--astro-rose) !important;
}

.bots-preview-card {
  margin-top: 1.25rem;
  padding: 1.25rem 1.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.bots-preview-card p {
  margin: 0.15rem 0 0;
}

.bots-preview-card a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--astro-secondary);
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
  text-decoration: none;
  transition: color var(--trans-fast);
}

.bots-preview-card a:hover {
  color: #FFFFFF;
}

@media (max-width: 768px) {
  .bots-workspace {
    padding: 1rem 0 8rem;
  }
  .bots-page-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .bots-overview-card {
    align-items: flex-start;
    flex-direction: column;
  }
  .bots-card-actions {
    width: 100%;
  }
  .bots-card-actions > * {
    flex: 1;
    justify-content: center;
  }
  .bots-content-grid {
    grid-template-columns: 1fr;
  }
  .bots-preview-card {
    align-items: flex-start;
    flex-direction: column;
  }
  .bots-card-main {
    align-items: flex-start;
  }
  .bots-card-avatar {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
    font-size: 1.45rem;
  }
}


/* ==========================================================================
   ASTRO Public Bot - Appearance Studio (Customizer Drawer & Ambient Layer)
   ========================================================================== */

/* Ambient Wallpaper Background Layer */
.bot-ambient-bg {
  position: fixed;
  inset: -30px;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 0;
  transition: filter 0.25s ease, opacity 0.3s ease;
  will-change: filter;
  display: block;
}

.bot-ambient-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bot-bg-overlay, rgba(11, 11, 26, 0.65));
  transition: background 0.25s ease;
  pointer-events: none;
}

/* Customizer Action Button in Topbar */
.btn-customize-action {
  background: rgba(122, 92, 255, 0.15) !important;
  border-color: rgba(122, 92, 255, 0.45) !important;
  color: #E2E8F0 !important;
}

.btn-customize-action:hover {
  background: rgba(122, 92, 255, 0.3) !important;
  border-color: var(--astro-primary) !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 16px var(--astro-glow-primary);
}

/* Customizer Drawer Overlay */
.customizer-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 15, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.customizer-drawer-overlay.active,
.customizer-drawer-overlay.open {
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Customizer Drawer Aside */
.customizer-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(460px, 92vw);
  background: rgba(14, 14, 34, 0.98);
  border-left: 1px solid rgba(122, 92, 255, 0.3);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow: -12px 0 50px rgba(0, 0, 0, 0.7), inset 1px 0 0 rgba(255, 255, 255, 0.08);
  z-index: 1001;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.customizer-drawer.active,
.customizer-drawer.open {
  transform: translateX(0) !important;
}

.customizer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(20, 20, 48, 0.6);
}

.customizer-header-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.customizer-header-title h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0;
}

.customizer-header-title small {
  display: block;
  font-size: 0.72rem;
  color: var(--astro-text-muted);
  margin-top: 0.1rem;
}

.customizer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.customizer-body::-webkit-scrollbar {
  width: 5px;
}

.customizer-body::-webkit-scrollbar-thumb {
  background: rgba(122, 92, 255, 0.3);
  border-radius: 4px;
}

.customizer-card {
  background: rgba(20, 20, 48, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.card-section-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.card-section-label span {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--astro-secondary);
}

.customizer-tip {
  font-size: 0.8rem;
  color: var(--astro-text-muted);
  margin: 0;
  line-height: 1.4;
}

/* Wallpaper Presets Grid */
.wallpaper-presets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

.wallpaper-thumb-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  background: rgba(11, 11, 26, 0.75);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 0.45rem;
  cursor: pointer;
  transition: all var(--trans-fast);
  color: var(--astro-text-muted);
  text-align: center;
}

.wallpaper-thumb-card:hover {
  border-color: rgba(122, 92, 255, 0.5);
  transform: translateY(-2px);
  color: #FFFFFF;
}

.wallpaper-thumb-card.active {
  border-color: var(--astro-primary);
  background: rgba(122, 92, 255, 0.15);
  color: #FFFFFF;
  box-shadow: 0 0 16px var(--astro-glow-primary);
}

.thumb-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.thumb-procedural-stars {
  background: radial-gradient(1px 1px at 15px 12px, #fff, transparent),
              radial-gradient(1.5px 1.5px at 45px 30px, #a78bfa, transparent),
              radial-gradient(1px 1px at 70px 15px, #38bdf8, transparent),
              #070714;
  background-size: 80px 45px;
}

.thumb-obsidian {
  background: #05050A;
}

.thumb-custom-placeholder {
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  place-items: center;
  color: var(--astro-text-muted);
}

.wallpaper-thumb-card span {
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

/* Custom BG Input Box */
.custom-bg-input-box {
  background: rgba(11, 11, 26, 0.7);
  border: 1px dashed rgba(122, 92, 255, 0.35);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.custom-bg-input-box .input-with-action {
  display: flex;
  gap: 0.5rem;
}

.custom-bg-input-box .input-with-action input {
  flex: 1;
}

.upload-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--astro-text-subtle);
  font-size: 0.72rem;
  margin: 0.2rem 0;
}

.upload-divider::before,
.upload-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.upload-divider span {
  padding: 0 0.5rem;
}

/* Customizer Sliders */
.customizer-slider-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.slider-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.slider-label {
  font-size: 0.78rem;
  color: var(--astro-text);
  font-weight: 600;
}

.slider-value {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--astro-secondary);
  font-weight: 700;
}

.customizer-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  transition: background var(--trans-fast);
}

.customizer-range:hover {
  background: rgba(255, 255, 255, 0.2);
}

.customizer-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--astro-primary);
  border: 2px solid #FFFFFF;
  cursor: pointer;
  box-shadow: 0 0 10px var(--astro-glow-primary);
  transition: transform var(--trans-fast);
}

.customizer-range::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.customizer-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--astro-primary);
  border: 2px solid #FFFFFF;
  cursor: pointer;
  box-shadow: 0 0 10px var(--astro-glow-primary);
}

/* Customizer Swatches Grid */
.customizer-swatches-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
}

.studio-swatch {
  height: 38px;
  border-radius: var(--radius-md);
  background-color: var(--c);
  border: 2px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  position: relative;
  transition: transform var(--trans-fast), box-shadow var(--trans-fast), border-color var(--trans-fast);
}

.studio-swatch:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 0 16px var(--c);
  border-color: #FFFFFF;
}

.studio-swatch.active {
  border-color: #FFFFFF;
  box-shadow: 0 0 20px var(--c);
  transform: scale(1.06);
}

.studio-swatch.active::after {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 4px;
  border: 2px solid rgba(255, 255, 255, 0.9);
}

/* Custom Color Picker Row */
.custom-color-picker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.picker-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #FFFFFF;
}

.picker-sub {
  display: block;
  font-size: 0.7rem;
  color: var(--astro-text-muted);
}

.picker-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(11, 11, 26, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 0.25rem 0.65rem 0.25rem 0.35rem;
}

.picker-input-wrap input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 6px;
  padding: 0;
}

.picker-input-wrap input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.picker-input-wrap input[type="color"]::-webkit-color-swatch {
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 5px;
}

.picker-hex-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: #FFFFFF;
}

/* Segmented Pill Control */
.customizer-control-block {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.control-label {
  font-size: 0.78rem;
  color: var(--astro-text);
  font-weight: 600;
}

.segmented-pill-control {
  display: flex;
  background: rgba(11, 11, 26, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 3px;
}

.segment-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--astro-text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--trans-fast);
  text-align: center;
}

.segment-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.05);
}

.segment-btn.active {
  background: var(--astro-primary);
  color: #FFFFFF;
  box-shadow: 0 2px 10px var(--astro-glow-primary);
}

/* Customizer Toggles */
.customizer-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
}

.customizer-toggle-row strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #FFFFFF;
}

.customizer-toggle-row small {
  display: block;
  font-size: 0.7rem;
  color: var(--astro-text-muted);
  line-height: 1.35;
  margin-top: 0.1rem;
}

/* Customizer Footer */
.customizer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.1rem 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(20, 20, 48, 0.6);
}

.customizer-footer .astro-btn {
  flex: 1;
  justify-content: center;
}

/* Chat Bubble Customization Rules (Shape, Glass, Font Size) */
body.astro-public-bot-page .chat-message-bubble {
  background: rgba(20, 20, 48, var(--bubble-opacity, 0.85));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-radius var(--trans-fast), font-size var(--trans-fast), line-height var(--trans-fast);
}

body.astro-public-bot-page .user-item .chat-message-bubble {
  background: var(--astro-primary);
  opacity: var(--bubble-opacity, 0.95);
  color: #FFFFFF;
}

/* Bubble Corner Shapes */
body.astro-public-bot-page.bubble-shape-pill .chat-message-bubble {
  border-radius: 24px;
}

body.astro-public-bot-page.bubble-shape-pill .user-item .chat-message-bubble {
  border-bottom-right-radius: 6px;
}

body.astro-public-bot-page.bubble-shape-pill .astro-item .chat-message-bubble {
  border-bottom-left-radius: 6px;
}

body.astro-public-bot-page.bubble-shape-cyber .chat-message-bubble {
  border-radius: 2px;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

/* Chat Font Sizes */
body.astro-public-bot-page.font-size-compact .chat-message-bubble {
  font-size: 0.85rem;
  line-height: 1.5;
  padding: 0.85rem 1.15rem;
}

body.astro-public-bot-page.font-size-spacious .chat-message-bubble {
  font-size: 1.05rem;
  line-height: 1.75;
  padding: 1.25rem 1.65rem;
}
