/* ==========================================================================
   RESEARCH & TECHNOLOGY // HIMALKOM IPB - DIVISION REVEAL SYSTEM
   Aesthetic: Modern, Cyber-Futuristic, Research-Tech, Premium Dark Mode
   ========================================================================== */

/* --- CSS Reset & Variables --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  /* Core Color Palette */
  --bg-deep: #060813;
  --bg-surface: rgba(14, 22, 45, 0.75);
  --bg-surface-elevated: rgba(20, 32, 65, 0.85);
  --bg-card: rgba(10, 16, 36, 0.82);
  
  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-active: rgba(0, 242, 254, 0.45);
  --border-glow: rgba(0, 242, 254, 0.8);

  /* Primary Accents (Electric Cyan / Cyber Blue) */
  --cyan-primary: #00f2fe;
  --cyan-bright: #4facfe;
  --cyan-glow: rgba(0, 242, 254, 0.35);

  /* Secondary Accents (Cosmic Violet / Purple) */
  --purple-primary: #a855f7;
  --purple-bright: #c084fc;
  --purple-glow: rgba(168, 85, 247, 0.35);

  /* Status Colors */
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.3);
  --danger: #ff3366;
  --danger-glow: rgba(255, 51, 102, 0.4);

  /* Typography Colors */
  --text-pure: #ffffff;
  --text-primary: #f1f5f9;
  --text-secondary: rgba(255, 255, 255, 0.72);
  --text-muted: rgba(255, 255, 255, 0.44);

  /* Font Families */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Transitions */
  --tr-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --tr-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --tr-dramatic: 0.65s cubic-bezier(0.2, 0.8, 0.2, 1);
}

html, body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
}

/* Background Layers */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999;
  pointer-events: none;
}

/* Cyber Grid Background Pattern */
.cyber-grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.8) 0%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.8) 0%, transparent 85%);
}

/* Ambient Radial Glows */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 1;
  opacity: 0.45;
  transition: all 1.2s ease;
}

.glow-primary {
  width: 480px;
  height: 480px;
  top: -120px;
  right: -100px;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.25) 0%, transparent 70%);
}

.glow-secondary {
  width: 520px;
  height: 520px;
  bottom: -150px;
  left: -120px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.2) 0%, transparent 70%);
}

/* Dynamic glow adjustments when division is revealed */
body.division-web .glow-primary {
  background: radial-gradient(circle, rgba(0, 242, 254, 0.5) 0%, transparent 70%);
  opacity: 0.75;
}
body.division-web .glow-secondary {
  background: radial-gradient(circle, rgba(79, 172, 254, 0.35) 0%, transparent 70%);
  opacity: 0.6;
}

body.division-research .glow-primary {
  background: radial-gradient(circle, rgba(168, 85, 247, 0.55) 0%, transparent 70%);
  opacity: 0.75;
}
body.division-research .glow-secondary {
  background: radial-gradient(circle, rgba(236, 72, 153, 0.35) 0%, transparent 70%);
  opacity: 0.6;
}

/* --- System Header --- */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: rgba(6, 8, 19, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 100;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-pulse {
  width: 8px;
  height: 8px;
  background: var(--cyan-primary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--cyan-primary);
  animation: pulse-ring 2s infinite;
}

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

.brand-main {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-pure);
}

.brand-sub {
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  font-weight: 600;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.system-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 100px;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--success);
}

.status-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--success);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 6px 10px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--tr-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

/* --- App Main Layout --- */
.app-container {
  position: relative;
  z-index: 10;
  width: 100%;
  min-height: 100vh;
  padding: 76px 16px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

/* Stages Architecture */
.stage {
  display: none;
  width: 100%;
  max-width: 480px;
  padding: 10px 0 30px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(12px) scale(0.99);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.stage.active {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.stage-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

/* ==========================================================================
   STAGE 1: WELCOME SCREEN STYLES
   ========================================================================== */
.welcome-layout {
  gap: 24px;
  padding: 10px 0;
}

.cyber-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 5px 12px;
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.28);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--cyan-primary);
  letter-spacing: 0.08em;
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.12);
  max-width: 100%;
}

.pill-dot {
  width: 6px;
  height: 6px;
  background: var(--cyan-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--cyan-primary);
  flex-shrink: 0;
}

.welcome-heading-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.glitch-title {
  font-size: clamp(1.85rem, 7.5vw, 2.9rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #ffffff;
  background: linear-gradient(135deg, #ffffff 30%, rgba(255, 255, 255, 0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
  word-break: break-word;
}

.org-subtitles {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.org-dept {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--cyan-bright);
  letter-spacing: 0.02em;
}

.org-himalkom {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  font-family: var(--font-mono);
}

/* Quote Box */
.journey-quote-box {
  position: relative;
  max-width: 380px;
  width: 100%;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 2px solid var(--cyan-primary);
  border-radius: 0 8px 8px 0;
}

.quote-text {
  font-size: 0.98rem;
  font-style: italic;
  color: var(--text-primary);
  font-weight: 500;
}

/* 7-2-1 Stats Strip */
.stats-counter-strip {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(14, 22, 45, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  width: 100%;
  max-width: 380px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.stat-num {
  font-size: 1.45rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--cyan-primary);
  line-height: 1.1;
  text-shadow: 0 0 12px var(--cyan-glow);
}

.stat-label {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-top: 3px;
  white-space: nowrap;
}

.stat-divider {
  font-family: var(--font-mono);
  color: rgba(255, 255, 255, 0.18);
  font-size: 0.9rem;
}

.system-intro-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  max-width: 420px;
  line-height: 1.55;
}

.cta-action-wrap {
  width: 100%;
  max-width: 380px;
  margin-top: 6px;
}

.stage-footnote {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

/* ==========================================================================
   BUTTONS & CYBER INTERACTIVE CONTROLS
   ========================================================================== */
.cyber-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--font-sans);
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--tr-fast);
  overflow: hidden;
  text-decoration: none;
  width: 100%;
}

.primary-btn {
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  color: #060813;
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.35);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 242, 254, 0.55);
}

.primary-btn:active {
  transform: translateY(1px);
}

.pulse-glow {
  animation: button-pulse 2.8s infinite;
}

@keyframes button-pulse {
  0%, 100% {
    box-shadow: 0 4px 20px rgba(0, 242, 254, 0.35);
  }
  50% {
    box-shadow: 0 6px 30px rgba(0, 242, 254, 0.65);
  }
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
}

.danger-btn {
  background: linear-gradient(135deg, #ff3366 0%, #e11d48 100%);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(255, 51, 102, 0.35);
}

.danger-btn:hover {
  box-shadow: 0 8px 28px rgba(255, 51, 102, 0.5);
  transform: translateY(-2px);
}

.btn-arrow {
  transition: transform 0.2s ease;
  font-size: 1.1rem;
}

.cyber-btn:hover .btn-arrow {
  transform: translateX(4px);
}

.btn-shimmer {
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
}

.cyber-btn:hover .btn-shimmer {
  animation: shimmer-sweep 0.8s ease;
}

@keyframes shimmer-sweep {
  100% {
    left: 200%;
  }
}

.cyber-link-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 8px 12px;
  transition: var(--tr-fast);
  margin-top: 16px;
}

.cyber-link-btn:hover {
  color: var(--cyan-primary);
}

/* ==========================================================================
   STAGE 2: NIM VERIFICATION STYLES
   ========================================================================== */
.verify-layout {
  gap: 24px;
}

.cyber-step-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--cyan-bright);
}

.step-code {
  font-weight: 700;
}

.step-slash {
  color: rgba(255, 255, 255, 0.25);
}

.step-name {
  color: var(--text-muted);
}

.verify-heading-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.verify-title {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #ffffff;
  line-height: 1.2;
}

.verify-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 440px;
  line-height: 1.5;
}

/* Cyber Card with Brackets */
.cyber-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 30px 24px;
  width: 100%;
  max-width: 440px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.card-corner {
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: var(--cyan-primary);
  opacity: 0.6;
}

.card-corner.top-left {
  top: 6px;
  left: 6px;
  border-top: 2px solid var(--cyan-primary);
  border-left: 2px solid var(--cyan-primary);
}
.card-corner.top-right {
  top: 6px;
  right: 6px;
  border-top: 2px solid var(--cyan-primary);
  border-right: 2px solid var(--cyan-primary);
}
.card-corner.bottom-left {
  bottom: 6px;
  left: 6px;
  border-bottom: 2px solid var(--cyan-primary);
  border-left: 2px solid var(--cyan-primary);
}
.card-corner.bottom-right {
  bottom: 6px;
  right: 6px;
  border-bottom: 2px solid var(--cyan-primary);
  border-right: 2px solid var(--cyan-primary);
}

.input-field-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  margin-bottom: 22px;
}

.input-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.input-container {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(6, 8, 19, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  transition: var(--tr-fast);
  overflow: hidden;
}

.input-container:focus-within {
  border-color: var(--cyan-primary);
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.28);
}

.input-prefix {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cyan-primary);
  background: rgba(0, 242, 254, 0.06);
  height: 52px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.input-container input {
  flex: 1;
  height: 52px;
  padding: 0 14px;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.input-container input::placeholder {
  color: rgba(255, 255, 255, 0.28);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  text-transform: none;
}

.clear-input-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 0 12px;
  cursor: pointer;
  transition: var(--tr-fast);
}

.clear-input-btn:hover {
  color: #ffffff;
}

.input-helper {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* ==========================================================================
   INVALID IDENTITY MODAL / CARD
   ========================================================================== */
.cyber-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cyber-modal.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 14, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.modal-card {
  position: relative;
  z-index: 10;
  background: rgba(18, 12, 24, 0.95);
  border: 1px solid rgba(255, 51, 102, 0.45);
  border-radius: 18px;
  padding: 32px 24px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(255, 51, 102, 0.25);
  overflow: hidden;
}

.modal-glow-red {
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 51, 102, 0.35) 0%, transparent 70%);
  pointer-events: none;
}

.modal-icon-wrap {
  margin-bottom: 14px;
}

.error-badge-icon {
  font-size: 2.2rem;
  display: inline-block;
  animation: pulse-warn 1.5s infinite;
}

@keyframes pulse-warn {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.modal-title {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 800;
  color: #ff4d6d;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.modal-main-desc {
  font-size: 1.02rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 8px;
  line-height: 1.45;
}

.modal-sub-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  justify-content: center;
}

.shake-animation {
  animation: cyber-shake 0.45s ease-in-out;
}

@keyframes cyber-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* ==========================================================================
   STAGE 2.5: SCANNING & ANALYSIS ANIMATION STYLES
   ========================================================================== */
.analyzing-layout {
  gap: 28px;
  padding: 20px 0;
}

.scanner-container {
  position: relative;
  width: 170px;
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radar-outer-ring {
  position: absolute;
  inset: 0;
  border: 1.5px dashed rgba(0, 242, 254, 0.4);
  border-radius: 50%;
  animation: radar-spin 12s linear infinite;
}

.radar-middle-ring {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(0, 242, 254, 0.25);
  border-radius: 50%;
}

.radar-inner-core {
  position: relative;
  width: 74px;
  height: 74px;
  background: rgba(0, 242, 254, 0.08);
  border: 1.5px solid var(--cyan-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.35);
}

.core-glyph {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.08em;
}

.radar-sweep-beam {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(0, 242, 254, 0.4) 0deg, transparent 65deg, transparent 360deg);
  animation: radar-sweep 2.2s linear infinite;
}

@keyframes radar-spin {
  100% { transform: rotate(360deg); }
}

@keyframes radar-sweep {
  100% { transform: rotate(360deg); }
}

.analysis-progress-box {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
}

.meta-label {
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.meta-val {
  color: var(--cyan-primary);
}

.progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00f2fe, #4facfe);
  box-shadow: 0 0 14px var(--cyan-primary);
  border-radius: 100px;
  transition: width 0.3s ease;
}

.analysis-status-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 20px;
  background: rgba(6, 8, 19, 0.7);
  border: 1px solid rgba(0, 242, 254, 0.25);
  border-radius: 8px;
  width: 100%;
  max-width: 440px;
}

.terminal-prefix {
  font-family: var(--font-mono);
  color: var(--cyan-primary);
  font-weight: 700;
  font-size: 0.95rem;
}

.status-typing-text {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.06em;
}

.terminal-caret {
  font-family: var(--font-mono);
  color: var(--cyan-primary);
  animation: blink-caret 0.8s infinite;
  font-weight: 700;
}

@keyframes blink-caret {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 440px;
}

.telemetry-item {
  display: flex;
  flex-direction: column;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.telem-key {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.telem-val {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-primary);
  font-weight: 600;
  margin-top: 2px;
}

.status-highlight {
  color: var(--cyan-primary);
}

/* ==========================================================================
   STAGE 3: DIVISION REVEAL STYLES (THE CLIMAX)
   ========================================================================== */
.reveal-layout {
  gap: 24px;
}

/* Phase 1: Teaser Build-up */
.reveal-buildup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 30px 10px;
}

.buildup-banner {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cyan-primary);
  letter-spacing: 0.15em;
  padding: 6px 16px;
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.25);
  border-radius: 100px;
}

.buildup-title {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  text-shadow: 0 0 35px rgba(255, 255, 255, 0.2);
}

.buildup-subtitle {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  animation: pulse-buildup 1.2s infinite alternate;
}

@keyframes pulse-buildup {
  from { opacity: 0.6; }
  to { opacity: 1; }
}

/* Phase 2: Dramatic Reveal Showcase */
.reveal-showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  width: 100%;
}

/* Personalized Banner: subtle greeting */
.personal-greeting-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  backdrop-filter: blur(12px);
  max-width: 440px;
  width: 100%;
  text-align: left;
}

.user-avatar-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan-primary), var(--purple-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: #060813;
  box-shadow: 0 0 14px var(--cyan-glow);
  flex-shrink: 0;
}

.greeting-text-wrap {
  display: flex;
  flex-direction: column;
}

.greeting-prefix {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.greeting-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.greeting-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* Reveal Hero Card */
.reveal-hero-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 36px 24px 32px;
  width: 100%;
  max-width: 520px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.reveal-badge-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  margin-bottom: 12px;
}

.assigned-lead-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

/* DIVISION TITLE CONTAINER & DRAMATIC ANIMATION */
.division-title-container {
  width: 100%;
  padding: 8px 0 14px;
}

.reveal-division-title {
  font-size: clamp(2.1rem, 7vw, 3.1rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-align: center;
  word-break: break-word;
  hyphens: auto;
  transition: transform 0.6s ease, filter 0.6s ease;
}

/* Dramatic Reveal Keyframe Animation */
.animate-dramatic-reveal {
  animation: dramatic-reveal-burst 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes dramatic-reveal-burst {
  0% {
    opacity: 0;
    transform: scale(0.7);
    filter: blur(14px);
  }
  60% {
    opacity: 1;
    transform: scale(1.05);
    filter: blur(0px);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0px);
  }
}

/* Division Specific Styling */
body.division-web .reveal-division-title {
  color: #00f2fe;
  background: linear-gradient(135deg, #ffffff 15%, #00f2fe 60%, #4facfe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 30px rgba(0, 242, 254, 0.55));
}

body.division-research .reveal-division-title {
  color: #c084fc;
  background: linear-gradient(135deg, #ffffff 15%, #c084fc 60%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 30px rgba(168, 85, 247, 0.55));
}

body.division-web .reveal-hero-card {
  border-color: rgba(0, 242, 254, 0.35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 242, 254, 0.15);
}

body.division-research .reveal-hero-card {
  border-color: rgba(168, 85, 247, 0.35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(168, 85, 247, 0.15);
}

.division-dept-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}

.dept-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.dept-himalkom {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.division-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 260px;
  margin: 18px 0;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.divider-gem {
  width: 6px;
  height: 6px;
  transform: rotate(45deg);
  background: var(--cyan-primary);
}

body.division-research .divider-gem {
  background: var(--purple-primary);
}

.division-body {
  margin-bottom: 20px;
  max-width: 440px;
}

.division-desc-text {
  font-size: 0.96rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Division Pillars */
.division-pillars-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 26px;
  max-width: 440px;
}

.pillar-chip {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.pillar-chip::before {
  content: "✦";
  font-size: 0.7rem;
  color: var(--cyan-primary);
}

body.division-research .pillar-chip::before {
  color: var(--purple-primary);
}

/* Action CTA Group */
.division-cta-group {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.action-cta-btn {
  font-size: 1.02rem;
  padding: 16px 28px;
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  color: #060813 !important;
  font-weight: 800;
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.35);
  border-radius: 12px;
  transition: var(--tr-fast);
}

.action-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 242, 254, 0.55);
}

body.division-web .action-cta-btn {
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  color: #060813 !important;
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.4);
}

body.division-research .action-cta-btn {
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
  color: #ffffff !important;
}

body.division-research .action-cta-btn:hover {
  box-shadow: 0 8px 30px rgba(168, 85, 247, 0.6);
}

.next-chapter-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Ending Section */
.ending-section {
  width: 100%;
  max-width: 480px;
  padding: 30px 20px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 10px;
}

.ending-title {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ffffff;
}

.ending-message {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.ending-org {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cyan-bright);
  letter-spacing: 0.1em;
  margin-top: 2px;
}

.ending-actions {
  width: 100%;
  max-width: 240px;
  margin-top: 8px;
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.cyber-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(14, 22, 45, 0.95);
  border: 1px solid var(--border-active);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  z-index: 1000;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.cyber-toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   ANIMATIONS & KEYFRAMES
   ========================================================================== */
.animate-fade-in {
  opacity: 0;
  animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.animate-slide-down {
  animation: slideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 242, 254, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(0, 242, 254, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 242, 254, 0); }
}

/* ==========================================================================
   MOBILE-FIRST RESPONSIVE OPTIMIZATIONS
   ========================================================================== */
/* ==========================================================================
   MOBILE-FIRST RESPONSIVE OPTIMIZATIONS
   ========================================================================== */
@media (max-width: 480px) {
  .app-header {
    padding: 0 12px;
    height: 54px;
  }
  .brand-main {
    font-size: 0.76rem;
  }
  .brand-sub {
    font-size: 0.58rem;
  }
  .system-status {
    padding: 3px 8px;
  }
  .status-label {
    font-size: 0.58rem;
  }
  .app-container {
    padding: 68px 12px 36px;
  }
  .stage {
    max-width: 100%;
    padding: 6px 0 30px;
  }
  .cyber-card, .reveal-hero-card {
    padding: 22px 14px;
    border-radius: 16px;
    max-width: 100%;
    width: 100%;
  }
  .glitch-title {
    font-size: 1.85rem;
    line-height: 1.15;
  }
  .org-dept {
    font-size: 1rem;
  }
  .reveal-division-title {
    font-size: 1.6rem;
    line-height: 1.15;
  }
  .stats-counter-strip {
    padding: 10px 6px;
    gap: 4px;
    max-width: 100%;
    width: 100%;
  }
  .stat-num {
    font-size: 1.3rem;
  }
  .stat-label {
    font-size: 0.55rem;
  }
  .stat-divider {
    font-size: 0.75rem;
  }
  .journey-quote-box {
    max-width: 100%;
    padding: 10px 12px;
  }
  .quote-text {
    font-size: 0.92rem;
  }
  .system-intro-desc {
    max-width: 100%;
    font-size: 0.85rem;
  }
  .telemetry-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .modal-card {
    padding: 26px 16px;
  }
}
