/* === 1. DECLARACIÓN DE FUENTE PERSONALIZADA (Enlaces RAW corregidos) === */
@font-face {
  font-family: 'MingLiU';
  src: url('https://raw.githubusercontent.com/TheCONDIMENTSoficialxd/torizo-webpage-assets/main/fonts/MingLiU.woff2') format('woff2'),
       url('https://raw.githubusercontent.com/TheCONDIMENTSoficialxd/torizo-webpage-assets/main/fonts/MingLiU.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* === 2. VARIABLES GLOBALES === */
:root {
  --max-width: 800px;
  --bg-overlay: rgba(0, 0, 0, 0.85);
  --accent-orange: #ff320a;
  --accent-green: #08b600;
  --accent-yellow: #fad701;
  --accent-blue: #0165d7;
  --bg-box: #171717;
}

/* === 3. RESET GENERAL === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* === 4. ESTRUCTURA PRINCIPAL Y FONDO === */
html, body {
  margin: 0;
  padding: 0;
}

body {
  background-image: url('https://raw.githubusercontent.com/TheCONDIMENTSoficialxd/torizo-webpage-assets/main/fondo.gif');
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
  font-family: 'MingLiU', Arial, sans-serif;
  color: var(--accent-yellow);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  min-height: 100vh;
}

/* === 5. HEADER Y LOGO === */
header {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
}

header img,
.writeHeader img {
  width: 250px;
  max-width: 98%;
  display: block;
  margin: 0 auto;
}

/* === 6. TÍTULO Y NÚMERO DE PÁGINA (#showComic) === */
#showComic, 
.writePageTitle, 
h1, h2, h3, h4, h5 {
  font-family: 'MingLiU', Arial, sans-serif;
  color: var(--accent-yellow);
  text-align: center;
}

.writePageTitle h1 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: bold;
  background-color: var(--bg-box);
  color: var(--accent-yellow);
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  display: inline-block;
  margin: 0.5rem 0 !important;
  line-height: 1.2 !important;
}

/* === 7. NAVEGACIÓN Y ENLACES DE CÓMIC === */
.comicNav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
  gap: 15px;
}

.comicNav img {
  width: 50px;
  max-width: 98%;
  padding-right: 0;
}

/* Botones de navegación cuando son texto */
.comicNav a {
  background-color: var(--bg-box);
  color: #ffffff;
  padding: 0.5rem 1rem;
  text-decoration: none;
  font-size: 1.1rem;
  border-radius: 4px;
  transition: all 0.2s ease-in-out;
  display: inline-block;
}

.comicNav a:hover {
  color: var(--accent-orange);
  transform: scale(1.05);
}

/* === 8. VISOR DEL CÓMIC === */
.comicPage {
  display: flex;
  justify-content: center;
  margin: 10px 0;
}

.comicPage img {
  width: 550px;
  max-width: 98%;
  border-radius: 4px;
}

/* === 9. ESTILOS PARA SUBPÁGINAS Y NOTAS DE AUTOR === */
.subPage, #authorNotes {
  width: min(var(--max-width), 95%);
  background-color: var(--bg-box);
  color: var(--accent-yellow);
  border: 1px solid #333;
  border-radius: 8px;
  margin: 1.5rem auto;
  padding: 1rem 1.5rem;
  font-family: 'MingLiU', Arial, sans-serif;
}

.subPage:not(.archivePage) {
  text-align: center;
}

.subPage p, footer, #authorNotes, .archiveTable {
  font-family: 'MingLiU', Arial, sans-serif;
  font-size: 1rem;
}

/* Enlaces generales dentro de párrafos o subpáginas */
a {
  color: var(--accent-yellow);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-orange);
}

/* === 10. UTILIDADES Y POSICIONAMIENTO === */
.leftPic {
  clear: left;
  float: right;
  margin-left: 20px;
}

.rightPic {
  clear: right;
  float: left;
  margin-left: 20px;
}

.charTable, .charTable td { 
  width: 100%;
}

.clearfix::after {
  content: "";
  clear: both;
  display: table;
}

/* === Lista de enlaces === */
.social-links {
  list-style: none;
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center; /* 👈 centra horizontalmente */
}

.social-links li {
  margin: 1.5rem 0;
}

.social-links li a {
  display: block;
  background-color: #171717;
  color: #fff;
  padding: 0.75rem;
  text-decoration: none;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  border-radius: 4px;
  transition: all 0.2s ease-in-out;
  width: 250px;        /* 👈 ancho fijo o podés usar max-width */
  text-align: center;  /* centra el texto dentro del botón */
}

.social-links li a:hover {
  color: var(--accent-orange);
  transform: scale(1.05);
}
