/* ============================================================
   retro.css — AnonBoard
   Estilo visual Taringa v1 (principios de los 2000)
   Paleta: Azul #004A80 · Blanco · Gris claro
   ============================================================ */

:root {
  --blue-dark:   #003f70;
  --blue-main:   #004a80;
  --blue-mid:    #005fa3;
  --blue-light:  #1976b8;
  --blue-hover:  #e8f4ff;
  --white:       #ffffff;
  --gray-bg:     #f0f0f0;
  --gray-light:  #e8e8e8;
  --gray-mid:    #cccccc;
  --gray-dark:   #888888;
  --text-main:   #222222;
  --text-muted:  #666666;
  --text-link:   #004a80;
  --border-main: #aac4d8;
  --border-dark: #7aaac0;
  --orange:      #e06a00;
  --red:         #cc2200;
  --green:       #2a7a2a;
  --yellow-trip: #e06a00;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  background: var(--gray-bg);
  color: var(--text-main);
  line-height: 1.4;
}

a { color: var(--text-link); }
a:hover { text-decoration: underline; color: var(--red); }

/* ── TOP STRIP ───────────────────────────────────────────────────────────── */
.top-strip {
  background: var(--blue-dark);
  color: #aacde8;
  font-size: 10px;
  padding: 2px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #002a50;
}
.top-strip a { color: #aacde8; text-decoration: none; }
.top-strip a:hover { color: #fff; text-decoration: underline; }

/* ── HEADER ──────────────────────────────────────────────────────────────── */
.site-header {
  background: linear-gradient(180deg, #006cbf 0%, #004a80 55%, #003a65 100%);
  border-bottom: 3px solid #002a50;
}
.header-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  padding: 0 10px;
  min-height: 68px;
  overflow: hidden;
}
.logo-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 18px 8px 0;
  border-right: 1px solid rgba(255,255,255,0.15);
  min-width: 160px;
  cursor: pointer;
  user-select: none;
}
.logo-name {
  font-family: Arial Black, Arial, sans-serif;
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.4);
  line-height: 1;
}
.logo-accent { color: #ffcc00; }
.logo-tagline { font-size: 9px; color: #99ccee; letter-spacing: 0.5px; margin-top: 3px; text-transform: uppercase; }
.boards-nav { display: flex; align-items: flex-end; flex: 1; padding: 0 10px; overflow-x: auto; overflow-y: visible; scrollbar-width: none; -ms-overflow-style: none; min-width: 0; }
.board-tab {
  display: flex;
  align-items: center;
  padding: 8px 10px 6px;
  color: #cce4f5;
  text-decoration: none;
  font-size: 11px;
  font-weight: bold;
  border-top: 2px solid transparent;
  border-left: 1px solid transparent;
  border-right: 1px solid transparent;
  margin-bottom: -3px;
  border-radius: 3px 3px 0 0;
  white-space: nowrap;
}
.board-tab:hover { background: rgba(255,255,255,0.12); color: #fff; }
.board-tab.active { background: var(--gray-bg); color: var(--blue-main); border-top: 2px solid #ffcc00; border-left-color: var(--border-dark); border-right-color: var(--border-dark); }
.board-code { font-size: 10px; color: #ffcc00; margin-right: 3px; }
.board-tab.active .board-code { color: var(--orange); }
.header-search { display: flex; align-items: center; gap: 4px; padding: 0 0 8px 10px; border-left: 1px solid rgba(255,255,255,0.15); }
.header-search input { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3); color: #fff; font-size: 11px; padding: 3px 6px; border-radius: 2px; width: 140px; font-family: Arial, sans-serif; }
.header-search input::placeholder { color: rgba(255,255,255,0.5); }
.header-search input:focus { outline: none; background: rgba(255,255,255,0.22); }
.header-search button { background: #ffcc00; color: #333; border: none; font-size: 10px; font-weight: bold; padding: 3px 8px; cursor: pointer; border-radius: 2px; }
.header-search button:hover { background: #ffd633; }

/* ── SEP BAR ─────────────────────────────────────────────────────────────── */
.sep-bar {
  background: var(--blue-main);
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  padding: 3px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--blue-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.breadcrumb { font-weight: normal; color: #aacde8; }
.breadcrumb strong { color: #fff; }
.breadcrumb-back { background: none; border: none; color: #cce4f5; font-size: 10px; cursor: pointer; padding: 0; font-family: Arial, sans-serif; }
.breadcrumb-back:hover { color: #fff; text-decoration: underline; }
.new-thread-btn, .refresh-btn {
  background: #ffcc00; color: #333; border: none; font-size: 10px; font-weight: bold;
  padding: 2px 10px; cursor: pointer; border-radius: 2px; font-family: Arial, sans-serif;
  text-transform: uppercase;
}
.new-thread-btn:hover, .refresh-btn:hover { background: #ffd633; }
.refresh-btn { background: rgba(255,255,255,0.15); color: #fff; font-weight: normal; }

/* ── PAGE LAYOUT ─────────────────────────────────────────────────────────── */
.page-wrapper { max-width: 980px; margin: 0 auto; padding: 8px 10px 20px; }
.main-layout { display: flex; gap: 8px; align-items: flex-start; }
.col-main { flex: 1; min-width: 0; }

/* ── SECTION HEADER ──────────────────────────────────────────────────────── */
.section-header {
  background: var(--blue-main); color: #fff; font-size: 11px; font-weight: bold;
  padding: 4px 8px; border: 1px solid var(--blue-dark); border-bottom: none;
  display: flex; justify-content: space-between; align-items: center;
  text-transform: uppercase; letter-spacing: 0.4px;
}
.sort-links { display: flex; gap: 4px; }
.sort-btn { background: none; border: none; color: #cce4f5; font-size: 10px; cursor: pointer; font-family: Arial, sans-serif; padding: 0 4px; }
.sort-btn:hover { color: #fff; text-decoration: underline; }
.sort-btn.active { color: #ffcc00; font-weight: bold; }
.section-body { background: var(--white); border: 1px solid var(--border-main); border-top: none; }

/* ── THREAD CARD ─────────────────────────────────────────────────────────── */
.thread-card { display: flex; gap: 8px; padding: 8px; border-bottom: 1px solid var(--gray-light); cursor: pointer; transition: background 0.1s; }
.thread-card:hover { background: var(--blue-hover); }
.thread-card:last-child { border-bottom: none; }
.thread-thumb { width: 56px; height: 56px; background: var(--gray-light); border: 1px solid var(--border-main); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 18px; overflow: hidden; }
.thumb-img { width: 100%; height: 100%; object-fit: cover; }
.thread-info { flex: 1; min-width: 0; }
.thread-id { font-size: 9px; color: var(--gray-dark); font-family: monospace; margin-bottom: 2px; }
.thread-title { font-size: 12px; font-weight: bold; color: var(--text-link); margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-card:hover .thread-title { color: var(--red); }
.thread-excerpt { font-size: 11px; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 4px; }
.thread-meta { display: flex; gap: 8px; align-items: center; font-size: 10px; color: var(--gray-dark); flex-wrap: wrap; }
.meta-board { background: var(--blue-main); color: #fff; padding: 1px 5px; font-size: 9px; font-weight: bold; }
.meta-trip { color: var(--orange); font-family: monospace; }
.meta-anon { font-style: italic; }
.meta-replies { color: var(--blue-main); font-weight: bold; }
.feed-loading, .feed-error, .feed-empty { padding: 16px; text-align: center; color: var(--gray-dark); font-size: 12px; }
.feed-error { color: var(--red); }

/* ── PAGINATION ──────────────────────────────────────────────────────────── */
.pagination-bar { background: var(--gray-light); border: 1px solid var(--border-main); border-top: none; padding: 5px 8px; display: flex; align-items: center; gap: 3px; font-size: 11px; }
.page-label { color: var(--gray-dark); font-size: 10px; margin-right: 4px; }
.page-btn { background: var(--white); border: 1px solid var(--border-main); color: var(--text-link); font-size: 11px; padding: 2px 7px; cursor: pointer; font-family: Arial, sans-serif; border-radius: 1px; }
.page-btn:hover { background: var(--blue-hover); }
.page-btn.active { background: var(--blue-main); color: #fff; border-color: var(--blue-dark); font-weight: bold; }

/* ── SIDEBAR ─────────────────────────────────────────────────────────────── */
.sidebar { width: 198px; flex-shrink: 0; }
.col-sidebar { width: 198px; flex-shrink: 0; }
.board-list-item { display: flex; flex-direction: column; padding: 5px 7px; border-bottom: 1px solid var(--gray-light); text-decoration: none; color: inherit; transition: background 0.1s; }
.board-list-item:hover { background: var(--blue-hover); }
.board-list-code { font-size: 10px; font-weight: bold; color: var(--orange); font-family: monospace; }
.board-list-name { font-size: 11px; color: var(--text-main); font-weight: bold; }
.board-list-count { font-size: 9px; color: var(--gray-dark); margin-top: 1px; }
.widget { margin-bottom: 8px; }
.widget-header { background: var(--blue-main); color: #fff; font-size: 10px; font-weight: bold; padding: 3px 7px; border: 1px solid var(--blue-dark); border-bottom: none; text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center; gap: 5px; }
.widget-dot { width: 6px; height: 6px; background: #ffcc00; border-radius: 50%; flex-shrink: 0; }
.widget-body { background: var(--white); border: 1px solid var(--border-main); border-top: none; }
.widget-empty { padding: 8px; color: var(--gray-dark); font-size: 10px; text-align: center; }
.featured-item { display: flex; gap: 6px; padding: 6px 7px; border-bottom: 1px solid var(--gray-light); cursor: pointer; width: 100%; background: none; border-left: none; border-right: none; border-top: none; text-align: left; font-family: Arial, sans-serif; transition: background 0.1s; }
.featured-item:hover { background: var(--blue-hover); }
.feat-rank { font-size: 14px; font-weight: 900; color: var(--gray-mid); min-width: 16px; font-family: Arial Black, Arial, sans-serif; }
.feat-rank.top { color: var(--orange); }
.feat-title { font-size: 10px; color: var(--text-link); font-weight: bold; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feat-meta { font-size: 9px; color: var(--gray-dark); margin-top: 2px; }
.comment-item { padding: 5px 7px; border-bottom: 1px solid var(--gray-light); cursor: pointer; width: 100%; background: none; border-left: none; border-right: none; border-top: none; text-align: left; font-family: Arial, sans-serif; transition: background 0.1s; }
.comment-item:hover { background: var(--blue-hover); }
.comment-text { font-size: 10px; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 2px; }
.comment-meta { font-size: 9px; color: var(--gray-dark); display: flex; justify-content: space-between; }
.comment-meta .trip { color: var(--orange); font-family: monospace; }
.comment-link { color: var(--blue-main); font-weight: bold; }

/* ── POST NODE (árbol de respuestas) ─────────────────────────────────────── */
.post-node { display: flex; position: relative; gap: 0; }
.post-node-inner { flex: 1; min-width: 0; margin-bottom: 6px; }
.connector-v { width: 2px; background: var(--border-main); flex-shrink: 0; margin-right: 8px; border-radius: 1px; min-height: 100%; }
.post-replies { display: flex; position: relative; margin-left: 16px; margin-top: 6px; }
.connector-branch { width: 2px; background: var(--border-main); flex-shrink: 0; margin-right: 8px; }
.replies-list { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }

.post-header { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.post-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: bold; border: 1px solid var(--border-main);
  background: var(--gray-light); color: var(--gray-dark);
}
.post-node.depth-0 .post-avatar { width: 32px; height: 32px; background: #e8f4ff; color: var(--blue-main); font-size: 13px; }
.post-node.depth-1 .post-avatar { background: #eaf3de; color: #27500a; }
.post-node.depth-2 .post-avatar { background: #faeeda; color: #633806; }
.post-node.depth-3 .post-avatar { background: #fbeaf0; color: #72243e; }

.post-meta { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.post-author { font-size: 12px; font-weight: bold; color: var(--text-main); }
.post-tripcode { font-size: 10px; color: var(--orange); background: #fff3e0; border: 1px solid #ffcc80; padding: 0 5px; border-radius: 2px; font-family: monospace; }
.post-time { font-size: 10px; color: var(--gray-dark); }
.post-hashid { font-size: 9px; color: var(--gray-dark); font-family: monospace; }

.post-node > .post-node-inner > div:first-child {
  background: var(--white);
  border: 1px solid var(--border-main);
  border-radius: 2px;
  padding: 8px 10px;
}
.post-node.depth-0 > .post-node-inner > div:first-child {
  border-color: var(--border-dark);
  padding: 10px 12px;
}

.post-body { font-size: 12px; color: var(--text-main); line-height: 1.5; margin: 4px 0 6px; word-break: break-word; }
.post-body--root { font-size: 13px; }
.post-media { margin: 8px 0; }
.post-thumb {
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  display: block;
  border: 1px solid var(--border-main);
  border-radius: 4px;
  cursor: zoom-in;
  background: #0a1a28;
}
.post-thumb:hover { border-color: var(--blue-main); }

/* Lightbox overlay para ver imagen a tamaño completo */
.img-lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.88);
  display: flex; align-items: center; justify-content: center;
  cursor: zoom-out;
}
.img-lightbox img {
  max-width: 95vw; max-height: 95vh;
  object-fit: contain;
  border: 2px solid var(--blue-main);
  border-radius: 4px;
  box-shadow: 0 4px 40px #000c;
}

/* Quote preview */
.quote-preview { border-left: 3px solid var(--blue-mid); padding: 3px 8px; background: var(--blue-hover); margin-bottom: 5px; font-size: 10px; color: var(--text-muted); border-radius: 0 2px 2px 0; }
.quote-id { font-family: monospace; color: var(--blue-main); margin-right: 5px; font-weight: bold; }

/* Post actions */
.post-actions { display: flex; align-items: center; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.action-btn { font-size: 10px; color: var(--text-muted); background: none; border: 1px solid var(--border-main); padding: 1px 7px; cursor: pointer; font-family: Arial, sans-serif; border-radius: 1px; transition: all 0.1s; }
.action-btn:hover, .action-btn.active { background: var(--blue-hover); color: var(--blue-main); border-color: var(--blue-mid); }
.action-quote:hover, .action-quote.active-quote { background: #fff3e0; color: var(--orange); border-color: #ffcc80; }
.action-report:hover { background: #fff0f0; color: #c0392b; border-color: #e5a9a9; }
.reply-count { font-size: 10px; color: var(--gray-dark); margin-left: 4px; }

/* Reply form */
.reply-form { margin-top: 6px; }
.reply-form-inner { background: var(--gray-bg); border: 1px solid var(--border-main); padding: 8px; border-radius: 1px; }
.reply-textarea { width: 100%; font-family: Arial, Helvetica, sans-serif; font-size: 11px; padding: 5px 7px; border: 1px solid var(--border-main); resize: vertical; border-radius: 1px; background: #fff; color: var(--text-main); }
.reply-textarea:focus { outline: none; border-color: var(--blue-mid); }
.reply-textarea.over { border-color: var(--red); }
.reply-form-footer { display: flex; gap: 5px; align-items: center; margin-top: 5px; flex-wrap: wrap; }
.reply-author { font-family: Arial, Helvetica, sans-serif; font-size: 11px; padding: 3px 6px; border: 1px solid var(--border-main); background: #fff; color: var(--text-main); flex: 1; min-width: 120px; border-radius: 1px; }
.reply-author:focus { outline: none; border-color: var(--blue-mid); }
.trip-preview-inline { font-size: 10px; font-family: monospace; color: var(--orange); background: #fff3e0; border: 1px solid #ffcc80; padding: 1px 5px; border-radius: 2px; }
.reply-counter { font-size: 11px; font-family: monospace; color: var(--gray-dark); min-width: 32px; text-align: right; }
.reply-counter.warn { color: var(--orange); }
.reply-counter.over { color: var(--red); font-weight: bold; }
.btn-reply-cancel { font-size: 10px; background: #fff; border: 1px solid var(--border-dark); color: #444; padding: 2px 8px; cursor: pointer; font-family: Arial, sans-serif; border-radius: 1px; }
.btn-reply-cancel:hover { background: var(--gray-light); }
.btn-reply-submit { font-size: 10px; background: var(--blue-main); border: 1px solid var(--blue-dark); color: #fff; padding: 2px 12px; cursor: pointer; font-family: Arial, sans-serif; font-weight: bold; border-radius: 1px; }
.btn-reply-submit:hover:not(:disabled) { background: var(--blue-mid); }
.btn-reply-submit:disabled { background: var(--gray-mid); border-color: var(--gray-dark); cursor: not-allowed; }
.reply-error { font-size: 10px; color: var(--red); margin-top: 4px; }

/* Thread loading/error */
.thread-loading, .thread-error, .thread-empty { padding: 20px; text-align: center; color: var(--gray-dark); font-size: 13px; }
.thread-error { color: var(--red); }
.loading-spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--gray-mid); border-top-color: var(--blue-main); border-radius: 50%; animation: spin 0.7s linear infinite; margin-right: 6px; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── MODAL / NEW THREAD FORM ─────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 20px 8px; z-index: 1000; overflow-y: auto;
}
.modal { background: #fff; border: 2px solid var(--blue-main); width: 100%; max-width: 580px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; }
.modal-header { background: linear-gradient(180deg,#006cbf 0%,#004a80 60%,#003a65 100%); padding: 6px 10px; display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--blue-dark); }
.modal-title { color: #fff; font-size: 13px; font-weight: bold; }
.modal-close { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3); color: #fff; font-size: 14px; font-weight: bold; width: 22px; height: 22px; cursor: pointer; border-radius: 2px; }
.modal-close:hover { background: rgba(255,255,255,0.3); }
.modal-board-bar { background: var(--blue-main); color: #cce4f5; font-size: 10px; padding: 3px 10px; border-bottom: 1px solid var(--blue-dark); }
.modal-board-bar strong { color: #ffcc00; }
.modal-body { padding: 10px 12px; }
.modal-footer { background: var(--gray-light); border-top: 1px solid var(--border-main); padding: 8px 12px; display: flex; justify-content: space-between; align-items: center; }
.anon-badge { background: var(--blue-main); color: #fff; font-size: 9px; padding: 2px 7px; border-radius: 2px; font-weight: bold; }
.footer-actions { display: flex; gap: 8px; }

/* Form fields */
.field { margin-bottom: 8px; }
.field-label { display: block; font-size: 11px; font-weight: bold; color: var(--blue-main); margin-bottom: 3px; text-transform: uppercase; letter-spacing: 0.3px; }
.optional { font-weight: normal; color: var(--gray-dark); text-transform: none; letter-spacing: 0; font-size: 10px; }
.field input[type=text], .field textarea {
  width: 100%; border: 1px solid var(--border-main); padding: 5px 7px;
  font-size: 12px; font-family: Arial, Helvetica, sans-serif; background: #fff; color: #222; border-radius: 1px; resize: vertical;
}
.field input[type=text]:focus, .field textarea:focus { outline: none; border-color: var(--blue-mid); box-shadow: 0 0 0 2px rgba(0,74,128,0.1); }
.input-error { border-color: var(--red) !important; }
.input-ok    { border-color: var(--green) !important; }
.char-counter { text-align: right; font-size: 10px; margin-top: 2px; color: var(--gray-dark); font-family: monospace; }
.char-counter .warn { color: var(--orange); }
.field-error { font-size: 10px; color: var(--red); margin-top: 3px; }
.drop-zone { border: 2px dashed var(--border-main); background: #fafcff; padding: 14px 10px; text-align: center; cursor: pointer; border-radius: 2px; transition: all 0.15s; }
.drop-zone:hover, .drop-zone.dragging { border-color: var(--blue-mid); background: var(--blue-hover); }
.drop-icon { font-size: 24px; margin-bottom: 4px; }
.drop-text { font-size: 11px; color: var(--gray-dark); }
.drop-text strong { color: var(--blue-main); }
.drop-formats { font-size: 10px; color: var(--gray-dark); margin-top: 2px; }
.image-preview { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--border-main); background: #fafcff; padding: 6px; }
.preview-thumb { width: 64px; height: 64px; object-fit: cover; border: 1px solid var(--border-main); flex-shrink: 0; }
.preview-info { flex: 1; min-width: 0; font-size: 10px; color: var(--gray-dark); }
.preview-name { font-size: 11px; font-weight: bold; color: #222; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exif-notice { color: var(--green); font-size: 10px; margin-top: 3px; }
.preview-remove { background: var(--red); color: #fff; border: none; font-size: 9px; padding: 2px 7px; cursor: pointer; border-radius: 1px; flex-shrink: 0; }
.preview-remove:hover { background: #aa1a00; }
.tripcode-info { background: #fffbe6; border: 1px solid #e6cc00; padding: 5px 8px; font-size: 10px; color: #5a4800; margin-top: 4px; border-radius: 1px; line-height: 1.45; }
.tripcode-preview { font-family: monospace; font-size: 11px; color: var(--orange); background: #fff3e0; border: 1px solid #ffcc80; padding: 0 5px; border-radius: 2px; display: inline-block; margin-top: 3px; }
.identity-preview { font-size: 10px; color: var(--gray-dark); margin-top: 4px; }
.identity-preview code { font-size: 10px; color: var(--orange); font-family: monospace; }
.submit-error { background: #ffeaea; border: 1px solid var(--red); color: var(--red); padding: 6px 8px; font-size: 11px; margin-top: 8px; border-radius: 1px; }
.submit-success { background: #e6f5e6; border: 1px solid #4a9a4a; color: #1a5a1a; padding: 8px 10px; font-size: 12px; text-align: center; margin-top: 8px; border-radius: 1px; }
.btn-cancel { background: #fff; border: 1px solid var(--border-dark); color: #444; font-size: 11px; font-weight: bold; padding: 5px 14px; cursor: pointer; font-family: Arial, sans-serif; border-radius: 1px; }
.btn-cancel:hover { background: var(--gray-light); }
.btn-submit { background: var(--blue-main); border: 1px solid var(--blue-dark); color: #fff; font-size: 11px; font-weight: bold; padding: 5px 18px; cursor: pointer; font-family: Arial, sans-serif; border-radius: 1px; }
.btn-submit:hover:not(:disabled) { background: var(--blue-mid); }
.btn-submit:disabled { background: var(--gray-mid); border-color: var(--gray-dark); cursor: not-allowed; }

/* ── FOOTER ──────────────────────────────────────────────────────────────── */
.site-footer { background: var(--blue-dark); border-top: 2px solid var(--blue-main); color: #7aaac0; font-size: 10px; padding: 8px 10px; text-align: center; margin-top: 10px; }
.site-footer a { color: #aacde8; text-decoration: none; margin: 0 5px; }
.site-footer a:hover { text-decoration: underline; }
.site-footer span { display: block; margin-top: 4px; }

/* ── Estilos adicionales versión PHP ──────────────────────────── */
.thread-card { display: flex; gap: 8px; padding: 8px; border-bottom: 1px solid var(--gray-light); cursor: pointer; text-decoration: none; color: inherit; transition: background 0.1s; }
.thread-card:hover { background: var(--blue-hover); text-decoration: none; }
.thread-title-full { font-size: 16px; font-weight: bold; color: var(--text-main); margin: 4px 0 8px; line-height: 1.35; }
.post-card { background: var(--white); border: 1px solid var(--border-main); border-radius: 2px; padding: 8px 10px; }
.post-card--root { border-color: var(--border-dark); padding: 10px 12px; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; }
.stat-cell { padding: 8px; text-align: center; border-right: 1px solid var(--gray-light); border-bottom: 1px solid var(--gray-light); }
.stat-cell:nth-child(even) { border-right: none; }
.stat-cell:nth-last-child(-n+2) { border-bottom: none; }
.stat-number { font-size: 18px; font-weight: 900; color: var(--blue-main); font-family: Arial Black, Arial, sans-serif; line-height: 1; }
.stat-label { font-size: 9px; color: var(--gray-dark); text-transform: uppercase; letter-spacing: 0.3px; margin-top: 2px; }
.featured-item { display: flex; gap: 6px; padding: 6px 7px; border-bottom: 1px solid var(--gray-light); text-decoration: none; color: inherit; transition: background 0.1s; }
.featured-item:hover { background: var(--blue-hover); }
.feat-info { flex: 1; min-width: 0; }
.comment-item { display: block; padding: 5px 7px; border-bottom: 1px solid var(--gray-light); text-decoration: none; color: inherit; transition: background 0.1s; }
.comment-item:hover { background: var(--blue-hover); }
.highlight { animation: highlightPulse 2s ease-out; }
@keyframes highlightPulse { 0% { background: #fff8cc; } 100% { background: transparent; } }

.quote-preview-inline { border-left: 3px solid var(--blue-mid); padding: 3px 8px; background: var(--blue-hover); margin-bottom: 6px; font-size: 10px; color: var(--text-muted); border-radius: 0 2px 2px 0; }
.quote-preview-inline .quote-id { font-family: monospace; color: var(--blue-main); margin-right: 5px; font-weight: bold; }

/* ══════════════════════════════════════════════════════════════
   NUEVOS ESTILOS v3
   ══════════════════════════════════════════════════════════════ */

/* ── Top strip links ─────────────────────────────────────────── */
.top-strip-links a { color: #cce4f5; text-decoration: none; }
.top-strip-links a:hover { color: #fff; text-decoration: underline; }

/* ── Stats grid (sidebar home) ───────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; }
.stat-cell {
  padding: 8px 10px; border-bottom: 1px solid var(--gray-light);
  border-right: 1px solid var(--gray-light); text-align: center;
}
.stat-cell:nth-child(2) { border-right: none; }
.stat-cell:nth-child(3) { border-bottom: none; grid-column: 1 / -1; border-right: none; }
.stat-number { font-size: 20px; font-weight: 900; color: var(--blue-main); line-height: 1; font-family: Arial Black, Arial, sans-serif; }
.stat-label  { font-size: 9px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; margin-top: 2px; }

/* ── Thread cards (home feed) ────────────────────────────────── */
.thread-card {
  display: flex; gap: 10px; padding: 10px 10px; border-bottom: 1px solid var(--gray-light);
  text-decoration: none; color: inherit; transition: background 0.1s;
}
.thread-card:hover { background: #f0f6ff; }
.thread-thumb {
  width: 52px; height: 52px; flex-shrink: 0; background: var(--gray-bg);
  border: 1px solid var(--gray-light); display: flex; align-items: center;
  justify-content: center; overflow: hidden; border-radius: 1px;
}
.thumb-img { width: 100%; height: 100%; object-fit: cover; }
.thumb-placeholder { font-size: 20px; color: var(--text-muted); }
.thread-info { flex: 1; min-width: 0; }
.thread-id   { font-size: 9px; color: var(--text-muted); font-family: monospace; margin-bottom: 1px; }
.thread-title { font-size: 13px; font-weight: bold; color: var(--blue-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0 0 2px; }
.thread-excerpt { font-size: 11px; color: #444; margin: 0 0 4px; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.thread-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 10px; color: var(--text-muted); }
.meta-board  { background: var(--blue-main); color: #fff; padding: 0 4px; font-size: 9px; font-weight: bold; border-radius: 1px; }
.meta-replies { color: #4a7a9e; }
.meta-time   { color: var(--text-muted); }
.meta-anon   { color: #4a9a4a; font-family: monospace; font-size: 10px; }
.meta-trip   { font-size: 10px; }

/* ── Sort links ──────────────────────────────────────────────── */
.sort-links { display: flex; gap: 4px; }
.sort-btn {
  padding: 2px 8px; font-size: 10px; border: 1px solid var(--border-main);
  text-decoration: none; color: var(--text-main); background: #fff; border-radius: 1px;
}
.sort-btn.active { background: var(--blue-main); color: #fff; border-color: var(--blue-main); }
.sort-btn:hover:not(.active) { background: var(--blue-hover); }

/* ── Pagination ──────────────────────────────────────────────── */
.pagination-bar {
  display: flex; align-items: center; gap: 3px; padding: 10px;
  border-top: 1px solid var(--gray-light);
}
.page-label { font-size: 10px; color: var(--text-muted); margin-right: 4px; }
.page-btn {
  padding: 2px 7px; font-size: 11px; border: 1px solid var(--border-main);
  text-decoration: none; color: var(--blue-main); background: #fff; border-radius: 1px;
}
.page-btn.active { background: var(--blue-main); color: #fff; border-color: var(--blue-main); font-weight: bold; }
.page-btn:hover:not(.active) { background: var(--blue-hover); }

/* ── Search results ──────────────────────────────────────────── */
.search-bar-page {
  padding: 10px; border-bottom: 1px solid var(--gray-light); background: var(--gray-bg);
}
.search-form-page { display: flex; gap: 6px; flex-wrap: wrap; }
.search-input-page {
  flex: 1; min-width: 200px; border: 1px solid var(--border-main); padding: 5px 8px;
  font-size: 12px; font-family: Arial, sans-serif; border-radius: 1px;
}
.search-select {
  border: 1px solid var(--border-main); padding: 4px 6px; font-size: 11px;
  font-family: Arial, sans-serif; border-radius: 1px; background: #fff; color: var(--text-main);
}
.search-btn-page {
  background: var(--blue-main); color: #fff; border: none; padding: 5px 14px;
  font-size: 12px; font-weight: bold; cursor: pointer; border-radius: 1px; font-family: Arial, sans-serif;
}
.search-btn-page:hover { background: var(--blue-mid); }
.search-result-card {
  display: flex; gap: 10px; padding: 10px; border-bottom: 1px solid var(--gray-light);
  text-decoration: none; color: inherit; transition: background 0.1s;
}
.search-result-card:hover { background: #f0f6ff; }
.search-result-type {
  flex-shrink: 0; font-size: 9px; font-weight: bold; text-transform: uppercase;
  padding: 2px 5px; border-radius: 1px; white-space: nowrap; height: fit-content;
  margin-top: 2px;
}
.type-thread { background: #e8f0ff; color: #004a80; border: 1px solid #aac4d8; }
.type-post   { background: #e8ffe8; color: #1a5a1a; border: 1px solid #a0c8a0; }
.search-result-body { flex: 1; min-width: 0; }
.search-result-title { font-size: 13px; font-weight: bold; color: var(--blue-main); margin-bottom: 3px; }
.search-result-in { font-size: 10px; color: var(--text-muted); font-weight: normal; margin-left: 6px; }
.search-result-excerpt { font-size: 11px; color: #444; margin: 0 0 4px; line-height: 1.4; }
.search-result-excerpt mark { background: #fff3a0; color: #000; padding: 0 1px; border-radius: 1px; }
.search-result-meta { display: flex; gap: 8px; font-size: 10px; color: var(--text-muted); }
.feed-empty { padding: 20px; text-align: center; color: var(--text-muted); font-size: 12px; }

/* ── Static page body ────────────────────────────────────────── */
.static-page-body { padding: 14px 16px; line-height: 1.7; font-size: 12px; color: #222; }
.static-page-body h1 { font-size: 18px; color: var(--blue-main); margin: 0 0 12px; border-bottom: 1px solid var(--gray-light); padding-bottom: 6px; }
.static-page-body h2 { font-size: 14px; color: var(--blue-main); margin: 16px 0 8px; }
.static-page-body h3 { font-size: 13px; color: #333; margin: 12px 0 6px; }
.static-page-body p  { margin: 0 0 10px; }
.static-page-body strong { color: #111; }
.static-page-body a { color: var(--blue-main); }
.static-page-body br { display: none; } /* rely on <p> spacing */

/* ── Board list (sidebar_home) ───────────────────────────────── */
.board-list-item {
  display: flex; flex-direction: column; padding: 5px 8px;
  border-bottom: 1px solid var(--gray-light); text-decoration: none; color: inherit;
}
.board-list-item:hover { background: var(--blue-hover); }
.board-list-code  { font-size: 9px; font-weight: bold; color: var(--orange); font-family: monospace; }
.board-list-name  { font-size: 11px; color: var(--text-main); font-weight: bold; }
.board-list-count { font-size: 9px; color: var(--text-muted); margin-top: 1px; }

/* ── Publicidad / Ad slots ───────────────────────────────────── */
.ad-slot {
  width: 100%;
  margin: 10px 0;
  overflow: hidden;
  border-radius: 3px;
}
.ad-slot--banner-top  { margin-bottom: 14px; }
.ad-slot--sidebar     { margin: 8px 0; }
.ad-slot--in-feed     { margin: 6px 0; }
.ad-slot--thread-end  { margin-top: 16px; }

/* Placeholder visual — quitar cuando actives AdSense */
.ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f5f6;
  border: 1px dashed #ccc;
  border-radius: 3px;
  min-height: 90px;
  color: #999;
  font-size: 10px;
  font-family: monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.ad-slot--sidebar .ad-placeholder     { min-height: 250px; }
.ad-slot--in-feed .ad-placeholder     { min-height: 80px; }

/* ── Editor WYSIWYG propio ────────────────────────────────────────────── */

/* Wrapper del editor */
.wy-wrap {
  border: 1px solid #c8d8e4;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  margin-bottom: 6px;
}

/* Toolbar */
.wy-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  padding: 5px 7px;
  background: #f0f5f9;
  border-bottom: 1px solid #c8d8e4;
}

/* Botones de toolbar */
.wy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 5px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: #2d4a62;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transition: background .1s, border-color .1s;
  font-family: Arial, sans-serif;
}
.wy-btn:hover {
  background: #deeaf2;
  border-color: #b0c8d8;
}
.wy-btn--active {
  background: #c5dcea;
  border-color: #7aabca;
  color: #003d66;
}
/* Separador */
.wy-sep {
  display: inline-block;
  width: 1px;
  height: 18px;
  background: #c8d8e4;
  margin: 0 3px;
  align-self: center;
}

/* Área editable */
.wy-area {
  min-height: 90px;
  padding: 10px 12px;
  color: #1a2530;
  font-size: 13px;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  outline: none;
  background: #fff;
  word-break: break-word;
}
.wy-area:focus {
  box-shadow: inset 0 0 0 2px rgba(45,106,159,.15);
}
/* Placeholder via CSS */
.wy-area:empty::before {
  content: attr(data-placeholder);
  color: #8fa8bb;
  pointer-events: none;
}

/* Estilos del contenido dentro del editor */
.wy-area b, .wy-area strong { font-weight: bold; }
.wy-area i, .wy-area em     { font-style: italic; }
.wy-area u                   { text-decoration: underline; }
.wy-area s                   { text-decoration: line-through; }
.wy-area blockquote {
  border-left: 3px solid #2d6a9f;
  padding-left: 10px;
  color: #4a6b82;
  margin: 6px 0;
}
.wy-area code, .wy-area pre {
  background: #f0f4f7;
  color: #1a3a4a;
  border-radius: 3px;
  padding: 2px 5px;
  font-size: 12px;
  font-family: monospace;
}
.wy-area a { color: #1560a8; text-decoration: underline; }
.wy-area ol { list-style: decimal; padding-left: 20px; }
.wy-area ul { list-style: disc;    padding-left: 20px; }

/* Variante alta para modal de nuevo hilo */
#nt-body-editor .wy-area { min-height: 160px; }

/* Slot del editor en respuestas */
.reply-editor-slot .wy-area { min-height: 100px; }


/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — Media queries
   ═══════════════════════════════════════════════════════════════ */

/* Ocultar scrollbar en webkit para boards-nav */
.boards-nav::-webkit-scrollbar { display: none; }

/* ── Tablet: ≤ 768px ────────────────────────────────────────── */
@media (max-width: 768px) {

  /* Header */
  .header-inner {
    flex-wrap: wrap;
    min-height: auto;
    padding: 6px 8px 0;
    overflow: visible;
  }
  .logo-block {
    min-width: auto;
    padding: 6px 12px 6px 0;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    flex: 1;
  }
  .logo-name { font-size: 22px; }
  .header-search {
    border-left: none;
    padding: 6px 0;
  }
  .header-search input { width: 110px; }
  .boards-nav {
    width: 100%;
    flex: none;
    padding: 0;
    border-top: 1px solid rgba(255,255,255,0.10);
  }
  .board-tab {
    padding: 6px 8px 5px;
    font-size: 10px;
  }

  /* Layout principal: apila en mobile */
  .main-layout {
    flex-direction: column !important;
    gap: 12px;
  }
  .col-sidebar {
    width: 100% !important;
    max-width: 100% !important;
  }
  .col-main { width: 100% !important; }

  /* Página wrapper */
  .page-wrapper { padding: 8px; }

  /* Thread card */
  .thread-card { padding: 8px 10px; gap: 8px; }
  .thread-thumb { width: 44px; height: 44px; font-size: 14px; }
  .thread-title { font-size: 12px; }

  /* Sep bar */
  .sep-bar {
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
    padding: 6px 8px;
  }
  .new-thread-btn { width: 100%; }

  /* Top strip */
  .top-strip {
    flex-direction: column;
    gap: 2px;
    font-size: 9px;
    padding: 4px 8px;
  }
  .top-strip-links { flex-wrap: wrap; gap: 2px; }

  /* Modales */
  .modal-box {
    width: 96vw !important;
    max-width: 96vw !important;
    padding: 14px !important;
  }

  /* Sidebar widgets: stack de 1 columna */
  .stats-grid { grid-template-columns: 1fr 1fr; }

  /* Post en hilo */
  .post-box { padding: 8px 10px; }
  .post-header { flex-wrap: wrap; gap: 4px; }

  /* Home grid → 1 columna */
  .board-grid { grid-template-columns: 1fr !important; }

  /* Admin */
  .admin-panels { grid-template-columns: 1fr !important; }
  .admin-form-row { flex-direction: column; }
  .admin-sidebar { display: none; }
  .admin-main { margin-left: 0 !important; }
}

/* ── Mobile pequeño: ≤ 480px ────────────────────────────────── */
@media (max-width: 480px) {
  .logo-name { font-size: 18px; }
  .logo-tagline { display: none; }
  .header-search input { width: 80px; font-size: 10px; }

  .thread-card { padding: 6px 8px; }
  .thread-thumb { display: none; }  /* ocultar thumb en móvil pequeño */
  .thread-title { font-size: 11px; white-space: normal; }

  .sep-bar .breadcrumb { font-size: 10px; }

  /* Reply form compacto */
  .reply-form-footer { flex-direction: column; align-items: flex-start; }

  /* Paginación */
  .pagination { flex-wrap: wrap; gap: 2px; }
  .pag-btn { padding: 3px 6px; font-size: 10px; }

  /* Post image */
  .post-image { max-width: 100%; }
  .post-image img { max-width: 100%; }

  /* Featured items sidebar */
  .featured-item { padding: 5px 0; }
  .feat-rank { font-size: 11px; }
}

/* ── Ajuste para layout de 2 columnas (board/thread) ────────── */
@media (min-width: 769px) {
  .main-layout { display: flex; gap: 16px; }
  .col-main { flex: 1; min-width: 0; }
  .col-sidebar { width: 220px; flex-shrink: 0; }
}

