/* ============================
   MoviMagic • Canales (PRO)
   chstyle.css
   ============================ */

:root{
  --bg:#0b0b0b;
  --panel:#121212;
  --card:#171717;
  --card2:#1b1b1b;
  --border:#2a2a2a;
  --muted:#bdbdbd;
  --text:#ffffff;

  --orange:#FF6A00;
  --orange2:#ff7f2a;

  --ok:#00ff88;
  --bad:#ff3b3b;

  --shadow: 0 18px 40px rgba(0,0,0,.45);
  --glow: 0 0 18px rgba(255,106,0,.12);
}

*{ box-sizing:border-box; }
html, body{ height:100%; }

body{
  margin:0;
  font-family: Arial, sans-serif;
  background:
    radial-gradient(1200px 600px at 20% 0%, rgba(255,106,0,.12), transparent 60%),
    radial-gradient(900px 400px at 90% 10%, rgba(255,106,0,.10), transparent 55%),
    linear-gradient(#090909, #0b0b0b);
  color:var(--text);
}

a{ color:inherit; }

/* ===== Layout ===== */
.container{
  max-width: 980px;
  margin: 28px auto;
  padding: 0 16px 40px;
}

/* ===== Topbar (estilo dashboard) ===== */
.header{
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 0 18px;
  padding: 14px 14px;

  background: rgba(12,12,12,.78);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);

  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 14px;
}

.brand{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width: 0;
}

.brand h1{
  margin:0;
  font-size: 22px;
  letter-spacing: .2px;
  color: var(--orange);
  display:flex;
  align-items:center;
  gap:10px;
  line-height: 1.1;
}

.brand .muted{
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}

.top-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex: 0 0 auto;
}

/* Botón volver (bien ubicado, no tapa) */
.top-actions .btn{
  position: static !important;
}

/* ===== Cards ===== */
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.03), transparent 55%),
              var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--glow);
}

.card h2{
  margin: 0 0 12px;
  font-size: 16px;
  display:flex;
  align-items:center;
  gap:10px;
}

.muted{ color: var(--muted); }

/* ===== Info badges (estado) ===== */
.whoami{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.badge{
  border: 1px solid var(--border);
  background: rgba(0,0,0,.28);
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
}

/* status messages */
.status{
  margin-top: 12px;
  min-height: 18px;
  font-size: 13px;
  color: var(--muted);
}

/* ===== Form layout ===== */
label{
  display:block;
  margin: 10px 0 6px;
  font-size: 12px;
  color: var(--muted);
}

input{
  width:100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.06);
  color: var(--text);
}

input:focus{
  outline: none;
  border-color: rgba(255,106,0,.55);
  box-shadow: 0 0 0 3px rgba(255,106,0,.18);
}

.grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.full{ grid-column: 1 / -1; }

.row{
  display:flex;
  gap:12px;
  align-items:flex-end;
  flex-wrap:wrap;
}

.col{ flex:1; min-width: 220px; }

.col.buttons{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  flex: 0 0 auto;
  min-width: 240px;
}

.hint{
  margin: 10px 0 0;
  font-size: 12.5px;
}

/* ===== Preview ===== */
.preview{
  margin-top: 14px;
  display:flex;
  align-items:center;
  gap: 14px;
  flex-wrap:wrap;
}

#channelId{
  color: #fff;
  font-weight: 700;
}

#idMode{
  margin-left: 8px;
  font-size: 12px;
  color: var(--muted);
}

#logoPreview{
  width: 84px;
  height: 84px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.28);
  object-fit: cover;
  display:none;
}

/* ===== Buttons (XUI-ish) ===== */
.actions{
  margin-top: 16px;
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
}

.btn{
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.06);
  color: #fff;

  padding: 10px 14px;
  border-radius: 12px;
  cursor:pointer;
  font-weight: 700;
  text-decoration:none;

  display:inline-flex;
  align-items:center;
  gap: 8px;
  transition: transform .12s ease, filter .12s ease, background .12s ease, border-color .12s ease;
}

.btn:hover{
  filter: brightness(1.08);
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.14);
}

.btn:active{ transform: translateY(0px); }

.btn-primary{
  background: linear-gradient(180deg, var(--orange2), var(--orange));
  border-color: rgba(255,106,0,.45);
}

.btn-secondary{
  background: rgba(255,255,255,.06);
}

.btn-danger{
  background: linear-gradient(180deg, #ff5a5a, var(--bad));
  border-color: rgba(255,59,59,.55);
}

.btn:disabled{
  opacity: .5;
  cursor: not-allowed;
  transform:none;
}

/* ===== Responsive ===== */
@media (max-width: 720px){
  .grid{ grid-template-columns: 1fr; }
  .col.buttons{ width:100%; justify-content: stretch; }
  .col.buttons .btn{ flex:1; justify-content:center; }
  .header{ flex-direction: column; align-items: stretch; }
  .top-actions{ justify-content:flex-end; }
}