/* BlackFlame Studios — negro, naranja y rojo */
:root {
  --bg: #0a0807;
  --bg-2: #120d0b;
  --panel: #171110;
  --panel-2: #1f1715;
  --line: rgba(255, 106, 26, 0.18);
  --line-strong: rgba(255, 106, 26, 0.45);
  --text: #f3ebe6;
  --muted: #a89a92;
  --orange: #ff6a1a;
  --amber: #ff9a2e;
  --red: #e0261b;
  --deep-red: #8f1410;
  --flame: linear-gradient(135deg, #ff9a2e 0%, #ff5a14 45%, #d7251a 100%);
  --radius: 14px;
  --font-display: 'Bebas Neue', 'Oswald', Impact, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(224, 38, 27, 0.16), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(255, 106, 26, 0.10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: var(--amber); text-decoration: none; }
a:hover { color: var(--orange); }
img { max-width: 100%; display: block; }
::selection { background: var(--orange); color: #000; }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.05;
  text-transform: uppercase;
}
h1 { font-size: clamp(3rem, 9vw, 6.5rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
h3 { font-size: 1.5rem; }
.eyebrow {
  font-size: 0.78rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--orange); font-weight: 600;
}
.muted { color: var(--muted); }
.gradient-text {
  background: var(--flame); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}

.container { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-head { margin-bottom: 2rem; }
.section-head p { color: var(--muted); max-width: 60ch; margin-top: .6rem; }

/* ---------- cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 8, 7, 0.82); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--text); }
.brand:hover { color: var(--text); }
.brand svg { width: 30px; height: 36px; flex: none; }
.brand .name { font-family: var(--font-display); font-size: 1.55rem; letter-spacing: .08em; line-height: 1; }
.brand .name small { display: block; font-family: var(--font-body); font-size: .58rem; letter-spacing: .42em; color: var(--orange); margin-top: 3px; }
.nav-links { display: flex; align-items: center; gap: 1.6rem; list-style: none; }
.nav-links a { color: var(--muted); font-size: .88rem; font-weight: 500; letter-spacing: .04em; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active { box-shadow: 0 2px 0 var(--orange); padding-bottom: 4px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-strong); color: var(--text); border-radius: 8px; padding: .4rem .7rem; font-size: 1rem; cursor: pointer; }
.badge-role { font-size: .65rem; padding: .15rem .5rem; border-radius: 99px; background: var(--flame); color: #fff; letter-spacing: .1em; font-weight: 700; margin-left: .35rem; }

/* ---------- botones y formularios ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: 600 .92rem var(--font-body); letter-spacing: .04em;
  padding: .8rem 1.5rem; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s;
  color: #fff; background: var(--flame);
  box-shadow: 0 8px 28px -10px rgba(255, 90, 20, 0.7);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 32px -8px rgba(255, 90, 20, 0.85); color: #fff; }
.btn.ghost { background: transparent; border-color: var(--line-strong); box-shadow: none; color: var(--text); }
.btn.ghost:hover { background: rgba(255, 106, 26, 0.1); border-color: var(--orange); }
.btn.danger { background: transparent; border-color: rgba(224, 38, 27, .6); color: #ff6b5f; box-shadow: none; }
.btn.danger:hover { background: rgba(224, 38, 27, .15); }
.btn.sm { padding: .4rem .85rem; font-size: .8rem; border-radius: 8px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

label { display: block; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .35rem; font-weight: 600; }
input, select, textarea {
  width: 100%; background: var(--bg-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; padding: .75rem .9rem;
  font: inherit; transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 106, 26, .18); }
textarea { min-height: 110px; resize: vertical; }
input[type=checkbox] { width: auto; accent-color: var(--orange); }
.field { margin-bottom: 1rem; }
.form-error { color: #ff7a6e; font-size: .9rem; min-height: 1.3em; margin-bottom: .6rem; }
.form-ok { color: var(--amber); font-size: .9rem; }

/* ---------- tarjetas ---------- */
.card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
a.card { color: inherit; display: block; }
a.card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: 0 18px 40px -20px rgba(255, 90, 20, .5); }
.card-body { padding: 1.2rem 1.3rem 1.4rem; }
.grid { display: grid; gap: 1.4rem; }
.grid.cols-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }

.poster {
  aspect-ratio: 2 / 3; background: var(--bg-2) center/cover no-repeat; position: relative;
  display: flex; align-items: flex-end;
}
.poster.wide { aspect-ratio: 16 / 9; }
.poster.square { aspect-ratio: 1; }
.poster .ph { position: absolute; inset: 0; display: grid; place-items: center; background:
  radial-gradient(circle at 50% 120%, rgba(224,38,27,.55), transparent 60%),
  linear-gradient(160deg, #1d1210, #0c0807); }
.poster .ph span { font-family: var(--font-display); font-size: 3.2rem; letter-spacing: .06em; opacity: .9; }
.poster .shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,8,7,.85), transparent 55%); }

.status {
  display: inline-block; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700;
  padding: .28rem .7rem; border-radius: 99px; border: 1px solid var(--line-strong); color: var(--amber);
  background: rgba(255, 106, 26, .1);
}
.status.live { background: var(--flame); color: #fff; border-color: transparent; }
.tag { display: inline-block; font-size: .72rem; padding: .2rem .6rem; border-radius: 6px; background: rgba(255,255,255,.06); color: var(--muted); margin: 0 .3rem .3rem 0; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(4rem, 12vw, 9rem) 0 clamp(3rem, 8vw, 6rem); }
.hero::before {
  content: ''; position: absolute; left: 50%; bottom: -35%; width: 120%; height: 90%; transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(255, 90, 20, .35), rgba(224, 38, 27, .18) 40%, transparent 68%);
  filter: blur(30px); pointer-events: none; animation: breathe 6s ease-in-out infinite;
}
@keyframes breathe { 50% { opacity: .65; transform: translateX(-50%) scale(1.06); } }
.hero .container { position: relative; }
.hero p.lead { max-width: 56ch; font-size: 1.15rem; color: #cdbfb6; margin: 1.4rem 0 2rem; }
.hero .actions { display: flex; flex-wrap: wrap; gap: .9rem; }
.grain::after { content: ''; position: fixed; inset: 0; pointer-events: none; opacity: .05; z-index: 100;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------- película / persona ---------- */
.detail-hero { position: relative; padding: 3.5rem 0 2.5rem; border-bottom: 1px solid var(--line); overflow: hidden; }
.detail-hero .backdrop { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .22; filter: saturate(1.2); }
.detail-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,8,7,.4), var(--bg)); }
.detail-hero .container { position: relative; z-index: 1; }
.detail-grid { display: grid; grid-template-columns: 280px 1fr; gap: 2.5rem; align-items: start; }
.detail-grid .poster { border-radius: var(--radius); border: 1px solid var(--line-strong); box-shadow: 0 30px 60px -25px rgba(255, 70, 20, .45); }
.meta-list { display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; margin: 1.2rem 0; color: var(--muted); font-size: .92rem; }
.meta-list b { color: var(--text); font-weight: 600; }
.prose { max-width: 70ch; white-space: pre-line; color: #dccfc6; }

.cast-card { text-align: center; }
.cast-card .poster { aspect-ratio: 1; }
.cast-card .who { font-weight: 600; color: var(--text); }
.cast-card .as { color: var(--orange); font-size: .85rem; margin-top: .15rem; }
.cast-card .as::before { content: 'como '; color: var(--muted); }

.crew-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem 2rem; }
.crew-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px dashed var(--line); }
.crew-list .job { color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; }

.film-row { display: flex; gap: 1rem; align-items: center; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.film-row .mini { width: 52px; aspect-ratio: 2/3; border-radius: 6px; background: var(--bg-2) center/cover; flex: none; }
.film-row .role { color: var(--orange); font-size: .85rem; }

/* ---------- bloqueos / VIP ---------- */
.locked {
  position: relative; border: 1px dashed var(--line-strong); border-radius: var(--radius);
  padding: 2rem; text-align: center; background:
    repeating-linear-gradient(135deg, rgba(255,106,26,.04) 0 12px, transparent 12px 24px), var(--panel);
}
.locked .lock { font-size: 1.8rem; display: block; margin-bottom: .4rem; }
.vip-banner {
  border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 1.4rem 1.6rem;
  background: linear-gradient(120deg, rgba(224, 38, 27, .2), rgba(255, 106, 26, .1)); margin-bottom: 2rem;
}
.video-frame { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.video-frame iframe, .video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.date-chip {
  display: inline-block; font-family: var(--font-display); font-size: 1.6rem; letter-spacing: .06em;
  background: var(--flame); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- pestañas ---------- */
.tabs { display: flex; gap: .4rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 2rem; }
.tab {
  background: none; border: none; color: var(--muted); font: 600 .9rem var(--font-body); letter-spacing: .06em;
  padding: .8rem 1.1rem; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; text-transform: uppercase;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--orange); border-bottom-color: var(--orange); }

.lore-entry { border-left: 3px solid var(--orange); padding: .4rem 0 .4rem 1.3rem; margin-bottom: 2rem; }
.lore-entry h3 { margin: .2rem 0 .5rem; }

/* ---------- acceso ---------- */
.auth-wrap { display: grid; place-items: center; padding: 4rem 0; }
.auth-card { width: min(460px, 100%); padding: 2.2rem; }
.auth-card h2 { margin-bottom: .3rem; }

/* ---------- admin ---------- */
.admin-layout { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; padding: 2.5rem 0 4rem; align-items: start; }
.admin-nav { position: sticky; top: 88px; display: grid; gap: .3rem; }
.admin-nav button { text-align: left; background: none; border: 1px solid transparent; color: var(--muted); padding: .65rem .9rem; border-radius: 10px; font: 500 .92rem var(--font-body); cursor: pointer; }
.admin-nav button:hover { color: var(--text); background: rgba(255,255,255,.04); }
.admin-nav button.active { color: #fff; background: rgba(255,106,26,.14); border-color: var(--line-strong); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .7rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; background: var(--panel); }
tr:last-child td { border-bottom: none; }
td.actions { white-space: nowrap; display: flex; gap: .4rem; }
td .clip { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.toolbar { display: flex; flex-wrap: wrap; gap: .8rem; align-items: end; justify-content: space-between; margin-bottom: 1.2rem; }
.toolbar .left { display: flex; gap: .8rem; align-items: end; flex-wrap: wrap; }
.toolbar select { min-width: 220px; }
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.72); z-index: 200; display: grid; place-items: center; padding: 1rem; overflow-y: auto; }
.modal { width: min(640px, 100%); max-height: 92vh; overflow-y: auto; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 16px; padding: 1.6rem; }
.modal h3 { margin-bottom: 1rem; }
.modal .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.modal .foot { display: flex; justify-content: flex-end; gap: .7rem; margin-top: 1rem; }
.code-pill { font-family: ui-monospace, 'SF Mono', Menlo, monospace; background: var(--bg-2); border: 1px solid var(--line-strong); padding: .25rem .6rem; border-radius: 6px; color: var(--amber); letter-spacing: .08em; }
.toast { position: fixed; bottom: 1.4rem; right: 1.4rem; background: var(--panel-2); border: 1px solid var(--orange); padding: .8rem 1.2rem; border-radius: 10px; z-index: 300; box-shadow: 0 10px 30px rgba(0,0,0,.5); }

/* ---------- pie ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 2.4rem 0; margin-top: 3rem; color: var(--muted); font-size: .88rem; }
.site-footer .container { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }
.empty { color: var(--muted); padding: 2rem; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }
.loading { color: var(--muted); padding: 2rem 0; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: .8rem 1.25rem 1.2rem; }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; padding: .55rem 0; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid .poster { max-width: 240px; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-nav { position: static; display: flex; overflow-x: auto; gap: .4rem; }
  .admin-nav button { white-space: nowrap; }
  .modal .row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }
