/* ==========================================================================
   myDB Studio — App Feature Video & Screen Recording Showcase Styles
   Designed to match top developer tools (Linear, Supabase, Raycast)
   Fully responsive across mobile (320px+), tablet, and desktop
   Supports dark/light themes via site CSS custom properties
   ========================================================================== */

.showcase-container {
  width: 100%;
  max-width: 1100px;
  margin: 2.75rem auto 0;
  position: relative;
  box-sizing: border-box;
}

/* Outer Ambient Glow */
.showcase-glow-backdrop {
  position: absolute;
  top: -20px;
  left: 5%;
  right: 5%;
  bottom: 0;
  background: radial-gradient(ellipse 60% 40% at 50% 20%, rgba(245, 158, 11, 0.22), transparent 75%);
  filter: blur(45px);
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.4s ease;
}

[data-theme="light"] .showcase-glow-backdrop {
  background: radial-gradient(ellipse 60% 40% at 50% 20%, rgba(245, 158, 11, 0.12), transparent 75%);
}

/* Feature Chapter Tabs (Linear / Raycast Style) */
.showcase-nav-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 2;
  width: 100%;
}

.showcase-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-sans);
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  white-space: nowrap;
}

[data-theme="light"] .showcase-pill-btn {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

.showcase-pill-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(245, 158, 11, 0.35);
  transform: translateY(-1px);
}

.showcase-pill-btn.active {
  color: #FFFFFF;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  border-color: #F59E0B;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
}

.showcase-pill-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

/* Main Application Window Frame */
.showcase-window {
  position: relative;
  z-index: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.75), 0 0 40px -10px rgba(245, 158, 11, 0.15);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

[data-theme="light"] .showcase-window {
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.12), 0 0 30px -10px rgba(245, 158, 11, 0.1);
  border-color: rgba(0, 0, 0, 0.12);
}

/* Window Header Chrome */
.showcase-window-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  gap: 0.5rem;
  background: rgba(18, 18, 22, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
  min-height: 42px;
  box-sizing: border-box;
  overflow: hidden;
}

[data-theme="light"] .showcase-window-header {
  background: rgba(245, 247, 250, 0.95);
  border-color: rgba(0, 0, 0, 0.08);
}

.showcase-window-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex-shrink: 1;
}

.window-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.dot-red { background: #EF4444; }
.dot-yellow { background: #F59E0B; }
.dot-green { background: #10B981; }

.showcase-connection-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.55rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-full);
  color: #34D399;
  font-weight: 500;
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
  flex-shrink: 1;
  min-width: 0;
}

.showcase-connection-badge span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  max-width: 100%;
}

.showcase-pulse-dot {
  width: 6px;
  height: 6px;
  background: #10B981;
  border-radius: 50%;
  animation: pulseDot 2s infinite;
  flex-shrink: 0;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.showcase-window-center {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex-shrink: 2;
}

.showcase-window-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-left: auto;
}

.showcase-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.showcase-icon-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

/* App Tab Bar */
.showcase-tab-bar {
  display: flex;
  align-items: center;
  background: rgba(12, 12, 15, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 0.5rem;
  width: 100%;
  box-sizing: border-box;
}

.showcase-tab-bar::-webkit-scrollbar {
  display: none;
}

[data-theme="light"] .showcase-tab-bar {
  background: #FAFAFA;
}

.showcase-tab-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: var(--transition);
  border-bottom: 2px solid transparent;
}

.showcase-tab-item:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.02);
}

.showcase-tab-item.active {
  color: var(--text-primary);
  background: rgba(245, 158, 11, 0.06);
  border-bottom-color: #F59E0B;
}

/* Screen Stage Viewport */
.showcase-screen-stage {
  position: relative;
  min-height: 440px;
  background: #0B0E14;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

[data-theme="light"] .showcase-screen-stage {
  background: #0F172A;
}

/* Feature Panes */
.showcase-pane {
  display: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  height: 100%;
  width: 100%;
  box-sizing: border-box;
}

.showcase-pane.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   PANE 1: Monaco SQL & Autocomplete Animation
   ========================================================================== */
.monaco-stage {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

.monaco-sidebar-layout {
  display: grid;
  grid-template-columns: 210px 1fr;
  min-height: 380px;
}

.monaco-explorer-sidebar {
  background: #080A0F;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
}

.monaco-tree-header {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.68rem;
  color: #64748B;
  letter-spacing: 0.05em;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.monaco-tree-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  color: #94A3B8;
  cursor: pointer;
  transition: var(--transition);
}

.monaco-tree-item:hover, .monaco-tree-item.selected {
  background: rgba(245, 158, 11, 0.1);
  color: #F8FAFC;
}

.monaco-tree-item.nested {
  padding-left: 1.4rem;
  font-size: 0.74rem;
}

.monaco-editor-workspace {
  position: relative;
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.65;
  color: #E2E8F0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.monaco-gutter-line {
  display: flex;
  gap: 1.15rem;
  align-items: baseline;
  white-space: pre-wrap;
  word-break: break-word;
}

.monaco-line-num {
  width: 22px;
  text-align: right;
  color: #475569;
  user-select: none;
  font-size: 0.78rem;
  flex-shrink: 0;
}

.monaco-line-code {
  flex: 1;
}

/* Syntax Highlighting */
.syn-kw { color: #F59E0B; font-weight: 600; }
.syn-fn { color: #38BDF8; }
.syn-str { color: #34D399; }
.syn-num { color: #FB7185; }
.syn-comment { color: #64748B; font-style: italic; }
.syn-ident { color: #E2E8F0; }

/* Animated Caret */
.typing-caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: #F59E0B;
  vertical-align: middle;
  animation: blinkCaret 0.8s infinite;
}

@keyframes blinkCaret {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Autocomplete Suggestion Popup */
.monaco-autocomplete-popup {
  position: absolute;
  top: 155px;
  left: 180px;
  width: 270px;
  max-width: 90%;
  background: #151A23;
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6);
  z-index: 10;
  animation: popIn 0.25s ease-out;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.96) translateY(-4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.monaco-autocomplete-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  color: #CBD5E1;
  cursor: pointer;
}

.monaco-autocomplete-item.selected {
  background: rgba(245, 158, 11, 0.2);
  color: #FFFFFF;
}

.monaco-item-meta {
  font-size: 0.68rem;
  color: #F59E0B;
}

/* Bottom Status Bar */
.monaco-status-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: #080A0F;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #94A3B8;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* ==========================================================================
   PANE 2: 1M-Row Virtualized Streaming Grid Animation
   ========================================================================== */
.streaming-stage {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
  box-sizing: border-box;
}

.streaming-hud-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  box-sizing: border-box;
}

.streaming-stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  flex-wrap: wrap;
}

.streaming-badge-fast {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.streaming-meter-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #94A3B8;
  flex-wrap: wrap;
}

.streaming-meter-bar {
  width: 80px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
}

.streaming-meter-fill {
  width: 28%;
  height: 100%;
  background: #10B981;
}

/* Simulated High Performance AG Grid */
.sim-grid-table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.sim-grid-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #E2E8F0;
  white-space: nowrap;
}

.sim-grid-table th {
  background: #111620;
  text-align: left;
  padding: 0.6rem 0.85rem;
  color: #94A3B8;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  user-select: none;
}

.sim-grid-table td {
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  white-space: nowrap;
}

.sim-grid-table tr:hover td {
  background: rgba(245, 158, 11, 0.06);
}

.sim-grid-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
}

.badge-paid { background: rgba(16, 185, 129, 0.15); color: #34D399; }
.badge-pending { background: rgba(245, 158, 11, 0.15); color: #FBBF24; }
.badge-refund { background: rgba(244, 63, 94, 0.15); color: #FB7185; }

/* ==========================================================================
   PANE 3: Visual ER Diagrams & Relationships Animation
   ========================================================================== */
.erd-stage {
  position: relative;
  min-height: 400px;
  padding: 1.5rem;
  background: radial-gradient(circle at 50% 50%, #10141E 0%, #0A0D14 100%);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

.erd-canvas-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}

.erd-nodes-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  position: relative;
  z-index: 2;
  gap: 2rem;
  margin-top: 1rem;
  min-width: 760px;
}

.erd-table-card {
  width: 230px;
  background: #141A26;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
  flex-shrink: 0;
}

.erd-table-card:hover {
  transform: translateY(-4px);
  border-color: #F59E0B;
}

.erd-table-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: rgba(245, 158, 11, 0.15);
  border-bottom: 1px solid rgba(245, 158, 11, 0.25);
  font-weight: 700;
  color: #FBBF24;
}

.erd-columns-list {
  padding: 0.4rem 0;
}

.erd-col-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.28rem 0.75rem;
  color: #CBD5E1;
}

.erd-col-item.pk {
  color: #F59E0B;
  font-weight: 600;
}

.erd-col-item.fk {
  color: #38BDF8;
}

.erd-connector-line {
  position: absolute;
  top: 48%;
  left: 31%;
  width: 37%;
  height: 2px;
  background: linear-gradient(90deg, #F59E0B, #38BDF8);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
  z-index: 1;
}

.erd-connector-line::after {
  content: '1 : N (FK: user_id)';
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  background: #111622;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.65rem;
  color: #94A3B8;
  font-family: var(--font-mono);
  white-space: nowrap;
}

/* ==========================================================================
   PANE 4: Universal 19+ DB Engines & SSH Bastions
   ========================================================================== */
.bastion-stage {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

.bastion-network-topology {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #101520;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.25rem 2rem;
  position: relative;
  box-sizing: border-box;
  width: 100%;
}

.topo-node {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  z-index: 2;
  flex-shrink: 0;
}

.topo-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #F59E0B;
}

.topo-node-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #E2E8F0;
  white-space: nowrap;
}

.topo-node-sub {
  font-size: 0.7rem;
  color: #64748B;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.topo-stream-connector {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 1.25rem;
  position: relative;
  overflow: hidden;
  min-width: 30px;
}

.topo-stream-particle {
  position: absolute;
  width: 40px;
  height: 100%;
  background: linear-gradient(90deg, transparent, #10B981, transparent);
  animation: streamData 1.8s infinite linear;
}

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

@keyframes streamDataVertical {
  0% { top: -20px; }
  100% { top: 100%; }
}

.bastion-engine-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  margin-top: 0.5rem;
}

.engine-quick-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-family: var(--font-sans);
  color: #CBD5E1;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.engine-quick-pill:hover, .engine-quick-pill.active {
  background: rgba(245, 158, 11, 0.15);
  border-color: #F59E0B;
  color: #FFFFFF;
}

/* ==========================================================================
   VIDEO PLAYER CONTROLS FOOTER (Scrubber, Play/Pause, Speed, Zoom)
   ========================================================================== */
.showcase-player-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: rgba(14, 16, 22, 0.95);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-secondary);
  user-select: none;
  box-sizing: border-box;
  width: 100%;
  gap: 0.75rem;
}

[data-theme="light"] .showcase-player-controls {
  background: #F8FAFC;
  border-color: rgba(0, 0, 0, 0.08);
}

.player-controls-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.player-btn-play {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #F59E0B;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.player-btn-play:hover {
  background: #F59E0B;
  color: #000000;
  transform: scale(1.05);
}

.player-time-display {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.player-scrubber-track {
  flex: 1;
  max-width: 450px;
  margin: 0 0.75rem;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
  transition: height 0.15s ease;
  min-width: 60px;
}

[data-theme="light"] .player-scrubber-track {
  background: rgba(0, 0, 0, 0.1);
}

.player-scrubber-track:hover {
  height: 6px;
}

.player-scrubber-progress {
  height: 100%;
  width: 25%;
  background: linear-gradient(90deg, #F59E0B, #FBBF24);
  border-radius: 2px;
  position: relative;
  transition: width 0.1s linear;
}

.player-scrubber-thumb {
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
}

.player-controls-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.speed-tag-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.speed-tag-btn:hover, .speed-tag-btn.active {
  color: var(--text-primary);
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.08);
}

/* Native Video Tag Mode (when mp4/webm is supplied) */
.showcase-native-video {
  width: 100%;
  height: auto;
  display: block;
  background: #000000;
}

/* Fullscreen Expansion Modal */
.showcase-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  box-sizing: border-box;
}

.showcase-modal-overlay.open {
  display: flex;
}

.showcase-modal-body {
  width: 100%;
  max-width: 1280px;
  max-height: 90vh;
  position: relative;
  animation: modalScaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.showcase-modal-close {
  position: absolute;
  top: -38px;
  right: 0;
  background: transparent;
  border: none;
  color: #FFFFFF;
  cursor: pointer;
  font-size: 1.8rem;
  padding: 0.25rem;
  transition: var(--transition);
  line-height: 1;
}

.showcase-modal-close:hover {
  color: #F59E0B;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES (TABLET & MOBILE)
   ========================================================================== */

@media (max-width: 768px) {
  .showcase-container {
    margin-top: 1.5rem;
    padding: 0;
  }

  /* Header adjustments to prevent collisions */
  .showcase-window-header {
    padding: 0.5rem 0.75rem;
  }

  .showcase-window-center {
    display: none !important; /* Hide middle database path on mobile so badge and latency never collide */
  }

  .showcase-connection-badge {
    font-size: 0.68rem;
    padding: 0.15rem 0.45rem;
    max-width: 170px;
  }

  .showcase-screen-stage {
    min-height: 380px;
  }

  /* Monaco editor mobile adjustments */
  .monaco-sidebar-layout {
    grid-template-columns: 1fr;
  }

  .monaco-explorer-sidebar {
    display: none;
  }

  .monaco-editor-workspace {
    padding: 0.85rem 1rem;
    font-size: 0.8rem;
  }

  .monaco-gutter-line {
    gap: 0.75rem;
  }

  .monaco-line-num {
    width: 18px;
    font-size: 0.72rem;
  }

  .monaco-autocomplete-popup {
    left: 1rem !important;
    top: 120px !important;
    width: calc(100% - 2rem) !important;
    max-width: 280px;
  }

  .monaco-status-footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.45rem 0.75rem;
    font-size: 0.7rem;
    gap: 0.25rem;
  }

  .monaco-status-footer span:nth-child(2) {
    display: none; /* Hide middle status guard on mobile to keep footer compact */
  }

  /* Streaming Grid mobile adjustments */
  .streaming-stage {
    padding: 0.75rem;
    gap: 0.65rem;
  }

  .streaming-hud-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
    padding: 0.6rem 0.75rem;
  }

  .streaming-stat-item {
    font-size: 0.78rem;
  }

  .streaming-meter-wrap {
    font-size: 0.72rem;
  }

  /* ER Diagram canvas mobile adjustments */
  .erd-stage {
    min-height: 360px;
    padding: 1rem;
  }

  .erd-nodes-container {
    min-width: 680px;
    gap: 1.25rem;
    margin-top: 0.5rem;
  }

  .erd-table-card {
    width: 210px;
  }

  .erd-connector-line {
    left: 28%;
    width: 44%;
  }

  /* SSH Bastion mobile adjustments */
  .bastion-stage {
    padding: 1rem;
    gap: 1rem;
  }

  .bastion-network-topology {
    padding: 1rem 1.25rem;
  }

  .topo-icon-box {
    width: 38px;
    height: 38px;
  }

  .topo-node-title {
    font-size: 0.74rem;
  }

  .topo-node-sub {
    font-size: 0.65rem;
  }

  .topo-stream-connector {
    margin: 0 0.65rem;
  }

  .engine-quick-pill {
    font-size: 0.72rem;
    padding: 0.3rem 0.55rem;
  }

  /* Player controls mobile adjustments */
  .showcase-player-controls {
    padding: 0.5rem 0.75rem;
  }

  .player-scrubber-track {
    margin: 0 0.5rem;
    max-width: 280px;
  }

  .player-time-display {
    font-size: 0.7rem;
  }
}

@media (max-width: 600px) {
  /* 2x2 Clean Grid for Feature Chapter Pills on Phones */
  .showcase-nav-pills {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    width: 100%;
  }

  .showcase-pill-btn {
    justify-content: center;
    font-size: 0.74rem;
    padding: 0.48rem 0.45rem;
    text-align: center;
    white-space: nowrap;
  }

  .showcase-pill-icon {
    font-size: 0.88rem;
  }

  /* Vertical Topology for Mobile Phones */
  .bastion-network-topology {
    flex-direction: column;
    gap: 0.65rem;
    padding: 1rem 0.75rem;
  }

  .topo-stream-connector {
    width: 2px;
    height: 20px;
    margin: 0.15rem auto;
  }

  .topo-stream-particle {
    width: 100%;
    height: 20px;
    background: linear-gradient(180deg, transparent, #10B981, transparent);
    animation: streamDataVertical 1.8s infinite linear;
  }

  .bastion-engine-tags {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
  }

  .engine-quick-pill {
    justify-content: center;
    padding: 0.35rem 0.3rem;
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .showcase-connection-badge {
    max-width: 130px;
  }

  .showcase-window-actions span {
    display: none !important; /* Hide '14ms latency' text to leave room for the pulse dot and fullscreen button */
  }

  .speed-tag-btn {
    display: none; /* Hide speed tag on narrow phone screens to preserve scrubber space */
  }

  .player-scrubber-track {
    margin: 0 0.4rem;
    min-width: 50px;
  }

  .showcase-tab-item {
    padding: 0.45rem 0.65rem;
    font-size: 0.72rem;
    gap: 0.35rem;
  }
}

@media (max-width: 360px) {
  .showcase-connection-badge {
    max-width: 100px;
    font-size: 0.65rem;
    padding: 0.12rem 0.35rem;
  }

  .showcase-pill-btn {
    font-size: 0.66rem;
    padding: 0.4rem 0.25rem;
    gap: 0.3rem;
  }

  .bastion-engine-tags {
    grid-template-columns: repeat(2, 1fr);
  }

  .player-btn-play {
    width: 26px;
    height: 26px;
  }

  .player-time-display {
    font-size: 0.66rem;
  }
}
