/* ==========================================================================
   prelander.css — full-screen video chat roulette
   ========================================================================== */

:root {
  --pink: #ff2d55;
  --orange: #ff8c00;
  --green: #34c759;
  --shadow: 0 4px 20px rgba(255, 45, 85, .4);
}

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

html, body {
  height: 100%;
  width: 100%;
  background: #000;
  color: #fff;
  font-family: 'Roboto', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #000;
}

.stage__video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background: linear-gradient(to top,
              rgba(0, 0, 0, .65) 0%,
              rgba(0, 0, 0, 0) 35%,
              rgba(0, 0, 0, 0) 65%,
              rgba(0, 0, 0, .55) 100%);
}

/* ---------- header ---------- */

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .6);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.2px;
}

.brand__mark {
  color: var(--pink);
  animation: beat 1.6s ease-in-out infinite;
}

.online {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, .14);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  white-space: nowrap;
}

.online__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: ping 2s infinite;
}

/* ---------- girl card ---------- */

.peer {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .38);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  max-width: 78%;
}

.peer__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--pink);
  flex: 0 0 auto;
}

.peer__name { font-size: 14px; font-weight: 700; line-height: 1.2; }
.peer__meta { font-size: 12px; opacity: .8; line-height: 1.3; }

/* ---------- bottom controls ---------- */

.bottom { display: flex; flex-direction: column; gap: 14px; }

.typing {
  align-self: center;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  background: rgba(0, 0, 0, .45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s ease, transform .3s ease;
}

.typing.is-visible { opacity: 1; transform: translateY(0); }

.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding-bottom: 8px;
}

.btn {
  flex: 1 1 0;
  max-width: 220px;
  padding: 15px 18px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: transform .2s ease, background-color .2s ease;
}

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

.btn--ghost {
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.btn--primary {
  background: linear-gradient(45deg, var(--pink), var(--orange));
  box-shadow: var(--shadow);
  animation: pulse 2.2s infinite;
}

/* ---------- connecting state ---------- */

.connecting {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}

.connecting.is-visible { opacity: 1; visibility: visible; }

.connecting__ring {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .2);
  border-top-color: var(--pink);
  animation: spin 1s linear infinite;
}

.connecting__text { font-size: 15px; font-weight: 600; letter-spacing: .2px; }

/* ---------- invite popup ---------- */

.popup-layer {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s ease, visibility .4s ease;
}

.popup-layer.is-visible { opacity: 1; visibility: visible; }

.popup {
  width: 100%;
  max-width: 380px;
  padding: 28px 24px;
  text-align: center;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: linear-gradient(145deg, rgba(42, 42, 42, .92), rgba(18, 18, 18, .95));
  box-shadow: 0 10px 34px rgba(0, 0, 0, .55);
  transform: scale(.9);
  transition: transform .45s cubic-bezier(.175, .885, .32, 1.275);
}

.popup-layer.is-visible .popup { transform: scale(1); }

.popup__icon { font-size: 46px; margin-bottom: 12px; animation: beat 2s infinite ease-in-out; }
.popup__title { font-size: 23px; font-weight: 800; line-height: 1.3; margin-bottom: 10px; }
.popup__text { font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, .8); margin-bottom: 22px; }

.popup__cta {
  display: block;
  width: 100%;
  padding: 16px;
  border: 0;
  border-radius: 16px;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  background: linear-gradient(45deg, var(--pink), var(--orange));
  box-shadow: var(--shadow);
  animation: pulse 2.2s infinite;
}

.popup__note { margin-top: 14px; font-size: 12px; color: rgba(255, 255, 255, .55); }

/* ---------- animations ---------- */

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

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}

@keyframes ping {
  0%   { box-shadow: 0 0 0 0 rgba(52, 199, 89, .7); }
  70%  { box-shadow: 0 0 0 10px rgba(52, 199, 89, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0); }
}

@keyframes beat {
  0%, 28%, 70% { transform: scale(1); }
  14%, 42%     { transform: scale(1.28); }
}

/* ---------- responsive ---------- */

@media (max-width: 360px) {
  .brand { font-size: 17px; }
  .online { font-size: 12px; padding: 6px 10px; }
  .btn { font-size: 15px; padding: 13px 14px; }
  .popup__title { font-size: 21px; }
  .popup__text { font-size: 14px; }
}

@media (min-width: 900px) {
  .stage__video { width: auto; height: 100%; }
  .overlay { max-width: 520px; margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
