body {
  margin: 0;
  font-family: "Comic Sans MS", cursive, sans-serif;
  background: linear-gradient(to right, #000428, #7f0000);
  color: white;
  font-size: 16px;
  transition: font-size 0.3s ease;
  line-height: 1.6;
}

/* Improve global box sizing for responsiveness */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:focus {
  outline: 3px solid #FFD700;
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  background: gold;
  color: black;
  padding: 8px;
}

.skip-link:focus {
  left: 10px;
  top: 10px;
}

h1 {
  text-align: center;
  font-size: 3rem;
  background: black;
  padding: 20px;
  color: gold;
  text-shadow: 3px 3px red;
}

/* Responsive heading sizing */
@media (max-width: 600px) {
  h1 {
    font-size: 2.1rem;
    padding: 16px 12px;
  }
}

.font-button-container {
  text-align: center;
  background: #111;
  padding: 15px;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(255, 215, 0, 0.25);
}

button {
  padding: 10px 20px;
  font-size: 1rem;
  background: gold;
  color: black;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  margin: 5px;
  transition: transform 0.08s ease, background 0.2s ease, box-shadow 0.2s ease;
}

button:hover,
button:focus {
  background: orange;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

button:active {
  transform: translateY(1px);
}

.section {
  padding: 40px 20px;
}

/* Slightly better spacing on small screens */
@media (max-width: 600px) {
  .section {
    padding: 28px 14px;
  }
}

.superman {
  background-color: #0033cc;
}

.batman {
  background-color: #111;
}

.hero-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: center;
}

.hero-container img {
  max-width: 300px;
  width: 100%;
  border-radius: 15px;
  border: 5px solid gold;
  height: auto;
  display: block;
}

/* Improve text column behavior on wide screens */
.hero-text {
  flex: 1;
  min-width: 280px;
  max-width: 700px;
}

.stats-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

/* Make stat boxes wrap more nicely and stay readable */
.stat-box {
  background: rgba(0, 0, 0, 0.92);
  border: 2px solid rgba(255, 215, 0, 0.95);
  padding: 14px 12px;
  width: 150px;
  border-radius: 10px;
  text-align: center;
  font-weight: bold;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

/* Slightly smaller stat cards on very small screens */
@media (max-width: 380px) {
  .stat-box {
    width: 140px;
  }
}

/* TABLES: improved styling + responsiveness */
.table-container {
  margin-top: 30px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
  border: 1px solid rgba(255, 215, 0, 0.25);
  background: rgba(0, 0, 0, 0.45);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

/* Allow the table to keep its layout and scroll on small screens */
table {
  width: 100%;
  min-width: 520px; /* enables horizontal scroll on narrow screens */
  border-collapse: separate;
  border-spacing: 0;
  background: rgba(0, 0, 0, 0.86);
}

caption {
  caption-side: top;
  font-weight: bold;
  padding: 12px 12px;
  color: gold;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

th,
td {
  border: 1px solid rgba(255, 215, 0, 0.35);
  padding: 12px 10px;
  text-align: center;
  vertical-align: middle;
}

/* Make headers sticky for better usability while scrolling */
thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

th {
  background: linear-gradient(to bottom, #1a1a1a, #0d0d0d);
  color: gold;
  font-weight: 800;
}

/* Better row separation + readability */
tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.04);
}

tbody tr:hover td {
  background: rgba(255, 215, 0, 0.08);
}

/* Round the visible table corners */
table thead tr:first-child th:first-child {
  border-top-left-radius: 14px;
}
table thead tr:first-child th:last-child {
  border-top-right-radius: 14px;
}
table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 14px;
}
table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 14px;
}

/* Slightly larger tap targets + text on mobile */
@media (max-width: 600px) {
  th,
  td {
    padding: 12px 10px;
    font-size: 0.98rem;
  }

  .table-container {
    margin-top: 22px;
  }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  body {
    transition: none;
  }
  button {
    transition: none;
  }
}

footer {
  background: black;
  text-align: center;
  padding: 20px;
  border-top: 1px solid rgba(255, 215, 0, 0.25);
}