/* RESET */
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  -webkit-tap-highlight-color: transparent !important;
  -webkit-focus-ring-color: transparent !important;
  outline: none !important;
}

*:focus,
*:active,
*:focus-within {
  outline: none !important;
  box-shadow: none !important;
}

/* Variables generales */
:root {
  --primary-pastel: #cbd5e1;
  --bg-card: #eceff1;
  --bg-body: #e2e8f0;
  --text-color: #2d3436;
  --border-radius: 12px
}

/* Variables en modo oscuro*/
[data-theme="dark"] {
  --bg-body: #0f172a;
  --bg-card: #1e293b;
  --primary-pastel: #334155;
  --text-color: #f8fafc;
  --accent-soft: #334155;
}

 html,
 body {
   height: 100%;
   font-family: monospace;
   background-color: var(--bg-body);
   transition: background-color 0.5s ease;
 }

/* HEADER */
.header {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--primary-pastel);
  color: var(--text-color);
  transition: background-color 0.5s ease, color 0.5s ease;
  padding: 1.5rem 1.5rem 1.5rem 1.5rem;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.logo a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: bold;
  font-size: 20px;
}

.nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  background: #222;
  display: none;
  flex-direction: column;
  text-align: center;
}

.nav-links li {
  border-bottom: 1px solid #333;
}

.nav-links li:last-child {
  border-bottom: none;
}

.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  display: block;
  border-radius: var(--border-radius);
  padding: 1rem;
  transition: background-color 0.2s ease;
}

.nav-links a:hover {
  background: var(--bg-body);
  color: var(--text-color);
  border-radius: 15px;
}

.nav-links a[onclick="return false;"] {
  color: #666;
  cursor: default;
  opacity: 0.7;
  font-style: italic;
}

.nav-links a[onclick="return false;"]:hover {
  color: var(--accent-color);
  opacity: 1;
}

.nav.active .nav-links {
  display: flex;
}

@media (min-width: 700px) {
  .menu-toggle {
    display: none;
  }

  .nav {
    flex-direction: row;
  }

  .nav-links {
    display: flex !important;
    position: static;
    flex-direction: row;
    background: none;
    width: auto;
    height: auto;
  }

  .nav-links li {
    border: none;
  }

  .nav-links a {
    padding: 0.5rem 1.2rem;
  }
}

/* BARRA DE FILTROS */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin: 1rem 0rem 0rem 0rem;
  justify-content: space-between;
}
.filter {
  display:flex;
  gap: 10px;
  align-items: center;
}

.filter label {
  font-weight: bold;
  color: var(--text-color);
  align-items: center;
  line-height: 1;
  display: inline-block;
  margin: 0;
}

.filter select {
  padding: 0.2rem 2rem 0.2rem 0.6rem;
  height: 30px;
  border: 1px solid var(--primary-pastel);
  border-radius: var(--border-radius);
  background-color: var(--bg-body);
  color: var(--text-color);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.filter select:hover {
  border-color: var(--bg-body);
}

.filter select:focus {
  outline: none;
  border-color: var(--primary-pastel);
  box-shadow: 0 0 0 2px rgba(95, 105, 95, 0.1);
}

.filter select option {
  color: var(--text-color);
}

/* Para Firefox: quitar la flecha nativa */
.filter-bar select:-moz-focusring {
  color: transparent;
  text-shadow: 0 0 0 #222;
}

@media (max-width: 600px) {
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  .filter-bar label {
    margin-right: 0;
    margin-bottom: 0.2rem;
  }
}

.btn-random {
  border: 1px solid var(--primary-pastel);
  border-radius: var(--border-radius);
  background-color: var(--bg-body);
  color: var(--text-color);
  padding: 0.2rem 2rem 0.2rem 0.6rem;
  height: 30px;
  cursor: pointer;
}

.btn-random:hover {
  border-color: var(--bg-body);
}

.btn-search {
  border: 1px solid var(--primary-pastel);
  border-radius: var(--border-radius);
  background-color: var(--bg-body);
  color: var(--text-color);
  padding: 0.2rem 1rem;
  height: 30px;
  cursor: pointer;
}

.btn-search:hover {
  border-color: var(--bg-body);
}

.search-box {
  position: relative;
  width: 100%;
}

#ascii-search {
  width: 100%;
  height: 30px;
  padding: 0.2rem 2rem 0.2rem 0.6rem;
  background: var(--bg-body, #222);
  border: 1px solid var(--primary-pastel);
  border-radius: var(--border-radius);
  color: var(--text-color);
  outline: none;
  transition: border-color 0.3s ease;
}

#ascii-search:focus {
  outline: none;
  border-color: var(--primary-pastel);
  box-shadow: 0 0 0 2px rgba(95, 105, 95, 0.1);
}

/* toogle */
.theme-switch {
  position: relative;
  width: 60px;
  height: 30px;
  display: block;
}

.theme-switch input {
  display: none;
}

.slider {
  background-color: var(--bg-body);
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px;
  transition: 0.4s;
  border: 1px solid var(--primary-pastel) ;
}

.ball {
  position: absolute;
  background-color: var(--text-color);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  left: 4px;
  transition: transform 0.4s ease;
  z-index: 2;
}

/* Animación de la bolita al marcar el checkbox */
#theme-checkbox:checked+.slider .ball {
  transform: translateX(30px);
}

#theme-checkbox:checked+.slider {
  background-color: #424242;
  /* Color del fondo en modo oscuro */
}

.icon {
  font-size: 14px;
}

/* MAIN */
.main {
  padding: 2rem 2rem 4rem 2rem; 
}

.main h1 {
  color: var(--text-color);
}

.contenedor-datos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(max(250px, 24%), 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
  align-items: stretch; /* Hace que todas las tarjetas de la fila tengan la misma altura */
}

.dato-item {
  background-color: var(--bg-card);
  border: 1px solid var(--primary-pastel);
  border-radius: var(--border-radius);
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100%;
  cursor: pointer !important;
}

.dato-item:hover .ascii-card,
.dato-item:hover .ascii-content {
  background: transparent !important;
  background-color: transparent !important;
}

.dato-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px var(--accent-soft, rgba(0, 0, 0, 0.15));
}

.dato-item:active {
  transform: scale(0.99);
}

[data-theme="dark"] .dato-item:hover {
  background-color: #3d4b5f;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

.ascii-title {
  font-size: 1.1em;
  color: var(--text-color);
  margin: 0 0 0.2em 0;
  font-size: 2rem;
}

/* ascii cards */
.ascii-card {
  background-color: var(--bg-card);
  color: var(--text-color);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  margin-bottom: auto;
}

.ascii-info {
display: flex;
  flex-direction: column;
  gap: 4px;
}

.botton-info {
  display: flex;
  justify-content: space-between;
  color: var(--text-color);
  align-items: flex-end;
  width: 100%;
  margin-top: 1rem;
}

.ascii-content {
  font-family: 'Courier New', monospace;
  white-space: pre-wrap;
  word-break: break-all;
  display: block;
  flex-shrink: 0;
}

.ascii-content.game-valorant {
  font-family: 'Courier New', monospace;
  letter-spacing: 0px;
}

.ascii-content.game-twitch {
  font-family: "Roobert", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
  white-space: pre !important;
  word-break: normal !important;
  line-height: 2 !important;
}

.ascii-content.game-general {
  font-family: ui-monospace, Monaco, Consolas, monospace;
}

.clicks-wrapper {
  font-size: 0.85rem;
  color: var(--primary-pastel);
  background: var(--bg-body);
  padding: 4px 10px;
  border-radius: var(--border-radius, 8px);
  font-weight: bold;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0 1rem;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  border: 2px solid transparent;
}

.pagination a {
  background: var(--bg-card);
  color: var(--text-color);
  border-color: var(--bg-card);
}

.pagination a:hover {
  background: var(--bg-body);
  color: var(--text-color);
  border-color: var(--bg-card);
}

.pagination .current-page {
  background: var(--bg-body);
  color: var(--text-color);
  cursor: default;
  border-bottom: 2px solid var(--bg-card);
}

.pagination .disabled {
  opacity: 0.8;
  cursor: not-allowed;
  background: var(--bg-card);
  color: var(--text-color);
  border-color: var(--bg-card);
}

.pagination-info {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted, #888);
}



.ranking-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 300px));
  gap: 1.5rem;
  margin-top: 1rem;
  align-items: start;
  justify-content: center;
}

.ranking-section {
  margin-bottom: 3rem;
}

.ranking-section h1 {
  margin-bottom: 1rem;
}

.ranking-section:last-child {
  margin-bottom: 0;
}

.ranking-item {
  position: relative;
  min-height: auto;
  transform: scale(0.94);
}

.ranking-position-1 {
  order: 2;
  transform: translateY(-18px);
}

/*
.ranking-position-1 .ranking-badge {
  background: #f59e0b;
  color: #1a1a1a;
  border-color: #f59e0b;
}
*/

.ranking-position-2 {
  order: 1;
}

.ranking-position-3 {
  order: 3;
}

.ranking-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  min-width: 38px;
  height: 30px;
  padding: 0 0.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-body);
  border: 1px solid var(--primary-pastel);
  border-radius: var(--border-radius);
  color: var(--text-color);
  font-weight: bold;
}

.ranking-item .ascii-title {
  padding-right: 3.5rem;
  font-size: 1.35rem;
}

.ranking-item .ascii-card {
  max-height: none;
  overflow: hidden;
  width: 100%;
}

.ranking-ascii-frame {
  width: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  padding: 0 4px;
}

.ranking-ascii-inner {
  display: inline-block;
  width: max-content;
  max-width: none;
  transform-origin: top center;
}

.ranking-ascii-inner .ascii-content {
  display: inline-block;
  width: var(--ascii-width, 100%) !important;
  min-width: var(--ascii-width, 100%) !important;
  max-width: none !important;
  margin: 0;
}

.ranking-ascii-inner .ascii-content.game-twitch,
.ranking-ascii-inner .ascii-content.game-twitch-chat {
  width: max-content !important;
  min-width: 0 !important;
  white-space: pre !important;
  word-break: normal !important;
}

@media (max-width: 900px) {
  .ranking-grid {
    grid-template-columns: minmax(220px, 320px);
  }

  .ranking-position-1,
  .ranking-position-2,
  .ranking-position-3 {
    order: initial;
    transform: none;
  }
}

/* FOOTER */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--primary-pastel);
  position: fixed;
  width: 100%;
  left: 0;
  bottom: 0;
  color: var(--text-color);
  padding: 0.7rem 1rem;
  text-align: center;
}

.footer-content a {
  color: var(--text-color);
  text-decoration: underline;
  margin-left: 0.5em;
}


/*-----------------------
- ESTILOS PARA SEND.PHP -
------------------------*/   

.form-container {
  max-width: 600px;
  margin: 2rem auto;
  padding: 2rem;
  background: var(--bg-card);
  border-radius: var(--border-radius);
  color: var(--text-color);
  line-height: 1.7;
}

.form-container h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--primary-pastel);
  padding-bottom: 0.5rem;
}

.form-group { 
  margin-bottom: 15px; 
  display: flex; 
  flex-direction: column; 
}

label { 
  font-weight: bold; 
  margin-bottom: 5px; 
}

input, select, textarea { 
  padding: 10px; 
  border: 1px solid var(--primary-pastel); 
  border-radius: var(--border-radius); 
  background-color: var(--bg-body);
  color: var(--text-color);
}

textarea { 
  font-family: monospace; 
  resize: vertical; 
}

.submit-button {
  padding: 10px 20px; 
  cursor: pointer; 
  background: #2ecc71; 
  color: white; 
  border: none; 
  border-radius: var(--border-radius);
}

/*--------------------------------------
- ESTILOS PARA POLITICA-PRIVACIDAD.PHP -
--------------------------------------*/

.privacidad-container {
  padding: 1rem;
  color: var(--text-color);
}

.privacidad-container ul {
  list-style-type: none;
  padding-left: 0;
}

.privacidad-container ul li {
  padding-left: 20px;
  margin-bottom: 10px;
  position: relative;
}

/*--------------------------------------
- ESTILOS PARA NOSOTROS.PHP -
--------------------------------------*/

.about-section {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  background: var(--bg-card);
  border-radius: var(--border-radius);
  color: var(--text-color);
  line-height: 1.7;
}

.about-section h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--primary-pastel);
  padding-bottom: 0.5rem;
}

.about-section h2 {
  font-size: 1.2rem;
  margin-top: 2rem;
  margin-bottom: 0.6rem;
  color: var(--primary-pastel);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.about-section p {
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.about-section ul {
  list-style: none;
  padding: 0;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.about-section ul li {
  font-size: 0.95rem;
  padding: 0.6rem 1rem;
  background: var(--bg-body);
  border-radius: var(--border-radius);
  border-left: 3px solid var(--primary-pastel);
}

.about-section a {
  color: var(--primary-pastel);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.about-section a:hover {
  opacity: 0.75;
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .about-section {
    margin: 1rem;
    padding: 1.2rem;
  }

  .about-section h1 {
    font-size: 1.5rem;
  }
}

/* Contenedor de donación */
.donacion-container {
  display: flex;
  justify-content: center;
  margin: 3rem 0;
  padding: 0 1rem;
}

.donacion-card {
  background-color: var(--bg-card);
  border: 2px dashed var(--primary-pastel);
  border-radius: var(--border-radius);
  padding: 2rem;
  max-width: 500px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.donacion-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.donacion-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.donacion-card h3 {
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.donacion-card p {
  color: var(--text-color);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

/* Botón Estilo PayPal */
.btn-paypal {
  display: inline-flex;
  align-items: center;
  background-color: var(--text-color);
  color: var(--bg-card) !important;
  text-decoration: none;
  padding: 10px 25px;
  border-radius: var(--border-radius);
  font-weight: bold;
  transition: opacity 0.2s ease;
}

.btn-paypal:hover {
  opacity: 0.9;
}

.paypal-logo {
  font-style: italic;
  font-weight: 900;
  margin-right: 8px;
  border-right: 1px solid;
  padding-right: 8px;
}

.paypal-email {
  margin-top: 1rem;
  font-size: 0.8rem !important;
  opacity: 0.7;
}

.paypal-email span {
  font-family: monospace;
  text-decoration: underline;
}

[data-theme="dark"] .donacion-card {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/*--------------------------------------
- ESTILOS PARA NOSOTROS.PHP -
--------------------------------------*/

.status-card {
  background-color: var(--bg-card);
  padding: 3rem;
  border-radius: 10px;
  justify-self: center;
  max-width: 500px;
  border: 2px solid var(--primary-pastel);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.status-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.status-line {
  height: 2px;
  background: var(--primary-pastel);
  width: 50px;
  margin: 1.5rem auto;
  opacity: 0.5;
}

.status-note {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 1rem 0;
}

.ascii-mini-preview pre {
  font-family: monospace;
  font-size: 10px;
  color: var(--text-color);
  opacity: 0.7;
  margin: 2rem 0;
}

/* Botón retro */
.btn-retro {
  display: inline-block;
  padding: 10px 20px;
  color: var(--text-color);
  text-decoration: none;
  border: 1px solid var(--text-color);
  transition: all 0.3s;
  font-weight: bold;
}

.btn-retro:hover {
  background-color: var(--text-color);
  color: var(--bg-color);
}

code {
  background-color: rgba(255, 70, 85, 0.1);
  padding: 2px 5px;
  border-radius: 4px;
  color: #ff4655;
  font-size: 0.9em;
}

/*-----------------------
- ESTILOS PARA ASCII_EDITOR.PHP -
------------------------*/

.creator-container {
  display: flex;
  gap: 20px;
  min-height: 70vh;
}

/* Columna Izquierda */
.toolbar {
  flex: 0 0 150px;
  background: var(--bg-card, #f4f4f4);
  padding: 1rem;
  border-radius: var(--border-radius);
  display: flex;
  flex-direction: column;
  gap: 15px;
  color: var(--text-color);
}

.tool-group p {
  color: var(--text-color);
  font-size: 0.8em;
  margin-bottom: 1rem;
  font-weight: bold;
  text-transform: uppercase;
}

/* --- BOTÓN DE HERRAMIENTA MODIFICADO --- */
.btn-tool {
  width: 28px;
  height: 28px;
  font-family: monospace;
  font-size: 1rem;
  cursor: pointer;
  margin: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
}

#brush-set {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  max-height: 280px;
  overflow-y: auto;
}

.custom-char-group p {
  color: var(--text-color);
  font-size: 0.8em;
  margin-bottom: 0.5rem;
  font-weight: bold;
  text-transform: uppercase;
}

.custom-char-input {
  display: flex;
  gap: 4px;
  align-items: center;
}

#custom-char {
  width: 32px;
  height: 32px;
  text-align: center;
  font-family: monospace;
  font-size: 1rem;
  background: var(--bg-body);
  border: 1px solid var(--primary-pastel);
  border-radius: var(--border-radius);
  color: var(--text-color);
  padding: 0;
}

.btn-action {
  border: 1px solid var(--primary-pastel);
  border-radius: var(--border-radius);
  background-color: var(--bg-body);
  color: var(--text-color);
  padding: 0.2rem 2rem 0.2rem 0.6rem;
  height: 30px;
  cursor: pointer;
  margin-bottom: 0.4rem;
}

.toolbar.twitch .btn-tool {
  width: 24px;
  height: 24px;
  font-size: 0.75rem;
}

.btn-tool.active {
  outline: 2px solid var(--primary-pastel);
  background: none;
}

/* Estilo para el contenedor h4 */
h4 {
  margin: 1rem 0;
  font-family: inherit;
  /* Hereda la fuente principal de tu web */
}

/* Estilo base del enlace */
h4 a {
  color: var(--text-color);
  font-size: 1.1rem;
  transition: color 0.2s ease-in-out;
}

#select-juego {
  padding: 0.2rem 2rem 0.2rem 0.6rem;
  height: 30px;
  border: 1px solid var(--primary-pastel);
  border-radius: var(--border-radius);
  background-color: var(--bg-body);
  color: var(--text-color);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

/* Columna Derecha */
.drawing-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.canvas-filters {
  display: flex;
  flex-direction: row;
  gap: 15px;
  background: var(--bg-card, #eee);
  border-radius: var(--border-radius);
  padding: 1rem;
  align-items: center;
  color: var(--text-color);
}

.filter select {
  padding: 0.2rem 2rem 0.2rem 0.6rem;
  height: 30px;
  border: 1px solid var(--primary-pastel);
  border-radius: var(--border-radius);
  background-color: var(--bg-body);
  color: var(--text-color);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.filter-item,
.filter-item-range {
  display: flex;
  align-items: center;
  gap: 15px;
  white-space: nowrap;
}

#range-row {
  -webkit-appearance: none;
  appearance: 0;
  width: 150px;
  background: #333;
  border-radius: 10px;
  height: 10px;
  outline: none;
  padding: 0;
}

#range-row::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: 0;
  width: 10px;
  height: 10px;
  background: #28a745;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #fff;
  margin-top: 0;
}

.badge-beta {
  font-size: 11px;
  font-weight: bold;
  border-radius: var(--border-radius);
  padding: 0.3rem 0.6rem;
  background-color: rgba(100, 65, 165, 0.15);
  border: 1px solid  #6441a5;
  color: #6441a5;
}

/* Estilo para el contenedor del Label */
.filter-item-range label {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-color, #333);
  display: flex;
  align-items: center;
  cursor: pointer;
}

#row-count {
  display: inline-block;
  min-width: 25px;
  text-align: center;
  background-color: rgba(46, 204, 113, 0.12);
  border: 1px solid #2ecc71;
  color: #2ecc71;
  padding: 2px 4px;
  border-radius: var(--border-radius);
  font-family: monospace;
}

/* Efecto cuando pasas el ratón sobre el grupo */
.filter-item-range:hover #row-count {
  transform: scale(1.1);
  background: #218838;
}

/* El lienzo */
.canvas-wrapper {
  flex: 1;
  overflow: hidden;
  height: auto;
}

#ascii-canvas {
  width: 100%;
  height: 100%;
  background: transparent;
  color: var(--text-color);
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  line-height: 1.2;
  border: none;
  resize: none;
  padding: 20px;
  white-space: pre;
  overflow: auto;
}

/* Responsive para móvil */
@media (max-width: 768px) {
  .creator-container {
    flex-direction: column;
  }

  .toolbar {
    flex: none;
    flex-direction: row;
    overflow-x: auto;
  }
}

.grid-wrapper {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  overflow: auto;
  height: auto;
  padding: 1rem;
}

.pixel-grid {
  display: grid !important;
  grid-template-columns: repeat(var(--grid-cols, 26), 1fr) !important;
  gap: 0 !important;
  width: 100% !important;
  background: transparent;
  image-rendering: pixelated;
  shape-rendering: crispedges;
  container-type: inline-size;
  font-size: calc(100cqw / var(--grid-cols, 26) * 0.95);
}

.cell {
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  /* Cuadrados perfectos obligatorios */
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  cursor: crosshair;
  box-sizing: border-box;
  box-shadow: 0 0 0 1px #444;
  /* Tu rejilla gris */
  line-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  font-family: monospace;
  font-size: inherit;
  overflow: hidden !important;
  /* Si el carácter es grande, se corta, no dobla la celda */
}

/* PON ESTO */
.pixel-grid.game-twitch {
  font-size: 25px !important;
}

.pixel-grid.game-valorant {
  font-size: 25px !important;
}

/* Preview Panel */
.preview-panel {
  flex: 0 0 0px;
  width: 0;
  overflow: hidden;
  background: var(--bg-card);
  border-radius: var(--border-radius);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0;
  opacity: 0;
  transition: flex-basis 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
}

.preview-panel.active {
  flex: 0 0 250px;
  padding: 1rem;
  opacity: 1;
  overflow: auto;
}

.creator-container.preview-active .pixel-grid.game-twitch {
  font-size: calc(100cqw / var(--grid-cols, 27) * 0.4) !important;
}

.creator-container.preview-active .pixel-grid.game-valorant {
  font-size: calc(100cqw / var(--grid-cols, 26) * 0.4) !important;
}

.creator-container.preview-active .pixel-grid {
  font-size: calc(100cqw / var(--grid-cols, 26) * 0.4) !important;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.preview-header p {
  font-size: 0.8em;
  font-weight: bold;
  text-transform: uppercase;
  color: var(--text-color);
}

.preview-content {
  overflow: hidden;
  /* cambia de auto a hidden */
  flex: 1;
  position: relative;
}

.preview-content .ascii-content {
  font-size: 12px;
  white-space: pre;
  word-break: normal;
  line-height: 1;
  letter-spacing: 0;
  font-family: 'Courier New', monospace;
}
/* Twitch usa su propia fuente */
.preview-content .ascii-content.game-twitch-chat,
.preview-content .ascii-content.game-twitch {
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 2;
}

.preview-hint {
  font-size: 0.75rem;
  color: var(--text-color);
  text-align: center;
  line-height: 1.4;
  opacity: 0.8;
  border-top: 1px solid var(--primary-pastel);
  padding-top: 0.75rem;
  margin-top: auto;
}

.preview-content .ascii-content {
  font-size: 12px;
  white-space: pre;
  word-break: normal;
  line-height: 1.2;
}

@media (max-width: 768px) {
  .preview-panel.active {
    flex: none;
    width: 100%;
  }
}

/*-----------------------
- ESTILOS PARA TERM-CONDITION.PHP -
------------------------*/

.terms-container {
  color:  var(--text-color);
  padding: 1rem;;
}

.terms-container ul {
  list-style-type: none;
  padding-left: 0;
}

.terms-container ul li {
  padding-left: 20px;
  margin-bottom: 10px;
  position: relative;
}

/*-----------------------
- ESTILOS PARA REQUES-BOARD.PHP -
------------------------*/

.foro-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem;
}

/* Columna del formulario (Izquierda) */
.columna-form {
  flex: 0 0 350px;
  position: sticky;
  top: 20px;
}

/* Mosaico de Peticiones (Derecha) */
.contenedor-request-mosaico {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  align-items: start;
}

.item-request,
.item-request-form {
  background-color: var(--bg-card);
  border: 1px solid var(--primary-pastel);
  border-radius: var(--border-radius);
  padding: 1rem;
  width: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.item-request {
  display: block;
  cursor: pointer !important;
  color: var(--text-color);
  will-change: transform;
  /* Unificadas todas las transiciones en una sola declaración limpia */
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.item-request:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.juego-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: bold;
  padding: 0.3rem 1rem;
  border-radius: var(--border-radius);
  background-color: var(--bg-body);
  border: 1px solid var(--primary-pastel);
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

/* Valorant - rojo */
.juego-tag.game-valorant {
  background-color: rgba(255, 70, 85, 0.12);
  border-color: #ff4655;
  color: #ff4655;
}

/* Twitch Chat - morado */
.juego-tag.game-twitch-chat {
  background-color: rgba(100, 65, 165, 0.15);
  border-color: #6441a5;
  color: #6441a5;
}

.form-card-special {
  cursor: default !important;
  border: 2px dashed var(--primary-pastel);
}

.form-card-special:hover {
  transform: none !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

.form-group-mini {
  margin-bottom: 1rem;
}

.form-group-mini label {
  display: block;
  font-size: 0.85rem;
  font-weight: bold;
  margin-bottom: 5px;
  color: var(--primary-pastel);
}

.form-group-mini input,
.form-group-mini select,
.form-group-mini textarea {
  width: 100%;
  padding: 0.8rem;
  background-color: var(--bg-body);
  border: 1px solid var(--primary-pastel);
  color: var(--text-color);
  border-radius: var(--border-radius);
  outline: none;
  font-family: inherit;
}

.form-group-mini select option {
  background-color: var(--bg-body);
  color: var(--text-color);
}

[data-theme="dark"] .form-group-mini select {
  color-scheme: dark;
}

.submit-button-mini {
  background: var(--primary-pastel);
  color: var(--text-color);
  border: none;
  padding: 1rem;
  border-radius: var(--border-radius);
  width: 100%;
  cursor: pointer;
  font-weight: bold;
  margin-top: 0.5rem;
  transition: filter 0.2s;
}

.submit-button-mini:hover {
  filter: brightness(1.2);
}

@media (max-width: 1000px) {
  .foro-layout {
    flex-direction: column;
  }

  .columna-form {
    width: 100%;
    position: static;
    flex: none;
  }
}

@media (max-width: 600px) {
  .contenedor-request-mosaico {
    grid-template-columns: 1fr;
  }
}
/*-------------------------------------------
- ESTILOS PARA HOW_TO_USE_ASCII_CREATOR.PHP -
-------------------------------------------*/
/* Contenedor que agrupa las tarjetas */
.instruction-contenedor {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  padding: 2rem 0;
}

/* Tarjeta individual (Diseño vertical por defecto) */
.instruction-card {
  display: flex;
  flex-direction: column;
  /* Fuerza a que la imagen se quede arriba y el texto abajo */
  padding: 1rem;
  background: var(--bg-card);
  width: 100%;
  max-width: 280px;
  border: 1px solid var(--primary-pastel);
  border-radius: 8px;
  /* Un toque estético opcional para redondear esquinas */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.instruction-img {
  width: 100%;
  height: 160px;
  /* Altura de la zona de la imagen */
  margin-bottom: 1rem;
  background-color: var(--bg-card-dark, #f5f5f5);
  /* Un color de fondo suave */
  border-radius: 6px;
  border: 1px dashed var(--primary-pastel);
  /* Un borde sutil estilo pixel/retro */

  /* Esto centra tu imagen pequeña perfectamente en medio del recuadro */
  display: flex;
  align-items: center;
  justify-content: center;
}

.instruction-img img {
  /* Al quitar el width 100%, la imagen mantiene su tamaño original pequeño y no se pixela */
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

/* Bloque de texto inferior */
.instruction-info {
  color: var(--text-color);
  font-size: 0.95rem;
  line-height: 1.4;
}

