/* =========================
   BASE
========================= */

:root{
  --bg:#0a0a12;
  --card:#14141f;
  --card2:#101018;
  --line:rgba(182,108,255,.18);
  --glow:rgba(160,0,255,.22);
  --accent:#b66cff;
  --cyan:#00e5ff;
  --btn:#6c3cff;
  --btnRed:#ff0033;
}

*,
*::before,
*::after{ box-sizing:border-box; }

html,body{ height:100%; }

body{
  margin:0;
  font-family: Arial, sans-serif;
  background:var(--bg);
  color:#fff;
  -webkit-text-size-adjust:100%; /* iOS Safari */
}

/* Evita desbordes raros en Safari */
img, video{ max-width:100%; height:auto; }
button, input, select, textarea{ font:inherit; }

/* =========================
   HEADER (entero, sin recorte)
========================= */

.header{
  width:100%;
  background:#000;
  padding:15px 0;
  display:flex;
  justify-content:center;
  align-items:center;
}

.header img{
  width:100%;
  max-width:1400px;
  height:auto;
  object-fit:contain;
  display:block;
}

/* =========================
   LAYOUT
========================= */

.container{
  width:95%;
  max-width:1100px;
  margin:0 auto;
}

h1{
  text-align:center;
  color:var(--accent);
  margin:22px 0 18px;
  letter-spacing:.5px;
}

/* =========================
   SELECTOR
========================= */

.selector-pro{
  background:var(--card);
  border-radius:14px;
  padding:14px;
  border:1px solid rgba(182,108,255,.25);
  box-shadow:0 0 18px rgba(160,0,255,.18);
  margin:0 auto 16px;
  max-width:900px;
}

.selector-pro label{
  display:block;
  margin-bottom:8px;
  color:var(--accent);
  font-weight:bold;
  text-align:center;
}

.selector-pro select{
  width:100%;
  padding:12px 14px;
  border-radius:12px;
  background:#0f0f18;
  color:#fff;
  border:1px solid rgba(182,108,255,.35);
  font-size:16px; /* iOS Safari: evita zoom */
  outline:none;
  appearance:none;
  -webkit-appearance:none;
}

/* =========================
   PLAYER
========================= */

.player{
  background:var(--card);
  border:1px solid rgba(182,108,255,.15);
  border-radius:14px;
  padding:12px;
  box-shadow:0 0 18px rgba(160,0,255,.25);
  margin:0 auto 18px;
  max-width:900px;
}

.player-frame{
  width:100%;
  background:#000;
  border-radius:12px;
  overflow:hidden;
}

/* Aspect-ratio fallback por si acaso */
.player-frame::before{
  content:"";
  display:block;
  padding-top:56.25%; /* 16:9 */
}

.player-frame iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
  display:block;
}

/* Necesario para el fallback */
.player-frame{ position:relative; }

.player-title{
  margin-top:10px;
  font-weight:bold;
  line-height:1.25;
  text-align:center;
}

/* BOTONES */
.video-actions{
  display:flex;
  gap:12px;
  margin-top:12px;
  justify-content:center;
  flex-wrap:wrap;
}

.btn-sub,
.btn-like{
  padding:10px 16px;
  border-radius:12px;
  font-weight:bold;
  text-decoration:none;
  border:1px solid rgba(255,255,255,.12);
  box-shadow:0 0 12px rgba(160,0,255,.15);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:1;
}

.btn-sub{ background:var(--btnRed); color:#fff; }
.btn-like{ background:var(--btn); color:#fff; }

/* DESCRIPCIÓN */
.video-desc{
  margin-top:12px;
  background:var(--card2);
  border:1px solid rgba(182,108,255,.15);
  border-radius:12px;
  padding:14px;
  line-height:1.55;
  box-shadow:0 0 12px rgba(160,0,255,.12);
  opacity:.95;
}

/* =========================
   NETFLIX ROW
========================= */

.row-title{
  max-width:1100px;
  margin:16px auto 10px;
  color:var(--accent);
  font-size:18px;
  letter-spacing:.3px;
}

.netflix-row{
  display:flex;
  gap:12px;
  overflow-x:auto;
  padding:10px 4px 18px;
  scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch;
}

.netflix-row::-webkit-scrollbar{ height:8px; }
.netflix-row::-webkit-scrollbar-thumb{
  background:rgba(182,108,255,.25);
  border-radius:10px;
}

.nf-card{
  flex:0 0 auto;
  width:240px;
  border:0;
  padding:0;
  background:transparent;
  color:inherit;
  text-align:left;
  cursor:pointer;
  scroll-snap-align:start;
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 0 14px rgba(160,0,255,.18);
  transition:.22s;
  outline:none;
}

.nf-card:hover{
  transform:translateY(-3px) scale(1.02);
  box-shadow:0 0 22px rgba(160,0,255,.35);
}

.nf-card.is-active{
  box-shadow:0 0 0 2px rgba(0,229,255,.8), 0 0 22px rgba(160,0,255,.35);
}

.nf-thumb{
  width:100%;
  background:#000;
  display:block;
  object-fit:cover;
  /* Safari fallback del aspect-ratio: */
  height:auto;
}

.nf-meta{
  background:var(--card);
  padding:10px;
  border-top:1px solid rgba(182,108,255,.12);
}

.nf-name{
  font-size:13px;
  font-weight:bold;
  line-height:1.25;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

/* =========================
   FORM COLABORACIONES (Safari FIX)
========================= */

.contact-card{
  width:100%;
  max-width:900px;
  margin:18px auto 60px;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:16px;
  padding:16px;
  box-shadow:0 0 18px rgba(160,0,255,.18);
  overflow:hidden; /* evita desbordes en Safari */
}

.contact-card .row-title{ margin:0 0 10px; }

.contact-sub{
  opacity:.9;
  line-height:1.55;
  margin:0 0 12px;
}

.msg{
  border-radius:12px;
  padding:12px 14px;
  margin:10px 0 14px;
  border:1px solid rgba(255,255,255,.12);
}
.msg.ok{ background:rgba(0,229,255,.08); }
.msg.err{ background:rgba(255,0,51,.10); }

.contact-form{
  width:100%;
}

.contact-form label{
  display:block;
  margin:10px 0 6px;
  font-weight:bold;
  color:var(--accent);
  word-wrap:break-word;
}

/* IMPORTANTÍSIMO para Safari: min-width:0 en hijos de grid */
.grid2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
  width:100%;
}
.grid2 > *{ min-width:0; }

.contact-form input,
.contact-form textarea{
  width:100%;
  max-width:100%;
  display:block;
  padding:12px 14px;
  border-radius:12px;
  background:#0f0f18;
  color:#fff;
  border:1px solid rgba(182,108,255,.25);
  outline:none;
  font-size:16px; /* evita zoom iOS */
  -webkit-appearance:none;
  appearance:none;
}

.contact-form textarea{ resize:vertical; }

.contact-form input:focus,
.contact-form textarea:focus{
  border-color:rgba(0,229,255,.55);
  box-shadow:0 0 0 3px rgba(0,229,255,.10);
}

/* ✅ CHECKBOX Safari/iOS FIX */
.check{
  display:flex;
  gap:12px;
  align-items:flex-start;
  margin-top:12px;
  line-height:1.35;
  user-select:none;
}

/* el input real */
.check input[type="checkbox"]{
  width:20px;
  height:20px;
  margin:2px 0 0;
  flex:0 0 20px;
  cursor:pointer;

  /* Safari friendly */
  -webkit-appearance:auto;
  appearance:auto;

  accent-color:#6c3cff; /* si Safari lo soporta, genial */
}

/* texto clicable */
.check .check-text{
  flex:1;
  cursor:pointer;
  display:block;
  color:#fff;
  opacity:.92;
}

.check .check-text a{
  color:#00e5ff;
  text-decoration:underline;
}

.btn-send{
  margin-top:12px;
  width:100%;
  padding:12px 16px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:var(--btn);
  color:#fff;
  font-weight:bold;
  cursor:pointer;
  box-shadow:0 0 14px rgba(160,0,255,.22);
  transition:.22s;
}

.btn-send:hover{
  transform:translateY(-2px);
  box-shadow:0 0 26px rgba(160,0,255,.45);
}

.contact-foot{
  margin:14px 0 0;
  opacity:.85;
  text-align:center;
}

.hp{ display:none !important; }

/* =========================
   FOOTER
========================= */

.footer-pro{
  width:100%;
  display:flex;
  justify-content:center;
  align-items:center;
  margin:60px 0 40px;
}

.footer-link{
  display:inline-block;
  color:var(--cyan);
  text-decoration:none;
  font-weight:bold;
  padding:12px 20px;
  border-radius:12px;
  border:1px solid rgba(182,108,255,.35);
  background:var(--card);
  box-shadow:0 0 14px rgba(160,0,255,.20);
  transition:.25s;
}

.footer-link:hover{
  transform:translateY(-2px);
  box-shadow:0 0 26px rgba(160,0,255,.45);
}

/* =========================
   LEGAL
========================= */

.legal-card{
  background:var(--card);
  border:1px solid rgba(182,108,255,.15);
  border-radius:14px;
  padding:18px;
  box-shadow:0 0 18px rgba(160,0,255,.18);
  margin:18px auto 40px;
  max-width:900px;
}

.legal-card h1{
  margin-top:0;
  text-align:center;
}

.legal-card h2{
  color:var(--accent);
  margin:18px 0 8px;
}

.legal-card p{
  line-height:1.65;
  opacity:.95;
}

/* =========================
   MOBILE
========================= */

@media (max-width:700px){

  .container{ width:94%; }

  h1{
    font-size:20px;
    margin:18px 0 14px;
  }

  .header{ padding:8px 0; }

  .player{
    max-width:100%;
    padding:10px;
    border-radius:12px;
  }

  .player-title{ font-size:15px; }

  .selector-pro{
    max-width:100%;
    padding:12px;
    border-radius:12px;
  }

  .video-desc{
    font-size:14px;
    line-height:1.5;
  }

  .btn-sub,
  .btn-like{
    width:100%;
    text-align:center;
    font-size:15px;
  }

  .video-actions{ gap:10px; }

  .footer-link{
    width:90%;
    text-align:center;
  }

  .nf-card{ width:190px; }
  .row-title{ font-size:16px; }

  .grid2{ grid-template-columns:1fr; }

  .contact-card{ padding:14px; }
}