:root{
  --bg:#060a2b;
  --panel:#0b1348;
  --text:#fff;
  --muted:rgba(255,255,255,.75);
  --card:rgba(255,255,255,.08);
  --border:rgba(255,255,255,.14);
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial;
  background:radial-gradient(900px 500px at 50% 0%, #16206b 0%, var(--bg) 60%);
  color:var(--text);
  min-height:100vh;
}
.wrap{
  width:min(980px, 92vw);
  margin:40px auto;
}
h1{
  margin:0 0 6px;
  font-size:44px;
  text-align:center;
}
.sub{
  margin:0 0 22px;
  text-align:center;
  color:var(--muted);
}

.bar{
  display:flex;
  gap:12px;
  background:rgba(255,255,255,.06);
  border:1px solid var(--border);
  padding:14px;
  border-radius:16px;
  align-items:center;
}
.input,.select{
  height:48px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(0,0,0,.2);
  color:var(--text);
  padding:0 14px;
  outline:none;
}
.input{flex:1; min-width:220px;}
.select{width:170px;}

.btn{
  height:48px;
  border-radius:12px;
  border:0;
  padding:0 16px;
  cursor:pointer;
  background:#2d6bff;
  color:white;
  font-weight:700;
}
.btn.small{height:36px; border-radius:10px; padding:0 12px;}
.btn.ghost{background:transparent; border:1px solid var(--border);}

.status{
  margin:14px 2px 0;
  color:var(--muted);
  min-height:20px;
}

.results{margin-top:18px;}

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:16px;
  padding:16px;
}
.card + .card{margin-top:14px;}
.subject{font-size:18px; font-weight:800; margin-bottom:6px;}
.meta{display:flex; flex-wrap:wrap; gap:10px; color:var(--muted); font-size:13px;}
.snippet{margin:12px 0; color:rgba(255,255,255,.9);}
.actions{margin:10px 0;}
.body{
  margin-top:10px;
  background:rgba(0,0,0,.25);
  border:1px solid var(--border);
  border-radius:12px;
  padding:12px;
  overflow:auto;
}
.empty{padding:16px; color:var(--muted);}

.spinner{
  position:fixed; inset:0;
  background:rgba(0,0,0,.55);
  display:flex;
  align-items:center;
  justify-content:center;
}
.spinner-box{
  background:rgba(255,255,255,.08);
  border:1px solid var(--border);
  border-radius:16px;
  padding:18px 18px 14px;
  min-width:220px;
  text-align:center;
}
.loader{
  width:34px;height:34px;
  border-radius:50%;
  border:4px solid rgba(255,255,255,.25);
  border-top-color:white;
  margin:0 auto 10px;
  animation:spin 0.9s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}

@media (max-width:720px){
  h1{font-size:34px}
  .bar{flex-direction:column; align-items:stretch;}
  .select{width:100%}
  .btn{width:100%}
}
/* Video fondo */
.bg-video {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.bg-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25; /* transparencia elegante */
}

/* Colores dinámicos */
body.netflix-theme {
  background: linear-gradient(135deg, #8b0000, #1a0000);
}

body.universal-theme {
  background: linear-gradient(135deg, #ffcc00, #a67c00);
}

.platform-video{
  margin-top: 18px;
  width: 100%;
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.14);
  display: block; /* o none si lo ocultas hasta seleccionar */
}

.platform-video video{
  width: 100%;
  height: 550px;        /* altura controlada */
  object-fit: contain;  /* ✅ no recorta */
  background: #000;     /* relleno bonito */
  display: block;
}

@media (max-width:768px){
  .platform-video video{
    height: 200px;
  }
}

.mail-html {
  max-width: 100%;
  overflow: auto;
}

.mail-html img {
  max-width: 100%;
  height: auto;
}

.mail-text{
  white-space: pre-wrap;
  margin: 0;
}

/* En móvil más bajito */
@media (max-width: 768px){
  .platform-video video{
    max-height: 200px;
  }
}