/* NERO - Neural Embedded Runtime Operator Cyberpunk/KITT Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Orbitron:wght@400;600;800;900&family=Share+Tech+Mono&display=swap');

:root {
  --bg-dark: #070709;
  --bg-card: #0d0e14;
  --bg-card-hover: #141622;
  --bg-chat-user: #1c1524;
  --bg-chat-nero: #160a0e;
  --nero-red: #ff1e38;
  --nero-red-glow: rgba(255, 30, 56, 0.5);
  --nero-red-dim: #7a0c18;
  --nero-cyan: #00f0ff;
  --text-main: #f0f0f5;
  --text-muted: #8a8d9b;
  --border-color: #222433;
  --font-heading: 'Orbitron', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
}

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

html, body {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 16px;
  display: flex;
  flex-direction: column;
}

/* KITT Scanner Header */
.scanner-container {
  width: 100%;
  height: 6px;
  background-color: #120305;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 15px var(--nero-red-glow);
  flex-shrink: 0;
}

.scanner-bar {
  width: 120px;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, var(--nero-red) 50%, transparent 100%);
  position: absolute;
  top: 0;
  left: -120px;
  box-shadow: 0 0 12px var(--nero-red), 0 0 20px var(--nero-red);
  animation: kittSweep 2.2s infinite ease-in-out alternate;
}

@keyframes kittSweep {
  0% {
    left: -120px;
  }
  100% {
    left: calc(100% + 120px);
  }
}

/* Header */
.nero-header {
  background-color: rgba(13, 14, 20, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  flex-shrink: 0;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.3rem;
  letter-spacing: 2px;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 30, 56, 0.6);
}

.brand-subtitle {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--nero-red);
  letter-spacing: 1px;
}

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

.lang-selector {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2px;
  gap: 2px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn.active {
  background: var(--nero-red);
  color: #ffffff;
  box-shadow: 0 0 8px var(--nero-red-glow);
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: rgba(255, 30, 56, 0.1);
  border: 1px solid var(--nero-red-dim);
  padding: 3px 8px;
  border-radius: 20px;
  color: var(--nero-red);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--nero-red);
  box-shadow: 0 0 8px var(--nero-red);
  animation: pulseDot 1.5s infinite alternate;
}

@keyframes pulseDot {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}

/* Main Container - 100dvh Lock */
.main-wrapper {
  flex: 1;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

/* Hero Card */
.hero-card {
  background: linear-gradient(135deg, rgba(255, 30, 56, 0.08) 0%, rgba(13, 14, 20, 0.9) 100%);
  border: 1px solid rgba(255, 30, 56, 0.3);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
  transition: opacity 0.3s ease, margin-bottom 0.3s ease, padding 0.3s ease;
}

.z4-icon {
  font-size: 1.8rem;
  color: var(--nero-red);
  text-shadow: 0 0 12px var(--nero-red);
}

.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  letter-spacing: 1px;
  color: #fff;
  margin-bottom: 2px;
}

.hero-info p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Chat Stream Container - Fills all available height & scrolls internally */
.chat-container {
  flex: 1;
  min-height: 0;
  background-color: var(--bg-card);
  background-image: linear-gradient(rgba(13, 14, 20, 0.45), rgba(13, 14, 20, 0.65)), url('../images/chat_bg.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 10px;
  -webkit-overflow-scrolling: touch;
}

.message-bubble {
  max-width: 88%;
  padding: 11px 16px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.55;
  letter-spacing: 0.15px;
  animation: fadeInMsg 0.25s ease-out;
}

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

.user-message {
  align-self: flex-end;
  background-color: rgba(28, 21, 36, 0.92);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-bottom-right-radius: 2px;
}

.nero-message {
  align-self: flex-start;
  background-color: rgba(22, 10, 14, 0.92);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 30, 56, 0.4);
  color: var(--text-main);
  border-bottom-left-radius: 2px;
  box-shadow: 0 2px 12px rgba(255, 30, 56, 0.15);
}

.message-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nero-label {
  color: var(--nero-red);
  font-weight: bold;
}

/* Voice Audio Waveform Animation */
.waveform-visualizer {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 16px;
  margin-top: 8px;
}

.wave-bar {
  width: 3px;
  height: 100%;
  background-color: var(--nero-red);
  border-radius: 2px;
  animation: wavePulse 0.8s infinite ease-in-out alternate;
}

.wave-bar:nth-child(2) { animation-delay: 0.1s; }
.wave-bar:nth-child(3) { animation-delay: 0.2s; }
.wave-bar:nth-child(4) { animation-delay: 0.3s; }
.wave-bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes wavePulse {
  0% { height: 20%; }
  100% { height: 100%; }
}

/* Quick Suggestion Chips */
.chips-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-top: 4px;
  padding-bottom: 6px;
  margin-bottom: 6px;
  scrollbar-width: none;
  flex-shrink: 0;
}

.chips-container::-webkit-scrollbar {
  display: none;
}

.prompt-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 7px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-family: var(--font-body);
  white-space: nowrap;
  cursor: pointer;
  margin-top: 2px;
  transition: all 0.2s ease;
}

.prompt-chip:hover {
  background: var(--bg-card-hover);
  color: #fff;
  border-color: var(--nero-red);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(255, 30, 56, 0.25);
}

/* Input Area - Fixed at bottom of main-wrapper */
.input-form {
  display: flex;
  gap: 8px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 8px 12px;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.chat-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 1.02rem;
  outline: none;
  padding: 6px 4px;
}

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

.btn-send {
  background: linear-gradient(135deg, #ff1e38 0%, #b30018 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 1px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 0 10px rgba(255, 30, 56, 0.4);
}

.btn-send:hover {
  box-shadow: 0 0 15px rgba(255, 30, 56, 0.8);
  transform: scale(1.02);
}

.btn-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.speech-toggle {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.speech-toggle.active {
  color: var(--nero-cyan);
  border-color: var(--nero-cyan);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

/* Backoffice Admin UI Styles */
.admin-header {
  border-bottom-color: rgba(255, 30, 56, 0.4);
}

.admin-nav {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  flex-shrink: 0;
}

.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.nav-tab.active {
  background: rgba(255, 30, 56, 0.15);
  color: #fff;
  border: 1px solid var(--nero-red-dim);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.metric-value {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--nero-red);
  margin-top: 4px;
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.data-table th {
  background: #11131c;
  font-family: var(--font-mono);
  color: var(--text-muted);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

.data-table tr:hover {
  background: var(--bg-card-hover);
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--nero-red);
  box-shadow: 0 0 30px var(--nero-red-glow);
  border-radius: 12px;
  width: 90%;
  max-width: 450px;
  padding: 24px;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
  .chat-container {
    background-size: 100% auto;
    background-position: center bottom;
  }
}

/* Session Countdown Timer Badge */
.session-timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(229, 9, 20, 0.15);
  border: 1px solid var(--nero-red);
  color: var(--nero-red);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  box-shadow: 0 0 10px rgba(229, 9, 20, 0.2);
  transition: all 0.3s ease;
}

.session-timer-badge.timer-warning {
  background: rgba(245, 158, 11, 0.15);
  border-color: #f59e0b;
  color: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.session-timer-badge.timer-danger {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #ef4444;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.5);
  animation: pulseTimer 1s infinite alternate;
}

@keyframes pulseTimer {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.05); opacity: 0.85; }
}

.session-timer-badge.timer-inactive {
  opacity: 0.5;
  border-color: var(--text-muted);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

/* Session Expired / Locked Notice */
.session-lock-notice {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.18), rgba(20, 10, 15, 0.85));
  border: 1px solid var(--nero-red);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 0 20px rgba(229, 9, 20, 0.25);
  animation: fadeInMsg 0.3s ease-out;
}

.session-lock-notice .lock-icon {
  font-size: 2rem;
  color: var(--nero-red);
  text-shadow: 0 0 12px var(--nero-red);
}

.session-lock-notice .lock-info h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: #fff;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.session-lock-notice .lock-info p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Chat View Container */
.chat-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
}

/* ======================================================= */
/* PROJECT PRESENTATION VIEW STYLING                       */
/* ======================================================= */
.presentation-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeInMsg 0.4s ease-out;
  padding-bottom: 20px;
  overflow-y: auto;
  width: 100%;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.presentation-view::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.presentation-view > * {
  flex-shrink: 0;
}

/* Dedicated Hero Image Header Banner */
.hero-image-banner {
  width: 100%;
  height: 200px;
  background-image: linear-gradient(180deg, rgba(7, 7, 9, 0.1) 0%, rgba(7, 7, 9, 0.7) 100%), url('../images/chat_bg.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  border: 1px solid rgba(255, 30, 56, 0.35);
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  box-sizing: border-box;
}

.presentation-hero {
  text-align: center;
  background: linear-gradient(135deg, rgba(20, 22, 32, 0.9), rgba(10, 11, 16, 0.95));
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px 18px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.presentation-hero h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  letter-spacing: 2px;
  color: #fff;
  margin-bottom: 4px;
}

.pres-subtitle {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--nero-red);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.pres-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 600px;
  margin: 0 auto;
}

/* QR Code Scan CTA Card */
.qr-cta-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.2), rgba(15, 17, 26, 0.95));
  border: 1px solid var(--nero-red);
  border-radius: 16px;
  padding: 26px 22px;
  box-shadow: 0 0 25px rgba(229, 9, 20, 0.3);
  position: relative;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.qr-cta-icon-wrapper {
  position: relative;
  width: 68px;
  height: 68px;
  min-width: 68px;
  background: #000;
  border: 2px solid var(--nero-red);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px var(--nero-red-glow);
  flex-shrink: 0;
}

.qr-scan-icon {
  font-size: 2.2rem;
  color: #fff;
}

.laser-scanner-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--nero-red);
  box-shadow: 0 0 8px var(--nero-red);
  animation: scanLaser 2s infinite ease-in-out;
}

@keyframes scanLaser {
  0% { top: 10%; opacity: 0.2; }
  50% { top: 85%; opacity: 1; }
  100% { top: 10%; opacity: 0.2; }
}

.qr-cta-info {
  flex: 1;
  min-width: 0;
  padding: 2px 0;
}

.qr-cta-info h3 {
  font-family: var(--font-heading);
  font-size: 0.94rem;
  color: #fff;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
  line-height: 1.4;
  word-break: break-word;
}

.qr-cta-info p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.scan-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(229, 9, 20, 0.25);
  border: 1px solid var(--nero-red);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  box-sizing: border-box;
}

/* Project Grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.25s ease;
}

.project-card:hover {
  border-color: var(--nero-red);
  transform: translateY(-2px);
}

.project-card .card-icon {
  font-size: 1.4rem;
  color: var(--nero-red);
  margin-bottom: 8px;
}

.project-card h4 {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: #fff;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.project-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Project Story / Evolution Section */
.story-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.story-header {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: #fff;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.story-header i {
  color: var(--nero-red);
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.story-card {
  background: rgba(10, 11, 16, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px;
  transition: all 0.25s ease;
}

.story-card:hover {
  border-color: rgba(255, 30, 56, 0.4);
  transform: translateY(-2px);
}

.story-step-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--nero-red);
  font-weight: bold;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.story-card h4 {
  font-family: var(--font-heading);
  font-size: 0.84rem;
  color: #fff;
  margin-bottom: 4px;
}

.story-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

@media (max-width: 600px) {
  .hero-image-banner {
    height: 140px;
  }

  .qr-cta-card {
    flex-direction: column;
    text-align: center;
    padding: 22px 16px;
    gap: 14px;
  }

  .qr-cta-icon-wrapper {
    width: 56px;
    height: 56px;
    min-width: 56px;
  }

  .qr-scan-icon {
    font-size: 1.8rem;
  }

  .qr-cta-info h3 {
    font-size: 0.88rem;
    letter-spacing: 0.4px;
    margin-bottom: 6px;
  }

  .qr-cta-info p {
    font-size: 0.84rem;
    margin-bottom: 10px;
  }

  /* Typing Indicator Animation */
.typing-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255, 30, 56, 0.15);
  border: 1px solid rgba(255, 30, 56, 0.4);
  border-radius: 20px;
  min-height: 28px;
  min-width: 60px;
  margin-top: 4px;
  margin-bottom: 2px;
}

.typing-indicator span {
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: var(--nero-red);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--nero-red);
  animation: typingBounce 1.2s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }
.typing-indicator span:nth-child(3) { animation-delay: 0s; }

@keyframes typingBounce {
  0%, 80%, 100% {
    transform: scale(0.4);
    opacity: 0.35;
  }
  40% {
    transform: scale(1.3);
    opacity: 1;
    box-shadow: 0 0 14px var(--nero-red);
  }
}

/* Queue Modal Overlay */
.queue-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 9, 14, 0.88);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeInModal 0.3s ease;
}

@keyframes fadeInModal {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.queue-modal-card {
  background: #0d0e14;
  border: 1px solid rgba(255, 170, 0, 0.5);
  box-shadow: 0 0 30px rgba(255, 170, 0, 0.25);
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  overflow: hidden;
  text-align: center;
  position: relative;
}

.queue-modal-scanner {
  height: 4px;
  background: #1a160d;
  position: relative;
  overflow: hidden;
}

.queue-scanner-bar {
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #ffaa00, transparent);
  position: absolute;
  animation: scanAmber 1.5s infinite ease-in-out alternate;
}

@keyframes scanAmber {
  0% { left: -40%; }
  100% { left: 100%; }
}

.queue-modal-header {
  padding: 18px 20px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #ffaa00;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.queue-icon-pulse {
  font-size: 1.2rem;
  animation: pulseIcon 1.2s infinite alternate;
}

@keyframes pulseIcon {
  0% { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(1.15); opacity: 1; }
}

.queue-modal-body {
  padding: 10px 24px 20px;
}

.queue-number-badge {
  background: rgba(255, 170, 0, 0.1);
  border: 1px dashed rgba(255, 170, 0, 0.4);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.queue-label {
  font-size: 0.75rem;
  color: #8a8d9b;
  letter-spacing: 1px;
}

.queue-number {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  font-weight: 900;
  color: #ffaa00;
  text-shadow: 0 0 15px rgba(255, 170, 0, 0.5);
}

.queue-desc {
  font-size: 0.88rem;
  color: #b0b3c6;
  line-height: 1.4;
  margin: 0;
}

.queue-modal-footer {
  background: rgba(0, 0, 0, 0.3);
  padding: 12px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #8a8d9b;
  font-size: 0.8rem;
}

.queue-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 170, 0, 0.2);
  border-top-color: #ffaa00;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ==========================================================================
   Voice-First NERO Communicator UI
   ========================================================================== */
.active-exchange-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-bottom: 20px;
}

.exchange-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.exchange-card.user-card {
  border-left: 3px solid #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

.exchange-card.nero-card {
  border-left: 3px solid var(--nero-red);
  background: rgba(229, 9, 20, 0.05);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.card-meta .nero-label {
  color: var(--nero-red);
}

.card-meta .status-meta {
  color: #888;
}

.card-content {
  color: var(--text-color);
  font-size: 1rem;
  line-height: 1.5;
  word-break: break-word;
}

/* Voice Interface (Hero Mic) */
.voice-interface-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 15px 0 25px;
  gap: 16px;
  width: 100%;
}

.live-transcript-box {
  width: 100%;
  max-width: 500px;
  background: rgba(0, 255, 136, 0.06);
  border: 1px dashed rgba(0, 255, 136, 0.3);
  border-radius: 10px;
  padding: 12px 16px;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

.transcript-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #00ff88;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.transcript-text {
  font-size: 0.95rem;
  color: #e0e0e0;
  font-style: italic;
  margin: 0;
}

/* Hero Mic Button */
.mic-button-wrapper {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0;
}

.mic-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(229, 9, 20, 0.3);
  transition: all 0.3s ease;
  pointer-events: none;
}

.mic-ring.ring-outer {
  width: 220px;
  height: 220px;
  border-color: rgba(229, 9, 20, 0.18);
}

.mic-ring.ring-inner {
  width: 180px;
  height: 180px;
  border-color: rgba(229, 9, 20, 0.35);
}

.btn-hero-mic {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e50914 0%, #b20710 100%);
  border: none;
  color: #fff;
  font-size: 3.6rem;
  cursor: pointer;
  box-shadow: 0 0 40px rgba(229, 9, 20, 0.65);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.btn-hero-mic:hover {
  transform: scale(1.06);
  box-shadow: 0 0 55px rgba(229, 9, 20, 0.9);
}

.btn-hero-mic:active {
  transform: scale(0.95);
}

/* Mic Idle (OFF) Pulsing State */
.mic-button-wrapper:not(.listening):not(.processing):not(.disabled) .btn-hero-mic {
  animation: micPulseRed 1.8s infinite alternate;
}

.mic-button-wrapper:not(.listening):not(.processing):not(.disabled) .ring-outer {
  border-color: rgba(229, 9, 20, 0.4);
  animation: ringExpandRed 2.2s infinite ease-out;
}

/* Mic Active Listening State */
.mic-button-wrapper.listening .btn-hero-mic {
  background: linear-gradient(135deg, #00ff88 0%, #00b359 100%);
  box-shadow: 0 0 35px rgba(0, 255, 136, 0.8);
  animation: micPulse 1.2s infinite alternate;
}

.mic-button-wrapper.listening .ring-outer {
  border-color: rgba(0, 255, 136, 0.4);
  animation: ringExpand 1.5s infinite ease-out;
}

.mic-button-wrapper.listening .ring-inner {
  border-color: rgba(0, 255, 136, 0.6);
}

/* Mic Processing / Transmitting State */
.mic-button-wrapper.processing .btn-hero-mic {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.7);
}

/* Mic Locked / Disabled State */
.mic-button-wrapper.disabled .btn-hero-mic,
.btn-hero-mic:disabled {
  background: #333 !important;
  color: #666 !important;
  box-shadow: none !important;
  cursor: not-allowed;
  transform: scale(1) !important;
}

.mic-button-wrapper.disabled .mic-ring {
  opacity: 0.2;
}

@keyframes micPulseRed {
  0% { transform: scale(1); box-shadow: 0 0 35px rgba(229, 9, 20, 0.5); }
  100% { transform: scale(1.08); box-shadow: 0 0 55px rgba(229, 9, 20, 0.9); }
}

@keyframes ringExpandRed {
  0% { transform: scale(0.95); opacity: 0.8; }
  100% { transform: scale(1.3); opacity: 0; }
}

@keyframes micPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); }
}

@keyframes ringExpand {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.3); opacity: 0; }
}

.mic-status-label {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  text-align: center;
}

/* Voice Controls & Fallback Input */
.voice-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin-top: 5px;
}

.btn-keyboard-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  color: #ccc;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-keyboard-toggle:hover,
.btn-keyboard-toggle.active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-color: var(--nero-red);
}

.fallback-form {
  margin-top: 12px;
  animation: fadeIn 0.2s ease;
}




