/* ==========================================================================
   FileSynk v1.0.0 - Studio Workspace Design System
   Dynamic Glassmorphism, Adaptive Command Island, Mobile Responsive
   ========================================================================== */

:root {
  /* Color Palette - Dark Obsidian Default */
  --bg-app: #07090e;
  --bg-surface: #0e1322;
  --bg-surface-elevated: #151c2e;
  --bg-surface-hover: #1c253c;
  --bg-input: #0a0e1a;
  
  --header-bg: rgba(7, 9, 14, 0.85);
  --dock-bg: rgba(14, 19, 34, 0.94);
  --aperture-bg: linear-gradient(180deg, #0e1322 0%, rgba(14, 19, 34, 0.7) 100%);
  --modal-bottom-bg: rgba(0, 0, 0, 0.2);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.16);
  --border-focus: #ff6b00;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #475569;

  --accent-orange: #ff6b00;
  --accent-orange-hover: #ea580c;
  --accent-orange-glow: rgba(255, 107, 0, 0.35);
  
  --color-green: #10b981;
  --color-green-glow: rgba(16, 185, 129, 0.3);
  --color-blue: #38bdf8;
  --color-purple: #a855f7;
  --color-red: #ef4444;

  /* Marvel & Capcom Theme Colors */
  --marvel-red: #e62429;
  --capcom-blue: #0052cc;

  /* Radius & Shadows */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 30px var(--accent-orange-glow);

  --transition-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.25s cubic-bezier(0.16, 1, 0.3, 1);

  --dock-height: 64px;
}

/* ==========================================================================
   Light Theme Complete Definition
   ========================================================================== */
[data-theme="light"] {
  --bg-app: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-surface-hover: #e2e8f0;
  --bg-input: #ffffff;

  --header-bg: rgba(255, 255, 255, 0.9);
  --dock-bg: rgba(255, 255, 255, 0.95);
  --aperture-bg: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  --modal-bottom-bg: #f8fafc;

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-medium: rgba(0, 0, 0, 0.16);

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-dim: #94a3b8;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.11);
  --shadow-glow: 0 0 30px rgba(255, 107, 0, 0.15);
}

/* Base Resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
}

html, body {
  width: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, color 0.25s ease;
}

body {
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Fullscreen Drag & Drop Target Overlay */
.drop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 9, 14, 0.88);
  backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.drop-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.drop-overlay-box {
  background: var(--bg-surface-elevated);
  border: 2px dashed var(--accent-orange);
  border-radius: var(--radius-xl);
  padding: 3rem;
  text-align: center;
  box-shadow: var(--shadow-glow);
  max-width: 480px;
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.drop-overlay.active .drop-overlay-box {
  transform: scale(1);
}

.drop-icon-pulsar {
  color: var(--accent-orange);
  margin-bottom: 1rem;
  animation: bouncePulsar 1.5s infinite;
}

@keyframes bouncePulsar {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ==========================================================================
   Header: Floating Command Island
   ========================================================================== */
.studio-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.75rem;
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.header-left {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}

.brand-logo-disc {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}

.brand-badge:hover .brand-logo-disc {
  transform: scale(1.08) rotate(3deg);
  filter: drop-shadow(0 0 16px rgba(255, 107, 0, 0.5));
}

.brand-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.45));
}

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

.brand-title {
  font-size: 1.12rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .brand-title {
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tag {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--accent-orange);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Center Radar Status */
.header-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.room-radar-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.radar-ping-dot {
  position: relative;
  width: 8px;
  height: 8px;
  background: var(--color-green);
  border-radius: 50%;
  flex-shrink: 0;
}

.radar-ping-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--color-green);
  animation: radarPing 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes radarPing {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* Header Right Controls */
.header-right {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.42rem 0.85rem;
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.pill-btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-medium);
}

.expiry-pill {
  border-color: rgba(255, 107, 0, 0.3);
}

.expiry-pill.urgent {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--color-red);
  color: #fca5a5;
  animation: pulseUrgent 1s infinite alternate;
}

@keyframes pulseUrgent {
  0% { transform: scale(1); }
  100% { transform: scale(1.04); }
}

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

.pill-label {
  color: var(--text-muted);
  font-weight: 500;
}

.pill-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--accent-orange);
  font-weight: 700;
}

/* Theme Switcher Button */
.icon-round-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.icon-round-btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

.theme-toggle-btn:hover .theme-icon {
  transform: rotate(15deg) scale(1.1);
  transition: transform 0.2s ease;
}

.theme-icon {
  display: inline-block;
  line-height: 1;
}

/* ==========================================================================
   Mobile Segmented Bar (Screens <= 860px)
   ========================================================================== */
.mobile-segmented-bar {
  display: none;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.4rem 0.6rem;
  gap: 0.35rem;
}

.mobile-tab {
  flex: 1;
  min-width: 0; /* Prevents text overflow in flex */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 0.35rem;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.mobile-tab.active {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.mobile-tab .tab-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.mobile-tab .tab-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab-badge {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

[data-theme="light"] .tab-badge {
  background: rgba(0, 0, 0, 0.08);
  color: #334155;
}

.mobile-tab.active .tab-badge {
  background: var(--accent-orange);
  color: #ffffff;
}

/* ==========================================================================
   Main Studio Workspace: 2-Column Split Console Layout
   ========================================================================== */
.studio-workspace {
  flex: 1;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.75rem 3rem 1.75rem;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(350px, 1fr);
  gap: 1.75rem;
  align-items: start;
}

.stage-section {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  min-width: 0;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

/* ==========================================================================
   Holographic Drop Aperture
   ========================================================================== */
.aperture-zone {
  position: relative;
  background: var(--aperture-bg);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 2.75rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: var(--transition-smooth);
}

.aperture-zone:hover {
  border-color: rgba(255, 107, 0, 0.4);
  box-shadow: var(--shadow-lg), 0 0 25px rgba(255, 107, 0, 0.12);
}

.aperture-glow-ambient {
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 360px;
  height: 240px;
  background: radial-gradient(circle, rgba(255, 107, 0, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.aperture-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.holo-core-graphic {
  position: relative;
  width: 84px;
  height: 84px;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.halo-orbit {
  position: absolute;
  border-radius: 50%;
}

.orbit-outer {
  inset: 0;
  border: 2px dashed rgba(255, 107, 0, 0.45);
  animation: rotateClockwise 20s linear infinite;
}

.orbit-inner {
  inset: 10px;
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-top-color: var(--accent-orange);
  animation: rotateCounterClockwise 12s linear infinite;
}

.halo-center-pulse {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--accent-orange) 0%, #ea580c 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 0 20px var(--accent-orange-glow);
}

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

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

.aperture-heading {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .aperture-heading {
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.aperture-sub {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.75rem;
  max-width: 520px;
}

.aperture-cta-group {
  margin-bottom: 1.75rem;
}

.btn-beam-giant {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: linear-gradient(135deg, var(--accent-orange) 0%, #ea580c 100%);
  color: #ffffff;
  border: none;
  padding: 0.85rem 1.9rem;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 18px var(--accent-orange-glow);
  transition: var(--transition-fast);
}

.btn-beam-giant:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 107, 0, 0.5);
}

.btn-beam-giant:active {
  transform: translateY(0);
}

.aperture-security-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.sec-pill {
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  white-space: nowrap;
}

[data-theme="light"] .sec-pill {
  background: rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
   Stream Panel: Active Transmissions Feed
   ========================================================================== */
.stream-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

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

.stream-header-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stream-icon {
  font-size: 1.2rem;
}

.stream-header-title h2 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.btn-batch-zip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--accent-orange);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.btn-batch-zip:not(:disabled):hover {
  background: var(--accent-orange);
  color: #ffffff;
}

.btn-batch-zip:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.stream-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 120px;
}

.stream-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  text-align: center;
}

.empty-sparkle {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.6;
}

.stream-empty-state h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.stream-empty-state p {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 360px;
}

/* File Card Component */
.file-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.15rem;
  transition: var(--transition-fast);
  min-width: 0;
}

.file-card:hover {
  border-color: var(--border-medium);
  background: var(--bg-surface-hover);
}

.file-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

[data-theme="light"] .file-icon-box {
  background: rgba(0, 0, 0, 0.04);
}

.file-info {
  flex: 1;
  min-width: 0;
}

.file-header-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.file-title {
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.file-size {
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-shrink: 0;
  font-family: monospace;
}

.file-meta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
  min-width: 0;
}

.file-peer-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.file-speed {
  color: var(--color-green);
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}

.file-progress-bar-container {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

[data-theme="light"] .file-progress-bar-container {
  background: rgba(0, 0, 0, 0.08);
}

.file-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-orange), #38bdf8);
  border-radius: var(--radius-full);
  transition: width 0.15s ease-out;
}

.file-actions {
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.file-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--accent-orange);
  color: #ffffff;
  border: none;
  padding: 0.42rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.file-action-btn:hover {
  background: var(--accent-orange-hover);
}

/* ==========================================================================
   Sidebar: Hero Radar Deck & Device Pairing Console
   ========================================================================= */
.console-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
}

.console-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.15rem;
  gap: 0.5rem;
}

.header-label-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.deck-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.header-label-group h3 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-label-group p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.btn-hero-action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.38rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.btn-hero-action:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

/* Heroes List & Hero Chip */
.heroes-list-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.hero-chip-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.8rem 1rem;
  transition: var(--transition-fast);
  min-width: 0;
}

.hero-chip-card.is-self {
  border-color: rgba(255, 107, 0, 0.3);
  background: linear-gradient(135deg, var(--bg-surface-elevated) 0%, rgba(255, 107, 0, 0.05) 100%);
}

.hero-avatar-halo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

[data-theme="light"] .hero-avatar-halo {
  background: rgba(0, 0, 0, 0.04);
}

.hero-chip-card.is-self .hero-avatar-halo {
  border-color: var(--accent-orange);
  box-shadow: 0 0 12px var(--accent-orange-glow);
}

.hero-info-col {
  flex: 1;
  min-width: 0;
}

.hero-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
  min-width: 0;
}

.hero-name-text {
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.franchise-pill {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  flex-shrink: 0;
}

.franchise-pill.marvel {
  background: var(--marvel-red);
  color: #ffffff;
  box-shadow: 0 1px 6px rgba(230, 36, 41, 0.4);
}

.franchise-pill.capcom {
  background: var(--capcom-blue);
  color: #ffffff;
  box-shadow: 0 1px 6px rgba(0, 82, 204, 0.4);
}

.hero-meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  flex-wrap: wrap;
}

.device-pill {
  color: var(--text-muted);
}

.host-pill {
  color: var(--accent-orange);
  font-weight: 600;
}

.peer-p2p-badge {
  color: var(--color-green);
  font-weight: 600;
}

/* ==========================================================================
   Desktop QR Pairing Console: Prominent 210px Showcase
   ========================================================================== */
.qr-pairing-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  cursor: pointer;
  margin-bottom: 1rem;
  transition: var(--transition-fast);
}

.qr-pairing-box:hover {
  border-color: var(--accent-orange);
  box-shadow: 0 4px 18px rgba(255, 107, 0, 0.15);
}

.qr-frame {
  position: relative;
  width: 210px;
  height: 210px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-md);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  margin-bottom: 0.85rem;
  box-shadow: var(--shadow-sm);
}

.qr-code-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-loading-spinner {
  position: absolute;
  inset: 0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.micro-spin {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--accent-orange);
  border-radius: 50%;
  animation: rotateClockwise 0.8s linear infinite;
}

.qr-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.qr-pairing-box:hover .qr-hover-overlay {
  opacity: 1;
}

.qr-instructions strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.qr-instructions p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
  max-width: 280px;
  margin: 0 auto;
}

/* Room Link Bar */
.room-link-container {
  margin-bottom: 0.9rem;
}

.room-link-box {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  padding: 0.25rem 0.35rem 0.25rem 0.75rem;
}

.room-link-box input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-family: monospace;
  outline: none;
  width: 100%;
}

.btn-copy-link,
.btn-native-share {
  position: relative;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 0.35rem;
  transition: var(--transition-fast);
}

.btn-copy-link:hover,
.btn-native-share:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-medium);
}

.copy-tooltip {
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-green);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-xs);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.copy-tooltip.show {
  opacity: 1;
}

/* Security & Expiry Controls */
.pairing-actions-row {
  display: flex;
  gap: 0.5rem;
}

.security-chip-btn {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.security-chip-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.sidebar-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0.5rem;
}

.connection-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.connection-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-green);
  flex-shrink: 0;
}

.connection-pill.disconnected .dot {
  background: var(--color-red);
}

/* ==========================================================================
   Mobile Floating Action Dock (Stickied on phones)
   ========================================================================== */
.mobile-sticky-dock {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 80;
  background: var(--dock-bg);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
  padding: 0.45rem 0.6rem calc(0.45rem + env(safe-area-inset-bottom));
  gap: 0.4rem;
  transition: background 0.25s ease;
}

.dock-action-btn {
  flex: 1;
  min-width: 0; /* Prevents text overflow */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.35rem 0.15rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.dock-btn-icon {
  font-size: 1.2rem;
  line-height: 1;
  margin-bottom: 0.15rem;
}

.dock-btn-text {
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.dock-action-btn.dock-btn-main {
  background: linear-gradient(135deg, var(--accent-orange) 0%, #ea580c 100%);
  color: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 10px var(--accent-orange-glow);
}

.dock-action-btn.dock-btn-main .dock-btn-text {
  color: #ffffff;
}

/* ==========================================================================
   Modals: Universal Lightboxes
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(14px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-window {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active .modal-window {
  transform: scale(1);
}

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

.modal-top h3 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

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

.modal-content {
  padding: 1.5rem;
}

.modal-hint {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.modal-bottom {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.15rem 1.5rem;
  background: var(--modal-bottom-bg);
  border-top: 1px solid var(--border-subtle);
}

/* Buttons inside modals */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.btn-primary {
  background: var(--accent-orange);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-orange-hover);
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.btn-danger {
  background: var(--color-red);
  color: #ffffff;
}

/* QR Lightbox */
.qr-lightbox-target {
  width: 250px;
  height: 250px;
  margin: 0 auto 1.25rem;
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: var(--shadow-md);
}

.qr-image-full {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Hero Custom Selector in Modal */
.hero-filter-row {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.hero-filter-btn {
  flex: 1;
  min-width: 90px;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.hero-filter-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.hero-filter-btn.marvel:hover {
  border-color: var(--marvel-red);
  color: #fca5a5;
}

.hero-filter-btn.capcom:hover {
  border-color: var(--capcom-blue);
  color: #93c5fd;
}

.hero-custom-input-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.85rem;
}

.avatar-large-bubble {
  width: 44px;
  height: 44px;
  background: var(--bg-surface-elevated);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.hero-custom-input-box input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  outline: none;
}

/* Expiry Presets Grid */
.expiry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 0.6rem;
}

.expiry-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 0.4rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.expiry-card:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-medium);
}

.expiry-card.active {
  background: rgba(255, 107, 0, 0.12);
  border-color: var(--accent-orange);
}

.expiry-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.expiry-card.active .expiry-val {
  color: var(--accent-orange);
}

.expiry-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
}

/* Form inputs in modal */
.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-row label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-row input {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-fast);
}

.form-row input:focus {
  border-color: var(--accent-orange);
}

.error-msg {
  color: var(--color-red);
  font-size: 0.8rem;
  margin-top: 0.35rem;
}

/* About Grid */
.about-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about-item {
  display: flex;
  gap: 0.85rem;
}

.about-ico {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.about-item strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 0.15rem;
}

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

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}

.toast {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  animation: slideInToast 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

.toast.removing {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.25s ease;
}

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

/* ==========================================================================
   Adaptive Responsive Media Queries: Fluid Mobile Polish
   ========================================================================== */

/* Tablet & Mobile Breakpoint (<= 860px) */
@media (max-width: 860px) {
  .studio-header {
    padding: 0.65rem 1rem;
  }

  .header-center {
    display: none; /* Hide center text to avoid collision */
  }

  .mobile-segmented-bar {
    display: flex;
    position: sticky;
    top: 54px;
    z-index: 40;
  }

  .studio-workspace {
    display: block;
    flex: 1 0 auto;
    padding: 0.85rem;
  }

  /* Segmented Tab Visibility Controller */
  body[data-mobile-tab="files"] .stage-section {
    display: flex;
  }
  body[data-mobile-tab="files"] .sidebar-section {
    display: none;
  }

  body[data-mobile-tab="heroes"] .stage-section {
    display: none;
  }
  body[data-mobile-tab="heroes"] .sidebar-section {
    display: flex;
  }
  body[data-mobile-tab="heroes"] .pairing-deck {
    display: none;
  }

  body[data-mobile-tab="pair"] .stage-section {
    display: none;
  }
  body[data-mobile-tab="pair"] .sidebar-section {
    display: flex;
  }
  body[data-mobile-tab="pair"] .heroes-deck {
    display: none;
  }

  .mobile-sticky-dock {
    display: flex;
  }

  .aperture-zone {
    padding: 2rem 1.25rem;
  }

  .aperture-heading {
    font-size: 1.35rem;
  }

  .aperture-sub {
    font-size: 0.85rem;
    margin-bottom: 1.35rem;
  }

  .toast-container {
    bottom: 5.5rem;
    right: 1rem;
    left: 1rem;
  }
}

/* Mobile Narrow Phones (<= 560px) */
@media (max-width: 560px) {
  .studio-header {
    padding: 0.55rem 0.75rem;
  }

  .brand-badge {
    gap: 0.6rem;
  }

  .brand-logo-disc {
    width: 36px;
    height: 36px;
  }

  .brand-title {
    font-size: 1rem;
  }

  .brand-tag {
    font-size: 0.58rem;
  }

  .header-right {
    gap: 0.35rem;
  }

  .expiry-pill {
    padding: 0.3rem 0.55rem;
    font-size: 0.76rem;
    gap: 0.25rem;
  }

  /* Hide verbose 'Expires:' text on mobile to prevent overlapping */
  .expiry-pill .pill-label {
    display: none;
  }

  .icon-round-btn {
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
  }

  .mobile-tab {
    font-size: 0.78rem;
    padding: 0.5rem 0.25rem;
    gap: 0.25rem;
  }

  .mobile-tab .tab-icon {
    font-size: 0.88rem;
  }

  .tab-badge {
    font-size: 0.65rem;
    padding: 0.08rem 0.35rem;
  }

  .qr-frame {
    width: 190px;
    height: 190px;
  }

  .btn-beam-giant {
    width: 100%;
    max-width: 280px;
    padding: 0.75rem 1.25rem;
    font-size: 0.92rem;
    justify-content: center;
  }

  .aperture-security-pills {
    gap: 0.35rem;
  }

  .sec-pill {
    font-size: 0.68rem;
    padding: 0.25rem 0.55rem;
  }

  .dock-btn-icon {
    font-size: 1.1rem;
  }

  .dock-btn-text {
    font-size: 0.65rem;
  }

  .console-card {
    padding: 1.15rem 0.85rem;
  }

  .console-card-header {
    flex-wrap: wrap;
  }

  .stream-header {
    flex-wrap: wrap;
  }

  .btn-batch-zip {
    width: 100%;
    justify-content: center;
  }

  .file-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 0.75rem;
    padding: 0.85rem 1rem;
  }

  .file-icon-box {
    flex-shrink: 0;
  }

  .file-info {
    flex: 1;
    min-width: 0;
  }

  .file-title {
    font-size: 0.88rem;
    max-width: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Full-width download button below file info on mobile: completely prevents any status collision */
  .file-card.file-completed .file-actions,
  .file-card:has(.file-action-btn) .file-actions {
    width: 100%;
    margin-left: 0;
    margin-top: 0.35rem;
  }

  .file-card.file-completed .file-action-btn,
  .file-card:has(.file-action-btn) .file-action-btn {
    width: 100%;
    justify-content: center;
    padding: 0.6rem 1rem;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
  }
}

/* Micro Devices (<= 375px) */
@media (max-width: 375px) {
  .brand-title {
    font-size: 0.92rem;
  }

  .brand-tag {
    display: none;
  }

  .expiry-pill {
    padding: 0.28rem 0.45rem;
    font-size: 0.72rem;
  }

  .icon-round-btn {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }

  .qr-frame {
    width: 165px;
    height: 165px;
  }

  .dock-btn-text {
    font-size: 0.6rem;
  }
}

/* ==========================================================================
   Global App Footer & Developer Credit
   ========================================================================== */
.app-global-footer {
  width: 100%;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 1.25rem 1.75rem;
  margin-top: auto;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-col-left {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.footer-brand {
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

.footer-sep {
  color: var(--border-medium);
}

.footer-rights {
  color: var(--text-secondary);
}

.footer-pill {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 107, 0, 0.12);
  color: var(--accent-orange);
  border: 1px solid rgba(255, 107, 0, 0.25);
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
}

.footer-col-right {
  display: flex;
  align-items: center;
}

.footer-dev {
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.dev-name {
  color: var(--accent-orange);
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* Developer badge in about modal */
.about-dev-badge {
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: center;
  font-size: 0.82rem;
}

.about-dev-badge strong {
  color: var(--accent-orange);
  font-weight: 800;
}

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

@media (max-width: 860px) {
  .app-global-footer {
    padding: 1.15rem 1rem;
    margin-top: auto;
    margin-bottom: calc(var(--dock-height, 64px) + env(safe-area-inset-bottom, 0px));
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 0.45rem;
  }

  .footer-col-left,
  .footer-col-right {
    justify-content: center;
  }
}

/* ==========================================================================
   PWA Installation & Mobile Prompt System
   ========================================================================== */

/* Header Install Button */
.pwa-header-btn {
  background: rgba(255, 107, 0, 0.12);
  border: 1px solid rgba(255, 107, 0, 0.35);
  color: var(--accent-orange);
  transition: var(--transition-fast);
}

.pwa-header-btn:hover {
  background: var(--accent-orange);
  color: #ffffff;
  border-color: var(--accent-orange);
  box-shadow: 0 0 16px rgba(255, 107, 0, 0.4);
}

/* Floating Install Banner for Mobile / Desktop */
.pwa-install-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 998;
  max-width: 440px;
  width: calc(100vw - 32px);
  pointer-events: none;
  opacity: 0;
  transform: translateY(30px) scale(0.97);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.pwa-install-banner.show {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.pwa-banner-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.15rem;
  background: rgba(14, 19, 34, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.55),
              0 0 24px rgba(56, 189, 248, 0.2);
}

[data-theme="light"] .pwa-banner-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.15),
              0 0 24px rgba(2, 132, 199, 0.15);
}

.pwa-banner-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 1;
}

.pwa-banner-avatar {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #07090e;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.pwa-banner-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pwa-banner-copy {
  min-width: 0;
}

.pwa-banner-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
}

.pwa-banner-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.pwa-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.pwa-btn-dismiss {
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-fast);
}

.pwa-btn-dismiss:hover {
  color: var(--text-primary);
  background: var(--bg-surface-hover);
}

.pwa-btn-install {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #ff6b00 0%, #ff8c38 100%);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 107, 0, 0.35);
  transition: var(--transition-fast);
}

.pwa-btn-install:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255, 107, 0, 0.5);
}

/* About modal PWA install action */
.about-pwa-wrap {
  margin: 1.25rem 0 0.5rem;
}

.about-pwa-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* iOS Safari Install Guide Modal */
.ios-install-window {
  max-width: 420px;
}

.ios-install-hero {
  text-align: center;
  margin-bottom: 1.5rem;
}

.ios-install-logo-wrap {
  width: 64px;
  height: 64px;
  margin: 0 auto 0.75rem;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.ios-install-logo-wrap img {
  width: 100%;
  height: 100%;
}

.ios-install-hero h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.ios-install-hero p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.ios-steps-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.ios-step-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.ios-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-orange);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.ios-step-text {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.ios-inline-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.1rem 0.4rem;
  background: var(--bg-surface-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: bold;
}

/* Mobile Responsive Adjustments for PWA Banner */
@media (max-width: 860px) {
  .pwa-install-banner {
    left: 16px;
    right: 16px;
    width: auto;
    bottom: calc(var(--dock-height) + 16px);
  }

  .pwa-banner-card {
    padding: 0.75rem 0.9rem;
    gap: 0.75rem;
  }

  .pwa-banner-avatar {
    width: 38px;
    height: 38px;
  }

  .pwa-banner-title {
    font-size: 0.86rem;
  }

  .pwa-banner-desc {
    font-size: 0.7rem;
    max-width: 150px;
  }

  .pwa-btn-install {
    padding: 0.45rem 0.85rem;
    font-size: 0.78rem;
  }
}


