:root{
  --bg:#0b1220;
  --panel:#111a2b;
  --card:#141f33;
  --card2:#101a2a;
  --text:#ffffff;
  --muted:rgba(255,255,255,.65);
  --muted2:rgba(255,255,255,.45);
  --border:rgba(255,255,255,.10);

  /* MoviMagic vibe */
  --accent:#ff7a00;
  --accent2:#ff9a3d;

  --good:#22c55e;
  --bad:#ef4444;
  --info:#60a5fa;
}

*{ box-sizing:border-box; }

body{
  margin:0;
  font-family:'Roboto', sans-serif;
  background:
    radial-gradient(1200px 800px at 20% 0%, rgba(255,122,0,.14), transparent 60%),
    radial-gradient(900px 700px at 80% 10%, rgba(96,165,250,.12), transparent 60%),
    var(--bg);
  color:var(--text);
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}

.dashboard{
  width:min(1250px, 100%);
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border:1px solid var(--border);
  border-radius:16px;
  overflow:hidden;
  box-shadow:0 30px 70px rgba(0,0,0,.55);
}

.header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:18px 20px;
  background:linear-gradient(90deg, rgba(255,122,0,.18), rgba(96,165,250,.10));
  border-bottom:1px solid var(--border);
}

.brand{
  display:flex;
  gap:12px;
  align-items:center;
}
.brand-dot{
  width:10px;
  height:10px;
  border-radius:50%;
  background:var(--accent);
  box-shadow:0 0 0 6px rgba(255,122,0,.15);
}
.brand-text h1{
  margin:0;
  font-size:18px;
  letter-spacing:.2px;
}
.brand-text p{
  margin:2px 0 0 0;
  font-size:12px;
  color:var(--muted);
}

.pill{
  padding:10px 12px;
  border-radius:999px;
  border:1px solid var(--border);
  color:var(--muted);
  background:rgba(0,0,0,.22);
  font-size:12px;
}

.content{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:16px;
  padding:16px;
}

.card{
  background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.02));
  border:1px solid var(--border);
  border-radius:14px;
  padding:16px;
}

.card-title h2{
  margin:0;
  font-size:16px;
}
.card-title p{
  margin:6px 0 0 0;
  font-size:12px;
  color:var(--muted);
}

.form-grid{
  display:grid;
  gap:14px;
  margin-top:14px;
}

.field label{
  display:block;
  margin-bottom:8px;
  font-weight:600;
  font-size:13px;
}
.field small{
  display:block;
  margin-top:7px;
  color:var(--muted2);
  font-size:12px;
  line-height:1.35;
}

.row{
  display:flex;
  gap:10px;
  align-items:center;
}

input, select, textarea{
  width:100%;
  padding:12px 12px;
  border-radius:10px;
  border:1px solid var(--border);
  background:rgba(0,0,0,.18);
  color:var(--text);
  outline:none;
  transition: border-color .18s, box-shadow .18s, transform .06s;
}

textarea{
  resize:vertical;
  min-height:110px;
  line-height:1.45;
}

select{
  min-height:150px;
}

input:focus, select:focus, textarea:focus{
  border-color: rgba(255,122,0,.55);
  box-shadow:0 0 0 4px rgba(255,122,0,.18);
}

/* Radios (Modo TMDb/Manual) */
.radios{
  gap:12px;
  flex-wrap:wrap;
}

.radio{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.05);
  cursor:pointer;
  user-select:none;
}

.radio input{
  width:auto;
  padding:0;
  margin:0;
  accent-color: var(--accent);
}

.radio span{
  font-size:13px;
  color:rgba(255,255,255,.92);
}

.manual-box{
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(255,122,0,.28);
  background:rgba(255,122,0,.06);
}

.btn{
  width:100%;
  border:none;
  padding:12px 14px;
  border-radius:12px;
  cursor:pointer;
  font-weight:700;
  letter-spacing:.2px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  transition: transform .06s, opacity .15s, box-shadow .15s;
}

.btn:active{ transform: scale(.99); }

.btn-primary{
  background:linear-gradient(90deg, var(--accent), var(--accent2));
  color:#0a0f1a;
  box-shadow:0 12px 25px rgba(255,122,0,.20);
}

.btn-secondary{
  background:rgba(96,165,250,.18);
  border:1px solid rgba(96,165,250,.32);
  color:var(--text);
}

.btn-ghost{
  background:rgba(255,255,255,.06);
  border:1px solid var(--border);
  color:var(--text);
}

.btn-danger{
  background:rgba(239,68,68,.16);
  border:1px solid rgba(239,68,68,.35);
  color:var(--text);
}

.btn:disabled{
  opacity:.55;
  cursor:not-allowed;
}

.btn-spinner{
  width:16px;
  height:16px;
  border-radius:50%;
  border:2px solid rgba(0,0,0,.25);
  border-top-color: rgba(0,0,0,.75);
  display:none;
  animation: spin .7s linear infinite;
}

.loading .btn-spinner{ display:block; }

@keyframes spin { to { transform: rotate(360deg); } }

.right-column{
  display:grid;
  gap:16px;
}

.preview-card{
  padding:0;
  overflow:hidden;
}

.preview-hero{
  position:relative;
  min-height:320px;
  background: linear-gradient(180deg, rgba(0,0,0,.2), rgba(0,0,0,.78));
}

.preview-hero.has-bg{
  background-size:cover;
  background-position:center;
}

.preview-overlay{
  position:absolute;
  inset:0;
  background:linear-gradient(90deg, rgba(0,0,0,.86), rgba(0,0,0,.55) 55%, rgba(0,0,0,.88));
}

.preview-content{
  position:relative;
  z-index:2;
  display:flex;
  gap:14px;
  padding:16px;
  align-items:flex-start;
}

.poster{
  width:120px;
  height:180px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.06);
  flex:0 0 auto;
  background-size:cover;
  background-position:center;
  box-shadow:0 12px 30px rgba(0,0,0,.5);
}

.meta h3{
  margin:0;
  font-size:16px;
}
.meta .sub{
  margin:6px 0 10px 0;
  color:var(--muted);
  font-size:12px;
}
.meta-row{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:10px;
}

.badge{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.06);
  color:var(--text);
}

.overview{
  margin:0;
  color:rgba(255,255,255,.80);
  font-size:12.5px;
  line-height:1.45;
  max-height:90px;
  overflow:hidden;
}

.actions{
  display:grid;
  gap:10px;
  margin-top:14px;
}

.message{
  margin-top:14px;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(0,0,0,.22);
  color:var(--muted);
  min-height:44px;
  display:flex;
  align-items:center;
}

.message.good{
  border-color:rgba(34,197,94,.35);
  background:rgba(34,197,94,.10);
  color:#c8f7d8;
}
.message.bad{
  border-color:rgba(239,68,68,.35);
  background:rgba(239,68,68,.10);
  color:#ffd0d0;
}
.message.info{
  border-color:rgba(96,165,250,.35);
  background:rgba(96,165,250,.10);
  color:#d7ebff;
}

.chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}
.chip{
  padding:7px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(255,122,0,.10);
  color:rgba(255,255,255,.92);
  font-size:12px;
}

.footer{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  border-top:1px solid var(--border);
  color:var(--muted);
  font-size:12px;
}

.dim{ color:var(--muted2); }

@media (max-width: 920px){
  .content{
    grid-template-columns: 1fr;
  }
  .poster{
    width:110px;
    height:165px;
  }
}

@media (max-width: 520px){
  body{ padding:14px; }
  .footer{ flex-direction:column; }
  select{ min-height:180px; }
}
