/* ======================================================
   INDEX · FRIENDS · PRODUCCIÓN (NEGRO TOTAL)
   - UI dark glass (sin halos melocotón en el fondo)
   - Orbit perfecto (5 items) SIN depender de --i en HTML
   - Logo Friends más grande y presente
   - Botones con acento melocotón (solo en botones)
====================================================== */

/* =========================
   TOKENS
========================= */
:root{
  /* Fondo */
  --bg-main: #000000;
  --bg-2: #000000;

  /* Texto */
  --text: #ffffff;
  --text-soft: rgba(255,255,255,0.78);
  --text-muted: rgba(255,255,255,0.55);

  /* Glass */
  --glass-strong: rgba(0,0,0,0.62);
  --glass-soft: rgba(255,255,255,0.06);

  /* Melocotón (solo para acentos/botones) */
  --accent-1: #ffb07a;
  --accent-2: #ff6a4a;
  --accent-3: #ff3f8e;
  --accent: #ff6a4a;
  --accent-gradient: linear-gradient(135deg,var(--accent-1),var(--accent-2) 55%,var(--accent-3));

  /* Sombra melocotón */
  --accent-shadow: 0 8px 22px rgba(255, 122, 77, 0.45),
                   inset 0 0 0 1px rgba(255,255,255,0.18);

  /* Bordes */
  --stroke: rgba(255,255,255,0.12);
  --stroke-2: rgba(255,255,255,0.18);

  /* Radius */
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
}

/* ======================================================
   RESET
====================================================== */
*{ margin:0; padding:0; box-sizing:border-box; }
html, body{
  width:100%;
  height:100%;
  background: var(--bg-main);
  font-family:'Inter', sans-serif;
  color: var(--text);
}

/* ======================================================
   SCREEN (NEGRO, SIN HALOS MELOCOTÓN)
====================================================== */
.screen{
  min-height: 100dvh;
  display:flex;
  flex-direction:column;
  overflow:hidden;

  /* Fondo negro total (igual que feed.php) */
  background: #000;

  animation: screenIn .55s ease both;
}
@keyframes screenIn{
  from{ opacity:0; transform: translateY(10px); }
  to{ opacity:1; transform: translateY(0); }
}

/* ======================================================
   HEADER (LOGO MÁS GRANDE Y PRESENTE)
====================================================== */
.top-bar{
  display:flex;
  align-items:center;
  gap: 12px;
  padding: 16px 16px 10px;
}

.app-logo{
  height: 52px;
  max-width: 220px;
  width:auto;
  object-fit:contain;
  filter: drop-shadow(0 10px 22px rgba(0,0,0,0.55));
}

.title{
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .2px;
  flex: 1;
}

.dots{
  border:0;
  background: transparent;
  color: rgba(255,255,255,0.88);
  font-size: 22px;
  padding: 8px 10px;
  border-radius: 12px;
  cursor:pointer;
  transition: transform .12s ease, background .2s ease;
}
.dots:active{ transform: scale(.96); }
.dots:hover{ background: rgba(255,255,255,0.06); }

/* ======================================================
   RADAR (ORBITA PERFECTA)
====================================================== */
.radar-wrapper{
  flex: 1;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  padding: 10px 0;

  /* ✅ Baja el radar */
  margin-top: 38px;

  --orbit-size: 360px;
  --avatar-size: 56px;
  --orbit-radius: calc((var(--orbit-size) - var(--avatar-size)) / 2);
}

/* centro */
.radar-center{
  width: 170px;
  height: 170px;
  border-radius: 50%;
  overflow:hidden;
  z-index: 3;

  box-shadow:
    0 0 0 6px rgba(255,255,255,0.06),
    0 0 80px rgba(0,0,0,0.70);

  animation: floaty 3.8s ease-in-out infinite;
}
@keyframes floaty{
  0%,100%{ transform: translateY(0); }
  50%{ transform: translateY(-6px); }
}

.radar-center img{
  width:100%;
  height:100%;
  object-fit: cover;
}

/* órbita centrada */
.radar-orbit{
  position:absolute;
  top:50%;
  left:50%;
  width: var(--orbit-size);
  height: var(--orbit-size);
  border-radius:50%;
  z-index:2;

  animation: spinOrbit 26s linear infinite;
  /* Evita rasterización del conjunto (en iOS/Chrome puede emborronar las imágenes al rotar) */
  filter: none;
  will-change: transform;

  --n: 5; /* total de fotos */
}

/* fotos */
.radar-orbit img{
  position:absolute;
  top:50%;
  left:50%;
  width: var(--avatar-size);
  height: var(--avatar-size);
  border-radius:50%;
  object-fit: cover;

  box-shadow:
    0 0 0 3px rgba(255,255,255,0.12),
    0 14px 34px rgba(0,0,0,0.55);

  /* Forzamos composición GPU y evitamos blur por subpíxel al rotar */
  backface-visibility: hidden;
  transform:
    translate3d(-50%, -50%, 0)
    rotate(calc(var(--i) * (360deg / var(--n))))
    translate3d(var(--orbit-radius), 0, 0)
    rotate(calc(var(--i) * (-360deg / var(--n))));
  will-change: transform;

  animation: orbitPulse 2.6s ease-in-out infinite;
}

/* --i y --n los define el JS del radar (avatares dinámicos) */

@keyframes spinOrbit{
  from{ transform: translate(-50%, -50%) rotate(0deg); }
  to{ transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes orbitPulse{
  0%,100%{ opacity: .95; filter: saturate(1.02); }
  50%{ opacity: 1; filter: saturate(1.06); }
}

/* ======================================================
   TEXTO CENTRAL
====================================================== */
.content{
  text-align:center;
  padding: 12px 16px 22px;
}

.content h1{
  font-size: 42px;
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.5px;
  text-wrap: balance;
}

/* ======================================================
   CTA
====================================================== */
.cta{
  padding: 18px 16px 26px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: 14px;
}

.btn-primary{
  width:100%;
  height: 56px;
  border-radius: 18px;
  border: 0;
  background: var(--accent-gradient);
  color: #ffffff; /* blanco */
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .2px;
  cursor:pointer;
  box-shadow: var(--accent-shadow);
  transition: transform .12s ease, filter .2s ease;
}
.btn-primary:active{ transform: scale(.985); }
.btn-primary:hover{ filter: brightness(1.03); }

.cta-secondary{
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.80);
  text-align:center;
}

.cta-link{
  border:0;
  background: transparent;
  color:#fff;
  font-weight: 900;
  cursor:pointer;
  padding: 0 6px;
}
.cta-link:hover{ text-decoration: underline; }
.cta-link:disabled{
  opacity: .75;
  cursor: default;
  text-decoration: none;
}

/* ======================================================
   SHEETS (DARK GLASS)
====================================================== */
.sheet-overlay{
  position: fixed;
  inset:0;
  background: rgba(0,0,0,0.68);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity:0;
  pointer-events:none;
  transition: opacity 0.25s ease;
  z-index:50;
}

.bottom-sheet{
  position: fixed;
  left:0; right:0; bottom:0;

  background: rgba(10,10,12,0.92);
  color: var(--text);
  border-radius: 24px 24px 0 0;

  padding: 14px 16px 18px;
  transform: translateY(110%);
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  z-index:60;

  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.62);
}

.sheet-handle{
  width:44px;
  height:5px;
  border-radius: 10px;
  background: rgba(255,255,255,0.18);
  margin: 8px auto 14px;
}

/* ======================================================
   BOTÓN ICONO (ESQUINA SUPERIOR DERECHA EN SHEETS)
====================================================== */
.sheet-icon-btn{
  position:absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition: transform .12s ease, background .2s ease, border-color .2s ease;
}
.sheet-icon-btn:active{ transform: scale(.98); }
.sheet-icon-btn:hover{ background: rgba(255,255,255,0.08); }

/* ======================================================
   STEPS (RESET PASSWORD)
====================================================== */
.sheet-steps{
  display:flex;
  justify-content:center;
  gap: 8px;
  margin: 10px 0 14px;
}
.sheet-steps span{
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: rgba(255,255,255,0.16);
}
.sheet-steps span.active{
  background: var(--accent-gradient);
  box-shadow: var(--accent-shadow);
}

.rp-step{ display:none; }
.rp-step.active{ display:block; }

.rp-hint{
  margin: 10px 2px 0;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(255,255,255,0.78);
}

.rp-secondary{
  margin-top: -2px;
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.90);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: none;
}

.sheet-bottom-link{
  margin-top: 10px;
  text-align:center;
}

.bottom-sheet h2{
  font-size: 18px;
  font-weight: 900;
  text-align:center;
  margin-bottom: 4px;
}

.sheet-subtitle{
  font-size: 13px;
  color: var(--text-muted);
  text-align:center;
  margin-bottom: 14px;
}

.sheet-form{
  display:flex;
  flex-direction:column;
  gap: 10px;
  margin-bottom: 8px;
}

.sheet-form label{
  font-size: 12px;
  font-weight: 800;
  color: rgba(255,255,255,0.82);
}

.sheet-form input,
.sheet-form textarea{
  width:100%;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #fff;
  padding: 14px 14px;
  font-size: 14px;
  outline:none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.sheet-form textarea{
  resize:none;
  min-height: 110px;
  padding-top: 12px;
  line-height: 1.35;
}

.sheet-form input::placeholder,
.sheet-form textarea::placeholder{
  color: rgba(255,255,255,0.45);
}

.sheet-form input:focus,
.sheet-form textarea:focus{
  border-color: rgba(255,106,74,0.55);
  box-shadow: 0 0 0 4px rgba(255,106,74,0.16);
  background: rgba(255,255,255,0.08);
}

.sheet-btn{
  width:100%;
  height:54px;
  border-radius: 18px;
  border:0;
  cursor:pointer;
  font-weight: 900;
  letter-spacing: .2px;
  transition: transform .12s ease, filter .2s ease, opacity .2s ease;
}

.sheet-btn-accent{
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: var(--accent-shadow);
}

.sheet-btn:active{ transform: scale(.985); }
.sheet-btn:disabled{ opacity: .65; cursor: not-allowed; }

.form-message{
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.35;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.86);
}
.form-message.success{
  border-color: rgba(120,255,190,0.26);
  background: rgba(120,255,190,0.10);
}
.form-message.error{
  border-color: rgba(255,106,74,0.35);
  background: rgba(255,106,74,0.12);
}

/* Estado activo */
.sheet-open .sheet-overlay{
  opacity:1;
  pointer-events:auto;
}
.sheet-open .bottom-sheet.sheet-active{
  transform: translateY(0);
}


/* ======================================================
   DESKTOP
====================================================== */
@media (min-width: 900px){
  .radar-wrapper{
    --orbit-size: 500px;
    --avatar-size: 64px;
  }

  .radar-center{
    width: 210px;
    height: 210px;
  }

  .content h1{ font-size: 72px; }

  .cta{
    padding-bottom: 40px;
    max-width: 520px;
    margin: 0 auto;
  }

  .app-logo{
    height: 44px;
    max-width: 200px;
  }
}

/* ======================================================
   BLOQUEO TOTAL DE IMÁGENES (ANTI COPIA / ANTI DRAG)
====================================================== */
img{
  -webkit-user-drag:none;
  -webkit-touch-callout:none;
  user-select:none;
  -webkit-user-select:none;
  -moz-user-select:none;
  -ms-user-select:none;
  pointer-events:none;
}
.app-logo,
.radar-center img,
.radar-orbit img{
  pointer-events:none;
  user-select:none;
  -webkit-user-drag:none;
}
#rotating-text{
  white-space: pre-line;
}
