:root {
  --cp-bg-1: #0f172a;
  --cp-bg-2: #1e293b;
  --cp-card: #111827;
  --cp-text: #f8fafc;
  --cp-muted: #cbd5e1;
  --cp-accent: #f59e0b;
}

body {
  min-height: 100vh;
  color: var(--cp-text);
  background: linear-gradient(160deg, var(--cp-bg-1), var(--cp-bg-2));
}

.site-bg {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 10% 20%, rgba(245, 158, 11, 0.18), transparent 35%),
              radial-gradient(circle at 90% 80%, rgba(14, 165, 233, 0.16), transparent 35%);
  pointer-events: none;
  z-index: -1;
}

.hero-card {
  border-radius: 1rem;
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.95), rgba(30, 41, 59, 0.95));
  border: 1px solid rgba(148, 163, 184, 0.25);
  backdrop-filter: blur(2px);
}

.hero .lead {
  color: var(--cp-muted);
}

.form-control,
.form-control:focus {
  background: #0b1220;
  border-color: rgba(148, 163, 184, 0.45);
  color: #fff;
}

.form-control::placeholder {
  color: #94a3b8;
}

.article-card {
  background: var(--cp-card);
  color: #fff;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  border-radius: 0.95rem;
  overflow: hidden;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.portal-card:focus-within,
.portal-card:focus-visible {
  outline: 2px solid rgba(245, 158, 11, 0.7);
  outline-offset: 2px;
}

.portal-card-comic .card-title,
.portal-card-cine .card-title {
  letter-spacing: 0.01em;
}

.article-image-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0b1220;
}

.article-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-image-default {
  object-fit: cover;
}

.image-missing-label {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  background: rgba(15, 23, 42, 0.88);
  color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.55);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.4rem 0.55rem;
  border-radius: 0.45rem;
}

.placeholder-image {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #334155, #0f172a);
}

.placeholder-title {
  font-size: 3rem;
  font-weight: 700;
  color: #f8fafc;
}

.card-title {
  color: #f8fafc;
}

.pagination .page-link {
  background: #0b1220;
  color: #f8fafc;
  border-color: #334155;
}

.pagination .page-item.active .page-link {
  background: var(--cp-accent);
  border-color: var(--cp-accent);
  color: #111827;
}

.pagination .page-item.disabled .page-link {
  background: #111827;
  color: #64748b;
}

.viewer-body {
  margin: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: #0f172a;
}

.viewer-toolbar {
  background: linear-gradient(120deg, #111827, #1e293b);
  border-color: rgba(148, 163, 184, 0.2) !important;
}

.viewer-main {
  flex: 1;
  min-height: 0;
}

#articleFrame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.article-title {
  max-width: 58vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #e2e8f0;
  font-weight: 600;
}

@media (max-width: 767px) {
  .article-title {
    max-width: 100%;
    width: 100%;
    order: 3;
    font-size: 0.9rem;
    margin-top: 0.35rem;
  }

  .viewer-toolbar .container-fluid {
    align-items: flex-start;
  }
}
