/* Estilo inspirado en SocialPhobiaWorld 2012 (vBulletin azul y dorado), en versión moderna. */
:root {
  /* Colores tomados de SocialPhobiaWorld 2012 (capturas del usuario). */
  --bg: #d4e2ed;
  --surface: #efefef;
  --row: #dee3e7;
  --row-alt: #dee3e7;
  --icon-cell: #efefef;
  --text: #000000;
  --muted: #4d5a66;
  --border: #3671a9;
  --line: #b7c6d6;
  --link: #1c4895;
  --accent: #3671a9;
  --accent-dark: #2a5b8c;
  --accent-soft: #dee3e7;
  --gold: #e2b72a;
  --gold-text: #3d2f00;
  --head-a: #316da1;
  --head-b: #487eac;
  --block: #3671a9;
  --cols-bg: #ededed;
  --quote-bg: #f5f5e6;
  --quote-border: #c9b56a;
  --shadow: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 Verdana, "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
a { color: var(--link); }
a:hover { color: var(--accent); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); font-size: 0.8rem; }

/* ---- cabecera azul + franja dorada */
.site-header {
  background: linear-gradient(180deg, var(--head-b) 0%, var(--head-a) 100%);
  padding: 10px 0 12px;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.logo {
  display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center;
  text-decoration: none; color: var(--gold);
}
.logo-globe {
  grid-row: span 2; width: 42px; height: 42px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe27a 0%, #f2b705 35%, #c98a00 70%, #8a5b00 100%);
  box-shadow: inset -4px -4px 8px rgba(0, 0, 0, 0.25), 0 0 0 2px rgba(255, 255, 255, 0.15);
}
.logo-text {
  font: 700 1.7rem/1.1 "Trebuchet MS", "Segoe UI", system-ui, sans-serif; letter-spacing: -0.3px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.logo-text small { font-size: 0.65em; }
.logo-tagline {
  color: #e8eef6; font-size: 0.72rem; letter-spacing: 0.45em; text-transform: none; opacity: 0.9;
}
.logo:hover { color: #ffd23a; }
.user-nav { display: flex; align-items: center; gap: 14px; font-size: 0.85rem; }
.user-nav a, .user-nav .link-button { color: #fff; font-weight: 700; }
.user-nav form { margin: 0; }
.link-button { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.link-button:hover { text-decoration: underline; }

.navbar { background: var(--gold); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12); }
.navbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 30px; font-size: 0.82rem; }
.navbar a { color: var(--gold-text); font-weight: 700; text-decoration: none; }
.navbar a:hover { text-decoration: underline; }
.navbar-note { color: var(--gold-text); opacity: 0.8; }

main { padding-top: 16px; padding-bottom: 32px; }
h1 { font: 700 1.45rem/1.25 "Trebuchet MS", "Segoe UI", system-ui, sans-serif; margin: 6px 0 14px; overflow-wrap: anywhere; color: var(--accent-dark); }
.breadcrumbs { font-size: 0.8rem; color: var(--muted); }
.breadcrumbs span { margin: 0 4px; }

/* ---- bloques: barra azul + cabecera de columnas + filas */
.category, .box, .post {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.category { margin-bottom: 18px; }
.block-head {
  background: var(--block);
  color: #fff; padding: 8px 12px;
}
.block-head h2 { margin: 0; font: 700 0.95rem/1.3 Verdana, system-ui, sans-serif; }
.block-head p { margin: 2px 0 0; font-size: 0.75rem; opacity: 0.92; }
.list-head {
  background: var(--cols-bg);
  border-bottom: 1px solid var(--border);
  font-size: 0.72rem; font-weight: 700; color: #555;
  padding: 4px 12px;
}
.list-head span:nth-child(3), .list-head span:nth-child(4) { text-align: right; }

.nodes, .threads { list-style: none; margin: 0; padding: 0; }
.node, .thread { padding: 9px 12px; border-top: 1px solid var(--border); background: var(--row); }
.node:nth-child(even), .thread:nth-child(even) { background: var(--row-alt); }
.nodes .node:first-child, .threads .thread:first-child { border-top: 0; }

/* columnas: icono | título | último mensaje | números */
.node-cols, .thread-cols { display: grid; grid-template-columns: 30px minmax(0, 1fr) 210px 90px; gap: 12px; align-items: center; }
.thread { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; }
.thread.thread-cols { grid-template-columns: 30px minmax(0, 1fr) 210px 90px; }

.node-icon, .thread-icon {
  width: 26px; height: 28px; border-radius: 3px;
  background: linear-gradient(135deg, #fbe7a6 0%, #e9c45c 100%);
  border: 1px solid #b38f2a; box-shadow: 2px 2px 0 rgba(90, 70, 20, 0.25);
  position: relative;
}
.node-icon::after, .thread-icon::after {
  content: ""; position: absolute; left: 5px; right: 5px; top: 7px; height: 11px;
  background: repeating-linear-gradient(180deg, rgba(90, 70, 20, 0.45) 0 1px, transparent 1px 4px);
}
.thread-icon { width: 20px; height: 22px; justify-self: center; }
.thread-icon::after { top: 5px; height: 9px; left: 4px; right: 4px; }
.is-sticky .thread-icon { background: linear-gradient(135deg, #cfe3f7 0%, #7fb0e0 100%); border-color: #3470ae; }

.node-title, .thread-title { font-weight: 700; text-decoration: underline; overflow-wrap: anywhere; }
.node-title { font-size: 0.95rem; }
.node-desc { font-size: 0.78rem; color: var(--muted); }
.node-subs { font-size: 0.78rem; margin-top: 3px; display: flex; flex-wrap: wrap; gap: 2px 12px; }
.node-subs a::before { content: "▸ "; color: var(--muted); text-decoration: none; }
.node-last, .thread-last { font-size: 0.8rem; min-width: 0; text-align: right; }
.node-last a { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.node-stats, .thread-stats { display: flex; flex-direction: column; align-items: flex-end; font-size: 0.9rem; }
.badge {
  display: inline-block; font-size: 0.7rem; font-weight: 700; padding: 0 6px; margin-right: 4px;
  border-radius: 3px; background: var(--gold); color: var(--gold-text); vertical-align: 1px;
}

.pagination { display: flex; flex-wrap: wrap; gap: 4px; margin: 12px 0; font-size: 0.82rem; }
.pagination a, .pagination span {
  padding: 2px 9px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); text-decoration: none;
}
.pagination .current { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.pagination .gap { border: 0; background: none; }

/* ---- mensajes */
.thread-meta { margin-top: -8px; }
.posts { display: flex; flex-direction: column; gap: 12px; }
.post-head {
  display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center;
  padding: 6px 12px; color: #e8eef6; font-size: 0.78rem;
  background: var(--block);
}
.post-head time { color: #e8eef6; }
.post-author { font-weight: 700; color: #fff; font-size: 0.9rem; }
.post-num { margin-left: auto; color: #fff; text-decoration: none; font-weight: 700; }
.avatar { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex: none; border: 2px solid rgba(255, 255, 255, 0.6); }
.avatar-letter {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold); color: var(--gold-text); font-weight: 700; font-size: 1.1rem;
}
.post-body { padding: 12px 14px; overflow-wrap: anywhere; font-size: 0.92rem; }
.post-attachments { padding: 0 14px 12px; display: flex; flex-wrap: wrap; gap: 8px; }

.bb-img { max-width: 100%; height: auto; vertical-align: middle; }
.bb-thumb img { border: 1px solid var(--border); border-radius: 4px; max-width: 100%; height: auto; }
.bb-quote { margin: 8px 0; padding: 8px 12px; background: var(--quote-bg); border: 1px solid var(--quote-border); border-left-width: 4px; border-radius: 4px; }
.bb-quote-by { font-size: 0.8rem; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.bb-code { background: var(--row); padding: 10px; border-radius: 4px; overflow-x: auto; font-size: 0.85rem; }
.bb-spoiler { margin: 8px 0; padding: 6px 10px; border: 1px dashed var(--border); border-radius: 4px; }
.bb-spoiler summary { cursor: pointer; font-weight: 700; }
.bb-ispoiler { background: var(--text); color: var(--text); }
.bb-ispoiler:hover { color: var(--bg); }
.bb-heading { font-weight: 700; font-size: 1.05rem; margin: 8px 0; }
.bb-video { position: relative; max-width: 560px; aspect-ratio: 16 / 9; }
.bb-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.bb-table { overflow-x: auto; }
.bb-table table { border-collapse: collapse; }
.bb-table td, .bb-table th { border: 1px solid var(--border); padding: 4px 8px; }
.smilie { font-style: normal; }

/* ---- formularios y cuenta */
.box { padding: 16px; margin-bottom: 16px; }
.form-box { max-width: 520px; }
form label { display: block; font-weight: 700; margin: 12px 0 4px; font-size: 0.85rem; }
form label.check { font-weight: 400; display: flex; gap: 8px; align-items: flex-start; }
input[type=text], input[type=password], input[type=search], input[type=email], textarea {
  width: 100%; padding: 7px 10px; font: inherit; color: var(--text);
  background: #fff; border: 1px solid var(--border); border-radius: 4px;
}
button:not(.link-button), .button-link {
  display: inline-block; margin-top: 14px; padding: 7px 16px; font: inherit; font-weight: 700; cursor: pointer;
  color: #fff; background: linear-gradient(180deg, var(--head-b) 0%, var(--head-a) 100%);
  border: 1px solid var(--accent-dark); border-radius: 4px; text-decoration: none;
}
.button-link { margin-top: 0; padding: 3px 12px; font-size: 0.8rem; }
.button-link:hover, button:not(.link-button):hover { filter: brightness(1.08); color: #fff; }
.danger, button.danger, .button-link.danger { background: #b3261e; border-color: #8c1d17; color: #fff; }
.form-error { color: #b3261e; font-weight: 700; }
.notice { background: #fff4c7; border: 1px solid var(--quote-border); border-radius: 4px; padding: 8px 12px; color: #4a3a00; }
.search-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.search-form input { flex: 1; min-width: 200px; }
.search-form button { margin-top: 0; }
.account-menu { padding-left: 18px; }
.account-menu li { margin: 8px 0; }
.snippet { font-size: 0.85rem; margin-top: 4px; overflow-wrap: anywhere; }
.threads:not(:has(.thread-cols)) {
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px; overflow: hidden;
}
.my-post { grid-template-columns: minmax(0, 1fr) auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.error-text { font-size: 1rem; }
.site-footer {
  background: linear-gradient(180deg, var(--head-b) 0%, var(--head-a) 100%);
  padding: 14px 0; font-size: 0.78rem; color: #e8eef6;
}

@media (max-width: 760px) {
  .node-cols, .thread-cols, .thread.thread-cols { grid-template-columns: 26px minmax(0, 1fr); row-gap: 2px; }
  .node-last, .thread-last, .node-stats, .thread-stats { grid-column: 2; text-align: left; align-items: flex-start; }
  .node-stats, .thread-stats { flex-direction: row; gap: 8px; }
  .list-head { display: none; }
  .logo-text { font-size: 1.35rem; }
  .logo-tagline { letter-spacing: 0.3em; }
  .navbar-note { display: none; }
  h1 { font-size: 1.25rem; }
}

/* ---- footer, anuncios y páginas de texto */
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.footer-links a { color: #fff; }
.ad { margin: 14px 0; min-height: 90px; text-align: center; }
.prose { font-size: 0.9rem; max-width: 820px; }
.prose h2 { font-size: 1rem; color: var(--accent-dark); margin: 18px 0 6px; }

/* ---- mis mensajes */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.tabs a { padding: 4px 12px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); text-decoration: none; font-size: 0.82rem; font-weight: 700; }
.tabs a.active { background: var(--block); color: #fff; }
.badge-thread { background: var(--block); color: #fff; }
.badge-reply { background: #8a97a5; color: #fff; }

/* Herramientas de administrador en la cabecera de cada mensaje */
.admin-tools { display: flex; gap: 8px; font-size: 0.8rem; }
.admin-tools a { color: #e8eef6; }
.admin-tools a.admin-delete { color: #ffd4d0; font-weight: 700; }

/* Aviso de modo solo lectura, en todas las páginas */
.readonly-banner { background: #fff4c7; border-bottom: 1px solid var(--quote-border); color: #4a3a00; font-size: 0.86rem; }
.readonly-banner .wrap { padding-top: 7px; padding-bottom: 7px; }
.readonly-banner a { color: #4a3a00; font-weight: 700; }

/* Email de contacto como imagen (contra bots de spam) */
.email-img { vertical-align: -3px; }

/* Encuestas de XenForo, solo resultados */
.poll { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 10px 14px; margin: 0 0 14px; }
.poll-question { font-size: 1rem; margin: 0 0 8px; color: var(--accent-dark); }
.poll-results { list-style: none; margin: 0 0 6px; padding: 0; }
.poll-results li { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) auto; gap: 10px; align-items: center; padding: 3px 0; font-size: 0.88rem; }
.poll-label { overflow-wrap: anywhere; }
.poll-bar { display: block; height: 10px; background: #fff; border: 1px solid var(--border); border-radius: 3px; overflow: hidden; }
.poll-bar span { display: block; height: 100%; background: var(--block); }
.poll-votes { white-space: nowrap; font-size: 0.8rem; color: var(--muted); }
@media (max-width: 560px) { .poll-results li { grid-template-columns: 1fr auto; } .poll-bar { grid-column: 1 / -1; } }
