/* =========================================================
   TERROR EN CARTELERA — Styles
   Dark horror theme — pure CSS, no frameworks
   ========================================================= */

/* ----- CSS Variables ----- */
:root {
  --black:        #0a0a0a;
  --dark-1:       #111111;
  --dark-2:       #1a1a1a;
  --dark-3:       #242424;
  --dark-4:       #2e2e2e;
  --blood-dark:   #8b0000;
  --blood:        #a80000;
  --blood-bright: #cc0000;
  --blood-glow:   rgba(204, 0, 0, 0.35);
  --white:        #ffffff;
  --text-primary:   #f7f7f7;
  --text-secondary: #ababab;
  --text-muted:     #6e6e6e;
  --border:       rgba(255, 255, 255, 0.08);
  --border-red:   rgba(139, 0, 0, 0.4);
  --card-bg:      #141414;
  --modal-bg:     #0f0f0f;
  --skeleton-base:     #1c1c1c;
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --transition: 0.25s ease;
}

/* ----- Reset & Base ----- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--black);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--blood-bright);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--text-primary); }

img { display: block; max-width: 100%; }

.hidden { display: none !important; }

/* ----- Header ----- */
.site-header {
  position: relative;
  text-align: center;
  padding: 4rem 1.5rem 3rem;
  overflow: hidden;
  border-bottom: 1px solid var(--border-red);
}

.header-bg {
  position: absolute;
  inset: 0;
  background: var(--black);
  z-index: 0;
}

.header-content {
  position: relative;
  z-index: 1;
}

.header-icon {
  font-size: 2.8rem;
  margin-bottom: 0.6rem;
  filter: drop-shadow(0 0 12px var(--blood-bright));
  animation: pulse-skull 3.5s ease-in-out infinite;
}

@keyframes pulse-skull {
  0%, 100% { filter: drop-shadow(0 0 10px var(--blood-bright)); }
  50%       { filter: drop-shadow(0 0 22px var(--blood-bright)) brightness(1.2); }
}

.site-title {
  font-family: 'Roboto', sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  letter-spacing: 0.06em;
  color: var(--text-primary);
  text-shadow: 0 0 40px var(--blood-glow);
  line-height: 1.15;
}

.site-subtitle {
  margin-top: 0.7rem;
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--blood-bright);
}

/* ----- Main Content ----- */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

/* ----- Section ----- */
.section {
  margin-top: 3.5rem;
}

.section-header {
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-family: 'Roboto', sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  letter-spacing: 0.04em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-icon {
  font-size: 1.3em;
  filter: drop-shadow(0 0 6px var(--blood-bright));
}

.section-desc {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ----- Movie Grid ----- */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

@media (max-width: 480px) {
  .movie-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.875rem;
  }
}

/* ----- Movie Card ----- */
.movie-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
  transition:
    transform var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.movie-card:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: var(--border-red);
  box-shadow:
    0 8px 30px rgba(0,0,0,0.6),
    0 0 20px var(--blood-glow);
}

.movie-card:focus-visible {
  outline: 2px solid var(--blood-bright);
  outline-offset: 2px;
}

/* Poster */
.card-poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  background: var(--dark-3);
  overflow: hidden;
}

.card-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.movie-card:hover .card-poster {
  transform: scale(1.04);
}

.card-poster-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--dark-1);
  color: var(--text-muted);
  font-size: 0.75rem;
  text-align: center;
  gap: 0.5rem;
  padding: 1rem;
}

.card-poster-placeholder span {
  font-size: 2.5rem;
}

/* Card Body */
.card-body {
  padding: 0.75rem 0.875rem 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* Genre Tags */
.card-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.15rem;
}

.genre-tag {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 20px;
  border: 1px solid;
  line-height: 1.6;
}

.genre-tag.horror {
  color: var(--blood-bright);
  border-color: rgba(204,0,0,0.4);
  background: rgba(204,0,0,0.08);
}

.genre-tag.thriller {
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.05);
}

.genre-tag.mystery {
  color: var(--text-secondary);
  border-color: rgba(139,0,0,0.5);
  background: rgba(139,0,0,0.06);
}

.genre-tag.default {
  color: var(--text-muted);
  border-color: var(--border);
  background: transparent;
}

/* Card Synopsis (truncated) */
.card-synopsis {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 0.15rem;
}

/* ----- Skeleton Loading ----- */
.skeleton-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.skeleton-poster {
  aspect-ratio: 2 / 3;
  background: var(--skeleton-base);
  animation: skeleton-pulse 1.6s ease-in-out infinite;
}

.skeleton-body {
  padding: 0.75rem 0.875rem 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skeleton-line {
  height: 12px;
  border-radius: 4px;
  background: var(--skeleton-base);
  animation: skeleton-pulse 1.6s ease-in-out infinite;
}

.skeleton-line.short  { width: 55%; }
.skeleton-line.medium { width: 75%; }
.skeleton-line.full   { width: 100%; }

@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

/* ----- Section Error ----- */
.section-error {
  padding: 2rem;
  text-align: center;
  color: var(--text-secondary);
  background: var(--dark-1);
  border: 1px solid var(--border-red);
  border-radius: var(--radius-md);
  margin-top: 1rem;
}

.error-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 6px var(--blood-bright));
}

/* ----- Modal Overlay ----- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fade-in 0.2s ease;
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal {
  background: var(--modal-bg);
  border: 1px solid var(--border-red);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow:
    0 20px 60px rgba(0,0,0,0.8),
    0 0 40px rgba(139,0,0,0.2);
  animation: slide-up 0.25s ease;
  scrollbar-width: thin;
  scrollbar-color: var(--blood-dark) transparent;
}

.modal::-webkit-scrollbar { width: 5px; }
.modal::-webkit-scrollbar-track { background: transparent; }
.modal::-webkit-scrollbar-thumb { background: var(--blood-dark); border-radius: 10px; }

@keyframes slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Modal Close Button */
.modal-close {
  position: sticky;
  top: 1rem;
  left: 100%;
  float: right;
  margin: 0.875rem 0.875rem 0 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--dark-3);
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
  z-index: 10;
  flex-shrink: 0;
}

.modal-close:hover {
  background: var(--blood-dark);
  color: var(--text-primary);
  border-color: var(--blood);
}

/* Modal Inner */
.modal-inner {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
}

@media (max-width: 600px) {
  .modal-inner {
    grid-template-columns: 1fr;
  }
}

/* Modal Poster */
.modal-poster-col {
  position: relative;
}

.modal-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  display: block;
}

@media (max-width: 600px) {
  .modal-poster {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 55vw;
    object-position: top;
  }
}

.modal-poster-placeholder {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: var(--dark-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

/* Modal Info */
.modal-info {
  padding: 2rem 2rem 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-title {
  font-family: 'Roboto', sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  letter-spacing: 0.03em;
  color: var(--text-primary);
  line-height: 1.2;
  text-shadow: 0 0 20px var(--blood-glow);
}

.modal-tagline {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-secondary);
  border-left: 2px solid var(--blood-dark);
  padding-left: 0.75rem;
}

.modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.modal-meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.modal-meta-label {
  color: var(--text-muted);
  font-weight: 500;
}

.modal-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.modal-overview {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Cast */
.modal-section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.cast-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.cast-pill {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--dark-3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px;
  transition: border-color var(--transition), color var(--transition);
}

.cast-pill:hover {
  border-color: var(--border-red);
  color: var(--text-primary);
}

/* Modal action buttons (trailer + Letterboxd) */
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.btn-trailer,
.btn-letterboxd {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition:
    background var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}

.btn-trailer {
  background: var(--blood-dark);
  color: var(--text-primary);
  border: 1px solid var(--blood);
}

.btn-trailer:hover {
  background: var(--blood-bright);
  box-shadow: 0 0 18px var(--blood-glow);
  transform: translateY(-1px);
  color: #fff;
}

.btn-trailer-icon,
.btn-letterboxd-icon {
  font-size: 1.1em;
  line-height: 1;
}

.btn-letterboxd {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-letterboxd:hover {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
}

/* Modal Skeleton */
.modal-skeleton {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 300px;
}

.skeleton-title {
  height: 28px;
  width: 60%;
  border-radius: 6px;
  background: var(--skeleton-base);
  animation: skeleton-pulse 1.6s ease-in-out infinite;
}

/* ----- Footer ----- */
.site-footer {
  text-align: center;
  padding: 2rem 1rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.site-footer p {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tmdb-logo {
  height: 14px;
  display: inline-block;
  opacity: 0.7;
  transition: opacity var(--transition);
}

.tmdb-logo:hover { opacity: 1; }

.footer-disclaimer {
  font-size: 0.72rem;
  color: var(--text-muted);
  opacity: 0.6;
}

/* =========================================================
   Ficha de Película (/pelicula/...)
   ========================================================= */

/* ----- Barra superior ----- */
.film-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-red);
}

.film-topbar-brand {
  font-family: 'Roboto', sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
  color: var(--text-primary);
}
.film-topbar-icon { color: var(--blood-bright); }
.film-topbar-brand:hover { color: var(--blood-bright); }

.film-topbar-back {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}
.film-topbar-back:hover { color: var(--blood-bright); }

.film-page {
  width: 100%;
  overflow-x: hidden;
}

/* ----- Hero ----- */
.film-hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  min-height: min(80vh, 780px);
  background: var(--dark-1);
}

.film-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center 18%;
  animation: fade-in 0.5s ease;
}

.film-hero--poster-bg .film-hero-bg {
  filter: blur(30px) brightness(0.45) saturate(1.1);
  transform: scale(1.2);
}

.film-hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to top, var(--black) 1%, rgba(10, 10, 10, 0.5) 45%, rgba(10, 10, 10, 0.32) 100%),
    linear-gradient(to right, rgba(10, 10, 10, 0.86) 0%, rgba(10, 10, 10, 0.4) 55%, rgba(10, 10, 10, 0.12) 100%);
}

.film-hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 2rem;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 3rem;
  align-items: end;
}

.film-poster-col {
  position: relative;
}

.film-poster,
.film-poster-placeholder {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: var(--dark-1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.65);
}

.film-poster-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
}

.film-hero-info {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  min-width: 0;
  padding-bottom: 0.5rem;
}
.film-hero-info > * {
  min-width: 0;
  max-width: 100%;
}

.film-title {
  font-family: 'Roboto', sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(1.75rem, 4.5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: var(--white);
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.85);
  overflow-wrap: break-word;
}
.film-year {
  color: var(--text-secondary);
  font-weight: 400;
}

.film-alt-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin-top: -0.5rem;
}

.film-tagline {
  font-size: clamp(0.9rem, 1.6vw, 1.1rem);
  font-style: italic;
  color: var(--text-secondary);
  border-left: 2px solid var(--blood);
  padding-left: 0.85rem;
  max-width: 60ch;
}

.film-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.film-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 2;
}
.film-meta-item {
  margin-right: 1.5rem;
}
.film-meta-label {
  color: var(--text-muted);
  font-weight: 500;
}

.film-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* ----- Cuerpo ----- */
.film-body {
  max-width: 1120px;
  margin: 0 auto;
  padding: 3rem 2rem 4.5rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}
.film-body > * {
  min-width: 0;
}

.film-section {
  scroll-margin-top: 4.5rem;
}

.film-section-title {
  font-family: 'Roboto', sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  padding-bottom: 0.6rem;
  margin-bottom: 1.4rem;
  border-bottom: 1px solid var(--border);
}

.film-trailer {
  position: relative;
  width: 100%;
  max-width: 960px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}
.film-trailer iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.film-section-title::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 0.95em;
  background: var(--blood-bright);
  margin-right: 0.6rem;
  vertical-align: -1px;
}

.film-overview {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 68ch;
  overflow-wrap: break-word;
}

.film-error-wrap {
  max-width: 640px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}

/* ----- Reparto y equipo con foto ----- */
.people-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1.5rem 0.75rem;
}

.person {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.45rem;
  margin: 0;
}

.person-photo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  background: var(--dark-3);
  border: 1px solid var(--border);
  transition: border-color var(--transition), transform var(--transition);
}

.person:hover .person-photo {
  border-color: var(--blood);
  transform: translateY(-3px);
}

.person-photo--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Roboto', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.person-name {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.25;
}

.person-role {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.2;
}

/* ----- Responsive ficha ----- */
@media (max-width: 860px) {
  .film-topbar {
    padding: 0.7rem 1rem;
  }
  .film-topbar-brand {
    font-size: 0.8rem;
  }
  .film-topbar-back {
    font-size: 0.66rem;
  }
  .film-hero {
    min-height: 0;
  }
  .film-hero-bg {
    background-position: center top;
  }
  .film-hero-scrim {
    background: linear-gradient(to top, var(--black) 6%, rgba(10, 10, 10, 0.55) 55%, rgba(10, 10, 10, 0.4) 100%);
  }
  .film-hero-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 2.5rem 1.25rem 2rem;
    justify-items: center;
    text-align: center;
  }
  .film-poster-col {
    width: min(220px, 55vw);
  }
  .film-hero-info {
    align-items: center;
  }
  .film-tagline {
    border-left: 0;
    padding-left: 0;
  }
  .film-genres,
  .film-meta,
  .film-actions {
    justify-content: center;
  }
  .film-body {
    padding: 2.25rem 1.25rem 3.5rem;
    gap: 2.25rem;
  }
}

/* =========================================================
   Administración (ruta /admin + barra en la ficha)
   ========================================================= */
.admin-bar[hidden] { display: none; }
.admin-bar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem 0.85rem;
  padding: 0.7rem 1.5rem;
  background: #1c0606;
  border-bottom: 1px solid var(--blood);
}
.admin-bar-user {
  font-size: 0.8rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}
.admin-bar-badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffd7d7;
  background: rgba(204, 0, 0, 0.22);
  border: 1px solid var(--blood);
  border-radius: 20px;
  padding: 2px 10px;
}
.admin-bar-spacer { flex: 1; }

.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: var(--text-primary);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), opacity var(--transition);
}
.admin-btn:hover { background: rgba(255, 255, 255, 0.08); }
.admin-btn:disabled { opacity: 0.55; cursor: default; }

.admin-btn--primary {
  background: var(--blood-dark);
  border-color: var(--blood);
  color: #fff;
}
.admin-btn--primary:hover { background: var(--blood-bright); }

.admin-btn--danger {
  background: var(--blood);
  border-color: var(--blood-bright);
  color: #fff;
}
.admin-btn--danger:hover { background: var(--blood-bright); box-shadow: 0 0 16px var(--blood-glow); }

/* Página /admin */
.admin-main {
  max-width: 460px;
  margin: 4rem auto;
  padding: 0 1.5rem;
}
.admin-card {
  background: var(--card-bg);
  border: 1px solid var(--border-red);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  text-align: center;
}
.admin-title {
  font-family: 'Roboto', sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 1.4rem;
  letter-spacing: 0.03em;
  color: var(--text-primary);
}
.admin-lead {
  margin: 0.9rem 0 1.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.admin-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.admin-error {
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--blood-bright);
}

/* ----- Scrollbar (global) ----- */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--dark-4); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--blood-dark); }
