:root {
  --marvel: #ed1d24;
  --ink: #0b0d17;
  --line-w: 4px;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5f5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  background-color: var(--ink);
  color: var(--text-primary);
  min-height: 100vh;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  background: rgba(11, 13, 23, 0.95);
  color: #fffbeb;
  padding: 0.55rem 1rem;
  border-radius: 0.75rem;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(-120%);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 60;
}

.skip-link:focus-visible {
  opacity: 1;
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

h1,
h2,
h3 {
  font-family: 'Bangers', cursive;
  letter-spacing: 1.5px;
}

a {
  color: inherit;
}

a:hover {
  text-decoration: none;
}

.site-main {
  flex: 1;
  width: 100%;
}

.site-footer {
  margin-top: 4rem;
  padding: 2rem 1rem;
  background: linear-gradient(180deg, #0f172a 0%, #050812 100%); /* fix contraste SonarCloud */
  border-top: var(--line-w) solid var(--marvel);
  text-align: center;
  color: var(--text-secondary);
}

.app-hero {
  position: relative;
  background: radial-gradient(1200px 400px at 10% -10%, rgba(255, 255, 255, 0.08), transparent 60%),
    linear-gradient(180deg, #151826 0%, #0b0d17 100%);
  border-bottom: var(--line-w) solid var(--marvel);
  border-top: var(--line-w) solid var(--marvel);
}
.app-hero--tech {
  border-top: var(--line-w) solid #2563eb;
  border-bottom: var(--line-w) solid #2563eb;
}

.app-hero__inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.app-hero__title {
  color: #fff;
  font-size: 2.25rem;
  line-height: 1;
  text-shadow: 0 0 12px rgba(237, 29, 36, 0.25), 0 0 6px rgba(237, 29, 36, 0.35);
  transition: text-shadow 0.3s ease, transform 0.3s ease;
}
.app-hero--tech .app-hero__title {
  text-shadow: 0 0 12px rgba(37, 99, 235, 0.3), 0 0 6px rgba(37, 99, 235, 0.45);
}

.app-hero__title:hover {
  text-shadow: 0 0 18px rgba(237, 29, 36, 0.65), 0 0 28px rgba(237, 29, 36, 0.5),
    0 0 42px rgba(237, 29, 36, 0.4);
  transform: translateY(-2px);
}
.app-hero--tech .app-hero__title:hover {
  text-shadow: 0 0 18px rgba(37, 99, 235, 0.65), 0 0 28px rgba(37, 99, 235, 0.45),
    0 0 42px rgba(37, 99, 235, 0.4);
}

.app-hero__meta {
  color: #e5e7eb;
  font-weight: 700;
}

.hero-text-nowrap {
  white-space: nowrap;
}

.app-hero__cta {
  background: #111a2c; /* fix contraste SonarCloud */
  border: 1px solid #ed1d24;
  color: #f9fafb;
  box-shadow: 0 12px 26px rgba(237, 29, 36, 0.25);
  padding: 0.6rem 1.15rem;
  min-width: 0;
  height: 2.6rem;
  box-sizing: border-box;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.app-hero__cta-equal {
  width: 11rem;
  justify-content: center;
  text-align: center;
}

.app-hero__cta:hover {
  background: #4f1014;
  box-shadow: 0 18px 32px rgba(237, 29, 36, 0.35);
}

.app-hero__cta.is-active,
.app-hero__cta[aria-current="page"] {
  background: #6b1117;
  box-shadow: none;
}

.app-hero__cta:focus-visible {
  outline: 2px solid rgba(237, 29, 36, 0.6);
  outline-offset: 3px;
}

.app-hero__cta--github {
  border-color: #3b82f6;
  background: #102040;
  color: #f8fafc;
  box-shadow: 0 12px 26px rgba(59, 130, 246, 0.35);
}

.app-hero__cta--github:hover {
  background: #1d3a8a;
  box-shadow: 0 18px 32px rgba(59, 130, 246, 0.45);
}

.app-hero__cta--github.is-active,
.app-hero__cta--github[aria-current="page"] {
  background: #21429c;
  box-shadow: none;
}

.app-hero__cta--github:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 3px;
}

.app-hero__cta--flat.is-active,
.app-hero__cta--flat[aria-current="page"] {
  box-shadow: none;
}

.app-hero__cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 9999px;
  background: linear-gradient(145deg, rgba(237, 29, 36, 0.7), rgba(237, 29, 36, 0.35));
  box-shadow: 0 10px 24px rgba(237, 29, 36, 0.32);
  font-family: 'Roboto', sans-serif;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f8fafc;
  font-size: 0.95rem;
}

.app-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--marvel);
  color: #fff;
  padding: 0.375rem 0.75rem;
  border-radius: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 25px rgba(237, 29, 36, 0.35);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  border-radius: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--marvel);
  outline-offset: 3px;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.35);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-primary {
  background-color: #b70f1c;
  color: #fff;
}

.btn-primary:hover {
  background-color: #a30d18;
}

.btn-rag {
  background-color: #38bdf8;
  color: #000;
}

.btn-rag:hover {
  background-color: #0ea5e9;
}

.btn-secondary {
  background-color: #374151;
  color: #f8fafc;
}

.btn-secondary:hover {
  background-color: #4b5563;
}

.btn-danger {
  background-color: #b91c1c;
  color: #f8fafc;
}

.btn-danger:hover {
  background-color: #991b1b;
}

.btn-link {
  color: #f59e0b;
  font-weight: 600;
}

.btn-link:hover {
  color: #fbbf24;
  text-decoration: underline;
}

.btn-sonarcloud {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 11rem;
  height: 2.6rem;
  padding: 0.6rem 1.15rem;
  border-radius: 0.75rem;
  background: #102a54; /* fix contraste SonarCloud */
  border: 1px solid #3b82f6;
  color: #f9fafb;
  box-shadow: none;
  text-transform: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  min-width: 0;
  box-sizing: border-box;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.btn-sonarcloud.is-active,
.btn-sonarcloud[aria-current="page"] {
  background: #1b3f7c;
  box-shadow: none;
}

.btn-sonarcloud:hover {
  background: #1f4fbf;
  box-shadow: none;
}

.btn-sonarcloud:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 3px;
}

.card {
  background-color: #1e293b;
  border: 1px solid #334155;
}

.rag-result-box {
  background-color: #0f172a;
  border: 1px solid #1f2a40;
  border-radius: 0.75rem;
  padding: 0.75rem;
  font-size: 0.85rem;
  line-height: 1.4;
  white-space: pre-wrap;
  color: #fff;
}

.rag-heroes-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.rag-hero-card {
  border-radius: 1.25rem;
  border: 1px solid #475569;
  background: #101a2d; /* fix contraste SonarCloud */
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.rag-hero-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.rag-hero-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.1rem 1.25rem 1.35rem;
}

.rag-hero-card__name {
  font-family: 'Bangers', cursive;
  font-size: 1.35rem;
  letter-spacing: 1px;
  color: #fff;
  line-height: 1.1;
  text-transform: uppercase;
}

.rag-hero-card__excerpt {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #e2e8f0;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.rag-hero-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.rag-hero-card__badge {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: #162d55;
  border: 1px solid #3b82f6;
  font-size: 0.7rem;
  color: #dbeafe;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rag-result-text {
  background: #0f172a;
  border: 1px solid #1f2a40;
  border-radius: 0.9rem;
  padding: 1.25rem;
  color: #e2e8f0;
  font-size: 0.95rem;
  line-height: 1.6;
  white-space: pre-wrap;
  text-align: left;
}

.rag-result-text.is-loading {
  color: #cbd5f5;
  font-style: italic;
}

.section-lined {
  border-top: var(--line-w) solid var(--marvel);
}

.msg-hidden {
  height: 1.25rem;
}


.hero-card-image,
.album-cover,
.album-cover-placeholder {
  width: 100%;
  object-fit: cover;
  display: block;
}

.hero-card-image {
  aspect-ratio: 16 / 9;
  height: auto;
}

.album-cover,
.album-cover-placeholder {
  aspect-ratio: 16 / 9;
}

.oficial-marvel-video-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #f9fafb;
}

.oficial-marvel-meta {
  margin: 0 0 1rem;
  color: #e2e8f0;
  font-size: 1rem;
}


/* Modern Panel Loader - Exact same style as sonar-inline-loader */
.panel-loader {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  border: 1px solid #1f2f46;
  background: #0f172a;
  color: #e2e8f0;
}

.panel-loader__dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.panel-loader__dots span {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: linear-gradient(120deg, #22d3ee, #7c3aed);
  opacity: 0.3;
  animation: panel-loader-bounce 1s infinite ease-in-out;
}

.panel-loader__dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.panel-loader__dots span:nth-child(3) {
  animation-delay: 0.3s;
}

.panel-loader__text {
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

@keyframes panel-loader-bounce {
  0%, 80%, 100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-6px);
  }
}

.hidden {
  display: none !important;
}
