/* ═══════════════════════════════════════════════════════════════
   FORJA DE ÓRBITAS · STYLE.CSS
   Estilo cómic épico: Marvel · DC · Anime · Disney · VibraOS
═══════════════════════════════════════════════════════════════ */

:root{
  --panel: rgba(255,255,255,.04);
  --border: rgba(255,255,255,.08);
  --accent: #ffd700;
  --accent2: #ffb800;
}

/* TYPOGRAPHY */
textarea{ resize: vertical; }
.code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
}

/* ── CAPÍTULO CARD — estilo panel de cómic ── */
.chapter-card{
  border: 2px solid var(--border);
  background: rgba(4,1,14,.7);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  transition: border-color .3s;
}
.chapter-card:hover{
  border-color: rgba(255,255,255,.16);
}
/* Número de capítulo fantasma — splash page style */
.chap-num-ghost{
  font-family: 'Bangers', cursive;
  font-size: 7rem;
  color: rgba(255,255,255,.025);
  position: absolute;
  top: -12px;
  right: 10px;
  line-height: 1;
  pointer-events: none;
  letter-spacing: .02em;
  user-select: none;
}
/* Barra de color superior por universo */
.chapter-card::before{
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2), transparent);
}
.chap-head{
  padding: 10px 14px 10px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, var(--panel-glow, rgba(255,215,0,.04)), transparent);
}
.chap-label{
  font-family: 'Bebas Neue', 'Bangers', cursive;
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--accent);
  text-transform: uppercase;
  opacity: .75;
}
.chap-body{
  padding: 12px 14px;
}

/* ── ESCENA CARD ── */
.scene-card{
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.02);
  padding: 12px;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
  transition: border-color .15s, background .15s;
}
.scene-card:hover{
  border-color: rgba(255,255,255,.1);
  background: rgba(255,255,255,.03);
}
/* Barra lateral de color */
.scene-card::before{
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), transparent);
}
.scene-num{
  font-family: 'Bangers', cursive;
  font-size: 9px;
  letter-spacing: .12em;
  color: var(--accent);
  text-transform: uppercase;
  opacity: .65;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.scene-num::after{
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: .3;
}

/* Input de escena */
.scene-card input,
.scene-card textarea{
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.07);
  color: rgba(255,255,255,.92);
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  padding: 8px 10px;
  width: 100%;
  outline: none;
  transition: border-color .15s;
}
.scene-card input:focus,
.scene-card textarea:focus{
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 8%, transparent);
}
.scene-card input::placeholder,
.scene-card textarea::placeholder{
  color: rgba(255,255,255,.25);
}

/* PROMPT TEXTAREA — estilo terminal */
.scene-card textarea.code{
  background: rgba(0,0,0,.5);
  border-color: rgba(255,255,255,.05);
  font-family: ui-monospace, 'Space Mono', monospace;
  font-size: 11px;
  line-height: 1.6;
  color: rgba(200,200,255,.8);
}
.scene-card textarea.code:focus{
  border-color: rgba(129,140,248,.5);
}

/* LABEL DE CAMPO dentro de escena */
.scene-card .field-label{
  font-family: 'Space Mono', monospace;
  font-size: 7.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.28);
  display: block;
  margin-bottom: 4px;
  margin-top: 10px;
}
.scene-card .field-label:first-child{ margin-top: 0; }

/* GRID DE IMAGEN + PROMPT */
.scene-img-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}
@media(max-width:640px){ .scene-img-grid{ grid-template-columns: 1fr; } }

/* PREVIEW IMAGEN */
.scene-preview{
  width: 100%;
  border: 1px solid rgba(255,255,255,.1);
  display: block;
  max-height: 180px;
  object-fit: cover;
  margin-top: 8px;
}
.scene-no-img{
  margin-top: 8px;
  padding: 12px;
  border: 1px dashed rgba(255,255,255,.08);
  font-family: 'Space Mono', monospace;
  font-size: 7.5px;
  color: rgba(255,255,255,.2);
  text-align: center;
  letter-spacing: .08em;
  line-height: 1.7;
}

/* BOTONES INLINE DE ESCENA */
.scene-btn-row{
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.scene-btn{
  font-family: 'Space Mono', monospace;
  font-size: 7.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.45);
  cursor: pointer;
  transition: all .15s;
}
.scene-btn:hover{ background: rgba(255,255,255,.1); color: rgba(255,255,255,.9); }
.scene-btn.sky{
  border-color: rgba(56,189,248,.25);
  background: rgba(56,189,248,.06);
  color: rgba(125,211,252,.8);
}
.scene-btn.sky:hover{ background: rgba(56,189,248,.14); }
.scene-btn.danger{
  border-color: rgba(239,68,68,.2);
  background: rgba(239,68,68,.04);
  color: rgba(252,165,165,.7);
}
.scene-btn.danger:hover{ background: rgba(239,68,68,.1); }

/* BOTÓN + ESCENA */
.add-scene-btn{
  width: 100%;
  padding: 8px;
  border: 1px dashed rgba(255,255,255,.1);
  background: transparent;
  color: rgba(255,255,255,.3);
  font-family: 'Space Mono', monospace;
  font-size: 8px;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .15s;
  margin-top: 8px;
}
.add-scene-btn:hover{
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 4%, transparent);
}

/* ── TEMA DINÁMICO por universo — se aplica vía JS ── */
/* Los colores cambian vía CSS variables en :root */
