@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@600;700&display=swap');

:root {
  /* Shadcn UI "Violet" Dark Theme Variables with Vibrant accents */
  --background: 224 71.4% 4.1%;
  --foreground: 210 20% 98%;

  --card: 224 71.4% 4.1%;
  --card-foreground: 210 20% 98%;

  --popover: 224 71.4% 4.1%;
  --popover-foreground: 210 20% 98%;

  --primary: 38 100% 62%;
  --primary-foreground: 224 71.4% 4.1%;

  --secondary: 215 27.9% 16.9%;
  --secondary-foreground: 210 20% 98%;

  --muted: 215 27.9% 16.9%;
  --muted-foreground: 217.9 10.6% 64.9%;

  --accent: 215 27.9% 16.9%;
  --accent-foreground: 210 20% 98%;

  --destructive: 350 89% 60%;
  --destructive-foreground: 210 20% 98%;

  --border: 215 27.9% 16.9%;
  --input: 215 27.9% 16.9%;
  --ring: 38 100% 62%;

  --accent-bang: var(--primary);

  --radius: 0.5rem;
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
}

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

body {
  background-color: hsl(var(--background));
  background-image: radial-gradient(ellipse at 50% 0%, hsl(var(--primary) / 0.05) 0%, transparent 65%);
  color: hsl(var(--foreground));
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  min-height: 100vh;
  width: 100vw;
  overflow-x: hidden;
  
  /* Critical UX: Disable double-tap zoom on fast clicks */
  touch-action: manipulation;
  /* Critical UX: Disable text selection on UI buttons */
  -webkit-user-select: none;
  user-select: none;
}

/* Flash prevention — hides x-show elements until Alpine.js initialises */
[x-cloak] { display: none !important; }

/* Utilities */
.hidden { display: none !important; }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.w-full { width: 100%; }
.min-h-screen { min-height: 100vh; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.absolute { position: absolute; }
.relative { position: relative; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.h-full { height: 100%; }
.flex-1 { flex: 1 1 0%; }
.justify-between { justify-content: space-between; }
.text-primary { color: hsl(var(--primary)); }
.mt-2 { margin-top: 0.5rem; }
.pt-2 { padding-top: 0.5rem !important; }
.pt-4 { padding-top: 1rem !important; }
.pt-6 { padding-top: 1.5rem !important; }
.pt-8 { padding-top: 2rem !important; }
.pt-10 { padding-top: 2.5rem !important; }
.pb-4 { padding-bottom: 1rem !important; }
.pb-8 { padding-bottom: 2rem !important; }

.text-gradient {
  background: linear-gradient(135deg, hsl(38 100% 62%), hsl(25 95% 55%));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* Canvas Fullscreen */
#receiver-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: contain;
  background-color: hsl(var(--background));
  z-index: 10;
  transition: opacity 0.3s ease;
}

/* Typography components matched to Shadcn */
h1 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}
h2 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}
h3 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}
p {
  line-height: 1.75;
}
.text-muted-foreground {
  color: hsl(var(--muted-foreground));
}

/* Card Component */
.card {
  border-radius: calc(var(--radius) + 0.25rem);
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
  box-shadow:
    0 1px 2px rgba(0,0,0,0.08),
    0 8px 32px rgba(0,0,0,0.28),
    0 0 0 0.5px hsl(var(--primary) / 0.06) inset;
  display: flex;
  flex-direction: column;
}

.card-header {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 1.5rem;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 0;
}

.card-description {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin: 0;
}

.card-content {
  padding: 1.5rem;
  padding-top: 0;
}

.card-footer {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  padding-top: 0;
}

/* Input Component */
.input {
  display: flex;
  height: 2.5rem;
  width: 100%;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--input));
  background-color: transparent;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
  color: hsl(var(--foreground));
}

.input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 4px hsl(var(--ring));
}

.input:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.input-pin {
  height: 4rem;
  font-size: 2rem;
  text-align: center;
  letter-spacing: 0.5em;
  font-weight: 700;
  text-transform: uppercase;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* OTP / PIN digit boxes */
.pin-digit {
  width: 3.5rem;
  height: 4rem;
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  text-transform: uppercase;
  border: 2px solid hsl(var(--border));
  border-radius: var(--radius);
  background: hsl(var(--secondary));
  color: hsl(var(--foreground));
  caret-color: hsl(var(--primary));
  padding: 0;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.pin-digit:focus-visible {
  outline: none;
  border-color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.05);
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.18), 0 0 20px hsl(var(--primary) / 0.1);
}
.pin-digit.filled {
  border-color: hsl(var(--primary) / 0.75);
  color: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.12), inset 0 1px 3px hsl(var(--primary) / 0.08);
  animation: pin-snap 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Button Component */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.875rem;
  font-weight: 500;
  height: 2.5rem;
  padding: 0.5rem 1rem;
  transition: all 150ms ease;
  cursor: pointer;
  border: none;
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 4px hsl(var(--ring));
}

.btn:disabled {
  pointer-events: none;
  opacity: 0.5;
}

.btn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.btn-primary:hover {
  background-color: hsl(var(--primary) / 0.92);
  box-shadow: 0 4px 18px hsl(var(--primary) / 0.35);
}
.btn-primary:active {
  transform: scale(0.97);
  transition: transform 0.08s ease;
}

.btn-secondary {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}

.btn-secondary:hover {
  background-color: hsl(var(--secondary) / 0.8);
}

.btn-destructive {
  background-color: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
}

.btn-destructive:hover {
  background-color: hsl(var(--destructive) / 0.9);
}

.btn-outline {
  border: 1px solid hsl(var(--input));
  background-color: transparent;
  color: hsl(var(--foreground));
}

.btn-outline:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.btn-ghost {
  background-color: transparent;
  color: hsl(var(--foreground));
}

.btn-ghost:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.btn-lg {
  height: auto;
  min-height: 3rem;
  padding: 0 2rem;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Label Component */
.label {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  color: hsl(var(--foreground));
  display: block;
  margin-bottom: 0.5rem;
}

/* Layout Details */
.mobile-wrapper {
  max-width: 28rem;
  margin: 0 auto;
}

/* File Upload custom style inside Card */
.file-upload-box {
  border: 2px dashed hsl(var(--border));
  border-radius: calc(var(--radius) + 0.25rem);
  padding: 3rem 1.5rem;
  text-align: center;
  position: relative;
  cursor: pointer;
  background-color: hsl(var(--background));
  transition: all 200ms ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.file-upload-box:hover {
  border-color: hsl(var(--primary) / 0.5);
  background-color: hsl(var(--primary) / 0.05);
}

.file-upload-icon {
  width: 48px;
  height: 48px;
  color: hsl(var(--muted-foreground));
  transition: color 200ms ease;
}

.file-upload-box:hover .file-upload-icon {
  color: hsl(var(--primary));
}

.file-upload-title {
  font-size: 1rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.file-upload-subtitle {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.file-upload-box input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
}

/* Presenter Slide View */
.slide-preview-frame {
  margin-bottom: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--background));
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.slide-badge {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background-color: hsl(var(--foreground));
  color: hsl(var(--background));
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 5;
}

/* Screen Mode specific */
.screen-wrapper {
  width: 100vw;
  height: 100vh;
  background-color: hsl(var(--background));
  background-image: radial-gradient(circle at center, hsl(var(--primary) / 0.07) 0%, transparent 65%);
}

.qr-container {
  background-color: hsl(var(--foreground)); /* white for contrast */
  padding: 1rem;
  border-radius: calc(var(--radius) + 0.25rem);
  display: inline-block;
  margin: 0 auto;
}

.tv-pin {
  font-size: 4.5rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-indent: 0.35em; /* compensate trailing letter-spacing so text is visually centered */
  text-align: center;
  width: 100%;
  margin: 1.5rem 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* TV Loader (Tailwind-style Lucide Spinner equivalent) */
.tv-loader {
  width: 2rem;
  height: 2rem;
  border: 3px solid hsl(var(--muted));
  border-top-color: hsl(var(--foreground));
  border-radius: 50%;
  animation: spinner 0.8s linear infinite;
  display: inline-block;
}

@keyframes spinner {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Callout / Alert logic */
.alert {
  border-radius: var(--radius);
  border: 1px solid hsl(var(--destructive) / 0.5);
  background-color: hsl(var(--destructive) / 0.1);
  padding: 1rem;
  color: hsl(var(--destructive));
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
}
.alert-title {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
}
.alert-desc {
  font-size: 0.875rem;
  opacity: 0.9;
}

/* Fade Transitions (Alpine) — snappy spring, luxury pace */
.fade-enter         { opacity: 0; transform: translateY(8px) scale(0.987); }
.fade-enter-to      { opacity: 1; transform: translateY(0)   scale(1); }
.fade-enter-active  { transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                                  transform 0.2s cubic-bezier(0.16, 1, 0.3, 1); }
.fade-leave         { opacity: 1; transform: translateY(0); }
.fade-leave-to      { opacity: 0; transform: translateY(-5px); }
.fade-leave-active  { transition: opacity 0.12s ease-in, transform 0.12s ease-in; }

/* Shadcn Zoom-In animation */
.zoom-in-enter        { opacity: 0; transform: scale(0.95) translateY(4px); }
.zoom-in-enter-active { transition: all 0.17s cubic-bezier(0.16, 1, 0.3, 1); }
.zoom-in-leave        { opacity: 1; transform: scale(1); }
.zoom-in-leave-active { transition: all 0.11s ease-in; }
.zoom-in-leave-to     { opacity: 0; transform: scale(0.97); }

/* Shadcn Dialog / Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: hsl(var(--background) / 0.8);
  backdrop-filter: blur(4px);
  padding: 1rem;
}

.modal-content {
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  width: 100%;
  max-width: 24rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transform: scale(1);
}

.modal-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.025em;
  color: hsl(var(--foreground));
}

.modal-description {
  font-size: 0.95rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.5;
}

.modal-footer {
  display: flex;
  justify-content: stretch;
  margin-top: 0.5rem;
}

/* ── Presenter: Waiting pulse rings ────────────────────── */
.waiting-indicator {
  position: relative;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pulse-ring-outer,
.pulse-ring-inner {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1.5px solid hsl(var(--primary) / 0.45);
  animation: pulse-ring 2.2s ease-out infinite;
}
.pulse-ring-inner { animation-delay: 0.75s; }
@keyframes pulse-ring {
  0%   { transform: scale(1);   opacity: 0.7; }
  100% { transform: scale(2.6); opacity: 0; }
}

/* ── Presenter: Transport status indicator ─────────────── */
.transport-btn {
  padding: 0 0.625rem !important;
  font-size: 0.7rem !important;
  letter-spacing: 0;
  border-radius: 99px !important;
  height: 32px !important;
}
.transport-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.01em;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-green {
  background: #10b981;
  animation: dot-pulse 2.4s ease-in-out infinite;
}
.dot-amber { background: #f59e0b; }
@keyframes dot-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* ── Presenter: Top bar buttons ────────────────────────── */
.presenter-end-btn {
  color: hsl(var(--destructive)) !important;
  padding: 0 0.5rem !important;
  margin-left: -0.5rem;
  display: flex !important;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
}
.blank-btn {
  padding: 0 0.875rem !important;
  height: 32px !important;
  display: flex !important;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
}

/* ── Presenter: Navigation buttons ─────────────────────── */
.nav-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 1rem !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  transition: transform 0.08s ease, opacity 0.08s ease !important;
}
.nav-btn:active:not(:disabled) {
  transform: scale(0.95);
}
.nav-btn:disabled {
  opacity: 0.3;
}

/* ── Presenter: Slide image ─────────────────────────────── */
.slide-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.15s ease;
}

/* General button transition tightened */
.btn {
  transition: all 0.1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* App Logo */
.logo-text {
  font-family: 'Space Grotesk', var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: hsl(var(--foreground));
}
.logo-bang {
  color: hsl(var(--accent-bang));
  display: inline-block;
  animation: bang-breathe 4s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════════════
   LUXURY MICRO-ANIMATIONS
   ═══════════════════════════════════════════════════════════ */

/* Logo "!" subtle breathe */
@keyframes bang-breathe {
  0%, 100% { opacity: 1;    filter: brightness(1);   }
  50%       { opacity: 0.6; filter: brightness(1.4); }
}

/* PIN digit micro-bounce on fill */
@keyframes pin-snap {
  0%   { transform: scale(1); }
  35%  { transform: scale(0.88); }
  70%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* Connect button CTA shimmer sweep */
@keyframes shimmer-sweep {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}
.btn-cta {
  background: linear-gradient(
    90deg,
    hsl(38 100% 54%)  0%,
    hsl(38 100% 73%) 45%,
    hsl(38 100% 54%) 100%
  );
  background-size: 250% auto;
  font-weight: 600;
  letter-spacing: 0.01em;
  animation: shimmer-sweep 1.8s linear infinite;
  white-space: normal;
  text-align: center;
}
.btn-cta:disabled {
  background: hsl(var(--primary));
  animation: none;
  opacity: 0.4;
}

/* Nav buttons — golden glow on primary, press spring */
.nav-btn {
  will-change: transform;
  position: relative;
}
.btn-primary.nav-btn:not(:disabled) {
  box-shadow: 0 4px 24px hsl(var(--primary) / 0.28);
  transition: transform 0.08s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.14s ease !important;
}
.btn-primary.nav-btn:not(:disabled):hover {
  box-shadow: 0 6px 32px hsl(var(--primary) / 0.45);
}
.btn-primary.nav-btn:not(:disabled):active {
  transform: scale(0.93);
  box-shadow: 0 2px 12px hsl(var(--primary) / 0.2);
}
.btn-secondary.nav-btn:not(:disabled):active {
  transform: scale(0.93);
}

/* Waiting indicator — third ring + primary-tinted spinner */
.pulse-ring-third {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid hsl(var(--primary) / 0.2);
  animation: pulse-ring 2.2s ease-out infinite 1.45s;
}
.waiting-indicator .tv-loader {
  border-top-color: hsl(var(--primary));
  width: 2.25rem;
  height: 2.25rem;
  border-width: 2.5px;
}

/* Slide badge fade-in on enter */
@keyframes badge-in {
  from { opacity: 0; transform: translateY(-4px) scale(0.92); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}
.slide-badge {
  animation: badge-in 0.18s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* File upload box — idle border glow pulse */
@keyframes upload-idle {
  0%,  100% { border-color: hsl(var(--border)); }
  50%       { border-color: hsl(var(--primary) / 0.35); }
}
.file-upload-box {
  animation: upload-idle 2.4s ease-in-out infinite;
}
.file-upload-box:hover {
  animation: none;
  border-color: hsl(var(--primary) / 0.6);
  background-color: hsl(var(--primary) / 0.05);
  box-shadow: 0 0 24px hsl(var(--primary) / 0.1);
}

/* Transport button active glow */
.transport-btn:hover {
  box-shadow: 0 0 12px hsl(var(--primary) / 0.15);
}

/* Modal premium shadow */
.modal-content {
  box-shadow:
    0 20px 60px -10px rgba(0,0,0,0.7),
    0 0 0 0.5px hsl(var(--primary) / 0.12) inset;
}

/* Slide rendering overlay — use blur+fade so it looks intentional */
.slide-img {
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* End session button — hover tint */
.presenter-end-btn:hover {
  background: hsl(var(--destructive) / 0.1) !important;
  border-radius: calc(var(--radius) - 2px);
}

/* Blank button — when active: amber glow */
.btn-primary.blank-btn {
  box-shadow: 0 0 18px hsl(var(--primary) / 0.4);
}

/* ── Receiver: Logo watermark (top-left, always visible) ────────────── */
.receiver-logo {
  position: fixed;
  top: 1.25rem;
  left: 1.25rem;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  padding: 0.4rem 0.9rem 0.4rem 0.65rem;
  opacity: 0.8;
  pointer-events: none;
  user-select: none;
  box-shadow:
    0 2px 12px rgba(0, 0, 0, 0.6),
    0 0 0 0.5px rgba(255, 255, 255, 0.04) inset;
}

.receiver-logo-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: hsl(var(--primary));
  flex-shrink: 0;
  box-shadow: 0 0 6px hsl(var(--primary) / 0.7);
  animation: dot-pulse 2.4s ease-in-out infinite;
}

/* ── Receiver: End session button (top-right, hover-reveal) ─────────── */
.receiver-end-btn {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 70;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.8);
  transition:
    opacity 0.22s ease,
    transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.screen-wrapper:hover .receiver-end-btn {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.receiver-end-btn:hover {
  background: rgba(196, 30, 30, 0.92) !important;
  border-color: rgba(220, 50, 50, 0.35) !important;
  color: #fff !important;
  transform: scale(1.1) !important;
  box-shadow: 0 4px 20px rgba(196, 30, 30, 0.45) !important;
}

.receiver-end-btn:active {
  transform: scale(0.94) !important;
  transition-duration: 0.06s !important;
}

/* ── Landing: Hamburger nav ─────────────────────────── */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 0.4rem 0.35rem;
    background: none;
    border: none;
    color: hsl(var(--foreground));
    border-radius: calc(var(--radius) - 2px);
    transition: background 0.15s;
    flex-shrink: 0;
}
.nav-hamburger:hover { background: hsl(var(--accent)); }
.nav-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.2s ease;
}
.nav-hamburger.is-open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.is-open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-drawer {
    position: fixed;
    top: 3.5rem;
    left: 0; right: 0;
    background: hsl(var(--background) / 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid hsl(var(--border));
    z-index: 98;
    padding: 1.25rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition:
        transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.22s ease;
    box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}
.nav-drawer.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.nav-drawer-link {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    padding: 0.875rem 0;
    border-bottom: 1px solid hsl(var(--border) / 0.5);
    text-decoration: none;
    transition: color 0.15s;
}
.nav-drawer-link:last-of-type { border-bottom: none; }
.nav-drawer-link:hover { color: hsl(var(--foreground)); }
.nav-drawer-actions {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid hsl(var(--border));
}
.nav-drawer-btn {
    display: block;
    text-align: center;
    padding: 0.8rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.15s;
    background: transparent;
    border: 1px solid hsl(var(--border));
    color: hsl(var(--foreground));
}
.nav-drawer-btn:hover {
    background: hsl(var(--accent));
    border-color: hsl(var(--primary) / 0.4);
}
.nav-drawer-cta {
    display: block;
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    text-align: center;
    padding: 0.875rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.15s;
}
.nav-drawer-cta:hover {
    background: hsl(var(--primary) / 0.88);
    box-shadow: 0 4px 16px hsl(var(--primary) / 0.35);
}

/* "Start a Screen" — subtle outline pill, visually distinct from plain links */
.nav-link-screen {
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 2px);
    color: hsl(var(--foreground)) !important;
}
.nav-link-screen:hover {
    border-color: hsl(var(--primary) / 0.45) !important;
    background: hsl(var(--accent)) !important;
}
