/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #0a0a0f;
  color: #f0f0f5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== PAGE LAYOUT ===== */
.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 24px;
  gap: 24px;
}

/* ===== LOGO ===== */
.logo {
  width: 100%;
  max-width: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo svg {
  width: 100%;
  height: auto;
}

/* ===== VIDEO CONTAINER — centered landscape ===== */
.video-container {
  width: 100%;
  max-width: 860px;
  flex-shrink: 0;
}

.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #111118;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 20px 60px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(91, 124, 206, 0.08);
}

.video-wrapper video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== BIG PLAY OVERLAY (initial) ===== */
.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(10, 10, 15, 0.55);
  border: none;
  cursor: pointer;
  z-index: 10;
  transition: opacity 0.35s ease;
  -webkit-tap-highlight-color: transparent;
}

.play-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.play-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3d5cb8, #5B7CCE, #7a9be0);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 28px rgba(91, 124, 206, 0.45);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.play-overlay:hover .play-circle {
  transform: scale(1.08);
  box-shadow: 0 8px 36px rgba(91, 124, 206, 0.6);
}

.play-circle svg {
  width: 28px;
  height: 28px;
  margin-left: 3px;
  /* optical center */
}

.play-overlay span {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.02em;
}

/* ===== PLAYBACK TOGGLE (pause/play bottom-left) ===== */
.playback-toggle {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 15;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.playback-toggle:hover {
  background: rgba(0, 0, 0, 0.7);
}

.playback-toggle svg {
  width: 18px;
  height: 18px;
}

/* Show/hide based on play state via body class */
body.is-playing .playback-toggle,
body.is-paused .playback-toggle {
  opacity: 1;
  pointer-events: auto;
}

body.is-ended .playback-toggle {
  opacity: 0;
  pointer-events: none;
}

/* Toggle pause/play icons */
.playback-toggle .icon-play {
  display: none;
}

.playback-toggle .icon-pause {
  display: block;
}

body.is-paused .playback-toggle .icon-play {
  display: block;
}

body.is-paused .playback-toggle .icon-pause {
  display: none;
}

/* Auto-hide toggle after a few seconds (show on hover) */
body.is-playing .video-wrapper:not(:hover) .playback-toggle {
  opacity: 0;
  transition: opacity 1.2s ease 2s;
}

body.is-playing .video-wrapper:hover .playback-toggle {
  opacity: 1;
  transition: opacity 0.2s ease;
}

/* ===== END OVERLAY ===== */
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 20;
}

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

.overlay-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.25s ease;
  -webkit-tap-highlight-color: transparent;
  min-height: 48px;
  min-width: 48px;
  user-select: none;
}

.btn:active {
  transform: scale(0.96);
}

/* Primary — logo blue gradient */
.btn-primary {
  background: linear-gradient(135deg, #3d5cb8 0%, #5B7CCE 50%, #7a9be0 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(91, 124, 206, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 6px 28px rgba(91, 124, 206, 0.5);
  transform: translateY(-1px);
}

/* Secondary — glass */
.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #e0e0ef;
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

/* ===== BOTTOM CTA ===== */
.bottom-actions {
  display: flex;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.35s ease;
}

/* Hide CTA when overlay is visible */
body.is-ended .bottom-actions {
  opacity: 0;
  pointer-events: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .page {
    padding: 20px 0;
    gap: 18px;
  }

  .logo {
    max-width: 180px;
    padding: 0 16px;
  }

  .video-container {
    max-width: 100%;
  }

  .video-wrapper {
    border-radius: 0;
    box-shadow: none;
  }

  .overlay {
    border-radius: 0;
  }

  .btn {
    padding: 14px 24px;
    font-size: 0.95rem;
  }

  .bottom-actions {
    padding: 0 20px;
  }
}

@media (max-width: 380px) {
  .overlay-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 240px;
  }
}