/* ─────────────────────────────────────────────────────────────
   TX999GLORY — OPERATIONS STATION
   Palette: rgb(20, 20, 20) Matte Graphite Charcoal
   3D Animated Hologram Core · Watermark TERMINALX999 · Low Curve
   ───────────────────────────────────────────────────────────── */

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

:root {
  /* Exact rgb(20, 20, 20) Base Palette */
  --bg-20: rgb(20, 20, 20);
  --bg-card: rgb(26, 26, 26);
  --bg-card-hover: rgb(34, 34, 34);
  --bg-input: rgb(15, 15, 15);

  --border-subtle: rgb(38, 38, 38);
  --border-line: rgb(48, 48, 48);
  --border-light: rgb(65, 65, 65);

  --text-white: #ffffff;
  --text-silver: #b5bcc9;
  --text-gray: #7d8799;
  --text-dim: #4d5563;

  --emerald: #00e676;
  --rose: #ff2d55;
  --cyan: #00f2fe;

  --font-sans: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --r-sm: 3px;
  --r-md: 4px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-20);
  color: var(--text-white);
  font-family: var(--font-sans);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-20); }
::-webkit-scrollbar-thumb { background: rgb(45, 45, 45); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgb(75, 75, 75); }

/* ── HEADER ── */
.app-header {
  background: rgba(20, 20, 20, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 2.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.header-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  cursor: pointer;
}

.brand-glyph-svg {
  width: 30px;
  height: 30px;
  color: #fff;
}

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

.brand-title {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #ffffff;
  text-transform: uppercase;
  line-height: 1.1;
}

.brand-subtitle {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: var(--text-gray);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-top: 0.2rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.btn-header-login {
  background: rgb(26, 26, 26);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  padding: 0.5rem 1.25rem;
  border-radius: var(--r-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-header-login:hover {
  background: rgb(35, 35, 35);
  border-color: var(--border-light);
}

.btn-header-signup {
  background: #ffffff;
  border: 1px solid #ffffff;
  color: rgb(20, 20, 20);
  padding: 0.5rem 1.25rem;
  border-radius: var(--r-md);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-header-signup:hover {
  background: #e5e5e5;
  transform: translateY(-1px);
}

/* ── COSMIC STARFIELD CANVAS (INSIDE HERO SECTION ONLY) ── */
#cosmic-starfield {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* ── QUANTUM CYBER CORE BADGE ── */
.quantum-badge-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2.25rem;
  position: relative;
  z-index: 2;
}

.quantum-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(28, 28, 28, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  padding: 0.45rem 1.1rem;
  border-radius: var(--r-sm);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.quantum-pill:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(34, 34, 34, 0.95);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 242, 254, 0.15);
}

.quantum-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00f2fe;
  box-shadow: 0 0 10px #00f2fe, 0 0 20px rgba(0, 242, 254, 0.8);
  animation: quantum-pulse 2s infinite ease-in-out;
}

@keyframes quantum-pulse {
  0%, 100% {
    transform: scale(0.9);
    opacity: 0.8;
    box-shadow: 0 0 6px #00f2fe;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
    box-shadow: 0 0 14px #00f2fe, 0 0 25px rgba(0, 242, 254, 0.9);
  }
}

.quantum-badge-text {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--text-silver);
  text-transform: uppercase;
}

.quantum-latency {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.15rem 0.4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  color: #a0a0a0;
}
  animation: nucleus-pulse 2s ease-in-out infinite;
}

@keyframes nucleus-pulse {
  0%, 100% { transform: scale(0.85); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; }
}

/* Hologram Caption */
.holo-caption-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.725rem;
  color: var(--text-silver);
  background: rgb(26, 26, 26);
  border: 1px solid var(--border-subtle);
  padding: 0.45rem 1.15rem;
  border-radius: var(--r-md);
  margin-top: 1.25rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.live-dot-glow {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
}

/* ── HERO SECTION ── */
.hero-wrapper {
  position: relative;
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.5rem 3.5rem;
  text-align: center;
  overflow: hidden;
  background-color: transparent;
}

/* Giant Background Watermark Text: TERMINALX999 (Fitted & Responsive) */
.hero-watermark {
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(3.5rem, 11vw, 11.5rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.03);
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
  z-index: 1;
  max-width: 100vw;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 820px;
  margin: 0 auto;
}

/* Main Heading: Ready to begin? */
.hero-headline {
  font-size: clamp(3.2rem, 7.5vw, 5.8rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 1.5rem;
  background: linear-gradient(180deg, #ffffff 30%, #7d8594 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtext {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-silver);
  line-height: 1.65;
  margin-bottom: 2.75rem;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.15rem;
  flex-wrap: wrap;
}

.btn-hero-action {
  background: rgb(26, 26, 26);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  padding: 0.85rem 1.75rem;
  border-radius: var(--r-md);
  font-size: 0.925rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  transition: all 0.25s ease;
  text-decoration: none;
}
.btn-hero-action:hover {
  background: rgb(34, 34, 34);
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-dim);
  font-size: 1.1rem;
  animation: bounce-subtle 2s infinite;
  z-index: 10;
}
@keyframes bounce-subtle {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
  40% { transform: translateY(-6px) translateX(-50%); }
  60% { transform: translateY(-3px) translateX(-50%); }
}

/* ── SPECIFICATION CARDS ── */
.spec-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
  position: relative;
  z-index: 10;
}

.section-head {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 3.5rem;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.725rem;
  color: var(--text-gray);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #ffffff;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.spec-card {
  background: rgb(26, 26, 26);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 1.75rem;
  transition: all 0.25s ease;
}
.spec-card:hover {
  border-color: var(--border-light);
  background: rgb(32, 32, 32);
  transform: translateY(-2px);
}

.spec-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-gray);
  border: 1px solid var(--border-subtle);
  background: var(--bg-20);
  padding: 0.25rem 0.55rem;
  border-radius: var(--r-sm);
  display: inline-block;
  margin-bottom: 1.25rem;
}

.spec-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.spec-desc {
  font-size: 0.85rem;
  color: var(--text-silver);
  line-height: 1.6;
}

/* ── MODALS ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(12px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-box {
  background: rgb(24, 24, 24);
  border: 1px solid var(--border-line);
  border-radius: var(--r-md);
  width: 100%;
  max-width: 440px;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.95);
  overflow: hidden;
}

.modal-head {
  background: var(--bg-20);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-head-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-body {
  padding: 1.75rem;
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
}

.auth-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.75rem;
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--text-gray);
  cursor: pointer;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.auth-tab.active {
  color: #ffffff;
  border-bottom-color: #ffffff;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.725rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-silver);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  background: rgb(16, 16, 16);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  padding: 0.75rem 0.95rem;
  font-size: 0.875rem;
  color: #fff;
  font-family: var(--font-sans);
  outline: none;
  transition: all 0.2s ease;
}

.form-control:focus {
  border-color: #ffffff;
  box-shadow: 0 0 0 1px #ffffff;
}

.btn-auth-submit {
  width: 100%;
  background: #ffffff;
  color: rgb(20, 20, 20);
  border: none;
  border-radius: var(--r-sm);
  padding: 0.85rem;
  font-size: 0.875rem;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  letter-spacing: 0.05em;
  margin-top: 1rem;
  transition: all 0.2s;
}
.btn-auth-submit:hover {
  background: #e5e5e5;
}

/* ── MISSION CONSOLE DASHBOARD ── */
.dashboard-root {
  max-width: 1440px;
  margin: 0 auto;
  padding: 2rem 2.5rem 5rem;
}

.console-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.25rem;
  margin-bottom: 2rem;
  gap: 1rem;
}

.console-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.console-tab {
  background: rgb(26, 26, 26);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  padding: 0.65rem 1.15rem;
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--text-silver);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.console-tab.active {
  background: rgb(38, 38, 38);
  border-color: #ffffff;
  color: #ffffff;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.metric-card {
  background: rgb(26, 26, 26);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 1.5rem;
  position: relative;
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 0.725rem;
  color: var(--text-gray);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}

.metric-value {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 900;
  color: #ffffff;
}

.metric-sub {
  font-size: 0.75rem;
  color: var(--text-silver);
  margin-top: 0.45rem;
}

.panel {
  background: rgb(26, 26, 26);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 1.75rem;
  margin-bottom: 2rem;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
}

.panel-title {
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
}

/* Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
}

.table-sharp {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.table-sharp th {
  background: var(--bg-20);
  color: var(--text-gray);
  font-family: var(--font-mono);
  font-size: 0.725rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
}

.table-sharp td {
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border-subtle);
  color: #fff;
}

.table-sharp tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Badges */
.badge-sharp {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.725rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--r-sm);
  text-transform: uppercase;
  font-weight: 700;
}
.badge-sharp.online { background: rgba(0, 230, 118, 0.1); color: var(--emerald); border: 1px solid rgba(0, 230, 118, 0.25); }
.badge-sharp.dim { background: var(--bg-20); color: var(--text-gray); border: 1px solid var(--border-subtle); }

/* Toasts */
#toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.toast-sharp {
  background: rgb(28, 28, 28);
  border: 1px solid var(--border-line);
  border-left: 3px solid #ffffff;
  border-radius: var(--r-sm);
  padding: 0.85rem 1.35rem;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 280px;
}
.toast-sharp.error { border-left-color: var(--rose); }

/* Grid 2 */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 1100px) {
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .spec-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .app-header { padding: 1rem; }
  .dashboard-root { padding: 1rem; }
}
