/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', Arial, sans-serif;
  background: #000;
  color: #fff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ===== UTILITY ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.accent { color: #ff2a78; }
.hidden { display: none !important; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 40px;
  border: none;
  border-radius: 20px;
  font-family: 'Unbounded', Arial, sans-serif;
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
}
.btn--primary {
  background: #ff2a78;
  color: #fff;
}
.btn--primary:hover {
  background: #11111b;
  border: 1px solid #fff;
}
.btn--glow {
  box-shadow: 0 10px 30px 0 #ff2a78;
}
.btn--glow:hover {
  box-shadow: 0 5px 20px 0 rgba(255,42,120,0.4);
}
.btn--large {
  padding: 22px 50px;
  font-size: 20px;
}

/* ===== CTA BLOCK ===== */
.cta-block {
  text-align: center;
  margin-top: 50px;
}
.cta-block__sub {
  margin-top: 16px;
  font-size: 18px;
  color: #aaa;
}

/* ===== SECTION TITLES ===== */
.section-title {
  font-family: 'Unbounded', Arial, sans-serif;
  font-size: clamp(22px, 4vw, 46px);
  font-weight: 700;
  text-align: center;
  line-height: 1.25;
  margin-bottom: 20px;
}
.section-subtitle {
  text-align: center;
  font-size: clamp(14px, 2vw, 20px);
  color: #ccc;
  margin-bottom: 40px;
}

/* ===== HERO ===== */
.hero {
  padding: 40px 0 60px;
}
.hero__title {
  font-family: 'Unbounded', Arial, sans-serif;
  font-size: clamp(20px, 3vw, 33px);
  text-align: center;
  margin-bottom: 30px;
  line-height: 1.3;
}
.hero__hint {
  text-align: center;
  font-size: 18px;
  margin-top: 30px;
  line-height: 1.5;
  transition: opacity 0.3s ease;
}

/* ===== CUSTOM VIDEO PLAYER ===== */
.player {
  max-width: 1120px;
  margin: 0 auto;
}
.player__wrapper {
  position: relative;
  background: #111;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.player__video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

/* Overlay — sits above video, below nothing else */
.player__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  background: rgba(0,0,0,0.3);
  transition: opacity 0.3s;
}
.player__overlay.hide {
  opacity: 0;
  pointer-events: none;
}
.player__big-play {
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s;
  z-index: 6;
}
.player__big-play:hover {
  transform: scale(1.15);
}

/* Controls — below overlay when overlay is visible */
.player__controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.player__wrapper:hover .player__controls,
.player__wrapper.controls-visible .player__controls {
  opacity: 1;
  pointer-events: auto;
}

.player__btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 28px;
  min-height: 28px;
}

/* Progress */
.player__progress {
  flex: 1;
  position: relative;
  height: 6px;
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
  cursor: pointer;
}
.player__progress-buffered {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: rgba(255,255,255,0.3);
  border-radius: 3px;
  pointer-events: none;
}
.player__progress-filled {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: #ff2a78;
  border-radius: 3px;
  pointer-events: none;
}
.player__progress-input {
  position: absolute;
  top: -8px;
  left: 0;
  width: 100%;
  height: 22px;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}

/* Time */
.player__time {
  font-size: 13px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  min-width: 90px;
}

/* Volume */
.player__volume {
  display: flex;
  align-items: center;
  gap: 4px;
}
.player__volume-input {
  width: 60px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.player__volume-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
}

/* Speed */
.player__speed {
  position: relative;
}
.player__btn--speed {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  min-width: 32px;
}
.player__speed-menu {
  display: none;
  position: absolute;
  bottom: 100%;
  right: 0;
  background: rgba(0,0,0,0.95);
  border-radius: 8px;
  padding: 6px 0;
  min-width: 70px;
  margin-bottom: 8px;
}
.player__speed-menu.open {
  display: block;
}
.player__speed-menu button {
  display: block;
  width: 100%;
  padding: 6px 14px;
  background: none;
  border: none;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
}
.player__speed-menu button:hover,
.player__speed-menu button.active {
  background: #ff2a78;
}

/* CTA under video */
.player__cta {
  text-align: center;
  margin-top: 24px;
  animation: ctaAppear 0.5s ease forwards;
}
@keyframes ctaAppear {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== STEPS ===== */
.steps {
  padding: 80px 0;
}
.steps__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 50px;
}
.steps__card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 30px 24px;
  text-align: center;
}
.steps__icon {
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
}
.steps__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.steps__num {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 18px;
  margin-bottom: 12px;
}
.steps__dot {
  width: 24px;
  height: 24px;
  background: #ff2a78;
  border-radius: 8px;
  display: inline-block;
  flex-shrink: 0;
}
.steps__card p {
  color: #ccc;
  font-size: 16px;
}

/* Results */
.steps__results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.steps__result-card {
  border-radius: 20px;
  overflow: hidden;
}
.steps__result-card img {
  width: 100%;
  border-radius: 20px;
}

/* ===== CASES ===== */
.cases {
  padding: 80px 0;
}
.cases__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}
.cases__item {
  background: rgba(255,255,255,0.05);
  border-radius: 16px;
  overflow: hidden;
}
.cases__desc {
  padding: 20px;
  font-size: 16px;
}
.cases__item img {
  width: 100%;
  display: block;
  display: block;
}

/* ===== AUTHOR ===== */
.author {
  padding: 80px 0;
}
.author__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.author__quote {
  background: #ff2a78;
  border-radius: 16px;
  padding: 30px;
  font-size: 20px;
  line-height: 1.5;
  position: relative;
  margin-bottom: 20px;
}
.author__quote::after {
  content: '';
  position: absolute;
  bottom: -16px;
  right: 40px;
  width: 30px;
  height: 30px;
  background: #ff2a78;
  transform: rotate(45deg);
}
.author__name {
  font-family: 'Unbounded', Arial, sans-serif;
  font-size: 20px;
  font-weight: 600;
}
.author__role {
  color: #aaa;
  margin-bottom: 30px;
}
.author__cta-box {
  background: #fff;
  color: #000;
  border-radius: 20px;
  padding: 30px;
}
.author__cta-box h3 {
  font-size: 20px;
  margin-bottom: 20px;
  line-height: 1.4;
}
.author__photo img {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

/* ===== REVIEWS ===== */
.reviews {
  padding: 80px 0;
}
.reviews__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.reviews__item {
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}
.review-player {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.review-player > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.review-player.playing > video:first-of-type { display: none; }
.review-player.playing > video:last-of-type { display: block; }
.review-player__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s;
  z-index: 2;
}
.review-player__play:hover {
  transform: translate(-50%, -50%) scale(1.15);
}
.review-player.playing .review-player__play { display: none; }

/* ===== FINAL CTA ===== */
.final-cta {
  padding: 80px 0 100px;
}
.final-cta__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-top: 40px;
}
.final-cta__video {
  border-radius: 20px;
  overflow: hidden;
}
.final-cta__video video {
  width: 100%;
  display: block;
}
.final-cta__list {
  margin: 20px 0 30px;
}
.final-cta__list li {
  padding: 8px 0 8px 24px;
  position: relative;
  font-size: 17px;
  color: #ddd;
}
.final-cta__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff2a78;
}

/* ===== ANALYTICS PANEL ===== */
.analytics-panel {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 9999;
  overflow-y: auto;
  padding: 40px;
}
.analytics-panel__inner {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}
.analytics-panel__close {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 36px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
}
.analytics-panel h2 {
  font-family: 'Unbounded', Arial, sans-serif;
  font-size: 28px;
  margin-bottom: 30px;
}
.analytics-panel h3 {
  margin: 30px 0 15px;
  font-size: 18px;
}
.analytics-panel__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.stat-card {
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}
.stat-card__value {
  font-size: 32px;
  font-weight: 700;
  color: #ff2a78;
}
.stat-card__label {
  font-size: 14px;
  color: #aaa;
  margin-top: 4px;
}

/* Date filter */
.date-filter {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.date-filter__inputs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.date-filter__inputs label {
  color: #ccc;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.date-filter__inputs input[type="date"] {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}
.date-filter__inputs input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
}
.date-filter__btn {
  padding: 6px 16px;
  border-radius: 8px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.date-filter__btn--apply {
  background: #ff2a78;
  color: #fff;
}
.date-filter__btn--apply:hover {
  background: #e0236a;
}
.date-filter__btn--reset {
  background: rgba(255,255,255,0.15);
  color: #ccc;
}
.date-filter__btn--reset:hover {
  background: rgba(255,255,255,0.25);
}
.date-filter__presets {
  display: flex;
  gap: 8px;
}
.date-filter__preset {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  color: #ccc;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.date-filter__preset:hover {
  background: rgba(255,42,120,0.2);
  border-color: #ff2a78;
  color: #fff;
}
.date-filter__label {
  font-size: 13px;
  color: #888;
}
.date-filter__label strong {
  color: #ff2a78;
}

/* Analytics table */
.analytics-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 14px;
}
.analytics-table th {
  text-align: left;
  color: #888;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-weight: 500;
}
.analytics-table td {
  padding: 8px 12px;
  color: #ddd;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.analytics-table tr:hover td {
  background: rgba(255,255,255,0.05);
}

#retentionChart,
#timelineChart {
  width: 100%;
  max-width: 900px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  margin-top: 10px;
}
.analytics-section {
  margin-bottom: 30px;
}
.analytics-section h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #fff;
}

/* ===== RESPONSIVE ===== */

/* Tablet */
@media (max-width: 1024px) {
  .steps__grid,
  .steps__results {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .cases__grid {
    grid-template-columns: 1fr;
  }
  .author__grid,
  .final-cta__content {
    grid-template-columns: 1fr;
  }
  .author__photo {
    order: -1;
  }
  .reviews__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .final-cta__list li {
    font-size: 15px;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .container { padding: 0 16px; }

  /* Buttons */
  .btn { padding: 14px 24px; font-size: 14px; border-radius: 14px; }
  .btn--large { padding: 16px 28px; font-size: 15px; }

  /* Hero */
  .hero { padding: 24px 0 40px; }
  .hero__title { font-size: clamp(18px, 5vw, 24px); margin-bottom: 20px; }
  .hero__hint { font-size: 14px; margin-top: 20px; }

  /* Sections spacing */
  .steps,
  .cases,
  .author,
  .reviews,
  .final-cta { padding: 50px 0; }

  .section-title { font-size: clamp(18px, 5vw, 28px); margin-bottom: 16px; }
  .section-subtitle { font-size: 14px; margin-bottom: 24px; }

  /* Steps */
  .steps__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .steps__results {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .steps__card { padding: 20px 16px; }
  .steps__icon { width: 80px; height: 80px; }

  /* Cases */
  .cases__grid { gap: 16px; }
  .cases__desc { padding: 16px; font-size: 14px; min-height: auto; }

  /* Author */
  .author__quote { font-size: 16px; padding: 20px; }
  .author__name { font-size: 18px; }
  .author__cta-box { padding: 20px; }
  .author__cta-box h3 { font-size: 17px; }

  /* Reviews */
  .reviews__grid { grid-template-columns: 1fr; gap: 12px; }
  .reviews__item { max-height: none; }

  /* Final CTA */
  .final-cta__list li { font-size: 15px; padding-left: 20px; }
  .final-cta__list li::before { width: 10px; height: 10px; top: 12px; }

  /* CTA block */
  .cta-block { margin-top: 30px; }
  .cta-block__sub { font-size: 14px; }

  /* Player controls — mobile optimized */
  .player__controls {
    gap: 6px;
    padding: 8px 10px;
  }
  .player__btn { padding: 4px; min-width: 24px; min-height: 24px; }
  .player__btn svg { width: 16px; height: 16px; }
  .player__time { font-size: 10px; min-width: 65px; }
  .player__volume-input { display: none; }
  .player__btn--speed { font-size: 11px; min-width: 24px; }
  .player__progress { height: 4px; }
  .player__progress-input { height: 28px; top: -12px; }

  /* Big play button smaller on mobile */
  .player__big-play svg { width: 60px; height: 60px; }

  /* Analytics */
  .analytics-panel { padding: 20px 12px; }
  .analytics-panel h2 { font-size: 20px; }
  .analytics-panel__stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .stat-card { padding: 14px 10px; }
  .stat-card__value { font-size: 24px; }
  .stat-card__label { font-size: 12px; }
}

/* Small phones */
@media (max-width: 380px) {
  .btn { padding: 12px 20px; font-size: 13px; }
  .btn--large { padding: 14px 24px; font-size: 14px; }
  .hero__title { font-size: 17px; }
  .section-title { font-size: 17px; }
  .player__time { display: none; }
  .player__btn--rewind,
  .player__btn--forward { display: none; }
  .analytics-panel__stats {
    grid-template-columns: 1fr;
  }
}
