/* CastView — Cyberpunk Ambient Theme */

/* Custom Properties */
:root {
  --bg: #06060a;
  --surface: #0d0d14;
  --surface-2: #16161f;
  --surface-3: #22223a;
  --border: rgba(138, 43, 226, 0.08);
  --border-hover: rgba(0, 255, 255, 0.15);
  --text: #e8e6f0;
  --text-secondary: #8a8a9a;
  --text-muted: #4a4a5e;
  --accent: #bf5af2;
  --accent-hover: #d97aff;
  --accent-text: #d4a5ff;
  --accent-subtle: rgba(191, 90, 242, 0.07);
  --neon-cyan: #00f0ff;
  --neon-magenta: #ff2d95;
  --neon-violet: #b026ff;
  --neon-blue: #3d5afe;
  --glow-cyan: 0 0 20px rgba(0, 240, 255, 0.3), 0 0 60px rgba(0, 240, 255, 0.1);
  --glow-magenta: 0 0 20px rgba(255, 45, 149, 0.3), 0 0 60px rgba(255, 45, 149, 0.1);
  --glow-violet: 0 0 20px rgba(176, 38, 255, 0.3), 0 0 60px rgba(176, 38, 255, 0.1);
  --radius: 8px;
  --radius-lg: 14px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
* {
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}
*::-webkit-scrollbar { width: 5px; height: 5px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 999px; }
*::-webkit-scrollbar-thumb:hover { background: var(--neon-violet); }

html {
  scroll-behavior: smooth;
  /* GPU-accelerate scrolling */
  -webkit-overflow-scrolling: touch;
}

body {
  font-family: 'Rajdhani', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
  overflow-x: hidden;
  /* Smooth text rendering */
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, .logo-text-item, .room-id-display, .neon-badge {
  font-family: 'Orbitron', sans-serif;
}

::selection {
  background: rgba(0, 240, 255, 0.2);
  color: #fff;
}

/* ─── Ambient Background ─── */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.25;
  animation: orb-drift 18s ease-in-out infinite alternate;
  will-change: transform;
  contain: strict;
  transform: translateZ(0);
}

.ambient-orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--neon-violet) 0%, transparent 70%);
  top: -10%; left: -5%;
  animation-duration: 20s;
}
.ambient-orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--neon-cyan) 0%, transparent 70%);
  top: 50%; right: -8%;
  animation-duration: 25s;
  animation-delay: -5s;
}
.ambient-orb-3 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, var(--neon-magenta) 0%, transparent 70%);
  bottom: -5%; left: 30%;
  animation-duration: 22s;
  animation-delay: -10s;
  opacity: 0.15;
}

@keyframes orb-drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(60px, -40px, 0) scale(1.15); }
}

/* Scan line overlay */
.ambient-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 2px,
    rgba(0, 240, 255, 0.012) 2px,
    rgba(0, 240, 255, 0.012) 4px
  );
  pointer-events: none;
}

/* ─── Gradient Text ─── */
.gradient-text {
  background: linear-gradient(135deg, var(--neon-violet), var(--accent), var(--neon-magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-cyan {
  background: linear-gradient(135deg, var(--neon-cyan), #3d9eff, var(--neon-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Navbar ─── */
.navbar-glass {
  background: rgba(6, 6, 10, 0.7);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid rgba(0, 240, 255, 0.06);
  box-shadow: 0 1px 30px rgba(0, 0, 0, 0.4);
  transform: translateZ(0);
}

/* ─── Animated Logo Text ─── */
.logo-text-wrap {
  position: relative;
  height: 1.5em;
  overflow: hidden;
  min-width: 8rem;
}

.logo-text-slide {
  display: flex;
  flex-direction: column;
  animation: logo-cycle 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  will-change: transform;
}

.logo-text-item {
  height: 1.5em;
  line-height: 1.5em;
  white-space: nowrap;
  flex-shrink: 0;
}

@keyframes logo-cycle {
  0%, 30%    { transform: translateY(0); }
  35%, 65%   { transform: translateY(-1.5em); }
  70%, 100%  { transform: translateY(-3em); }
}

/* ─── Logo Icon Glow ─── */
.logo-icon {
  position: relative;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--neon-violet), var(--neon-magenta));
  box-shadow: 0 0 15px rgba(176, 38, 255, 0.4), 0 0 40px rgba(176, 38, 255, 0.15);
  transition: box-shadow 0.4s ease;
}
.logo-icon:hover {
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.5), 0 0 60px rgba(176, 38, 255, 0.3);
}

/* ─── Nav Buttons ─── */
.nav-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  background: rgba(13, 13, 20, 0.6);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  border-radius: 0;
}
.nav-btn:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.04);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.1), inset 0 0 12px rgba(0, 240, 255, 0.03);
}

.nav-btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1rem;
  font-size: 0.875rem;
  color: #fff;
  background: linear-gradient(135deg, var(--neon-violet), var(--accent));
  border: 1px solid rgba(176, 38, 255, 0.3);
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 0 15px rgba(176, 38, 255, 0.2);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  border-radius: 0;
}
.nav-btn-primary:hover {
  background: linear-gradient(135deg, var(--accent), var(--neon-magenta));
  border-color: rgba(255, 45, 149, 0.3);
  box-shadow: 0 0 25px rgba(191, 90, 242, 0.35);
  transform: translateY(-1px);
}
.nav-btn-primary:active {
  transform: scale(0.97) translateY(0);
}

/* ─── Drop Zone ─── */
.drop-zone {
  position: relative;
  width: 100%;
  max-width: 36rem;
  min-height: 15rem;
  border: 1px solid rgba(176, 38, 255, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(13, 13, 20, 0.5);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  backdrop-filter: blur(10px);
}
.drop-zone::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(135deg, rgba(176, 38, 255, 0.15), transparent 40%, transparent 60%, rgba(0, 240, 255, 0.15));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  transition: opacity 0.4s ease;
  opacity: 0.6;
}
.drop-zone:hover::before,
.drop-zone:focus-visible::before {
  opacity: 1;
  background: linear-gradient(135deg, rgba(176, 38, 255, 0.3), rgba(0, 240, 255, 0.15) 40%, rgba(255, 45, 149, 0.15) 60%, rgba(0, 240, 255, 0.3));
}
.drop-zone:hover,
.drop-zone:focus-visible {
  border-color: rgba(176, 38, 255, 0.25);
  background: rgba(176, 38, 255, 0.04);
  box-shadow: 0 0 40px rgba(176, 38, 255, 0.08), inset 0 0 40px rgba(176, 38, 255, 0.02);
}
.drop-zone.drag-over {
  border-color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.04);
  box-shadow: var(--glow-cyan), inset 0 0 30px rgba(0, 240, 255, 0.03);
}
.drop-zone.drag-over::before {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.4), transparent 50%, rgba(0, 240, 255, 0.4));
  opacity: 1;
}

.drop-zone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  position: relative;
  z-index: 2;
}
.drop-zone-content.hidden {
  display: none;
}

.drop-zone-active {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  z-index: 2;
}
.drop-zone-active.hidden {
  display: none;
}

.drop-icon-wrap {
  position: relative;
  width: 5rem;
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drop-icon-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(176, 38, 255, 0.2);
  animation: ring-pulse 3s ease-in-out infinite;
  will-change: transform, opacity;
}
.drop-icon-ring.delay-1 { animation-delay: 1s; }
.drop-icon-ring.delay-2 { animation-delay: 2s; }

@keyframes ring-pulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.35); opacity: 0; }
}

/* ─── File Type Badges ─── */
.file-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(22, 22, 31, 0.8);
  border: 1px solid var(--border);
  letter-spacing: 0.04em;
  transition: all var(--transition);
}
.file-badge:hover {
  border-color: rgba(0, 240, 255, 0.2);
  color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.08);
}

/* ─── Feature Cards ─── */
.feature-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1.25rem;
  border-radius: var(--radius-lg);
  background: rgba(13, 13, 20, 0.5);
  border: 1px solid var(--border);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
  position: relative;
  will-change: transform;
  transform: translateZ(0);
}
.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  opacity: 0;
  transition: opacity 0.4s ease;
  background: radial-gradient(circle at 50% 0%, rgba(176, 38, 255, 0.06), transparent 70%);
  pointer-events: none;
}
.feature-card:hover {
  border-color: rgba(176, 38, 255, 0.15);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(176, 38, 255, 0.05);
}
.feature-card:hover::before { opacity: 1; }

.feature-icon-wrap {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  background: rgba(176, 38, 255, 0.06);
  border: 1px solid rgba(176, 38, 255, 0.08);
  transition: all var(--transition);
}
.feature-card:hover .feature-icon-wrap {
  box-shadow: 0 0 15px rgba(176, 38, 255, 0.15);
}

/* ─── Viewer ─── */
.viewer-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 28rem;
  position: relative;
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.4);
}

.viewer-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  color: var(--text-muted);
  background: rgba(13, 13, 20, 0.6);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
  border-radius: 0;
}
.viewer-action-btn:hover {
  background: rgba(176, 38, 255, 0.06);
  border-color: rgba(176, 38, 255, 0.2);
  color: var(--text);
  box-shadow: 0 0 10px rgba(176, 38, 255, 0.1);
}

.viewer-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(6, 6, 10, 0.92);
  border-radius: var(--radius-lg);
  z-index: 10;
  backdrop-filter: blur(8px);
}
.viewer-loading.hidden { display: none; }

.loading-spinner {
  width: 2.75rem;
  height: 2.75rem;
  border: 2px solid var(--surface-3);
  border-top-color: var(--neon-cyan);
  border-right-color: var(--neon-violet);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.15);
  will-change: transform;
}

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

/* ─── Page Controls ─── */
.control-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.875rem;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
  border-radius: 0;
}
.control-btn:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.04);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.12);
}
.control-btn:active {
  transform: scale(0.95);
}
.control-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}
.control-btn:disabled:hover {
  border-color: var(--border);
  color: var(--text-secondary);
  background: var(--surface);
  box-shadow: none;
  transform: none;
}

.page-counter {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem 1rem;
}

/* ─── Cast Panel ─── */
.cast-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 60;
  transition: opacity 0.4s ease;
  backdrop-filter: blur(4px);
}
.cast-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.cast-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 22rem;
  z-index: 70;
  background: rgba(6, 6, 10, 0.95);
  backdrop-filter: blur(20px);
  border-left: 1px solid rgba(176, 38, 255, 0.08);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.4);
  will-change: transform;
  transform: translateZ(0);
}
.cast-panel.open {
  transform: translateX(0);
}

.cast-mode-tabs {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.2rem;
  gap: 0.2rem;
}

.cast-tab {
  flex: 1;
  padding: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cast-tab:hover { color: var(--text-secondary); }
.cast-tab.active {
  background: rgba(0, 240, 255, 0.06);
  color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.05);
}

.cast-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--neon-violet), var(--accent));
  border: 1px solid rgba(176, 38, 255, 0.2);
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 0 15px rgba(176, 38, 255, 0.15);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.cast-action-btn:hover {
  background: linear-gradient(135deg, var(--accent), var(--neon-magenta));
  box-shadow: 0 0 25px rgba(191, 90, 242, 0.3);
}
.cast-action-btn:active {
  transform: scale(0.97);
}

.cast-action-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-text);
  background: transparent;
  border: 1px solid rgba(176, 38, 255, 0.15);
  cursor: pointer;
  transition: all var(--transition);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cast-action-btn-outline:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.04);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.08);
}

.cast-input {
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-align: center;
  color: var(--neon-cyan);
  background: var(--surface);
  border: 1px solid var(--border);
  outline: none;
  transition: all var(--transition);
}
.cast-input::placeholder {
  color: var(--text-muted);
  letter-spacing: 0.35em;
}
.cast-input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.1), inset 0 0 15px rgba(0, 240, 255, 0.03);
}

.room-id-display {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: 0.45em;
  text-align: center;
  color: var(--neon-cyan);
  padding: 0.5rem;
  user-select: all;
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.4), 0 0 40px rgba(0, 240, 255, 0.15);
}

.remote-ctrl-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.5rem;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  border-radius: 0;
}
.remote-ctrl-btn:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.04);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.1);
}
.remote-ctrl-btn:active {
  transform: scale(0.95);
}

/* ─── Toast Notifications ─── */
.toast {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  background: rgba(13, 13, 20, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), 0 0 15px rgba(176, 38, 255, 0.05);
  pointer-events: auto;
  animation: toast-in 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 22rem;
}
.toast.toast-out {
  animation: toast-out 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.toast-error { border-color: rgba(255, 45, 149, 0.2); }
.toast-error i { color: var(--neon-magenta); }
.toast-success { border-color: rgba(0, 255, 136, 0.2); }
.toast-success i { color: #00ff88; }
.toast-info i { color: var(--neon-cyan); }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(1.5rem) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0; transform: translateX(1.5rem) scale(0.95); }
}

/* ─── PPTX Viewer ─── */
#pptx-viewer {
  transition: opacity 0.2s ease;
}
#pptx-viewer .pptx-slide {
  background: #fff;
  color: #1a1a1a;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(176, 38, 255, 0.05);
  border-radius: 4px;
  flex-shrink: 0;
}
#pptx-viewer .pptx-slide-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* ─── DOCX Viewer ─── */
#docx-viewer {
  background: #e5e7eb;
  border-radius: var(--radius);
  overflow-y: auto;
  padding: 16px;
}
#docx-viewer .docx-wrapper { background: transparent !important; }
#docx-viewer .docx-wrapper > section {
  margin: 0 auto 16px !important;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2) !important;
  border-radius: 4px;
}

/* ─── Fullscreen ─── */
.viewer-container:fullscreen,
.viewer-container:-webkit-full-screen {
  background: #000;
  border: none;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.viewer-container:fullscreen canvas,
.viewer-container:-webkit-full-screen canvas {
  max-height: 100vh;
  max-width: 100vw;
  object-fit: contain;
}
.viewer-container:fullscreen .pptx-slide,
.viewer-container:-webkit-full-screen .pptx-slide {
  border-radius: 0;
  box-shadow: none;
}

/* ─── Footer ─── */
.app-footer {
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.app-footer .footer-accent {
  color: var(--neon-cyan);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

/* ─── Animations ─── */
.fade-in {
  animation: fade-in 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-animate {
  animation: hero-entrance 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  will-change: transform, opacity;
}
@keyframes hero-entrance {
  from { opacity: 0; transform: translate3d(0, 24px, 0); filter: blur(4px); }
  to { opacity: 1; transform: translate3d(0, 0, 0); filter: blur(0); }
}
.hero-animate-delay-1 { animation-delay: 0.12s; }
.hero-animate-delay-2 { animation-delay: 0.24s; }
.hero-animate-delay-3 { animation-delay: 0.36s; }

/* ─── Neon Glow Pill (hero badge) ─── */
.neon-badge {
  position: relative;
  border: 1px solid rgba(0, 240, 255, 0.15) !important;
  background: rgba(0, 240, 255, 0.03) !important;
}
.neon-badge::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 9999px;
  background: linear-gradient(90deg, rgba(176, 38, 255, 0.15), rgba(0, 240, 255, 0.15));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1px;
  pointer-events: none;
}

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .drop-zone { min-height: 11rem; }
  .room-id-display { font-size: 1.75rem; letter-spacing: 0.3em; }
  .cast-panel { max-width: 100%; }
  .viewer-container { min-height: 18rem; }
  .ambient-orb { filter: blur(80px); }
  .ambient-orb-1 { width: 300px; height: 300px; }
  .ambient-orb-2 { width: 250px; height: 250px; }
  .ambient-orb-3 { width: 200px; height: 200px; }
  /* Reduce expensive blur on mobile */
  .navbar { backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2); }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .network-bg-canvas { display: none; }
  .ambient-orb { display: none; }
}

/* ─── iLovePDF Disclaimer Modal ─── */
.disclaimer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.disclaimer-overlay.hidden { display: none; }

.disclaimer-modal {
  background: rgba(13, 13, 20, 0.95);
  border: 1px solid rgba(176, 38, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  max-width: 400px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0,0,0,0.6), 0 0 30px rgba(176, 38, 255, 0.05);
  backdrop-filter: blur(20px);
}

.disclaimer-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(176, 38, 255, 0.08);
  border: 1px solid rgba(176, 38, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  box-shadow: 0 0 15px rgba(176, 38, 255, 0.1);
}

.disclaimer-btn-cancel {
  padding: 0.6rem 1rem;
  border: 1px solid var(--border-hover);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
  border-radius: 0;
}
.disclaimer-btn-cancel:hover { background: var(--surface-2); color: var(--text); }

.disclaimer-btn-confirm {
  padding: 0.6rem 1rem;
  border: none;
  background: linear-gradient(135deg, var(--neon-violet), var(--accent));
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 0 12px rgba(176, 38, 255, 0.2);
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
  border-radius: 0;
}
.disclaimer-btn-confirm:hover {
  background: linear-gradient(135deg, var(--accent), var(--neon-magenta));
  box-shadow: 0 0 20px rgba(191, 90, 242, 0.3);
}

.disclaimer-remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}
.disclaimer-remember input[type="checkbox"] { accent-color: var(--neon-cyan); cursor: pointer; }

/* ═══════════════════════════════════════════════════
   BOOT SCREEN — Hacker terminal intro
═══════════════════════════════════════════════════ */
.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #020204;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, transform 0.5s ease;
  will-change: opacity, transform;
  transform: translateZ(0);
}
.boot-screen.boot-exit {
  opacity: 0;
  transform: scale(1.05) translateZ(0);
  pointer-events: none;
}

.boot-content {
  max-width: 520px;
  width: 90%;
  text-align: left;
}

.boot-logo-icon {
  font-size: 1.5rem;
  color: var(--neon-cyan);
  margin-bottom: 1.25rem;
  text-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
  animation: blink-cursor 1s step-end infinite;
}

.boot-lines {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  line-height: 1.8;
  color: #00ff88;
  min-height: 200px;
  overflow: hidden;
}

.boot-line {
  opacity: 0;
  animation: boot-line-in 0.3s ease forwards;
  text-shadow: 0 0 6px rgba(0, 255, 136, 0.4);
}

@keyframes boot-line-in {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

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

.boot-progress-wrap {
  margin-top: 1.25rem;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
}

.boot-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-violet), var(--neon-magenta));
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.boot-scanline {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 2px,
    rgba(0, 240, 255, 0.02) 2px,
    rgba(0, 240, 255, 0.02) 4px
  );
  pointer-events: none;
  z-index: 1;
}

/* ═══════════════════════════════════════════════════
   GLITCH TEXT EFFECT
═══════════════════════════════════════════════════ */
.glitch-text {
  position: relative;
  display: inline-block;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.glitch-text::before {
  animation: glitch-shift 4s ease-in-out infinite;
  clip-path: inset(20% 0 40% 0);
  -webkit-text-fill-color: var(--neon-cyan);
  opacity: 0.7;
  will-change: transform;
}

.glitch-text::after {
  animation: glitch-shift-2 4s ease-in-out infinite;
  clip-path: inset(60% 0 10% 0);
  -webkit-text-fill-color: var(--neon-magenta);
  opacity: 0.7;
  will-change: transform;
}

@keyframes glitch-shift {
  0%, 90%, 100% { transform: translate(0); }
  92% { transform: translate(3px, -2px); }
  94% { transform: translate(-3px, 1px); }
  96% { transform: translate(2px, 2px); }
  98% { transform: translate(-2px, -1px); }
}

@keyframes glitch-shift-2 {
  0%, 88%, 100% { transform: translate(0); }
  90% { transform: translate(-3px, 2px); }
  92% { transform: translate(3px, -1px); }
  94% { transform: translate(-2px, -2px); }
  96% { transform: translate(2px, 1px); }
}

/* ═══════════════════════════════════════════════════
   FILE BADGES — cyberpunk cut corners
═══════════════════════════════════════════════════ */
.file-badge {
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
  border-radius: 0;
}

/* ═══════════════════════════════════════════════════
   NETWORK / SPIDER-WEB BACKGROUND CANVAS
═══════════════════════════════════════════════════ */
.network-bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
  opacity: 0.55;
  transform: translateZ(0);
}

/* ═══════════════════════════════════════════════════
   LASER POINTER DOT
═══════════════════════════════════════════════════ */
.laser-pointer-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 50, 50, 0.9) 0%, rgba(255, 50, 50, 0.3) 60%, transparent 100%);
  box-shadow: 0 0 12px 4px rgba(255, 50, 50, 0.5), 0 0 24px 8px rgba(255, 50, 50, 0.2);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 50;
  transition: left 0.08s linear, top 0.08s linear;
}

.laser-pointer-dot.hidden {
  display: none;
}

/* ═══════════════════════════════════════════════════
   PEER DEVICE BADGE
═══════════════════════════════════════════════════ */
.peer-device-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 6px;
  background: rgba(0, 240, 255, 0.06);
  border: 1px solid rgba(0, 240, 255, 0.15);
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
}

.peer-device-badge.hidden {
  display: none;
}

/* ═══════════════════════════════════════════════════
   LASER & TIMER ACTIVE STATES
═══════════════════════════════════════════════════ */
.laser-active {
  background: rgba(255, 50, 50, 0.15) !important;
  border-color: rgba(255, 50, 50, 0.4) !important;
  box-shadow: 0 0 12px rgba(255, 50, 50, 0.25);
}

.timer-running {
  background: rgba(0, 240, 255, 0.1) !important;
  border-color: rgba(0, 240, 255, 0.3) !important;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.2);
}

/* ═══════════════════════════════════════════════════
   BUTTON HOVER ANIMATIONS — Cyberpunk scan sweep + glow
═══════════════════════════════════════════════════ */

/* Shared sweep overlay for all cyberpunk buttons */
.nav-btn,
.nav-btn-primary,
.cast-action-btn,
.control-btn,
.viewer-action-btn,
.remote-ctrl-btn,
#disclaimer-overlay button {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-btn::after,
.nav-btn-primary::after,
.cast-action-btn::after,
.control-btn::after,
.viewer-action-btn::after,
.remote-ctrl-btn::after,
#disclaimer-overlay button::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 240, 255, 0.12) 40%,
    rgba(176, 38, 255, 0.08) 60%,
    transparent 100%
  );
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 1;
  will-change: transform;
}

.nav-btn:hover::after,
.nav-btn-primary:hover::after,
.cast-action-btn:hover::after,
.control-btn:hover::after,
.viewer-action-btn:hover::after,
.remote-ctrl-btn:hover::after,
#disclaimer-overlay button:hover::after {
  transform: translateX(100%);
}

/* Glow + lift on hover */
.nav-btn:hover,
.cast-action-btn:hover,
.control-btn:hover,
.viewer-action-btn:hover,
.remote-ctrl-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 12px rgba(0, 240, 255, 0.35),
    0 0 24px rgba(0, 240, 255, 0.1),
    inset 0 0 8px rgba(0, 240, 255, 0.05);
  border-color: var(--neon-cyan);
}

.nav-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 16px rgba(176, 38, 255, 0.5),
    0 0 32px rgba(176, 38, 255, 0.15),
    inset 0 0 10px rgba(176, 38, 255, 0.08);
  filter: brightness(1.15);
}

#disclaimer-overlay button:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 14px rgba(0, 240, 255, 0.4),
    0 0 28px rgba(0, 240, 255, 0.12);
}

/* Active press effect */
.nav-btn:active,
.nav-btn-primary:active,
.cast-action-btn:active,
.control-btn:active,
.viewer-action-btn:active,
.remote-ctrl-btn:active,
#disclaimer-overlay button:active {
  transform: translateY(0) scale(0.97);
  transition-duration: 0.08s;
}

