/*//<!--final-->*/
:root {
  --c1: #042940;
  --c2: #005c53;
  --c3: #9fc131;
  --c4: #dbf227;
  --c5: #d6d58e;

  --bg: #000000;
  --bg-elevated: rgba(4, 41, 64, 0.95);
  --border-soft: rgba(214, 213, 142, 0.25);
  --text-main: #f5f7fa;
  --text-muted: #c4d0dc;
  --accent: var(--c3);
  --accent-soft: rgba(159, 193, 49, 0.2);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  background: #000000;
  /* IMPORTANTE: Permitir scroll vertical para ver el directorio SEO */
  overflow-y: auto; 
  overflow-x: hidden;
}

/* Canvas full screen */
#canvas-container {
  position: relative;
  width: 100%;      /* antes 100vw → así evitamos el “hueco” por la barra de scroll */
  height: 100%;
  overflow: hidden;
  display: block;
  touch-action: none;
}



/* Overlay instrucciones */
#canvas-overlay {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 15;
}

.overlay-badge {
  background: rgba(0, 0, 0, 0.6);
  border-radius: 999px;
  padding: 4px 10px;
  margin-right: 7px;
  font-size: 11px;
  border: 1px solid rgba(219, 242, 39, 0.35);
  color: var(--c5);
}

/* Top-left botones */
#top-left-ui {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 20;
  display: flex;
  gap: 8px;
}

/* Botones pill */
.pill-button {
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: rgba(0, 92, 83, 0.95);
  color: var(--text-main);
  border: 1px solid rgba(219, 242, 39, 0.15);
  backdrop-filter: blur(12px);
  transition: background 0.15s, transform 0.1s, box-shadow 0.1s;
}

.pill-button:hover {
  background: rgba(0, 92, 83, 1);
  box-shadow: 0 0 0 1px rgba(219, 242, 39, 0.2);
  transform: translateY(-1px);
}

.pill-button.active {
  background: rgba(219, 242, 39, 0.18);  /* un pelín más intenso que el hover */
  box-shadow: 0 0 0 1px rgba(219, 242, 39, 0.85);
  transform: none;                        /* sin “empujarse” hacia abajo */
}

/* Si quieres que las “secundarias” también se vean claras cuando estén activas */
.pill-button.pill-secondary.active {
  background: rgba(4, 41, 64, 1);
  box-shadow: 0 0 0 1px rgba(219, 242, 39, 0.4);
}

.pill-secondary {
  background: rgba(4, 41, 64, 0.95);
}

.pill-secondary:hover {
  background: rgba(4, 41, 64, 1);
}

/* Panel info píxel */
#pixel-info-panel {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 15;
  min-width: 210px;
  /* Subimos un poco el padding top para dejar hueco
     a la X de cerrar y a la banderita */
  padding: 24px 12px 10px 16px;
  border-radius: 16px;
  background: rgba(4, 41, 64, 0.95);
  border: 1px solid var(--border-soft);
  backdrop-filter: blur(18px);
  font-size: 12px;
}

.pixel-report-button {
  position: absolute;
  top: 5px;
  left: 8px;
}

#pixel-info-panel.hidden {
  display: none;
}

.pixel-info-close {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 14px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.pixel-info-close:hover {
  color: var(--c4);
}

.pixel-info-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3px;
}

.pixel-info-row .label {
  color: var(--text-muted);
}

.pixel-info-row .value {
  font-weight: 500;
}

.pixel-info-actions {
  margin-top: 6px;
  display: flex;
  gap: 6px;
}

/* Paleta inferior: solo en modo Paint */
#palette-bar {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(4, 41, 64, 0.92);
  border: 1px solid rgba(214, 213, 142, 0.3);
  backdrop-filter: blur(16px);
}

body.paint-mode #palette-bar {
  display: inline-flex;
}

.palette-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

#palette {
  display: inline-flex;
  gap: 4px;
}

.palette-color {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.7);
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(4, 41, 64, 0.9);
}

.palette-color.selected {
  box-shadow: 0 0 0 2px var(--c4);
}

.palette-hex {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.palette-hex input {
  width: 70px;
  border-radius: 999px;
  border: 1px solid rgba(214, 213, 142, 0.5);
  background: rgba(2, 24, 36, 0.9);
  color: var(--text-main);
  font-size: 11px;
  padding: 3px 6px;
}

/* Botón de confirmar pintura */
#btn-confirm-paint.confirm-button {
  margin-left: 0.75rem;
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
  opacity: 0.6;
  cursor: not-allowed;
  transition: opacity 0.15s ease, transform 0.08s ease;
}

#btn-confirm-paint.confirm-button.enabled {
  opacity: 1;
  cursor: pointer;
}

#btn-confirm-paint.confirm-button.enabled:hover {
  transform: translateY(-1px);
}

#btn-confirm-paint.confirm-button.enabled:active {
  transform: translateY(0);
}

/* Botones pequeños */
.mini-button {
  border-radius: 999px;
  border: none;
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
  background: var(--c3);
  color: #02100b;
  font-weight: 600;
}

.mini-button:hover:not(:disabled) {
  background: #b3dd3e;
}

.mini-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.mini-button.outline {
  background: transparent;
  color: var(--c5);
  border: 1px solid rgba(214, 213, 142, 0.6);
  margin-top: 2px; 
  margin-bottom: 2px;
}

.paint-toggle {
  padding: 6px 18px;
  font-size: 13px;
  border-radius: 999px;
}

body.paint-mode #btn-paint {
  background: linear-gradient(135deg, var(--c2), var(--c3));
  color: #ffffff;
}

.palette-tool {
  border-radius: 999px;
  border: 1px solid rgba(214, 213, 142, 0.6);
  background: rgba(2, 24, 36, 0.9);
  color: var(--text-main);
  font-size: 11px;
  padding: 4px 10px;
  cursor: pointer;
}

.palette-tool.active {
  background: var(--c2);
  color: #ffffff;
  border-color: var(--c4);
}

/* Botón Erase */
.secondary-button.small {
  border-radius: 999px;
  border: 1px solid rgba(214, 213, 142, 0.6);
  background: rgba(2, 24, 36, 0.9);
  color: var(--text-main);
  font-size: 11px;
  padding: 4px 10px;
  cursor: pointer;
}

.secondary-button.small.active {
  background: var(--c2);
  color: #ffffff;
  border-color: var(--c4);
}

/* Modales */
.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  z-index: 1;
  width: 320px;
  max-width: 90vw;
  border-radius: 20px;
  padding: 14px 16px 14px;
  background: radial-gradient(circle at top left, rgba(159, 193, 49, 0.06), rgba(4, 41, 64, 0.98));
  border: 1px solid rgba(214, 213, 142, 0.4);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.7);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.modal-header h2 {
  font-size: 18px;
  margin: 0;
}

#topup-modal {
  z-index: 35;
}

.icon-button {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 18px;
  padding: 2px 4px;
  cursor: pointer;
}

.icon-button:hover {
  color: var(--c4);
}

/* Formularios */
.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 8px;
}

.form-group label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.form-group input {
  border-radius: 10px;
  border: 1px solid rgba(0, 92, 83, 0.8);
  padding: 6px 10px;
  background: rgba(2, 24, 36, 0.9);
  color: var(--text-main);
  font-size: 13px;
}

.form-group input:focus {
  outline: none;
  border-color: var(--c3);
  box-shadow: 0 0 0 1px rgba(159, 193, 49, 0.4);
}

/* Botones principales */
.primary-button {
  border-radius: 12px;
  border: none;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, var(--c3), var(--c4));
  color: #02100b;
  margin-top: 1px;
  width: 100%;
}

.primary-button.slim {
  width: auto;
  padding-inline: 14px;
}

.primary-button:hover:not(:disabled) {
  filter: brightness(1.05);
}

.primary-button.danger {
  background: linear-gradient(135deg, #b72424, #f5855a);
  color: #fff4f0;
}

/* Tabs perfil */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(2, 24, 36, 0.7);
}

.tab-button {
  flex: 1;
  border-radius: 999px;
  border: none;
  padding: 4px 6px;
  font-size: 12px;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
}

.tab-button.active {
  background: rgba(159, 193, 49, 0.18);
  color: var(--c4);
}

.tab-content.hidden {
  display: none;
}

.modal-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Perfil logeado */
.profile-summary p {
  margin: 4px 0;
  font-size: 13px;
}

.profile-summary .label {
  color: var(--text-muted);
  margin-right: 4px;
}

.profile-summary .value {
  font-weight: 500;
}

.profile-stats {
  display: flex;
  gap: 8px;
  margin: 10px 0;
}

.profile-stats-3 .stat {
  flex: 1;
}

.stat {
  padding: 6px 8px;
  border-radius: 12px;
  background: rgba(4, 41, 64, 0.9);
  border: 1px solid rgba(219, 242, 39, 0.25);
  text-align: center;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

.stat-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--c4);
}

/* Shop */
.shop-body {
  font-size: 13px;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
  margin-top: 8px;
}

.static-value {
  border-radius: 10px;
  border: 1px solid rgba(0, 92, 83, 0.8);
  padding: 6px 10px;
  background: rgba(2, 24, 36, 0.9);
  color: var(--text-main);
  font-size: 13px;
}

#price-results {
  margin-top: 10px;
  font-size: 13px;
}

#price-results p {
  margin: 2px 0;
}

.buy-group {
  margin-top: 10px;
}

.shop-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Offer modal */
.offer-body p {
  margin: 3px 0;
  font-size: 13px;
}

.offer-body .label {
  color: var(--text-muted);
  margin-right: 4px;
}

.offer-body .value {
  font-weight: 500;
}

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  min-width: 240px;
  max-width: 90vw;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(4, 41, 64, 0.95);
  border: 1px solid rgba(219, 242, 39, 0.4);
  color: var(--text-main);
  font-size: 13px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 40;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  border-color: rgba(159, 193, 49, 0.8);
}

.toast.error {
  border-color: rgba(255, 90, 90, 0.8);
}

.toast.info {
  border-color: rgba(219, 242, 39, 0.8);
}

/* ===== Scrollbars customizadas ===== */
#profile-modal .modal-content {
  scrollbar-width: thin; 
  scrollbar-color: rgba(159, 193, 49, 0.7) rgba(4, 41, 64, 0.98);
}
#profile-modal .modal-content::-webkit-scrollbar {
  width: 8px;
}
#profile-modal .modal-content::-webkit-scrollbar-track {
  background: rgba(4, 41, 64, 0.98);
  border-radius: 999px;
}
#profile-modal .modal-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--c3), var(--c4));
  border-radius: 999px;
  border: 1px solid rgba(2, 24, 36, 0.9);
}

#profile-modal:has(#profile-offers-tab:not(.hidden)) .modal-content {
  width: 980px;
  max-width: 95vw;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}

.offer-pack-input {
  width: 140px;
  border-radius: 10px;
  border: 1px solid rgba(214, 213, 142, 0.7);
  padding: 6px 10px;
  background: rgba(2, 24, 36, 0.95);
  color: var(--text-main);
  font-size: 13px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.7) inset;
  appearance: none;
}
.offer-pack-input:focus {
  outline: none;
  border-color: var(--c3);
  box-shadow: 0 0 0 1px rgba(159, 193, 49, 0.6) inset;
}


/* --- Landing SEO debajo del canvas --- */
.landing-container {
  position: relative;
  z-index: 10;
  background: radial-gradient(circle at top, #02100b 0%, #000000 70%);
  padding: 40px 20px 30px;
  border-top: 1px solid var(--c2);
}

.landing-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.landing-text h1 {
  font-size: 2.3rem;
  margin-bottom: 10px;
  color: var(--c4);
}

.landing-lead {
  font-size: 1rem;
  max-width: 700px;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.landing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.landing-card {
  background: rgba(4, 41, 64, 0.7);
  border-radius: 14px;
  border: 1px solid rgba(159, 193, 49, 0.25);
  padding: 14px 16px;
  font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.landing-card h2 {
  font-size: 1.1rem;
  margin: 0 0 6px;
  color: var(--c3);
}

.landing-card p {
  margin: 0;
  color: var(--text-muted);
}

.landing-card:hover {
  transform: translateY(-2px);
  border-color: var(--c3);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.55);
}

.landing-cta {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.secondary-link {
  font-size: 0.95rem;
  color: var(--c3);
  text-decoration: none;
  margin-right: 10px;
  padding-left: 1%;
  padding-top: 5px;
}

.secondary-link:hover {
  text-decoration: underline;
}

.terceros-link {
  font-size: 0.95rem;
  color: var(--c4);
  text-decoration: none;
  margin-right: 10px;
  padding-left: 1%;
}

.terceros-link:hover {
  text-decoration: underline;
}

/* ========================================================= */
/* NUEVOS ESTILOS PARA SEO (DIRECTORIO) Y EDICIÓN DE PERFIL */
/* ========================================================= */

/* --- Directorio SEO (Debajo del canvas) --- */
.directory-container {
  position: relative;
  z-index: 10; /* Encima del background */
  background: #02100b;
  padding: 40px 20px;
  min-height: 400px;
  border-top: 1px solid var(--c2);
}

.directory-header {
  max-width: 1000px;
  margin: 0 auto 30px auto;
  text-align: center;
}

.directory-header h2 {
  color: var(--c4);
  font-size: 2rem;
  margin-bottom: 10px;
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.dir-card {
  background: rgba(4, 41, 64, 0.6);
  border: 1px solid rgba(159, 193, 49, 0.2);
  border-radius: 12px;
  padding: 16px;
  transition: transform 0.2s, border-color 0.2s;
}

.dir-card .dir-report-button {
  position: absolute;
  top: 5px;
  right: 5px;
  padding-left: 3px;
}

.dir-card:hover {
  transform: translateY(-3px);
  border-color: var(--c3);
}

.dir-user {
  color: var(--c4);
  font-weight: bold;
  font-size: 1.1em;
  display: block;
  margin-bottom: 4px;
  text-decoration: none;
}

.dir-slogan {
  color: var(--text-muted);
  font-size: 0.9em;
  font-style: italic;
  margin-bottom: 8px;
  display: block;
}

.dir-stats {
  font-size: 0.8em;
  color: var(--c2);
  margin-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 8px;
}

/* Enlaces del directorio */
.link-style {
  color: var(--c3);
  text-decoration: none;
}
.link-style:hover {
  text-decoration: underline;
}

/* --- Edición de Perfil --- */
.profile-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.edit-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  margin-bottom: 10px;
}

.secondary-button {
  background: rgba(4, 41, 64, 0.8);
  color: var(--text-main);
  border: 1px solid var(--border-soft);
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
}
.secondary-button:hover {
  background: rgba(4, 41, 64, 1);
  border-color: var(--c3);
}

.text-muted-ital {
  color: #777;
  font-style: italic;
}
.hidden {
  display: none !important;

}



/* Icono de verificado */
.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  background-color: #1DA1F2; /* Azul */
  color: white;
  border-radius: 50%;
  font-size: 9px;
  margin-left: 4px;
  margin-bottom: 1px;
  margin-right: 3px;
  vertical-align: middle;
  border: 1px solid rgba(255,255,255,0.2);
}
.verified-badge::after {
  content: "✓";
  font-weight: bold;
}

.form-group textarea {
  border-radius: 10px;
  border: 1px solid rgba(0, 92, 83, 0.8);
  padding: 6px 10px;
  background: rgba(2, 24, 36, 0.9);
  color: var(--text-main);
  font-size: 13px;
  resize: vertical;
  min-height: 70px;
}

.form-group textarea:focus {
  outline: none;
  border-color: var(--c3);
  box-shadow: 0 0 0 1px rgba(159, 193, 49, 0.4);
}


/* ========================= */
/* SECCIÓN NEWS / NOVEDADES  */
/* ========================= */
.news-container {
  position: relative;
  z-index: 10;
  background: #010808;
  border-top: 1px solid var(--c2);
  padding: 40px 20px 32px;
}

.news-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.news-header {
  text-align: center;
  margin-bottom: 24px;
}

.news-header h2 {
  font-size: 2rem;
  color: var(--c4);
  margin-bottom: 6px;
}

.news-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.news-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .news-layout {
    grid-template-columns: 1fr;
  }
}

.news-highlight-panel,
.news-feed-panel {
  background: rgba(4, 41, 64, 0.65);
  border-radius: 16px;
  border: 1px solid rgba(159, 193, 49, 0.25);
  padding: 14px 16px;
}

.news-highlight-panel h3,
.news-feed-panel h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  color: var(--c3);
}

.news-highlight-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.news-highlight-card {
  padding: 10px 12px;
  border-radius: 12px;
  background: radial-gradient(circle at top left, rgba(219, 242, 39, 0.25), rgba(4, 41, 64, 0.9));
  border: 1px solid rgba(219, 242, 39, 0.6);
  font-size: 0.9rem;
}

.news-highlight-card .event-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.news-highlight-card .event-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.news-feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.news-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Botón tipo pill reutilizable */
.pill-filter {
  border-radius: 999px;
  border: 1px solid rgba(214, 213, 142, 0.6);
  background: rgba(2, 24, 36, 0.9);
  color: var(--text-main);
  font-size: 11px;
  padding: 4px 10px;
  cursor: pointer;
}

.pill-filter.active {
  background: var(--c3);
  color: #02100b;
  border-color: var(--c4);
}

.news-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

.news-feed::-webkit-scrollbar {
  width: 6px;
}
.news-feed::-webkit-scrollbar-thumb {
  background: rgba(159, 193, 49, 0.8);
  border-radius: 999px;
}
.news-feed::-webkit-scrollbar-track {
  background: rgba(4, 41, 64, 0.8);
}

.news-event-card {
  display: grid;
  grid-template-columns: minmax(0, 0.6fr) minmax(0, 1.4fr);
  gap: 4px 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(2, 24, 36, 0.95);
  border: 1px solid rgba(214, 213, 142, 0.25);
  font-size: 0.85rem;
}

.news-event-card .event-main {
  font-weight: 500;
}

.news-event-card .event-detail {
  color: var(--text-muted);
}

.news-event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.news-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.7rem;
  border: 1px solid rgba(159, 193, 49, 0.8);
  color: var(--c4);
}

.news-badge.type-purchase {
  border-color: #4caf50;
  color: #b2ffb2;
}
.news-badge.type-rent {
  border-color: #2196f3;
  color: #bbddff;
}
.news-badge.type-expire {
  border-color: #ff9800;
  color: #ffe0b2;
}
.news-badge.type-pixel {
  border-color: #e91e63;
  color: #ffc1e3;
}

.news-empty {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ========================= */
/* SECCIÓN GALERÍA / SOCIAL  */
/* ========================= */

.gallery-container {
  position: relative;
  z-index: 10;
  background: #02100b;
  padding: 40px 20px 50px;
  border-top: 1px solid var(--c2);
}

.gallery-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 20px;
}

.gallery-header h2 {
  font-size: 2rem;
  color: var(--c4);
  margin: 0 0 4px;
}

.gallery-header p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.95rem;
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.gallery-post-form-wrapper {
  background: rgba(4, 41, 64, 0.7);
  border-radius: 16px;
  border: 1px solid rgba(159, 193, 49, 0.3);
  padding: 14px 16px 12px;
  margin-bottom: 20px;
}

.gallery-post-form-wrapper h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
  color: var(--c3);
}

.gallery-hint {
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.gallery-post-form .form-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 10px;
}

@media (max-width: 800px) {
  .gallery-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .gallery-post-form .form-row {
    grid-template-columns: 1fr;
  }
}

.gallery-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.gallery-post-card {
  background: rgba(4, 41, 64, 0.7);
  border-radius: 14px;
  border: 1px solid rgba(159, 193, 49, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 260px;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.gallery-post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
  border-color: var(--c3);
}

.gallery-post-thumb {
  position: relative;
  width: 100%;
  padding-top: 65%;
  overflow: hidden;
  background: #000;
}

.gallery-post-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-post-body {
  padding: 10px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.gallery-post-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.gallery-post-desc {
  font-size: 0.83rem;
  color: var(--text-muted);
  max-height: 3.2em;
  overflow: hidden;
}

.gallery-post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.gallery-post-user {
  display: flex;
  align-items: center;
  gap: 4px;
}

.gallery-post-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px 8px;
  font-size: 0.8rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.gallery-like-btn,
.gallery-comment-btn {
  border-radius: 999px;
  border: 1px solid rgba(214, 213, 142, 0.5);
  background: rgba(2, 24, 36, 0.9);
  color: var(--text-main);
  padding: 3px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.gallery-like-btn.liked {
  background: #e91e63;
  border-color: #ffb6d9;
  color: #fff0f7;
}

.gallery-like-btn .emoji,
.gallery-comment-btn .emoji {
  font-size: 0.9rem;
}

.gallery-post-counts {
  display: flex;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ============================= */
/* MODAL GALERÍA: POST EN GRANDE */
/* ============================= */

.modal-content.gallery-post-modal {
  width: min(960px, 95vw);
  max-height: 80vh;
  padding: 0;           /* el padding lo gestiona el interior */
}

.gallery-post-modal-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  width: 100%;
  max-height: 80vh;
}

@media (max-width: 900px) {
  .gallery-post-modal-inner {
    grid-template-columns: 1fr;
  }
}

.gallery-post-modal-left {
  position: relative;
  background: #000;
  min-height: 260px;
}

.gallery-post-modal-left img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-post-modal-right {
  padding: 10px 14px 12px;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
}

.gallery-modal-user-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.gallery-modal-date {
  margin-left: auto;
}

.gallery-modal-description {
  font-size: 0.9rem;
  margin: 4px 0 8px;
  color: var(--text-main);
}

.gallery-comments-list {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding-top: 6px;
}

.gallery-comments-list::-webkit-scrollbar {
  width: 6px;
}
.gallery-comments-list::-webkit-scrollbar-thumb {
  background: rgba(159, 193, 49, 0.8);
  border-radius: 999px;
}
.gallery-comments-list::-webkit-scrollbar-track {
  background: rgba(4, 41, 64, 0.8);
}

.gallery-comment-item {
  margin-bottom: 6px;
}

.gallery-comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.gallery-comment-author {
  font-weight: 600;
  color: var(--text-main);
}

.gallery-comment-text {
  font-size: 0.85rem;
  margin-top: 2px;
}

.gallery-comment-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 40px;
  max-height: 80px;
  font-size: 0.85rem;
}

.comment-box {
  border: none;
  border-radius: 1%;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: #c4d0dc;
  color: #000000;
  border: 1px solid rgba(50, 50, 50, 0.15);
  backdrop-filter: blur(12px);
  transition: background 0.15s, transform 0.1s, box-shadow 0.1s;
}

/* Explicación ampliada de la landing */
.landing-explanation {
  position: relative;
  padding: 40px 20px 50px;
  background: rgba(3, 20, 29, 0.9);
  border-top: 1px solid var(--c2);
  border-bottom: 1px solid var(--c2);
  z-index: 10;
}

.landing-explanation-inner {
  max-width: 900px;
  margin: 0 auto;
}

.landing-explanation h2 {
  font-size: 1.9rem;
  color: var(--c4);
  margin-bottom: 12px;
  text-align: center;
}

.landing-explanation h3 {
  color: var(--c3);
  margin-top: 28px;
  font-size: 1.3rem;
}

.landing-paragraph {
  color: var(--text-main);
  margin: 10px 0;
  font-size: 1rem;
  line-height: 1.55;
}

.landing-list {
  margin: 15px 0 20px;
  padding-left: 18px;
  color: var(--text-main);
  line-height: 1.6;
}

.landing-list li {
  margin-bottom: 6px;
}


/* ===== Pixel helper (overlay de imagen en píxeles) ===== */

.pixel-tool-modal {
  width: 380px;
  max-width: 95vw;
}

.pixel-tool-body {
  font-size: 13px;
}

.pixel-tool-grid {
  display: flex;
  gap: 8px;
}

.pixel-tool-grid .form-group {
  flex: 1;
  margin-bottom: 6px;
}

.pixel-tool-range input[type="range"] {
  width: 100%;
}

.pixel-tool-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.pixel-tool-hint {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

/* Panel mover overlay */
.pixel-tool-move {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.pixel-tool-move-buttons {
  margin-top: 4px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.pixel-tool-move-buttons button {
  font-size: 11px;
  padding: 4px 0;
  border-radius: 999px;
  border: 1px solid rgba(214, 213, 142, 0.6);
  background: rgba(2, 24, 36, 0.9);
  color: var(--text-main);
  cursor: pointer;
}

.pixel-tool-move-buttons button:hover {
  background: var(--c2);
  color: #ffffff;
}

.link-button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--accent-color, #7ba3ff);
  text-decoration: underline;
  cursor: pointer;
}

.link-button:hover {
  opacity: 0.8;
}

/* ===== Banner de cookies ===== */

.cookie-banner {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 520px;
  width: calc(100% - 32px);
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
  border-radius: 16px;
  padding: 14px 16px;
  z-index: 9999;
  display: none; /* por defecto oculto hasta que JS decida */
}

.cookie-banner.visible {
  display: block;
}

.cookie-banner-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cookie-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cookie-text a {
  color: var(--c3);
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.cookie-btn {
  padding: 6px 14px;
  font-size: 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
}

.cookie-btn.accept {
  background: var(--c3);
  border-color: var(--c3);
  color: #000;
  font-weight: 600;
}

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

/* ========================= */
/* Ajustes móviles generales */
/* ========================= */
@media (max-width: 768px) {
  /* Botones arriba a la izquierda un poco más compactos */
  #top-left-ui {
    top: 8px;
    left: 8px;
    gap: 6px;
  }

  #top-left-ui .pill-button {
    padding: 4px 10px;
    font-size: 12px;
  }

  /* Overlay de instrucciones más pequeño */
  #canvas-overlay .overlay-badge {
    font-size: 10px;
    padding: 3px 8px;
    margin-right: 4px;
  }

  /* Panel de info del píxel: ocupar ancho en la parte baja */
  #pixel-info-panel {
    left: 8px;
    right: 8px;
    bottom: 8px;
    min-width: 0;
    font-size: 11px;
  }

  .pixel-info-row {
    gap: 6px;
  }

  #palette-bar {
    bottom: 72px; /* por encima del panel de info */
    left: 50%;
    transform: translateX(-50%);
    max-width: min(420px, 100% - 16px);
    padding: 8px 10px;
    border-radius: 18px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    row-gap: 6px;
  }
  #palette {
    max-width: 100%;
    overflow-x: auto;
    gap: 4px;
  }

  .palette-color {
    width: 18px;
    height: 18px;
  }
  #palette-hex-input {
    max-width: 120px;
    font-size: 11px;
    padding: 4px 6px;
  }

  .palette-hex {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  #btn-confirm-paint,
  #btn-pixel-tool,
  #btn-pipette,
  #btn-eraser,
  #btn-close-palette {
    font-size: 11px;
    padding: 4px 8px;
  }
  
  .landing-text h1 {
    font-size: 1.7rem;
  }

  .landing-lead {
    font-size: 0.95rem;
  }
  .palette-title {
  font-size: 13px;
  font-weight: 600;
  margin-right: 4px;
}

.palette-close {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 0 4px;
  line-height: 1;
}

.palette-close:hover {

  color: var(--c3);
}

.overlay-badge {
  
  display: none;
}
.footer-inner {
    justify-content: center;
    text-align: center;
  }

  .footer-social {
    justify-content: center;
  }
  
}

.report-flag {
  font-size: 10px;
  width: 17px;
  height: 17px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(4, 41, 64, 0.9);
  color: #ff6b6b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 3px;
}

.report-flag:hover {
  background: rgba(4, 41, 64, 1);
  border-color: #ff6b6b;
}

.report-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.report-option {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-size: 12px;
}

.report-option input[type="radio"] {
  display: none;
}

.report-option span {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(7, 34, 64, 0.9);
  color: var(--text-muted);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.report-option input[type="radio"]:checked + span {
  background: #ff6b6b;
  border-color: #ffb3b3;
  color: #08111f;
}

.social-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  background: #02080c;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.social-icon-img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.social-icon:hover {
  border-color: var(--c3);
  background: #04131f;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.6);
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid rgba(196, 208, 220, 0.14);
  background: radial-gradient(circle at top left, rgba(159, 193, 49, 0.07), transparent 55%),
              #02080c;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 16px 20px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-muted, #c4d0dc);
  flex-wrap: wrap;
}

.footer-social-label {
  opacity: 0.85;
  font-weight: 400;
}

.article-lang-switch {
  margin: 16px 0 24px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lang-btn {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(196, 208, 220, 0.4);
  background: #02080c;
  color: #c4d0dc;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.lang-btn.active {
  background: #9fc131;
  border-color: #dbf227;
  color: #02080c;
  transform: translateY(-1px);
}

.lang-btn:hover {
  border-color: #9fc131;
}

.article-link {
  font-size: 1.5rem;
  color: var(--c3);
  text-decoration: none;
  margin-right: 10px;
  padding-left: 1%;
  padding-top: 5px;
}

.article-link:hover {
  text-decoration: underline;
}

.read-time {
  color: var(--text-main);
  margin: 10px 0;
  font-size: 1rem;
  line-height: 1.55;
  margin-top: 5px;
  margin-bottom: 5px;
}
.article-small-link {
  font-size: 0.95rem;
  color: var(--c5);
  text-decoration: none;
}

.article-lang-switch {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Botón de compartir */
.article-share-btn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35); /* ajusta según tu tema */
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, transform 0.1s ease, border-color 0.2s ease;
  position: relative;
}

.article-share-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.article-share-icon {
  font-size: 16px;
  line-height: 1;
}

.article-share-btn.copied {
  border-color: #2ecc71;
  background: #2ecc71;
  color: #ffffff;
}

.article-share-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: #d6d58e;
  color: #fff;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 1;
}

.article-related {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08); 
}

.article-related h2 {
  margin-bottom: 1rem;
}

.article-related-grid {
  margin-top: 0.5rem;
}

.related-card {
  opacity: 0.95;
}
.related-card:hover {
  opacity: 1;
}

.article-bibliography {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08); 
}

.article-bibliography h2 {
  margin-bottom: 1rem;
}

.bibliography-list {
  list-style: decimal;
  padding-left: 1.25rem;
  margin: 0;
}

.bibliography-list li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.bibliography-list a {
  text-decoration: none;
}

.bibliography-list a:hover {
  text-decoration: underline;
}

.article-filters {
  margin: 1.5rem 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.article-filters-row,
.article-tags-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.article-filters-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

.article-sort-select {
  font-size: 0.9rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(159, 193, 49, 0.4);       
  background: rgba(4, 41, 64, 0.95);               
  color: var(--text-main);
  cursor: pointer;
  appearance: none;
}

.article-sort-select:hover {
  border-color: rgba(219, 242, 39, 0.7);            
}

.article-sort-select:focus-visible {
  outline: 2px solid rgba(219, 242, 39, 0.85);
  outline-offset: 2px;
}

.article-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.article-tag-btn {
  font-size: 0.8rem;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(159, 193, 49, 0.35);     
  background: rgba(4, 41, 64, 0.9);               
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.15s ease,
              border-color 0.15s ease,
              transform 0.07s ease,
              opacity 0.15s ease;
  opacity: 0.9;
}

.article-tag-btn:hover {
  background: rgba(0, 92, 83, 0.95);  
  border-color: rgba(219, 242, 39, 0.7);
  opacity: 1;
}

/* Tag activo */
.article-tag-btn.active {
  background: linear-gradient(135deg, var(--c3), var(--c4));
  border-color: rgba(219, 242, 39, 0.9);
  color: #02100b;
  opacity: 1;
  transform: translateY(-1px);
}



