:root {
  --primary: #1a73e8;
  --primary-hover: #1f7bf0;
  --primary-dark: #1666d5;
  --chip-blue: #0b74ff;
  --ink: #0f172a;
  --bg-deep: #020617;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100vh;
  background-color: #0b1328;
  background-image: radial-gradient(circle at 12% 8%, #0f172a 0, #0b1328 38%, #020617 68%);
  background-attachment: fixed;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--ink);
  background: transparent;
  padding: 28px 24px 24px;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
  overflow-y: auto;
  width: 100%;
}

/* Prevent any child from causing horizontal overflow */
body > * {
  max-width: 100%;
}

.page {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

/* 20% zoom for desktop (1.20x scale) - applied to .page not body for password manager compatibility */
@media (min-width: 1024px) {
  .page {
    zoom: 120%;
  }
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12.4px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  height: 40.47px;
  width: auto;
  flex-shrink: 0;
  display: block;
  margin: -5.225px 0 -5.225px -5.415px; /* negative left margin to compensate for PNG whitespace */
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 1;
  min-width: 0;
}

/* Nav mobile/desktop visibility */
.nav-mobile-only {
  display: none !important;
}

/* Mobile nav responsiveness */
@media (max-width: 480px) {
  .nav {
    padding: 10px 12px;
  }
  
  .nav-cta {
    gap: 6px;
  }
  
  /* Hide desktop nav items on mobile */
  .nav-desktop-only {
    display: none !important;
  }
  
  /* Show mobile nav items */
  .nav-mobile-only {
    display: inline-flex !important;
  }
  
  .nav-cta .btn-chrome-reveal {
    padding: 7px 12px;
    font-size: 11px;
  }
}

.badge-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: all 250ms ease;
  box-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.badge-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(139, 92, 246, 0.55);
  color: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.15),
    0 0 16px rgba(139, 92, 246, 0.3),
    0 0 6px rgba(99, 102, 241, 0.25),
    inset 0 0 10px rgba(139, 92, 246, 0.1);
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transform: translateY(0);
  transition: all 220ms ease;
  white-space: nowrap;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn:active {
  transition: all 0ms ease;
  transform: translateY(1px);
}

.btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.2),
    0 0 12px rgba(139, 92, 246, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
  border-color: rgba(59, 130, 246, 0.5);
  color: #fff;
  box-shadow: 
    0 2px 10px rgba(26, 115, 232, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, #3b82f6 100%);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 
    0 4px 18px rgba(26, 115, 232, 0.45),
    0 0 16px rgba(139, 92, 246, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(200, 180, 255, 0.2);
  color: #f8fafc;
  padding: 9px 16px;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(200, 180, 255, 0.35);
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.15),
    0 0 14px rgba(139, 92, 246, 0.25),
    inset 0 0 10px rgba(139, 92, 246, 0.08);
}

/* Pressed/active state for demo button */
.btn-ghost.demo-active-pressed {
  transition: all 120ms ease;
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.2),
    0 0 12px rgba(139, 92, 246, 0.25);
  transform: translateY(1px);
}

.btn-ghost.demo-active-pressed:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.6);
}

/* Subtle animated gradient glow for Try it live button */
.btn-glow-animated {
  position: relative;
  transition: box-shadow 0.3s ease;
}

.btn-glow-animated::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 8px;
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.22),
    rgba(147, 51, 234, 0.22),
    rgba(236, 72, 153, 0.22),
    rgba(14, 165, 233, 0.22)
  );
  animation: subtle-pulse 3s ease-in-out infinite;
  z-index: -1;
  filter: blur(6px);
}

.btn-glow-animated:hover::after {
  animation: subtle-pulse-hover 2s ease-in-out infinite;
}

.btn-glow-animated.demo-active-pressed::after {
  display: none;
}

/* Glow effect on AI button when Try it live is hovered */
.hero-grid:has(.btn-glow-animated:hover) .openrouter-ai-btn {
  animation: ai-glow-scroll 4s linear infinite;
}

@keyframes subtle-pulse {
  0%, 100% {
    opacity: 0.47;
  }
  50% {
    opacity: 0.89;
  }
}

@keyframes subtle-pulse-hover {
  0%, 100% {
    opacity: 0.68;
  }
  50% {
    opacity: 1;
  }
}

@keyframes ai-glow-scroll {
  0% {
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.8))
            drop-shadow(0 0 20px rgba(59, 130, 246, 0.6))
            drop-shadow(0 0 6px rgba(59, 130, 246, 0.4));
  }
  25% {
    filter: drop-shadow(0 0 10px rgba(147, 51, 234, 0.8))
            drop-shadow(0 0 20px rgba(147, 51, 234, 0.6))
            drop-shadow(0 0 6px rgba(147, 51, 234, 0.4));
  }
  50% {
    filter: drop-shadow(0 0 10px rgba(236, 72, 153, 0.8))
            drop-shadow(0 0 20px rgba(236, 72, 153, 0.6))
            drop-shadow(0 0 6px rgba(236, 72, 153, 0.4));
  }
  75% {
    filter: drop-shadow(0 0 10px rgba(14, 165, 233, 0.8))
            drop-shadow(0 0 20px rgba(14, 165, 233, 0.6))
            drop-shadow(0 0 6px rgba(14, 165, 233, 0.4));
  }
  100% {
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.8))
            drop-shadow(0 0 20px rgba(59, 130, 246, 0.6))
            drop-shadow(0 0 6px rgba(59, 130, 246, 0.4));
  }
}

/* Audio icon for video button */
.audio-icon {
  opacity: 0.7;
  flex-shrink: 0;
}

/* Explicit content badge */
.explicit-badge {
  font-size: 7px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(248, 250, 252, 0.7);
  margin-left: 2px;
}

/* Chrome Web Store Button */
.btn-chrome {
  background: 
    linear-gradient(110deg, 
      rgba(26, 115, 232, 1) 0%, 
      rgba(99, 102, 241, 1) 25%,
      rgba(168, 85, 247, 1) 50%,
      rgba(14, 165, 233, 1) 75%,
      rgba(26, 115, 232, 1) 100%
    );
  background-size: 200% 100%;
  animation: btn-shimmer 8s linear infinite;
  border-color: rgba(139, 92, 246, 0.6);
  border-radius: 12px;
  padding: 11px 20px;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
  box-shadow: 
    0 4px 16px rgba(26, 115, 232, 0.4),
    0 0 24px rgba(168, 85, 247, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease, filter 220ms ease;
}

@keyframes btn-shimmer {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

.btn-chrome:hover {
  background: 
    linear-gradient(110deg, 
      rgba(26, 115, 232, 1) 0%, 
      rgba(99, 102, 241, 1) 25%,
      rgba(168, 85, 247, 1) 50%,
      rgba(14, 165, 233, 1) 75%,
      rgba(26, 115, 232, 1) 100%
    );
  background-size: 200% 100%;
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-3px);
  filter: brightness(1.12) saturate(1.15);
  box-shadow: 
    0 8px 28px rgba(26, 115, 232, 0.5),
    0 0 40px rgba(168, 85, 247, 0.45),
    0 0 16px rgba(255, 255, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-chrome .chrome-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Secondary Chrome buttons - gradient reveals on hover */
.btn-chrome-reveal {
  background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
  border-color: rgba(59, 130, 246, 0.5);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 2px 10px rgba(26, 115, 232, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: 
    transform 220ms ease, 
    box-shadow 220ms ease, 
    border-color 220ms ease,
    background 300ms ease,
    filter 220ms ease;
}

.btn-chrome-reveal:hover {
  background: 
    linear-gradient(110deg, 
      rgba(26, 115, 232, 1) 0%, 
      rgba(99, 102, 241, 1) 25%,
      rgba(168, 85, 247, 1) 50%,
      rgba(14, 165, 233, 1) 75%,
      rgba(26, 115, 232, 1) 100%
    );
  background-size: 200% 100%;
  animation: btn-shimmer 8s linear infinite;
  border-color: rgba(139, 92, 246, 0.6);
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 
    0 6px 20px rgba(26, 115, 232, 0.45),
    0 0 24px rgba(168, 85, 247, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.main {
  display: flex;
  flex-direction: column;
  gap: 42px;
}

.hero {
  width: 100%;
}

.hero-shell {
  padding: 14px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-actions {
    margin-top: 12px;
    margin-bottom: 12px;
  }
  h1 {
    font-size: clamp(18px, 4vw, 28px);
  }
  .inline-gmail-logo {
    height: clamp(44px, 7vw, 62px);
  }
  .hero-sub br {
    display: none;
  }
  .model-cycler {
    margin-left: 0;
    margin-right: 4px;
  }
  .hero-trust {
    gap: 4px;
  }
  .hero-trust .trust-item {
    padding: 4px 8px;
    font-size: 9px;
    gap: 4px;
  }
  .hero-trust .trust-item svg,
  .hero-trust .trust-item img {
    width: 11px;
    height: 11px;
  }
}

.glass-card {
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.12);
  padding: 24px;
  color: var(--ink);
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.3));
  -webkit-filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.3));
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: flex-start;
  max-width: 560px;
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(226, 232, 240, 0.85);
}

.hero-kicker span.label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(99, 102, 241, 0.1) 100%);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  color: #f8fafc;
  box-shadow: 
    0 2px 8px rgba(139, 92, 246, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

h1 {
  margin: 0;
  font-size: clamp(28px, 2.2vw, 42px);
  font-weight: 700;
  letter-spacing: 0.1px;
  color: #f8fafc;
}

.gmail-logo-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: -7px 0 0 3px;
  vertical-align: middle;
  padding: 6px 12px;
  border-radius: 14px;
  filter: drop-shadow(0 0 12px rgba(96, 165, 250, 0.4)) drop-shadow(0 0 24px rgba(139, 92, 246, 0.3));
  transition: all 0.3s ease;
}

.gmail-logo-glass:hover {
  filter: drop-shadow(0 0 18px rgba(96, 165, 250, 0.5)) drop-shadow(0 0 36px rgba(139, 92, 246, 0.4));
  transform: translateY(-1px);
}

.gmail-logo-glass::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.7) 0%,
    rgba(30, 41, 59, 0.6) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1),
    0 4px 16px rgba(0, 0, 0, 0.25),
    0 0 1px rgba(255, 255, 255, 0.1);
  pointer-events: none;
  transition: all 0.3s ease;
}

.gmail-logo-glass:hover::before {
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.8) 0%,
    rgba(30, 41, 59, 0.7) 100%
  );
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1),
    0 6px 20px rgba(0, 0, 0, 0.3),
    0 0 1px rgba(255, 255, 255, 0.15);
}

.inline-gmail-logo {
  display: block;
  height: clamp(40px, 3.2vw, 58px);
  width: auto;
  margin: 0;
  position: relative;
  z-index: 1;
  transform: translate(1px, 1px);
  filter:
    brightness(1.25)
    contrast(1.1)
    saturate(1.6)
    hue-rotate(-15deg);
  transition: all 0.3s ease;
}

.gmail-logo-glass:hover .inline-gmail-logo {
  filter:
    brightness(1.35)
    contrast(1.15)
    saturate(1.8)
    hue-rotate(-15deg);
  transform: scale(1.02);
}

/* Desktop: keep on one line */
@media (min-width: 901px) {
  h1 {
    white-space: nowrap;
  }
}

/* Tablet/narrow desktop - mobile layout starts */
@media (max-width: 900px) {
  .gmail-logo-glass {
    margin: 4px 0 0 3px;
    padding: 4px 8px;
  }
  .gmail-logo-glass .inline-gmail-logo {
    transform: translate(0, 0);
    height: clamp(30px, 6vw, 40px);
  }
  h1 {
    font-size: clamp(20px, 4.5vw, 28px);
  }
}

@media (max-width: 768px) {
  .hero-copy {
    max-width: 100%;
  }
  .gmail-logo-glass {
    margin: 2px 0 0 2px;
    display: inline-flex;
    width: fit-content;
  }
  .gmail-logo-glass .inline-gmail-logo {
    height: clamp(28px, 6vw, 36px);
  }
  h1 {
    font-size: clamp(18px, 4.5vw, 24px);
    white-space: nowrap;
  }
}

@media (max-width: 500px) {
  .hero-shell {
    padding: 12px;
  }
  .gmail-logo-glass .inline-gmail-logo {
    height: clamp(20px, 5.5vw, 26px);
  }
  h1 {
    font-size: clamp(16px, 4.5vw, 20px);
    white-space: nowrap;
  }
}

@media (max-width: 400px) {
  .hero-shell {
    padding: 10px;
  }
  .hero-copy {
    gap: 6px;
  }
  .gmail-logo-glass .inline-gmail-logo {
    height: 20px;
  }
  h1 {
    font-size: 16px;
    white-space: nowrap;
  }
  .hero-trust {
    gap: 2px;
    flex-wrap: nowrap;
  }
  .hero-trust .trust-item {
    padding: 2px 4px;
    font-size: 7px;
    gap: 2px;
    white-space: nowrap;
  }
  .hero-trust .trust-item svg,
  .hero-trust .trust-item img {
    width: 8px;
    height: 8px;
  }
  /* Demo box: center without forcing full width */
  .hero-gmail-shell {
    width: fit-content;
    margin: 0 auto;
    max-width: 100%;
  }
  /* Fix text box clipping over toolbar */
  .gmail-message-text {
    margin-bottom: 10px;
  }
}

.hero-sub {
  margin: 0;
  font-size: 13.5px;
  font-weight: 400;
  color: rgba(226, 232, 240, 1.0);
  line-height: 1.5;
  max-width: 540px;
}

/* Hero trust signals */
.hero-trust {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: -2px;
  margin-bottom: 0px;
}

.hero-trust .trust-item,
.hero-trust a.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(248, 250, 252, 0.95);
  letter-spacing: 0.01em;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  text-decoration: none;
}

.hero-trust .trust-item:hover,
.hero-trust a.trust-item:hover {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  color: rgba(248, 250, 252, 0.95);
  text-decoration: none;
}

.hero-trust .trust-item svg,
.hero-trust .trust-item img {
  width: 14px;
  height: 14px;
}

.hero-trust .trust-item svg {
  color: #fbbf24;
  filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.4));
}

.hero-trust .trust-item:nth-child(3) svg,
.hero-trust .trust-item:nth-child(5) svg {
  color: #34d399;
  filter: drop-shadow(0 0 4px rgba(52, 211, 153, 0.4));
}

.hero-trust .trust-divider {
  display: none;
}

/* Model name cycler animation */
.model-cycler {
  display: inline;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: -0.01em;
  vertical-align: baseline;
  background: linear-gradient(
    135deg,
    #60a5fa 0%,
    #a78bfa 50%,
    #f472b6 100%
  );
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-pulse 3s ease-in-out infinite;
}

.model-cycler::after {
  content: '|';
  display: inline;
  margin-left: -1px;
  font-weight: 400;
  background: none;
  -webkit-text-fill-color: #60a5fa;
  animation: cursor-blink 0.8s step-end infinite;
}

.model-cycler.typing::after {
  animation: none;
  opacity: 1;
}

@keyframes gradient-pulse {
  0%, 100% {
    background-position: 0% 50%;
    filter: brightness(1);
  }
  50% {
    background-position: 100% 50%;
    filter: brightness(1.15);
  }
}

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

@media (prefers-reduced-motion: reduce) {
  .model-cycler {
    animation: none;
    background: #60a5fa;
    -webkit-background-clip: text;
    background-clip: text;
  }
  .model-cycler::after {
    display: none;
  }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 23px;
}

.hero-footnote {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(226, 232, 240, 0.85);
}

.model-benefit {
  margin-top: 4px;
  padding: 10px 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px) saturate(1.1);
  box-shadow:
    0 8px 20px rgba(15, 23, 42, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.model-benefit-section {
  width: 100%;
  display: flex;
  justify-content: center;
}

.model-benefit-standalone {
  margin-top: 0;
  padding: 18px 20px 22px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(30, 41, 59, 0.85);
  backdrop-filter: blur(16px) saturate(1.1);
  box-shadow:
    0 14px 38px rgba(15, 23, 42, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 100%;
}

.model-benefit-in-gmail {
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 10px 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(148, 163, 184, 0.2);
  backdrop-filter: blur(10px) saturate(1.1);
  box-shadow:
    0 8px 20px rgba(15, 23, 42, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.model-benefit-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.88);
  display: flex;
  align-items: center;
  gap: 8px;
}

.model-benefit-standalone .model-benefit-label {
  color: rgba(226, 232, 240, 0.98);
  font-size: 14px;
}

.model-benefit-in-gmail .model-benefit-label {
  color: rgba(226, 232, 240, 0.95);
}

/* Pulsating live dot */
.live-dot {
  width: 8px;
  height: 8px;
  background: #34d399;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
  animation: pulse-live-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-live-dot {
  0%, 100% { 
    opacity: 1; 
    transform: scale(1);
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
  }
  50% { 
    opacity: 0.7; 
    transform: scale(0.85);
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.9);
  }
}

.model-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  padding: 22px 0;
  min-height: 80px;
  background:
    linear-gradient(110deg,
      rgba(59, 130, 246, 0.22) 0%,
      rgba(147, 51, 234, 0.24) 25%,
      rgba(236, 72, 153, 0.22) 50%,
      rgba(14, 165, 233, 0.24) 75%,
      rgba(59, 130, 246, 0.22) 100%
    );
  background-size: 200% 100%;
  animation: shimmer 10s linear infinite;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 6px 16px rgba(15, 23, 42, 0.18);
  mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

@keyframes shimmer {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

.model-track {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  white-space: nowrap;
  width: max-content;
  animation: marquee-infinite 45s linear infinite;
  animation-play-state: paused;
  will-change: transform;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  perspective: 1000px;
  -webkit-perspective: 1000px;
}

.model-track-dup {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .model-track,
  .model-track-dup {
    animation: none;
    transform: translate3d(0, 0, 0);
  }
  .model-carousel {
    animation: none;
  }
}

.model-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  min-height: 36px;
  color: rgba(15, 23, 42, 0.95);
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.35)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.48), rgba(226, 232, 240, 0.42));
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 2px 10px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  text-align: center;
  white-space: nowrap;
  flex-shrink: 0;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
  overflow: visible;
  cursor: pointer;
  transition: all 250ms ease;
}

.model-badge:not(.has-proficiency):hover {
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 0 16px rgba(139, 92, 246, 0.35),
    0 0 6px rgba(99, 102, 241, 0.25),
    inset 0 0 10px rgba(139, 92, 246, 0.1);
  transform: translateY(-2px) translateZ(0);
}

.model-benefit-sub {
  margin: 6px 0 0;
  font-size: 10.5px;
  color: rgba(15, 23, 42, 0.7);
}

.model-benefit-standalone .model-benefit-sub {
  color: rgba(148, 163, 184, 0.9);
  font-size: 12px;
}

.model-benefit-in-gmail .model-benefit-sub {
  color: rgba(148, 163, 184, 0.85);
}

@keyframes marquee-infinite {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(var(--scroll-distance, -50%), 0, 0);
  }
}

@keyframes bg-shift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-6%, 4%, 0) scale(1.05);
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

.hero-visual {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-gmail-shell {
  position: relative;
  padding: 16px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  margin-top: -7px;
  margin-left: -5px;
}

.gmail-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.gmail-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(148, 163, 184, 0.95);
}

.gmail-breadcrumb-dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.9);
}

.gmail-avatar {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: linear-gradient(145deg, #38bdf8, #1d4ed8);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9);
}

.gmail-thread-card {
  margin-top: 6px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.06), rgba(15, 23, 42, 0.04));
  padding: 10px 12px 14px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

/* Demo active - subtle base state */
.hero-gmail-shell.demo-active .gmail-message-text {
  border: 1.5px solid rgba(100, 116, 139, 0.5);
  border-radius: 6px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.85);
  transition: all 0.2s ease;
  cursor: text;
  position: relative;
}

.hero-gmail-shell.demo-active .gmail-message-text::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 6px;
  background: radial-gradient(ellipse 400px 100px at center, rgba(59, 130, 246, 0.08), transparent);
  pointer-events: none;
}

/* Typing/focused state - user is clicked into the text area */
.hero-gmail-shell.demo-active .gmail-message-text.typing-active {
  border: 1px solid rgba(59, 130, 246, 0.5);
  background: rgba(15, 23, 42, 0.95);
  box-shadow:
    0 0 0 2px rgba(59, 130, 246, 0.12),
    0 0 16px rgba(59, 130, 246, 0.15);
}

/* Blue typing indicator cursor for compose area */
.hero-gmail-shell.demo-active .gmail-editable-content {
  caret-color: #60a5fa;
  caret-width: 3px;
}

/* Placeholder overlay positioned absolutely */
.gmail-message-initial {
  position: absolute;
  top: 5px;
  left: 5px;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 10px 12px 0;
  opacity: 1;
  transition: opacity 150ms ease;
  pointer-events: none;
}

/* Hide placeholder when demo is active */
.hero-gmail-shell.demo-active .gmail-message-initial {
  opacity: 0;
}

.gmail-line {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.4), transparent);
  margin-bottom: 12px;
}

.gmail-line.short {
  width: 55%;
}

.gmail-line.medium {
  width: 72%;
}

.gmail-line.long {
  width: 92%;
}

.gmail-quoted {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(51, 65, 85, 0.9);
  opacity: 0.8;
}

/* Extra spacing in ghost placeholder for quoted section */
.gmail-message-initial .gmail-quoted {
  margin-top: 14px;
  padding-left: 10px;
  border-left: 2px solid rgba(71, 85, 105, 0.7);
}

.gmail-quoted .gmail-line {
  background: linear-gradient(90deg, rgba(71, 85, 105, 0.9), transparent);
}

.hero-composer-overlay {
  margin-top: auto;
}

.glass-composer {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(248, 250, 252, 0.94);
  backdrop-filter: blur(10px) saturate(1.05);
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  padding: 10px 12px 12px;
}

.composer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 2px 6px;
}

.composer-top-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.composer-ai-label {
  font-size: 12px;
  font-weight: 700;
  color: #0f5cc1;
  letter-spacing: 0.1px;
}

.composer-title {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}

.composer-tabset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #edf2ff;
  border-radius: 999px;
  padding: 3px;
  border: 1px solid rgba(59, 130, 246, 0.16);
}

.composer-tab {
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  color: #0f172a;
  cursor: default;
  background: transparent;
  box-shadow: none;
}

.composer-tab.active {
  background: #1a73e8;
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 2px 6px rgba(26, 115, 232, 0.35);
}

.composer-top-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.model-pill {
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.55);
  font-size: 10px;
  font-weight: 600;
  color: #0f172a;
}

.model-pill.small {
  font-size: 10px;
  padding: 2px 6px;
}

.ai-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 14px;
  border-radius: 18px;
  border: none;
  background: #1a73e8;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 2px 6px rgba(26, 115, 232, 0.35);
  cursor: pointer;
  transform: translateY(0);
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
  white-space: nowrap;
}

.ai-pill:hover {
  background: #1f7bf0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 3px 8px rgba(26, 115, 232, 0.42);
  transform: translateY(-0.5px);
}

.icon-close {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transform: translateY(0);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.icon-close:hover {
  transform: translateY(-0.5px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 6px 16px rgba(15, 23, 42, 0.35);
  background: rgba(255, 255, 255, 0.16);
}

.composer-field {
  width: 100%;
  min-height: 120px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 10px;
  margin-bottom: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.95));
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.8),
    0 4px 12px rgba(15, 23, 42, 0.08);
  font-size: 12px;
  font-weight: 500;
  color: rgba(15, 23, 42, 0.68);
}

.composer-field p {
  margin: 0;
  color: rgba(15, 23, 42, 0.65);
}

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
}

.composer-footer-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: rgba(15, 23, 42, 0.65);
  font-weight: 500;
}

.composer-footer-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.composer-btn {
  height: 32px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 2px 6px rgba(15, 23, 42, 0.12);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.composer-btn:hover {
  transform: translateY(-0.5px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 3px 8px rgba(15, 23, 42, 0.16);
}

.composer-btn.ghost {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(15, 23, 42, 0.12);
}

.composer-btn.primary {
  background: linear-gradient(145deg, var(--primary), var(--primary-dark));
  border-color: var(--primary);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 2px 6px rgba(26, 115, 232, 0.35);
}

.how-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 18px 20px 22px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(30, 41, 59, 0.85);
  backdrop-filter: blur(16px) saturate(1.1);
  box-shadow:
    0 14px 38px rgba(15, 23, 42, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.how-text h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
  color: #e5f0ff;
}

.how-text p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(226, 232, 240, 0.9);
}

.how-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 720px) {
  .how-steps {
    grid-template-columns: minmax(0, 1fr);
  }
  .how-email-draft {
    transform: translateX(0);
  }
}

.how-step {
  font-size: 12px;
  color: #f1f5f9;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(15, 23, 42, 0.85);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
  cursor: pointer;
  transition: all 250ms ease;
}

.how-step:hover {
  background: rgba(15, 23, 42, 0.95);
  border-color: rgba(139, 92, 246, 0.5);
  transform: translateY(-2px);
  box-shadow:
    0 8px 20px rgba(15, 23, 42, 0.45),
    0 0 12px rgba(139, 92, 246, 0.25),
    0 0 4px rgba(99, 102, 241, 0.2),
    inset 0 0 8px rgba(139, 92, 246, 0.08);
}

.how-step span.num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 0;
  flex-shrink: 0;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.18);
  border: 1px solid rgba(59, 130, 246, 0.6);
  font-size: 11px;
  font-weight: 600;
  color: #bfdbfe;
}

/* How it Works - content wrapper */
.how-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.how-content p {
  margin: 0;
  font-size: 12px;
  color: #f1f5f9;
}

/* AI Button in How it Works */
.how-ai-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  height: 28px;
  border: 1px solid #1a73e8;
  border-radius: 16px;
  background: linear-gradient(180deg, #1a73e8 0%, #1666d5 100%);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1px;
  font-family: Arial, sans-serif;
  cursor: pointer;
  transition: background 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.how-ai-button:hover {
  background: linear-gradient(180deg, #1f7bf0 0%, #1866cf 100%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
  transform: translateY(-0.5px);
}

/* Inline AI button for text mentions */
.inline-ai-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 8px;
  border: 1px solid #1a73e8;
  border-radius: 10px;
  background: linear-gradient(180deg, #1a73e8 0%, #1666d5 100%);
  color: #ffffff !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1px;
  font-family: Arial, sans-serif;
  vertical-align: middle;
  margin: 0 2px;
  transform: translateY(-1px);
}

/* Toolbar Snippet in How it Works */
.how-toolbar-snippet {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 2px;
  padding: 6px 5px;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-top: 6px;
  transform: translateX(-12px);
}

.how-toolbar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 28px;
  padding: 0 3px;
  border: none;
  background: transparent;
  border-radius: 4px;
  color: #5f6368;
  cursor: pointer;
  transition: background 0.1s ease;
}

.how-toolbar-icon:hover {
  background: rgba(0, 0, 0, 0.04);
}

.how-toolbar-sep {
  width: 1px;
  height: 16px;
  background: #e0e0e0;
  margin: 0 2px;
}

/* Popup Bar in How it Works (matches demo popup) */
.how-popup-bar {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 6px;
  padding: 6px 8px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  margin-top: 6px;
  transform: translateX(-12px);
}

.how-popup-logo {
  width: 16px;
  height: 16px;
  object-fit: contain;
  transform: translateX(3px);
  margin-right: 2px;
}

.how-popup-draft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border: none;
  border-radius: 5px;
  background: linear-gradient(180deg, #1a73e8 0%, #1666d5 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.how-popup-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 5px;
  background: transparent;
  color: rgba(248, 250, 252, 0.9);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.how-popup-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: none;
  background: transparent;
  color: rgba(148, 163, 184, 0.6);
  font-size: 14px;
  cursor: pointer;
  margin-left: 2px;
}

/* Email Draft Demo in How it Works */
.how-email-draft {
  display: flex;
  align-items: center;
  align-self: center;
  padding: 6px 8px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.4;
  width: 220px;
  transform: translateX(-12px);
  overflow: hidden;
  white-space: nowrap;
  gap: 2px;
}

.draft-content-wrapper {
  display: flex;
  gap: 4px;
  align-items: center;
  flex: 1;
  min-width: 0;
  transition: transform 0.05s ease-out;
}

.draft-line {
  display: inline-flex;
  gap: 4px;
  align-items: baseline;
  flex-shrink: 0;
  white-space: nowrap;
  min-width: 0;
}

.draft-label {
  color: #94a3b8;
  font-weight: 600;
  flex-shrink: 0;
}

.draft-text {
  color: #e2e8f0;
  flex-shrink: 0;
  white-space: nowrap;
}

.draft-body {
  color: #f1f5f9;
  flex-shrink: 0;
  white-space: nowrap;
}

.draft-cursor {
  color: #60a5fa;
  font-weight: 400;
  animation: cursor-blink 0.8s step-end infinite;
  flex-shrink: 0;
  margin-left: 0;
}

.gmail-toolbar {
  --toolbar-bg: #f8f9fa;
  --toolbar-border: #e0e0e0;
  --toolbar-icon: #5f6368;
  --toolbar-icon-hover: #202124;
  --toolbar-hover-bg: rgba(0,0,0,0.04);
  --toolbar-accent: #1a73e8;
  --toolbar-accent-bg: rgba(26,115,232,0.12);
  --toolbar-disabled: #bdc1c6;

  /* Ultra-compact base sizing */
  --icon-size: 14px;
  --button-min-width: 24px;
  --button-height: 28px;
  --button-padding: 0 3px;
  --toolbar-gap: 2px;
  --toolbar-padding: 6px 5px;
  --sep-margin: 0 2px;
  --dropdown-padding: 0 3px;
  --dropdown-font-size: 10px;
  --arrow-size: 10px;

  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--toolbar-gap);
  margin-top: 16px;
  padding: var(--toolbar-padding);
  background: var(--toolbar-bg);
  border: 1px solid var(--toolbar-border);
  border-radius: 8px;
  font-family: 'Google Sans', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  user-select: none;
  width: 100%;
  min-width: 0;
}



.gmail-toolbar .sep {
  width: 1px;
  height: 16px;
  background: var(--toolbar-border);
  margin: var(--sep-margin);
  flex-shrink: 0;
  display: none;
}

/* Only show separators on very large screens */
@media (min-width: 2400px) {
  .gmail-toolbar .sep {
    display: block;
  }
}

.gmail-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--button-min-width);
  height: var(--button-height);
  padding: var(--button-padding);
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  color: var(--toolbar-icon);
  transition: background 0.1s ease;
  flex-shrink: 0;
}

/* Hide "Sans Serif" text completely until very large screens */
.gmail-toolbar .dropdown > span:not(.arrow) {
  display: none;
}

@media (min-width: 2400px) {
  .gmail-toolbar .dropdown > span:not(.arrow) {
    display: inline;
  }
}

.gmail-toolbar button:hover {
  background: var(--toolbar-hover-bg);
}

.gmail-toolbar button:hover svg {
  fill: var(--toolbar-icon-hover);
}

.gmail-toolbar button.active {
  background: var(--toolbar-accent-bg);
}

.gmail-toolbar button.active svg {
  fill: var(--toolbar-accent);
}

.gmail-toolbar button.disabled {
  pointer-events: none;
}

.gmail-toolbar button.disabled svg {
  fill: var(--toolbar-disabled);
}

.gmail-toolbar button svg {
  width: var(--icon-size) !important;
  height: var(--icon-size) !important;
  fill: var(--toolbar-icon);
  transition: fill 0.1s ease;
  flex-shrink: 0;
  max-width: var(--icon-size) !important;
  max-height: var(--icon-size) !important;
  min-width: var(--icon-size) !important;
  min-height: var(--icon-size) !important;
}

.gmail-toolbar .dropdown {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: var(--dropdown-padding);
  font-size: var(--dropdown-font-size);
  font-weight: 400;
  flex-shrink: 0;
  min-width: 0;
}

.gmail-toolbar .dropdown span {
  white-space: nowrap;
}

.gmail-toolbar .dropdown svg.arrow {
  width: var(--arrow-size) !important;
  height: var(--arrow-size) !important;
  flex-shrink: 0;
}

.gmail-toolbar .text-color {
  position: relative;
}

.gmail-toolbar .text-color .bar {
  position: absolute;
  bottom: 4px;
  left: 6px;
  right: 6px;
  height: 3px;
  background: #000;
  border-radius: 1px;
}

.gmail-toolbar .mini-arrow {
  min-width: 14px;
  padding: 0;
}

.gmail-toolbar .mini-arrow svg {
  width: calc(var(--icon-size) - 4px) !important;
  height: calc(var(--icon-size) - 4px) !important;
  flex-shrink: 0;
}

.openrouter-ai-btn {
  /* Layout */
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  min-width: fit-content;
  box-sizing: border-box;
  position: static;
  float: none;

  /* Spacing */
  padding: 0 12px;
  margin-left: 6px;
  margin-right: 2px;
  height: 30px;
  gap: 4px;

  /* Visual Design */
  border: 1px solid #1a73e8;
  border-radius: 16px;
  background: linear-gradient(180deg, #1a73e8 0%, #1666d5 100%);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);

  /* Typography */
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1px;
  font-family: Arial, sans-serif;

  /* Interaction */
  cursor: pointer;
  transition: background 120ms ease, box-shadow 120ms ease, transform 120ms ease;
  vertical-align: middle;

  /* Reset positioning properties */
  top: auto;
  left: auto;
  right: auto;
  bottom: auto;
}

.openrouter-ai-btn:hover {
  background: linear-gradient(180deg, #1f7bf0 0%, #1866cf 100%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
  transform: translateY(-0.5px);
}


/* Toolbar-specific overrides for AI button */
.gmail-toolbar .openrouter-ai-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  min-width: fit-content !important;
  box-sizing: border-box !important;
  position: static !important;
  float: none !important;
  padding: 0 12px !important;
  margin-left: 6px !important;
  margin-right: 2px !important;
  height: 30px !important;
  gap: 4px !important;
  border: 1px solid #1a73e8 !important;
  border-radius: 16px !important;
  background: linear-gradient(180deg, #1a73e8 0%, #1666d5 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.1px !important;
  font-family: Arial, sans-serif !important;
  cursor: pointer !important;
  transition: background 120ms ease, box-shadow 120ms ease, transform 120ms ease !important;
  vertical-align: middle !important;
}

.gmail-toolbar .openrouter-ai-btn:hover {
  background: linear-gradient(180deg, #1f7bf0 0%, #1866cf 100%) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18) !important;
  transform: translateY(-0.5px) !important;
}

.toolbar-caption {
  margin-top: 12px;
  font-size: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.toolbar-caption span:first-child {
  font-weight: 700;
  font-size: 11px;
  color: rgba(226, 232, 240, 0.95);
  letter-spacing: 0.01em;
}

.toolbar-caption span:last-child {
  font-weight: 500;
  font-size: 10px;
  color: rgba(148, 163, 184, 0.85);
}

.pricing-section {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 18px 20px 22px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(30, 41, 59, 0.85);
  backdrop-filter: blur(16px) saturate(1.1);
  box-shadow:
    0 14px 38px rgba(15, 23, 42, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

@media (max-width: 480px) {
  .pricing-section .model-pricing-grid {
    gap: 6px;
    margin: 12px 0 10px;
  }

  .pricing-section .model-pricing-item {
    padding: 6px 8px;
  }

  .pricing-section .model-pricing-name {
    font-size: 9px;
    gap: 4px;
  }

  .pricing-section .model-pricing-proficiency {
    font-size: 7px;
    padding: 2px 4px;
  }

  .pricing-section .model-pricing-details {
    gap: 2px;
  }

  .pricing-section .model-pricing-cost {
    font-size: 10px;
  }

  .pricing-section .model-pricing-unit {
    font-size: 7px;
  }
}

.pricing-copy h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
  color: #e5f0ff;
}

.pricing-copy p {
  margin: 0 0 10px;
  font-size: 13px;
  color: rgba(226, 232, 240, 0.9);
}

.model-pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0 12px;
}

@media (max-width: 720px) {
  .model-pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .model-pricing-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.model-pricing-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.4);
}

.model-pricing-name {
  font-size: 12px;
  font-weight: 600;
  color: #e5f0ff;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.model-pricing-proficiency {
  font-size: 9px;
  font-weight: 600;
  color: rgba(167, 139, 250, 0.95);
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 3px 6px;
  background: rgba(139, 92, 246, 0.15);
  border-radius: 4px;
  border: 1px solid rgba(139, 92, 246, 0.25);
  margin-left: auto;
}

.model-pricing-details {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.model-pricing-cost {
  font-size: 15px;
  font-weight: 700;
  color: #22c55e;
  letter-spacing: -0.01em;
}

.model-pricing-unit {
  font-size: 10px;
  font-weight: 500;
  color: rgba(226, 232, 240, 0.75);
}

.pricing-note {
  margin: 0 0 12px;
  font-size: 11px;
  color: rgba(226, 232, 240, 0.7);
  font-style: italic;
}

.pricing-pillrow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: rgba(226, 232, 240, 0.86);
}

.pricing-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-self: start;
  margin-top: 16px;
}

.pricing-card-grid.pricing-card-single {
  grid-template-columns: minmax(0, 420px);
  justify-content: center;
}

@media (max-width: 620px) {
  .pricing-card-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.pricing-card {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background-image:
    radial-gradient(120% 120% at 10% 0%, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04) 45%, rgba(255, 255, 255, 0.01)),
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.05));
  background-color: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px) saturate(1.22);
  box-shadow:
    0 12px 32px rgba(15, 23, 42, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  padding: 18px 18px 18px;
  font-size: 12px;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 260px;
  justify-content: space-between;
  transition: all 280ms ease;
}

.pricing-card:hover {
  border-color: rgba(139, 92, 246, 0.35);
  transform: translateY(-4px);
  box-shadow:
    0 16px 40px rgba(15, 23, 42, 0.35),
    0 0 20px rgba(139, 92, 246, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.plan-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.plan-title {
  font-size: 13px;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.3;
}

.plan-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: #1e40af;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.7)),
    linear-gradient(135deg, rgba(96, 165, 250, 0.2), rgba(139, 92, 246, 0.15));
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 2px 8px rgba(0, 0, 0, 0.12),
    0 0 12px rgba(139, 92, 246, 0.1);
  flex-shrink: 0;
}

.plan-price {
  font-size: 14px;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.3;
  margin-top: 4px;
}

.plan-meta {
  font-size: 11px;
  color: rgba(226, 232, 240, 0.92);
  line-height: 1.4;
}

.plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.plan-footnote {
  margin-top: auto;
  padding-top: 8px;
  font-size: 11px;
  color: rgba(226, 232, 240, 0.85);
  line-height: 1.4;
}

footer {
  margin-top: 16px;
  font-size: 11px;
  color: rgba(148, 163, 184, 0.82);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

footer a {
  color: rgba(191, 219, 254, 0.9);
  text-decoration: none;
  font-weight: 500;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 200ms ease;
}

footer a:hover {
  color: #f8fafc;
  background: rgba(139, 92, 246, 0.15);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
}

/* Sign In Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms ease, visibility 300ms ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px) saturate(1.2);
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 300ms ease;
}

.modal-overlay.active .modal-card {
  opacity: 1;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-description {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(226, 232, 240, 0.85);
}

.modal-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.01em;
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(226, 232, 240, 0.9);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 220ms ease;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(139, 92, 246, 0.45);
  color: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.15),
    0 0 12px rgba(139, 92, 246, 0.2);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.95);
  letter-spacing: 0.01em;
}

.form-group input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-size: 14px;
  font-family: Arial, sans-serif;
  transition: all 180ms ease;
  outline: none;
  /* Ensure no transforms affect password manager dropdown positioning */
  transform: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(148, 163, 184, 0.6);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

.form-group select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-size: 14px;
  font-family: Arial, sans-serif;
  transition: all 180ms ease;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='%2394a3b8'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-group select option {
  background: #1e293b;
  color: #f8fafc;
}

.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-size: 14px;
  font-family: Arial, sans-serif;
  transition: all 180ms ease;
  outline: none;
  resize: vertical;
  min-height: 80px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 500px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.label-optional {
  font-weight: 400;
  color: rgba(148, 163, 184, 0.7);
}

.contact-footer {
  color: rgba(148, 163, 184, 0.8);
  font-size: 12px;
}

.contact-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 0;
  gap: 16px;
}

.success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(16, 185, 129, 0.15) 100%);
  border: 2px solid rgba(34, 197, 94, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #22c55e;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.25);
}

.contact-success .modal-description {
  margin: 0;
}

.btn-full {
  width: 100%;
  justify-content: center;
  padding: 12px 18px;
  font-size: 14px;
  border-radius: 12px;
}

.btn-social {
  gap: 10px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-social:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 
    0 4px 14px rgba(0, 0, 0, 0.15),
    0 0 12px rgba(139, 92, 246, 0.15);
}

.modal-links {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
}

.link-subtle {
  font-size: 12px;
  color: rgba(148, 163, 184, 0.9);
  text-decoration: none;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 200ms ease;
}

.link-subtle:hover {
  color: #f8fafc;
  background: rgba(139, 92, 246, 0.12);
}

.modal-divider {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}

.modal-divider::before,
.modal-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
}

.modal-divider span {
  font-size: 12px;
  font-weight: 500;
  color: rgba(148, 163, 184, 0.9);
  flex-shrink: 0;
}

.modal-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: rgba(226, 232, 240, 0.85);
}

.link-primary {
  color: #60a5fa;
  text-decoration: none;
  font-weight: 600;
  transition: all 200ms ease;
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 6px;
}

.link-primary:hover {
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.12);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.15);
}

/* How It Works Video Modal */
.modal-card-wide {
  max-width: 780px;
  width: calc(100vw - 40px);
  max-height: calc(100vh - 40px);
  height: auto;
  display: flex;
  flex-direction: column;
}

@media (min-width: 1024px) {
  .modal-card-wide {
    /* Match the video wrapper width calculation to maintain 16:9 scaling, reduced by 15% */
    width: min(calc((100vw - 40px) * 0.85), calc(((100vh - 200px) * 0.85) * 16 / 9 + 56px));
    max-width: min(calc((100vw - 40px) * 0.85), calc(((100vh - 200px) * 0.85) * 16 / 9 + 56px));
    max-height: calc((100vh - 40px) * 0.85);
    height: auto;
  }
}

/* Remove bounding popup styling for video modal */
.modal-card-wide.video-modal-no-border {
  border: none;
  background: transparent;
  backdrop-filter: none;
  padding: 0;
  box-shadow: none;
  width: calc(100vw - 40px);
  max-width: calc(100vw - 40px);
}

@media (min-width: 1024px) {
  .modal-card-wide.video-modal-no-border {
    width: 70vw;
    max-width: 70vw;
  }
}

/* Mobile landscape optimization for Arcade demo */
@media (max-width: 1023px) and (orientation: landscape) {
  .modal-card-wide.video-modal-no-border {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .video-modal-header {
    position: absolute;
    top: 0;
    right: 0;
    padding: 8px;
    margin-bottom: 0;
    z-index: 30;
  }

  #how-modal-close {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
  }

  .modal-body.video-modal-body {
    padding: 0;
  }

  .arcade-wrapper {
    border-radius: 8px;
  }
}

/* Restore modal header for video modal to position close button */
.video-modal-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 16px;
  padding: 20px 20px 0 20px;
  position: relative;
  z-index: 20;
}

/* Increase close button size by 15% for video modal */
#how-modal-close {
  width: 39px;
  height: 39px;
  font-size: 25px;
}

.modal-body.video-modal-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  min-height: 0;
  overflow: visible;
  align-items: center;
  padding: 0 20px 20px 20px;
}

.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
  max-width: 100%;
  max-height: calc((100vh - 200px) * 0.85);
}

/* Calculate optimal size based on available space while maintaining 16:9 */
@media (min-width: 1024px) {
  .modal-body.video-modal-body {
    align-items: center;
  }
  
  .video-wrapper {
    /* Use the smaller of: full width or height-based width (maintaining 16:9), reduced by 15% */
    /* Account for modal padding (28px * 2 = 56px) */
    width: min(100%, calc(((100vh - 200px) * 0.85) * 16 / 9));
    max-width: min(100%, calc(((100vh - 200px) * 0.85) * 16 / 9));
    max-height: calc((100vh - 200px) * 0.85);
  }
}

.video-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
  outline: none;
}

/* Arcade demo wrapper */
.arcade-wrapper {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  flex-shrink: 0;
}

/* Fullscreen video player for mobile */
.fullscreen-video-player {
  display: none;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  background: #000;
  border-radius: 12px;
  object-fit: contain;
  flex: 1;
}

/* Show video player on mobile */
@media (max-width: 768px) {
  .fullscreen-video-player {
    display: block;
  }
}

/* Hide arcade wrapper on mobile */
@media (max-width: 768px) {
  .arcade-wrapper {
    display: none;
  }
}

/* Cover Arcade watermark widget in bottom-right */
.arcade-watermark-cover {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 320px;
  height: auto;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 12px;
  z-index: 200;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  gap: 16px;
}

.arcade-watermark-content {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-direction: row;
  flex: 1;
}

.arcade-watermark-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  pointer-events: none;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.arcade-watermark-cover:hover .arcade-watermark-logo {
  transform: scale(1.1);
}

.arcade-watermark-btn {
  padding: 8px 16px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  white-space: nowrap;
  flex-shrink: 0;
}

.arcade-watermark-btn:hover {
  pointer-events: auto;
}

/* Promo overlay (replaces demo) */
.arcade-promo-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse 100% 80% at 70% 20%, rgba(99, 102, 241, 0.4) 0%, transparent 50%),
    radial-gradient(ellipse 90% 90% at 20% 80%, rgba(26, 115, 232, 0.3) 0%, transparent 45%),
    radial-gradient(ellipse 70% 60% at 50% 110%, rgba(168, 85, 247, 0.25) 0%, transparent 50%),
    radial-gradient(circle at 15% 10%, #0f172a 0%, #0b1328 40%, #020617 70%);
  z-index: 250;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  border-radius: 8px;
  overflow: hidden;
}

.arcade-promo-overlay.visible {
  opacity: 1;
  visibility: visible;
}

/* Mesh overlay with pulsing animation */
.arcade-promo-mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(at 75% 25%, rgba(59, 130, 246, 0.2) 0%, transparent 45%),
    radial-gradient(at 25% 75%, rgba(139, 92, 246, 0.15) 0%, transparent 40%),
    radial-gradient(at 50% 50%, rgba(14, 165, 233, 0.1) 0%, transparent 35%);
  pointer-events: none;
  animation: promoMeshPulse 8s ease-in-out infinite;
}

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

.arcade-promo-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: promoGridMove 25s linear infinite;
  pointer-events: none;
}

/* Glow orbs */
.arcade-promo-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: promoOrbFloat 8s ease-in-out infinite;
}

.arcade-promo-orb-1 {
  width: 45%;
  height: 60%;
  background: rgba(99, 102, 241, 0.3);
  top: -20%;
  right: 10%;
  animation-delay: 0s;
}

.arcade-promo-orb-2 {
  width: 35%;
  height: 50%;
  background: rgba(26, 115, 232, 0.25);
  bottom: -15%;
  left: 10%;
  animation-delay: 2s;
}

.arcade-promo-orb-3 {
  width: 30%;
  height: 40%;
  background: rgba(168, 85, 247, 0.2);
  top: 35%;
  left: -10%;
  animation-delay: 4s;
}

.arcade-promo-orb-4 {
  width: 25%;
  height: 35%;
  background: rgba(14, 165, 233, 0.18);
  bottom: 10%;
  right: 10%;
  animation-delay: 3s;
}

@keyframes promoOrbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -15px) scale(1.1); }
}

@keyframes promoGridMove {
  0% { transform: translateY(0); }
  100% { transform: translateY(50px); }
}

.arcade-promo-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(30px, 6vw, 80px);
  padding: clamp(16px, 3vw, 40px);
  width: 100%;
  height: 100%;
  max-width: 100%;
  position: relative;
  z-index: 1;
}

.arcade-promo-text {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.5vw, 28px);
  flex: 0 1 auto;
  min-width: 0;
  max-width: 52%;
  animation: promoSlideIn 0.6s ease-out;
}

@keyframes promoSlideIn {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

.arcade-promo-brand {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 20px);
}

.arcade-promo-logo {
  width: clamp(44px, 7vw, 72px);
  height: clamp(44px, 7vw, 72px);
  object-fit: contain;
  filter: drop-shadow(0 8px 32px rgba(33, 150, 243, 0.6));
}

.arcade-promo-name {
  font-size: clamp(24px, 4vw, 44px);
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.02em;
}

.arcade-promo-headline {
  font-size: clamp(28px, 6vw, 64px);
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0;
}

.arcade-promo-accent {
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.arcade-promo-sub {
  font-size: clamp(14px, 2vw, 22px);
  font-weight: 500;
  color: rgba(226, 232, 240, 0.85);
  margin: 0;
  line-height: 1.5;
  max-width: 90%;
}

.arcade-promo-models {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(8px, 1.2vw, 14px);
  margin-top: clamp(6px, 1vw, 12px);
  max-width: 85%;
}

.arcade-promo-badge {
  display: inline-flex;
  align-items: center;
  padding: clamp(8px, 1.2vw, 14px) clamp(14px, 2vw, 24px);
  border-radius: 100px;
  font-size: clamp(12px, 1.6vw, 18px);
  font-weight: 700;
  color: rgba(15, 23, 42, 0.95);
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.55)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.65), rgba(226, 232, 240, 0.55));
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.95),
    0 4px 16px rgba(15, 23, 42, 0.25);
  white-space: nowrap;
  animation: promoBadgePop 0.5s ease-out backwards;
}

.arcade-promo-badge:nth-child(1) { animation-delay: 0.3s; }
.arcade-promo-badge:nth-child(2) { animation-delay: 0.4s; }
.arcade-promo-badge:nth-child(3) { animation-delay: 0.5s; }
.arcade-promo-badge:nth-child(4) { animation-delay: 0.6s; }
.arcade-promo-badge:nth-child(5) { animation-delay: 0.7s; }

@keyframes promoBadgePop {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.arcade-promo-btn {
  display: inline-flex;
  align-items: center;
  gap: clamp(8px, 1vw, 12px);
  padding: clamp(14px, 2vw, 20px) clamp(24px, 3.5vw, 36px);
  font-size: clamp(14px, 1.8vw, 18px);
  font-weight: 600;
  margin-top: clamp(10px, 1.5vw, 18px);
  width: fit-content;
}

.arcade-promo-btn .chrome-icon {
  flex-shrink: 0;
  width: clamp(18px, 2.5vw, 22px);
  height: clamp(18px, 2.5vw, 22px);
}

/* Floating popup UI */
.arcade-promo-popup {
  flex-shrink: 0;
  animation: promoPopupFloat 4s ease-in-out infinite, promoSlideUp 0.6s ease-out 0.2s backwards;
}

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

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

.arcade-popup-window {
  width: clamp(300px, 38vw, 420px);
  border-radius: clamp(16px, 2.5vw, 24px);
  background:
    radial-gradient(ellipse 120% 120% at 10% 0%, rgba(96, 165, 250, 0.18), transparent 50%),
    radial-gradient(ellipse 80% 80% at 100% 100%, rgba(147, 51, 234, 0.1), transparent 50%),
    rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.45),
    0 2px 0 rgba(255, 255, 255, 0.12) inset,
    0 0 80px rgba(99, 102, 241, 0.18);
  padding: clamp(14px, 2.2vw, 20px);
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.6vw, 16px);
}

.arcade-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(12px, 1.6vw, 16px);
  margin: clamp(-14px, -2.2vw, -20px) clamp(-14px, -2.2vw, -20px) 0;
  border-radius: clamp(16px, 2.5vw, 24px) clamp(16px, 2.5vw, 24px) 0 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(15, 23, 42, 0.5);
}

.arcade-popup-brand {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.2vw, 12px);
}

.arcade-popup-brand img {
  width: clamp(28px, 4vw, 36px);
  height: clamp(28px, 4vw, 36px);
  filter: drop-shadow(0 3px 10px rgba(26, 115, 232, 0.4));
}

.arcade-popup-brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.arcade-popup-title {
  font-size: clamp(13px, 1.8vw, 17px);
  font-weight: 700;
  color: #f1f5f9;
}

.arcade-popup-tagline {
  font-size: clamp(9px, 1.2vw, 11px);
  color: rgba(241, 245, 249, 0.5);
}

.arcade-popup-controls {
  display: flex;
  align-items: center;
  gap: clamp(4px, 0.6vw, 6px);
}

.arcade-popup-toggle {
  width: clamp(32px, 4vw, 40px);
  height: clamp(18px, 2.2vw, 22px);
  background: rgba(51, 65, 85, 0.6);
  border: 1px solid rgba(71, 85, 105, 0.5);
  border-radius: 999px;
}

.arcade-popup-toggle-thumb {
  width: clamp(14px, 1.8vw, 18px);
  height: clamp(14px, 1.8vw, 18px);
  background: rgba(30, 41, 59, 0.95);
  border-radius: 50%;
  margin: 2px;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.arcade-popup-toggle-thumb svg {
  width: clamp(9px, 1.2vw, 11px);
  height: clamp(9px, 1.2vw, 11px);
  fill: #6366f1;
}

.arcade-popup-close {
  width: clamp(20px, 2.5vw, 24px);
  height: clamp(20px, 2.5vw, 24px);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 5px;
  background: rgba(51, 65, 85, 0.5);
  color: #94a3b8;
  font-size: clamp(12px, 1.6vw, 16px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.arcade-popup-status {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.3vw, 12px);
  padding: clamp(10px, 1.5vw, 15px);
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: clamp(10px, 1.5vw, 14px);
}

.arcade-popup-status-dot {
  width: clamp(10px, 1.2vw, 12px);
  height: clamp(10px, 1.2vw, 12px);
  border-radius: 50%;
  background: #10b981;
  animation: statusPulse 2s ease-in-out infinite;
}

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

.arcade-popup-status-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.arcade-popup-status-label {
  font-size: clamp(12px, 1.5vw, 14px);
  font-weight: 600;
  color: #f1f5f9;
}

.arcade-popup-status-email {
  font-size: clamp(10px, 1.2vw, 12px);
  color: rgba(241, 245, 249, 0.5);
}

.arcade-popup-model-badge {
  padding: clamp(5px, 0.8vw, 8px) clamp(10px, 1.2vw, 12px);
  border-radius: 7px;
  font-size: clamp(10px, 1.3vw, 13px);
  font-weight: 600;
  background: rgba(30, 58, 95, 0.6);
  border: 1px solid rgba(59, 130, 246, 0.5);
  color: #60a5fa;
}

.arcade-popup-section {
  padding: clamp(10px, 1.5vw, 14px);
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: clamp(10px, 1.5vw, 14px);
}

.arcade-popup-section-label {
  font-size: clamp(9px, 1.1vw, 10px);
  font-weight: 600;
  color: rgba(241, 245, 249, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: clamp(5px, 0.8vw, 7px);
}

.arcade-popup-dropdown {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(10px, 1.3vw, 12px);
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(71, 85, 105, 0.5);
  border-radius: 9px;
  font-size: clamp(12px, 1.5vw, 15px);
  font-weight: 500;
  color: #f1f5f9;
}

.arcade-popup-chevron {
  font-size: clamp(8px, 1vw, 10px);
  color: rgba(148, 163, 184, 0.7);
}

.arcade-popup-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.arcade-popup-toggle-desc {
  font-size: clamp(9px, 1.1vw, 11px);
  color: rgba(148, 163, 184, 0.7);
  display: block;
}

.arcade-popup-switch {
  width: clamp(36px, 4.5vw, 44px);
  height: clamp(20px, 2.5vw, 24px);
  background: rgba(51, 65, 85, 0.6);
  border: 1px solid rgba(71, 85, 105, 0.5);
  border-radius: 12px;
  position: relative;
}

.arcade-popup-switch-on {
  background: rgba(59, 130, 246, 0.8);
  border-color: rgba(59, 130, 246, 0.4);
}

.arcade-popup-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: clamp(16px, 2vw, 20px);
  height: clamp(16px, 2vw, 20px);
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.arcade-popup-switch-on .arcade-popup-switch-thumb {
  left: auto;
  right: 2px;
}

.arcade-popup-dashboard-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(5px, 0.8vw, 8px);
  padding: clamp(10px, 1.3vw, 14px);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.9) 0%, rgba(99, 102, 241, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: white;
  font-size: clamp(11px, 1.3vw, 13px);
  font-weight: 600;
  cursor: default;
  box-shadow:
    0 4px 16px rgba(26, 115, 232, 0.3),
    0 1px 0 rgba(255, 255, 255, 0.2) inset;
}

.arcade-popup-dashboard-btn svg {
  width: clamp(12px, 1.5vw, 14px);
  height: clamp(12px, 1.5vw, 14px);
  fill: white;
}

.arcade-popup-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(5px, 0.8vw, 8px);
  padding-top: clamp(6px, 0.8vw, 8px);
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  font-size: clamp(9px, 1vw, 11px);
  color: rgba(241, 245, 249, 0.5);
}

.arcade-popup-version {
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 4px;
  font-size: clamp(7px, 0.8vw, 9px);
}

.arcade-promo-back {
  position: absolute;
  bottom: clamp(12px, 2vw, 24px);
  left: 50%;
  transform: translateX(-50%);
  background: none;
  border: none;
  color: rgba(148, 163, 184, 0.6);
  font-size: clamp(12px, 1.5vw, 15px);
  font-weight: 500;
  cursor: pointer;
  padding: 10px 20px;
  transition: color 0.2s ease;
  z-index: 10;
}

.arcade-promo-back:hover {
  color: #f1f5f9;
}

/* Hide popup on very small screens */
@media (max-width: 700px) {
  .arcade-promo-popup {
    display: none;
  }

  .arcade-promo-text {
    max-width: 100%;
    align-items: center;
    text-align: center;
  }

  .arcade-promo-models {
    justify-content: center;
  }
}

/* Video mute button */
.video-mute-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 88px;
  height: 88px;
  min-width: 88px;
  min-height: 88px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  color: #f8fafc;
  cursor: pointer;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 220ms ease;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  padding: 0;
}

.video-mute-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-2px);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.2),
    0 0 12px rgba(139, 92, 246, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.video-mute-btn:active {
  transform: translateY(0);
}

.video-mute-btn svg {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.video-mute-btn .mute-icon {
  display: block;
}

.video-mute-btn .unmute-icon {
  display: none;
}

.video-mute-btn.muted .mute-icon {
  display: none;
}

.video-mute-btn.muted .unmute-icon {
  display: block;
}

.video-mute-btn.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Mobile: ensure good touch target */
@media (max-width: 768px) {
  .video-mute-btn {
    width: 96px;
    height: 96px;
    min-width: 96px;
    min-height: 96px;
    top: 10px;
    right: 10px;
  }
  
  .video-mute-btn svg {
    width: 44px;
    height: 44px;
  }
}


/* Video CTA button overlay - scales with video */
/* Hidden by default, shown only when video ends */
.video-cta-btn {
  position: absolute;
  bottom: 8.5%;
  left: 6.2%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  background:
    linear-gradient(110deg,
      rgba(26, 115, 232, 1) 0%,
      rgba(99, 102, 241, 1) 25%,
      rgba(168, 85, 247, 1) 50%,
      rgba(14, 165, 233, 1) 75%,
      rgba(26, 115, 232, 1) 100%
    );
  background-size: 200% 100%;
  animation: btn-shimmer 8s linear infinite;
  border: 1px solid rgba(139, 92, 246, 0.6);
  box-shadow:
    0 4px 16px rgba(26, 115, 232, 0.4),
    0 0 24px rgba(168, 85, 247, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  white-space: nowrap;
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.6s ease, visibility 0.6s ease, transform 0.6s ease, box-shadow 0.2s ease;
  pointer-events: none;
}

.video-cta-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.video-cta-btn .chrome-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.video-cta-btn:hover {
  transform: translateY(-3px);
  box-shadow:
    0 8px 28px rgba(26, 115, 232, 0.5),
    0 0 40px rgba(168, 85, 247, 0.45),
    0 0 16px rgba(255, 255, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Video end replacement content - scales to fit 16:9 container */
.video-end-content {
  position: absolute;
  inset: 0;
  background: #020617;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow: hidden;
  z-index: 5;
}

.video-end-content .mesh-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(at 80% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 40%),
    radial-gradient(at 20% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 35%),
    radial-gradient(at 60% 60%, rgba(14, 165, 233, 0.08) 0%, transparent 30%);
  pointer-events: none;
}

.video-end-content .grid-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 4.2% 7.4%;
  pointer-events: none;
}

.video-end-content .glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.video-end-content .glow-orb-1 {
  width: 31%;
  height: 55%;
  background: rgba(99, 102, 241, 0.2);
  top: -18%;
  right: 8%;
}

.video-end-content .glow-orb-2 {
  width: 23%;
  height: 42%;
  background: rgba(26, 115, 232, 0.15);
  bottom: -14%;
  left: 16%;
}

.video-end-content .glow-orb-3 {
  width: 20%;
  height: 35%;
  background: rgba(168, 85, 247, 0.12);
  top: 50%;
  right: -4%;
}

.video-end-content .content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 7.4% 6.25%;
  gap: 4.7%;
  box-sizing: border-box;
}

.video-end-content .text-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3.7%;
  min-width: 0;
}

.video-end-content .brand {
  display: flex;
  align-items: center;
  gap: 1.25%;
}

.video-end-content .logo-icon {
  width: 5%;
  flex-shrink: 0;
}

.video-end-content .logo-icon img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(33, 150, 243, 0.5));
}

.video-end-content .brand-name {
  font-size: 2.5vw;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.02em;
}

.video-end-content .headline {
  font-size: 4.2vw;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.video-end-content .headline .accent {
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.video-end-content .subheadline {
  font-size: 1.7vw;
  font-weight: 500;
  color: rgba(226, 232, 240, 0.85);
  line-height: 1.5;
}

.video-end-content .model-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8%;
}

.video-end-content .model-badge {
  padding: 1.3% 1.4%;
  border-radius: 100px;
  font-size: 1.05vw;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.95);
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.5)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(226, 232, 240, 0.5));
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 4px 20px rgba(15, 23, 42, 0.25);
  white-space: nowrap;
}

.video-end-content .cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6vw;
  padding: 1.1% 1.6%;
  border-radius: 12px;
  font-size: 1.1vw;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  background:
    linear-gradient(110deg,
      rgba(26, 115, 232, 1) 0%,
      rgba(99, 102, 241, 1) 25%,
      rgba(168, 85, 247, 1) 50%,
      rgba(14, 165, 233, 1) 75%,
      rgba(26, 115, 232, 1) 100%
    );
  background-size: 200% 100%;
  animation: btn-shimmer 8s linear infinite;
  border: 1px solid rgba(139, 92, 246, 0.6);
  box-shadow:
    0 4px 16px rgba(26, 115, 232, 0.4),
    0 0 24px rgba(168, 85, 247, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  white-space: nowrap;
  margin-top: 1%;
}

.video-end-content .cta-btn .chrome-icon {
  width: 1.4vw;
  height: 1.4vw;
  flex-shrink: 0;
}

.video-end-content .visual-content {
  flex: 0 0 39%;
  min-width: 0;
}

.video-end-content .gmail-mockup {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 1.25vw;
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 1.7%;
  box-shadow:
    0 25px 80px rgba(0, 0, 0, 0.5),
    0 0 60px rgba(99, 102, 241, 0.15);
  transform: perspective(1200px) rotateY(-8deg) rotateX(2deg);
}

.video-end-content .gmail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.2%;
  padding-bottom: 1.7%;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.video-end-content .gmail-title {
  font-size: 1.05vw;
  font-weight: 600;
  color: rgba(148, 163, 184, 0.9);
}

.video-end-content .gmail-dots {
  display: flex;
  gap: 0.43vw;
}

.video-end-content .gmail-dot {
  width: 0.63vw;
  height: 0.63vw;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.4);
}

.video-end-content .gmail-dot.red { background: #f87171; }
.video-end-content .gmail-dot.yellow { background: #fbbf24; }
.video-end-content .gmail-dot.green { background: #4ade80; }

.video-end-content .email-lines {
  display: flex;
  flex-direction: column;
  gap: 1.3%;
  margin-bottom: 2.6%;
}

.video-end-content .email-line {
  height: 1.3%;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.25), transparent);
}

.video-end-content .email-line.short { width: 45%; }
.video-end-content .email-line.medium { width: 68%; }
.video-end-content .email-line.long { width: 88%; }

.video-end-content .toolbar {
  display: flex;
  align-items: center;
  gap: 0.43vw;
  padding: 1.3% 0.94vw;
  background: #f8f9fa;
  border-radius: 0.74vw;
  margin-bottom: 2.2%;
}

.video-end-content .toolbar-btn {
  width: 1.7vw;
  height: 1.7vw;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-end-content .toolbar-btn svg {
  width: 0.94vw;
  height: 0.94vw;
  fill: #5f6368;
}

.video-end-content .toolbar-sep {
  width: 1px;
  height: 1.25vw;
  background: #e0e0e0;
  margin: 0 0.3vw;
}

.video-end-content .ai-btn {
  width: 2.5vw;
  height: 2.5vw;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a73e8 0%, #6366f1 50%, #a855f7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.94vw;
  font-weight: 800;
  color: #fff;
  margin-left: auto;
  box-shadow:
    0 4px 20px rgba(99, 102, 241, 0.5),
    0 0 30px rgba(168, 85, 247, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.video-end-content .composer-card {
  background: rgba(248, 250, 252, 0.98);
  border-radius: 0.82vw;
  padding: 2.2%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.video-end-content .composer-header {
  display: flex;
  align-items: center;
  gap: 0.74vw;
  margin-bottom: 1.7%;
}

.video-end-content .composer-ai-label {
  font-size: 0.94vw;
  font-weight: 700;
  color: #1a73e8;
}

.video-end-content .composer-tabs {
  display: flex;
  gap: 0.31vw;
  background: #edf2ff;
  padding: 0.35%;
  border-radius: 1.25vw;
}

.video-end-content .composer-tab {
  padding: 0.6% 1.3%;
  border-radius: 1vw;
  font-size: 0.83vw;
  font-weight: 600;
  color: #0f172a;
}

.video-end-content .composer-tab.active {
  background: #1a73e8;
  color: #fff;
}

.video-end-content .composer-model {
  margin-left: auto;
  padding: 0.6% 1.1%;
  border-radius: 1.25vw;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-size: 0.74vw;
  font-weight: 600;
  color: #0f172a;
}

.video-end-content .composer-textarea {
  width: 100%;
  border-radius: 0.5vw;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95));
  padding: 2%;
  font-size: 0.82vw;
  color: rgba(15, 23, 42, 0.6);
  margin-bottom: 1.7%;
  line-height: 1.4;
}

.video-end-content .composer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6vw;
}

.video-end-content .composer-btn {
  padding: 1% 2%;
  border-radius: 0.5vw;
  font-size: 0.82vw;
  font-weight: 700;
}

.video-end-content .composer-btn.ghost {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 23, 42, 0.12);
  color: #0f172a;
}

.video-end-content .composer-btn.primary {
  background: linear-gradient(135deg, #1a73e8, #2563eb);
  border: none;
  color: #fff;
  box-shadow: 0 2px 10px rgba(26, 115, 232, 0.4);
}

/* Live Pricing Loading & Badge */
.model-pricing-loading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px;
  color: rgba(226, 232, 240, 0.7);
  font-size: 13px;
}

.pricing-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(96, 165, 250, 0.2);
  border-top-color: #60a5fa;
  border-radius: 50%;
  animation: pricing-spin 0.8s linear infinite;
}

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

.live-pricing-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 5px 12px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  color: #4ade80;
}

.live-dot {
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  animation: live-pulse 2s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* Model pricing item hover effect */
.model-pricing-item {
  transition: all 220ms ease;
  cursor: pointer;
}

.model-pricing-item:hover {
  transform: translateY(-3px);
  background: rgba(15, 23, 42, 0.8);
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow: 
    0 8px 24px rgba(15, 23, 42, 0.5),
    0 0 16px rgba(139, 92, 246, 0.2),
    inset 0 0 10px rgba(139, 92, 246, 0.05);
}

/* Skeleton loading state for pricing items */
.model-pricing-item.skeleton {
  pointer-events: none;
}

.skeleton-text {
  display: inline-block;
  height: 1em;
  width: 80px;
  background: linear-gradient(90deg, 
    rgba(148, 163, 184, 0.15) 0%, 
    rgba(148, 163, 184, 0.25) 50%, 
    rgba(148, 163, 184, 0.15) 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
  vertical-align: middle;
}

.skeleton-text.short {
  width: 40px;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* =============================================================================
   Proficiency Flip - Model Carousel (3D card flip on hover)
   ============================================================================= */

/* Badge with proficiency - setup for 3D flip */
.model-badge.has-proficiency {
  cursor: pointer;
  perspective: 600px;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

/* Inner container for flip */
.badge-inner {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease;
  transform-style: preserve-3d;
}

/* Flip on hover */
.model-badge.has-proficiency:hover .badge-inner {
  transform: rotateX(180deg);
}

/* Shared styles for front and back */
.badge-front,
.badge-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  min-height: 32px;
  white-space: nowrap;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Front face - model name */
.badge-front {
  color: rgba(15, 23, 42, 0.95);
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.35)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.48), rgba(226, 232, 240, 0.42));
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 2px 10px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
}

/* Back face - proficiency */
.badge-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotateX(180deg);

  /* Gradient background matching proficiency aesthetic */
  background:
    linear-gradient(135deg,
      rgba(96, 165, 250, 0.35) 0%,
      rgba(167, 139, 250, 0.45) 50%,
      rgba(244, 114, 182, 0.35) 100%
    );

  /* Glassmorphism effect */
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);

  /* Border */
  border: 1px solid rgba(167, 139, 250, 0.5);

  /* Text styling */
  color: #f8fafc;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);

  /* Glow effect */
  box-shadow:
    0 4px 20px rgba(139, 92, 246, 0.4),
    0 0 30px rgba(96, 165, 250, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 0 20px rgba(167, 139, 250, 0.12);

  /* Shimmer animation */
  animation: proficiency-shimmer 3s ease-in-out infinite;
}

@keyframes proficiency-shimmer {
  0%, 100% {
    box-shadow:
      0 4px 20px rgba(139, 92, 246, 0.4),
      0 0 30px rgba(96, 165, 250, 0.25),
      inset 0 1px 0 rgba(255, 255, 255, 0.18),
      inset 0 0 20px rgba(167, 139, 250, 0.12);
  }
  50% {
    box-shadow:
      0 6px 28px rgba(139, 92, 246, 0.5),
      0 0 40px rgba(244, 114, 182, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.22),
      inset 0 0 25px rgba(96, 165, 250, 0.18);
  }
}

/* Reduced motion - instant flip instead of animation */
@media (prefers-reduced-motion: reduce) {
  .badge-inner {
    transition: none;
  }
  .badge-back {
    animation: none;
  }
}

/* =============================================================================
   INTERACTIVE DEMO STYLES
   ============================================================================= */

/* Demo active state - Gmail shell with static purple glow */
.hero-gmail-shell.demo-active {
  background: linear-gradient(135deg,
    rgba(15, 23, 42, 0.92) 0%,
    rgba(15, 23, 42, 0.88) 100%
  );
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(139, 92, 246, 0.4),
    0 0 60px rgba(139, 92, 246, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.5);
}

/* Demo active state - AI button with cycling color gradient */
.hero-gmail-shell.demo-active .openrouter-ai-btn {
  background: linear-gradient(135deg,
    rgba(26, 115, 232, 1) 0%,
    rgba(99, 102, 241, 1) 25%,
    rgba(168, 85, 247, 1) 50%,
    rgba(14, 165, 233, 1) 75%,
    rgba(26, 115, 232, 1) 100%
  ) !important;
  background-size: 200% 200% !important;
  animation: color-cycle 6s ease-in-out infinite !important;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.16) !important,
    0 0 12px rgba(26, 115, 232, 0.8) !important,
    0 0 20px rgba(99, 102, 241, 0.6) !important;
  border-color: rgba(139, 92, 246, 0.7) !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}

@keyframes color-cycle {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Hover state for demo-active button - preserve hover animation */
.hero-gmail-shell.demo-active .openrouter-ai-btn:hover {
  transform: translateY(-0.5px) !important;
}

/* Remove shimmer effect once AI button is clicked */
.hero-gmail-shell.demo-active .openrouter-ai-btn.shimmer-done {
  background: linear-gradient(180deg, #1a73e8 0%, #1666d5 100%) !important;
  background-size: auto !important;
  animation: none !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16) !important;
}

/* Hover state after shimmer is done */
.hero-gmail-shell.demo-active .openrouter-ai-btn.shimmer-done:hover {
  background: linear-gradient(180deg, #1f7bf0 0%, #1866cf 100%) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18) !important;
  transform: translateY(-0.5px) !important;
}

/* Email message text styling */
.gmail-message-text {
  font-size: 12px;
  line-height: 1.5;
  color: #e2e8f0;
  opacity: 0;
  transition: opacity 150ms ease;
  pointer-events: none;
  margin-top: -5px;
  margin-left: -5px;
}

/* Show email text when demo is active */
.hero-gmail-shell.demo-active .gmail-message-text {
  opacity: 1;
  pointer-events: auto;
}


/* Editable content styling moved to bottom of file */

.gmail-sender {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 12px;
  flex-wrap: wrap;
}

.gmail-sender strong {
  color: #f1f5f9;
  font-weight: 600;
}

.gmail-to-label {
  color: #94a3b8;
  font-weight: 400;
}

.gmail-email {
  color: #cbd5e1;
  font-size: 11px;
}

.gmail-time {
  color: #94a3b8;
  font-size: 11px;
  margin-left: auto;
}

.gmail-message-text p {
  margin: 0 0 8px 0;
}

.gmail-quoted {
  margin-top: 10px;
  padding-left: 12px;
  border-left: 2px solid rgba(71, 85, 105, 0.5);
  opacity: 0.45;
  filter: blur(0.3px);
  pointer-events: none;
  user-select: none;
}

.gmail-quoted-header {
  font-size: 10px;
  color: rgba(148, 163, 184, 0.7);
  margin-bottom: 6px;
  font-style: italic;
}

.gmail-quoted p {
  color: rgba(226, 232, 240, 0.6);
  font-size: 11px;
}

/* Editable content area - make it stand out */
.gmail-editable-content {
  position: relative;
  padding: 8px 10px;
  margin: -8px -10px;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.03);
  border: 1px dashed rgba(59, 130, 246, 0.12);
  transition: all 0.2s ease;
}

.gmail-editable-content:hover {
  background: rgba(59, 130, 246, 0.06);
  border-color: rgba(59, 130, 246, 0.22);
}

.gmail-editable-content:focus {
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.28);
  outline: none;
}

/* ============================================================================= */
/* THEME TOGGLE - SWITCH WITH ICON ON THUMB */
/* ============================================================================= */

.openreply-popup-theme-toggle {
  position: absolute;
  top: 11px;
  right: 12px;
  width: 36px;
  height: 22px;
  background: transparent;
  cursor: pointer;
  border: none;
  padding: 0;
  z-index: 100;
}

/* Toggle switch container */
.openreply-popup-theme-thumb {
  position: relative;
  width: 36px;
  height: 22px;
  background: rgba(226, 232, 240, 0.9);
  border: 1px solid rgba(203, 213, 225, 0.7);
  border-radius: 999px;
  cursor: pointer;
  transition: all 200ms ease;
  display: flex;
  align-items: center;
  padding: 0 2px;
}

.openreply-popup-theme-toggle:hover .openreply-popup-theme-thumb {
  border-color: #1a73e8;
  background: rgba(226, 232, 240, 1);
}

/* Sliding white button with icon inside */
.openreply-popup-theme-thumb::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  transition: transform 200ms ease;
}

/* Icon inside the white thumb - sun in light mode */
.openreply-popup-theme-indicator-icon {
  position: absolute;
  left: 2px;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: transform 200ms ease;
}

.openreply-popup-theme-indicator-icon svg {
  width: 9px;
  height: 9px;
}

.openreply-sun-icon {
  fill: #f59e0b;
}

.openreply-moon-icon {
  fill: #6366f1;
  display: none;
}

/* Dark mode: show moon, hide sun */
.openreply-popup-theme-toggle.openreply-dark .openreply-sun-icon {
  display: none;
}

.openreply-popup-theme-toggle.openreply-dark .openreply-moon-icon {
  display: block;
}

/* Dark mode: toggle active state - slide thumb to right */
.openreply-popup-theme-toggle.openreply-dark .openreply-popup-theme-thumb {
  background: rgba(51, 65, 85, 0.9);
  border-color: rgba(71, 85, 105, 0.7);
}

.openreply-popup-theme-toggle.openreply-dark .openreply-popup-theme-thumb::before {
  transform: translateX(14px);
}

.openreply-popup-theme-toggle.openreply-dark .openreply-popup-theme-indicator-icon {
  transform: translateX(14px);
}

/* Keep avatar visible when demo is active */

/* Demo Popup Overlay */
.demo-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  opacity: 0;
  transition: opacity 300ms ease;
  pointer-events: none;
}

.demo-popup-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Extension-style popup window (draggable) */
.demo-popup-window {
  position: fixed;
  width: 380px;
  background: linear-gradient(135deg, rgba(241, 245, 249, 0.98) 0%, rgba(241, 245, 249, 0.95) 100%);
  border-radius: 16px;
  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.2);
  z-index: 10000;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: grab;
  user-select: none;
  top: 50%;
  left: 50%;
  margin-left: -190px;
  margin-top: -240px;
}

.demo-popup-overlay.visible .demo-popup-window {
  transform: scale(1);
}

.demo-popup-window.dragging {
  cursor: grabbing;
}

.demo-popup-header {
  padding: 16px;
  background: linear-gradient(135deg, #f1f5f9 0%, #e8ecf1 100%);
  border-bottom: 1px solid rgba(203, 213, 225, 0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: move;
}

.demo-popup-header-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.demo-popup-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.demo-popup-title {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
}

.demo-popup-close {
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 6px;
  font-size: 20px;
  color: #64748b;
  cursor: pointer;
  transition: all 200ms ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.demo-popup-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #1f2937;
}

/* Popup content sections */
.demo-popup-content {
  padding: 20px;
  max-height: 400px;
  overflow-y: auto;
}

.demo-popup-section {
  margin-bottom: 16px;
}

.demo-popup-section-title {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.demo-popup-option {
  padding: 12px;
  border-radius: 10px;
  border: 2px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  transition: all 220ms ease;
  margin-bottom: 8px;
  text-align: left;
  user-select: none;
}

.demo-popup-option:hover {
  border-color: #3b82f6;
  background: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.1);
}

.demo-popup-option-title {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 2px;
}

.demo-popup-option-desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  margin: 0;
}

/* Pulse Animation for AI Button */
@keyframes btn-pulse {
  0%, 100% {
    transform: translateY(-2px) scale(1.08);
    box-shadow:
      0 4px 16px rgba(139, 92, 246, 0.5),
      0 0 20px rgba(139, 92, 246, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
  50% {
    transform: translateY(-4px) scale(1.12);
    box-shadow:
      0 6px 24px rgba(139, 92, 246, 0.6),
      0 0 30px rgba(139, 92, 246, 0.45),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .gmail-message-text {
    position: absolute;
    top: 5px;
    left: 5px;
    right: 0;
    font-size: 13px;
    padding: 12px;
  }

  .hero-gmail-shell.demo-active .gmail-message-text {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
  }

  .demo-popup-window {
    width: 90vw;
    max-width: 340px;
    margin-left: -45vw;
    margin-top: -200px;
  }

  .demo-popup-content {
    max-height: 60vh;
  }

  /* Reduce space between ghost text and toolbar on mobile */
  .gmail-thread-card {
    padding-bottom: 8px;
  }

  .gmail-message-initial {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    padding-bottom: 0;
    margin-bottom: 30px;
  }

  .hero-gmail-shell.demo-active .gmail-message-initial {
    position: absolute;
    top: 5px;
    left: 5px;
    right: 0;
  }

  .gmail-message-initial .gmail-line {
    margin-bottom: 6px;
    height: 5px;
  }

  .gmail-message-initial .gmail-quoted {
    margin-top: 4px;
    padding-top: 4px;
  }

  .gmail-message-initial .gmail-quoted .gmail-line {
    margin-bottom: 5px;
  }

  .gmail-toolbar {
    margin-top: -12px;
  }

  /* Demo activated - expand from center on mobile */
  .hero-gmail-shell.demo-active .gmail-thread-card {
    animation: expand-from-center 0.3s ease-out forwards;
  }
}

/* Smallest screens - demo fixes */
@media (max-width: 480px) {
  /* Demo box: center without forcing full width */
  .hero-gmail-shell {
    width: fit-content;
    margin: 0 auto;
    max-width: 100%;
  }

  /* Fix text box clipping over toolbar - add spacing */
  .gmail-toolbar {
    margin-top: 0;
  }
}

@keyframes expand-from-center {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .gmail-message-text,
  .demo-popup-overlay,
  .demo-popup-window {
    transition: none;
    animation: none;
  }

  .hero-gmail-shell.demo-active .openrouter-ai-btn {
    animation: none;
  }
}

/* Widescreen - larger hero to fill viewport */
@media (min-width: 1400px) {
  .page {
    /* zoom removed - was causing toolbar overflow at 1440p */
  }

  .hero-shell {
    padding: 48px 40px;
  }

  .hero-grid {
    gap: 40px;
  }

  .hero-copy {
    gap: 20px;
    max-width: 680px;
  }

  h1 {
    font-size: 40px;
  }

  .hero-sub {
    font-size: 17px;
    max-width: 620px;
  }

  .hero-kicker span.label {
    font-size: 12px;
    padding: 8px 16px;
  }

  .hero-gmail-shell {
    padding: 24px;
  }

  .gmail-thread-card {
    padding: 16px 18px 20px;
  }

  /* Demo active - subtle base state on desktop */
  .hero-gmail-shell.demo-active .gmail-message-text {
    border: 1.5px solid rgba(100, 116, 139, 0.5);
    border-radius: 8px;
    padding: 12px 14px;
    background: rgba(15, 23, 42, 0.85);
    cursor: text;
    position: relative;
  }

  .hero-gmail-shell.demo-active .gmail-message-text::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 8px;
    background: radial-gradient(ellipse 500px 120px at center, rgba(59, 130, 246, 0.08), transparent);
    pointer-events: none;
  }

  /* Typing/focused state on desktop */
  .hero-gmail-shell.demo-active .gmail-message-text.typing-active {
    border: 1px solid rgba(59, 130, 246, 0.5);
    background: rgba(15, 23, 42, 0.95);
    box-shadow:
      0 0 0 2px rgba(59, 130, 246, 0.12),
      0 0 16px rgba(59, 130, 246, 0.15);
  }

  .model-benefit-section {
    margin-top: 16px;
  }

  .model-benefit-standalone {
    padding: 22px 28px 28px;
  }

  .model-benefit-label {
    font-size: 15px;
  }

  .model-benefit-sub {
    font-size: 16px;
  }
}

/* =============================================================================
   Demo Tour Tooltips - Guided onboarding for "Try it live" demo
   ============================================================================= */

.demo-tour-tooltip {
  position: fixed;
  z-index: 1000001;
  width: 300px;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background:
    radial-gradient(ellipse 120% 120% at 10% 0%, rgba(96, 165, 250, 0.15), transparent 50%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
  backdrop-filter: blur(20px) saturate(1.2);
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: auto;
  font-family: Arial, sans-serif;
}

.demo-tour-tooltip.demo-tour-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Arrow pointing UP (tooltip below target) */
.demo-tour-arrow-up {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 12px solid rgba(30, 41, 59, 0.95);
  filter: drop-shadow(0 -2px 3px rgba(0, 0, 0, 0.15));
}

/* Arrow pointing LEFT (tooltip right of target) */
.demo-tour-arrow-left {
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-right: 12px solid rgba(30, 41, 59, 0.95);
  filter: drop-shadow(-2px 0 3px rgba(0, 0, 0, 0.15));
}

/* Close button */
.demo-tour-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.demo-tour-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
}

/* Content area */
.demo-tour-content {
  color: #f1f5f9;
}

.demo-tour-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 10px;
  color: #f1f5f9;
  padding-right: 24px;
}

.demo-tour-text {
  font-size: 14px;
  line-height: 1.5;
  color: #94a3b8;
  margin: 0;
}

.demo-tour-text strong {
  color: #e2e8f0;
  font-weight: 600;
}

/* Footer with step count and button */
.demo-tour-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.demo-tour-step {
  font-size: 13px;
  color: #64748b;
}

.demo-tour-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.demo-tour-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Chrome-styled button for final step */
.demo-tour-btn-chrome {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  background:
    linear-gradient(110deg,
      rgba(26, 115, 232, 1) 0%,
      rgba(99, 102, 241, 1) 25%,
      rgba(168, 85, 247, 1) 50%,
      rgba(14, 165, 233, 1) 75%,
      rgba(26, 115, 232, 1) 100%
    );
  background-size: 200% 100%;
  animation: demo-tour-shimmer 6s linear infinite;
  border: 1px solid rgba(139, 92, 246, 0.6);
  box-shadow:
    0 4px 16px rgba(26, 115, 232, 0.4),
    0 0 20px rgba(168, 85, 247, 0.25);
}

.demo-tour-btn-chrome:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow:
    0 6px 24px rgba(26, 115, 232, 0.5),
    0 0 30px rgba(168, 85, 247, 0.35);
}

.demo-tour-chrome-icon {
  flex-shrink: 0;
}

@keyframes demo-tour-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* AI badge in tour text - circular like actual AI button */
.demo-tour-ai-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin: 0 4px;
  background: linear-gradient(180deg, #1a73e8 0%, #1666d5 100%);
  border: 1px solid #1a73e8;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  color: white;
  vertical-align: middle;
  box-shadow: 0 1px 3px rgba(26, 115, 232, 0.3);
}

/* Highlight pulse animation for target elements */
@keyframes demo-tour-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(59, 130, 246, 0);
  }
}

.demo-tour-highlight {
  animation: demo-tour-pulse 1.5s ease-in-out infinite;
  position: relative;
  z-index: 10;
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .demo-tour-tooltip {
    width: calc(100vw - 32px);
    max-width: 320px;
    left: 50% !important;
    transform: translateX(-50%) translateY(8px);
  }

  .demo-tour-tooltip.demo-tour-visible {
    transform: translateX(-50%) translateY(0);
  }

  .demo-tour-arrow-up,
  .demo-tour-arrow-left {
    display: none;
  }
}