:root {
  --bg: #0d0d0d;
  --bg-card: #1a1a1a;
  --text: #eaeaea;
  --highlight: #ff4d00;
  --title: #ffb380;
}
body.light {
  --bg: #f4f4f4;
  --bg-card: #ffffff;
  --text: #202020;
  --highlight: #005eff;
  --title: #0048a8;
}



/* ========== ESTILOS GENERALES ========== */
body {
  font-family: 'Poppins', Arial, sans-serif;
  background: #0d0d0d;
  color: #eaeaea;
  margin: 0;
}

header {
  background: #181818;
  padding: 24px 16px 10px;
  text-align: center;
  border-bottom: 2px solid #242424;
}

header h1 {
  font-size: 32px;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

/* ========== BOTONES ========== */
nav {
  text-align: center;
  margin-bottom: 20px;
}

nav button {
  margin: 6px;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  transition: 0.25s;
  background: #303030;
  color: #e0e0e0;
}

nav button:hover {
  background: #ff4d00;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 0 10px rgba(255, 77, 0, 0.55);
}

/* ========== TARJETAS ========== */
#cards-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
  padding: 20px;
}

.card {
  width: 250px;
  background: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: 0.3s;
  border: 1px solid #292929;
}

.card:hover {
  transform: scale(1.06);
  border-color: #ff4d00;
  box-shadow: 0 0 12px rgba(255, 77, 0, 0.4);
}

.card img {
  width: 100%;
  height: 290px;
  object-fit: cover;
}

.card .info {
  padding: 14px;
  text-align: center;
}

.card .info h3 {
  margin: 6px 0;
  font-size: 18px;
  color: #ffb380;
}

.card .info p {
  font-size: 14px;
  opacity: 0.8;
}

/* ========== LOADER ========== */
#loading {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  z-index: 2000;
  pointer-events: auto;
  color: #ff4d00;
}

/* ========== MODAL ========== */
#modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.82);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3000;
  backdrop-filter: blur(3px);
}

#modal-content {
  background: #1a1a1a;
  padding: 28px;
  border-radius: 18px;
  max-width: 720px;
  width: 92%;
  text-align: center;
  position: relative;
  border: 2px solid #242424;
  box-shadow: 0 0 14px rgba(255, 77, 0, 0.4);
}

#modal-content img {
  max-width: 100%;
  margin: 16px 0;
  border-radius: 10px;
}

#modal-content h2 {
  font-size: 24px;
  margin-bottom: 12px;
  color: #ffb380;
}

#modal-content pre {
  text-align: left;
  white-space: pre-line;
  background: #121212;
  padding: 12px;
  border-radius: 10px;
  font-size: 15px;
  max-height: 350px;
  overflow-y: auto;
}

#close-modal {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 32px;
  cursor: pointer;
  color: #ff4d00;
  transition: 0.25s;
}

#close-modal:hover {
  transform: scale(1.25);
  color: #ffb380;
}

/* Ocultos */
.hidden {
  display: none !important;
}


body {
  background: var(--bg);
  color: var(--text);
  transition: background 0.4s, color 0.4s;
}

header {
  background: var(--bg-card);
  transition: background 0.4s;
}

nav button:hover {
  background: var(--highlight);
}

.card {
  background: var(--bg-card);
  border-color: var(--bg);
}

.card:hover {
  border-color: var(--highlight);
}

.card .info h3 {
  color: var(--title);
}

#modal-content {
  background: var(--bg-card);
  border-color: var(--highlight);
}


/* Animación al aparecer tarjetas */
.card {
  opacity: 0;
  transform: translateY(15px);
  animation: fadeIn 0.6s forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Suavidad de apertura de modal */
#modal-content {
  animation: popup 0.35s ease;
}

@keyframes popup {
  0% { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Botón de tema */
#theme-toggle {
  background: var(--highlight);
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  margin-top: 12px;
  transition: 0.25s;
}

#theme-toggle:hover {
  transform: scale(1.06);
  box-shadow: 0 0 10px var(--highlight);
}
