/* comunidad.css v1.4 — Sección Comunidad: jugadores + foro */

/* ── Reset / base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary, #0a0f1a);
    color: var(--text-primary, #e2e8f0);
    min-height: 100vh;
}

/* ── Layout container ────────────────────────────────────────── */
.com-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 16px 80px; /* top padding para el navbar fijo */
}

/* ── Overlay del drawer móvil ─────────────────────────────────── */
.nav-drawer-overlay {
    position: fixed; inset: 0; z-index: 298;
    background: rgba(0,0,0,.55);
}
.nav-drawer.open { transform: translateX(0) !important; }

/* ── Active link en navbar de comunidad ──────────────────────── */
.nav-links .nav-link.active,
.nav-drawer-link.active {
    color: var(--accent, #14a44d) !important;
}

/* ── Breadcrumb / back ───────────────────────────────────────── */
.com-breadcrumb {
    display: flex; align-items: center; gap: 10px;
    padding: 18px 0 0;
    font-size: .82rem; color: var(--text-muted, #8892a4);
}
.com-back-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
    color: var(--text-primary, #e2e8f0);
    border-radius: 8px; padding: 6px 14px;
    font-size: .8rem; font-weight: 600;
    text-decoration: none; transition: .18s;
}
.com-back-btn:hover {
    background: rgba(20,164,77,.1); border-color: rgba(20,164,77,.3);
    color: #14a44d; text-decoration: none;
}
.com-breadcrumb-sep { opacity: .35; }
.com-breadcrumb-current { color: var(--accent, #14a44d); font-weight: 600; }

/* ── Hero / header de sección ────────────────────────────────── */
.com-hero {
    padding: 24px 0 28px;
    text-align: center;
}
.com-hero-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 900;
    background: linear-gradient(135deg, #14a44d 0%, #d4af37 50%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}
.com-hero-sub {
    color: var(--text-muted, #8892a4);
    font-size: .95rem;
}

/* ── Tabs de navegación ──────────────────────────────────────── */
.com-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-secondary, #111827);
    border: 1px solid var(--border-color, #1e2d3d);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 28px;
    overflow-x: auto;
    scrollbar-width: none;
}
.com-tabs::-webkit-scrollbar { display: none; }
.com-tab-btn {
    flex: 1;
    min-width: 120px;
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-muted, #8892a4);
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}
.com-tab-btn.active {
    background: linear-gradient(135deg, #14a44d22, #d4af3722);
    color: var(--accent, #14a44d);
    border: 1px solid #14a44d44;
}
.com-tab-btn:hover:not(.active) {
    background: rgba(255,255,255,.05);
    color: var(--text-primary, #e2e8f0);
}

/* ── SECCIÓN JUGADORES ───────────────────────────────────────── */
.jugadores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.jugador-card {
    background: var(--bg-secondary, #111827);
    border: 1px solid var(--border-color, #1e2d3d);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform .2s, border-color .2s, box-shadow .2s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.jugador-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #14a44d, #d4af37);
    opacity: 0;
    transition: opacity .2s;
}
.jugador-card:hover { transform: translateY(-3px); border-color: #14a44d44; box-shadow: 0 8px 32px rgba(20,164,77,.15); }
.jugador-card:hover::before { opacity: 1; }

.jugador-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.jugador-avatar {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #14a44d, #0d7d3a);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; font-weight: 700; color: #fff;
    flex-shrink: 0;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,.08);
    position: relative;
}
.jugador-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* Marcos de avatar por nivel (mismos keyframes que cuenta.css) */
.jugador-avatar.av-lv2  { animation: jfr-green 2s ease-in-out infinite; }
.jugador-avatar.av-lv3  { animation: jfr-green 2s ease-in-out infinite; }
.jugador-avatar.av-lv4  { animation: jfr-green 2s ease-in-out infinite; }
.jugador-avatar.av-lv5  { animation: jfr-blue 2s ease-in-out infinite; }
.jugador-avatar.av-lv6,  .jugador-avatar.av-lv7,
.jugador-avatar.av-lv8,  .jugador-avatar.av-lv9  { animation: jfr-blue 2s ease-in-out infinite; }
.jugador-avatar.av-lv10, .jugador-avatar.av-lv11,
.jugador-avatar.av-lv12, .jugador-avatar.av-lv13,
.jugador-avatar.av-lv14 { animation: jfr-gold 2s ease-in-out infinite; }
.jugador-avatar.av-lv15, .jugador-avatar.av-lv16,
.jugador-avatar.av-lv17, .jugador-avatar.av-lv18,
.jugador-avatar.av-lv19 { animation: jfr-epic 3s linear infinite; }
.jugador-avatar.av-lv20 { animation: jfr-dragon 3s linear infinite; }

@keyframes jfr-green  { 0%,100%{ box-shadow:0 0 0 3px #14a44d66; } 50%{ box-shadow:0 0 0 5px #14a44daa, 0 0 16px #14a44d55; } }
@keyframes jfr-blue   { 0%,100%{ box-shadow:0 0 0 3px #3b82f666; } 50%{ box-shadow:0 0 0 5px #3b82f6aa, 0 0 16px #3b82f655; } }
@keyframes jfr-gold   { 0%,100%{ box-shadow:0 0 0 3px #d4af3766; } 50%{ box-shadow:0 0 0 5px #d4af37cc, 0 0 20px #d4af3777; } }
@keyframes jfr-epic   { 0%{ box-shadow:0 0 0 3px #a855f7cc; } 33%{ box-shadow:0 0 0 4px #3b82f6cc,0 0 24px #a855f755; } 66%{ box-shadow:0 0 0 4px #ec4899cc,0 0 24px #3b82f655; } 100%{ box-shadow:0 0 0 3px #a855f7cc; } }
@keyframes jfr-dragon { 0%{ box-shadow:0 0 0 3px #3b82f6cc; } 33%{ box-shadow:0 0 0 5px #ef4444cc,0 0 28px #3b82f655; } 66%{ box-shadow:0 0 0 5px #a855f7cc,0 0 28px #ef444455; } 100%{ box-shadow:0 0 0 3px #3b82f6cc; } }

.jugador-info { flex: 1; min-width: 0; }
.jugador-nombre {
    font-size: .95rem; font-weight: 700;
    color: var(--text-primary, #e2e8f0);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.jugador-nivel {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: .72rem; font-weight: 600;
    color: #d4af37;
    margin-top: 2px;
}
.jugador-nivel-badge {
    background: linear-gradient(135deg, #d4af3722, #d4af3744);
    border: 1px solid #d4af3744;
    border-radius: 20px;
    padding: 2px 8px;
    font-size: .68rem; font-weight: 700; color: #d4af37;
}

.jugador-bio {
    font-size: .78rem;
    color: var(--text-muted, #8892a4);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.jugador-colors {
    display: flex; gap: 4px; flex-wrap: wrap;
}
.jugador-color-icon {
    width: 18px; height: 18px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.5));
}

.jugador-footer {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 4px;
}
.jugador-xp {
    font-size: .7rem; color: var(--text-muted, #8892a4);
}
.jugador-btn-perfil {
    padding: 5px 14px;
    border-radius: 8px;
    border: 1px solid #14a44d44;
    background: rgba(20,164,77,.1);
    color: #14a44d;
    font-size: .75rem; font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
}
.jugador-btn-perfil:hover { background: #14a44d; color: #fff; }

/* ── SECCIÓN FORO ─────────────────────────────────────────────── */
.foro-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
    align-items: start;
}
@media (max-width: 768px) {
    .foro-layout { grid-template-columns: 1fr; }
    .foro-sidebar { display: none; }
    .foro-sidebar.mobile-show { display: block; }
}

/* Sidebar de categorías */
.foro-sidebar {
    background: var(--bg-secondary, #111827);
    border: 1px solid var(--border-color, #1e2d3d);
    border-radius: 14px;
    overflow: hidden;
    position: sticky;
    top: 72px;
}
.foro-sidebar-title {
    padding: 14px 16px;
    font-size: .78rem;
    font-weight: 700;
    color: var(--text-muted, #8892a4);
    text-transform: uppercase;
    letter-spacing: .08em;
    border-bottom: 1px solid var(--border-color, #1e2d3d);
}
.foro-cat-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color, #1e2d3d);
    color: var(--text-muted, #8892a4);
    font-size: .85rem;
    cursor: pointer;
    transition: all .15s;
    text-align: left;
}
.foro-cat-btn:last-child { border-bottom: none; }
.foro-cat-btn:hover { background: rgba(255,255,255,.04); color: var(--text-primary, #e2e8f0); }
.foro-cat-btn.active { background: rgba(20,164,77,.08); color: var(--accent, #14a44d); border-right: 3px solid #14a44d; }
.foro-cat-icon { font-size: 1.1rem; }
.foro-cat-info { flex: 1; }
.foro-cat-nombre { font-weight: 600; font-size: .83rem; }
.foro-cat-count { font-size: .7rem; color: var(--text-muted, #8892a4); margin-top: 1px; }
.foro-cat-btn.active .foro-cat-count { color: #14a44d88; }

/* Panel principal del foro */
.foro-main { display: flex; flex-direction: column; gap: 12px; }

.foro-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}
.foro-topbar-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary, #e2e8f0);
}
.btn-nuevo-topic {
    display: flex; align-items: center; gap: 6px;
    padding: 9px 18px;
    background: linear-gradient(135deg, #14a44d, #0d7d3a);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: .85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
}
.btn-nuevo-topic:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(20,164,77,.35); }

/* Topic card */
.topic-card {
    background: var(--bg-secondary, #111827);
    border: 1px solid var(--border-color, #1e2d3d);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all .18s;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: start;
}
.topic-card:hover { border-color: #14a44d44; background: rgba(20,164,77,.03); }
.topic-card.pinned { border-color: #d4af3744; background: rgba(212,175,55,.03); }
.topic-card.pinned::before {
    content: '📌';
    position: absolute;
    top: 10px; right: 12px;
    font-size: .8rem;
}

.topic-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #14a44d, #0d7d3a);
    display: flex; align-items: center; justify-content: center;
    font-size: .9rem; font-weight: 700; color: #fff;
    flex-shrink: 0;
    overflow: hidden;
}
.topic-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.topic-body { min-width: 0; }
.topic-titulo {
    font-size: .92rem; font-weight: 700;
    color: var(--text-primary, #e2e8f0);
    margin-bottom: 4px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topic-extracto {
    font-size: .78rem;
    color: var(--text-muted, #8892a4);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}
.topic-meta {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.topic-meta-item {
    display: flex; align-items: center; gap: 4px;
    font-size: .7rem;
    color: var(--text-muted, #8892a4);
}
.topic-cat-badge {
    padding: 2px 8px;
    border-radius: 20px;
    font-size: .65rem;
    font-weight: 700;
    background: rgba(20,164,77,.15);
    color: #14a44d;
    border: 1px solid #14a44d33;
}
.topic-stats {
    display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
    flex-shrink: 0;
}
.topic-stat {
    display: flex; align-items: center; gap: 4px;
    font-size: .72rem;
    color: var(--text-muted, #8892a4);
}
.topic-closed-badge {
    font-size: .65rem;
    background: rgba(239,68,68,.15);
    color: #ef4444;
    border: 1px solid #ef444433;
    border-radius: 20px;
    padding: 2px 8px;
}

/* ── DETALLE DE TOPIC ──────────────────────────────────────────── */
#topicDetail { display: none; }
.topic-detail-back {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color, #1e2d3d);
    background: var(--bg-secondary, #111827);
    color: var(--text-muted, #8892a4);
    font-size: .83rem;
    cursor: pointer;
    width: fit-content;
    margin-bottom: 16px;
    transition: all .15s;
}
.topic-detail-back:hover { color: var(--text-primary, #e2e8f0); border-color: #14a44d44; }

.topic-detail-card {
    background: var(--bg-secondary, #111827);
    border: 1px solid var(--border-color, #1e2d3d);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 16px;
}
.topic-detail-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color, #1e2d3d);
}
.topic-detail-titulo {
    font-size: 1.3rem; font-weight: 800;
    color: var(--text-primary, #e2e8f0);
    margin-bottom: 10px;
    line-height: 1.3;
}
.topic-detail-meta {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.topic-detail-autor {
    display: flex; align-items: center; gap: 8px;
}
.topic-detail-autor-av {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #14a44d, #0d7d3a);
    display: flex; align-items: center; justify-content: center;
    font-size: .75rem; font-weight: 700; color: #fff;
    overflow: hidden;
}
.topic-detail-autor-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.topic-detail-autor-info { display: flex; flex-direction: column; }
.topic-detail-autor-nombre { font-size: .83rem; font-weight: 700; color: var(--text-primary, #e2e8f0); }
.topic-detail-autor-nivel { font-size: .7rem; color: #d4af37; }
.topic-detail-contenido {
    padding: 20px;
    font-size: .88rem;
    line-height: 1.7;
    color: var(--text-primary, #e2e8f0);
    white-space: pre-wrap;
    word-break: break-word;
}

/* Comentarios del topic */
.topic-comentarios { display: flex; flex-direction: column; gap: 0; }
.topic-comentario {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color, #1e2d3d);
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 12px;
}
.topic-comentario:last-child { border-bottom: none; }
.tc-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #14a44d, #0d7d3a);
    display: flex; align-items: center; justify-content: center;
    font-size: .8rem; font-weight: 700; color: #fff;
    overflow: hidden;
    flex-shrink: 0;
}
.tc-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.tc-body { min-width: 0; }
.tc-author-row {
    display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}
.tc-author { font-size: .8rem; font-weight: 700; color: var(--text-primary, #e2e8f0); }
.tc-nivel { font-size: .68rem; color: #d4af37; }
.tc-fecha { font-size: .68rem; color: var(--text-muted, #8892a4); margin-left: auto; }
.tc-texto {
    font-size: .83rem;
    line-height: 1.6;
    color: var(--text-primary, #e2e8f0);
    white-space: pre-wrap;
    word-break: break-word;
}
.tc-actions {
    display: flex; gap: 8px; margin-top: 6px;
}
.tc-action-btn {
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid var(--border-color, #1e2d3d);
    background: transparent;
    color: var(--text-muted, #8892a4);
    font-size: .68rem;
    cursor: pointer;
    transition: all .15s;
}
.tc-action-btn:hover { border-color: #ef444444; color: #ef4444; }

/* Formulario de comentario del foro */
.foro-comentario-form {
    background: var(--bg-secondary, #111827);
    border: 1px solid var(--border-color, #1e2d3d);
    border-radius: 12px;
    padding: 16px;
    margin-top: 8px;
}
.foro-comentario-form h4 {
    font-size: .83rem;
    font-weight: 700;
    color: var(--text-muted, #8892a4);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 10px;
}
.foro-textarea {
    width: 100%;
    min-height: 90px;
    padding: 10px 14px;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border-color, #1e2d3d);
    border-radius: 8px;
    color: var(--text-primary, #e2e8f0);
    font-size: .85rem;
    line-height: 1.5;
    resize: vertical;
    font-family: inherit;
    transition: border-color .2s;
}
.foro-textarea:focus { outline: none; border-color: #14a44d55; }
.foro-form-footer {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 8px;
}
.foro-char-count { font-size: .72rem; color: var(--text-muted, #8892a4); }
.btn-foro-submit {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 18px;
    background: linear-gradient(135deg, #14a44d, #0d7d3a);
    color: #fff; border: none; border-radius: 8px;
    font-size: .83rem; font-weight: 700; cursor: pointer;
    transition: all .2s;
}
.btn-foro-submit:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(20,164,77,.3); }
.btn-foro-submit:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── MODAL NUEVO TOPIC ─────────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.7);
    backdrop-filter: blur(4px);
    z-index: 9000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.modal-overlay.active { display: flex; }
.modal-box {
    background: var(--bg-secondary, #111827);
    border: 1px solid var(--border-color, #1e2d3d);
    border-radius: 16px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color, #1e2d3d);
}
.modal-title { font-size: 1rem; font-weight: 800; color: var(--text-primary, #e2e8f0); }
.modal-close {
    width: 32px; height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border-color, #1e2d3d);
    background: transparent;
    color: var(--text-muted, #8892a4);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all .15s;
}
.modal-close:hover { color: var(--text-primary, #e2e8f0); background: rgba(255,255,255,.06); }
.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }

.form-group label {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-muted, #8892a4);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 6px;
}
.form-input, .form-select {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border-color, #1e2d3d);
    border-radius: 8px;
    color: var(--text-primary, #e2e8f0);
    font-size: .88rem;
    font-family: inherit;
    transition: border-color .2s;
}
.form-input:focus, .form-select:focus { outline: none; border-color: #14a44d55; }
.form-select option { background: #111827; }
.form-textarea {
    width: 100%;
    min-height: 120px;
    padding: 10px 14px;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border-color, #1e2d3d);
    border-radius: 8px;
    color: var(--text-primary, #e2e8f0);
    font-size: .85rem;
    line-height: 1.5;
    resize: vertical;
    font-family: inherit;
    transition: border-color .2s;
}
.form-textarea:focus { outline: none; border-color: #14a44d55; }
.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border-color, #1e2d3d);
    display: flex; gap: 8px; justify-content: flex-end;
}
.btn-modal-cancel {
    padding: 9px 18px;
    border-radius: 8px;
    border: 1px solid var(--border-color, #1e2d3d);
    background: transparent;
    color: var(--text-muted, #8892a4);
    font-size: .85rem; font-weight: 600; cursor: pointer;
    transition: all .15s;
}
.btn-modal-cancel:hover { background: rgba(255,255,255,.05); color: var(--text-primary, #e2e8f0); }
.btn-modal-submit {
    padding: 9px 22px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #14a44d, #0d7d3a);
    color: #fff;
    font-size: .85rem; font-weight: 700; cursor: pointer;
    transition: all .2s;
}
.btn-modal-submit:disabled { opacity: .5; cursor: not-allowed; }

/* ── Skeletons y empty states ──────────────────────────────────── */
.skel {
    background: linear-gradient(90deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,.1) 50%, rgba(255,255,255,.05) 100%);
    background-size: 200% 100%;
    animation: skel-shine 1.4s ease-in-out infinite;
    border-radius: 8px;
}
@keyframes skel-shine { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.skel-card { height: 140px; border-radius: 16px; margin-bottom: 12px; }
.skel-topic { height: 80px; border-radius: 12px; margin-bottom: 10px; }

.com-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted, #8892a4);
}
.com-empty-icon { font-size: 2.5rem; margin-bottom: 12px; }
.com-empty h4 { font-size: 1rem; color: var(--text-primary, #e2e8f0); margin-bottom: 6px; }
.com-empty p { font-size: .83rem; }

/* ── Buscador de jugadores ─────────────────────────────────────── */
.jugadores-topbar {
    display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap;
}
.jugadores-search {
    flex: 1; min-width: 200px;
    padding: 9px 14px;
    background: var(--bg-secondary, #111827);
    border: 1px solid var(--border-color, #1e2d3d);
    border-radius: 10px;
    color: var(--text-primary, #e2e8f0);
    font-size: .85rem;
    transition: border-color .2s;
}
.jugadores-search:focus { outline: none; border-color: #14a44d55; }
.jugadores-search::placeholder { color: var(--text-muted, #8892a4); }
.jugadores-sort {
    padding: 9px 12px;
    background: var(--bg-secondary, #111827);
    border: 1px solid var(--border-color, #1e2d3d);
    border-radius: 10px;
    color: var(--text-muted, #8892a4);
    font-size: .83rem;
    cursor: pointer;
}
.jugadores-sort option { background: #111827; }

/* ── Topbar foro móvil ─────────────────────────────────────────── */
.foro-cat-select-mobile {
    display: none;
    width: 100%;
    padding: 9px 12px;
    background: var(--bg-secondary, #111827);
    border: 1px solid var(--border-color, #1e2d3d);
    border-radius: 10px;
    color: var(--text-primary, #e2e8f0);
    font-size: .85rem;
    margin-bottom: 12px;
}
.foro-cat-select-mobile option { background: #111827; }
@media (max-width: 768px) {
    .foro-cat-select-mobile { display: block; }
    .jugadores-grid { grid-template-columns: 1fr; }
}

/* ── Jugadores: contador de resultados ───────────────────────── */
.jugadores-count {
    font-size: .78rem;
    color: var(--text-muted, #8892a4);
    margin-bottom: 12px;
}
.jugadores-count span {
    color: var(--accent, #14a44d);
    font-weight: 700;
}

/* ── Foro: header con badge de categoría activa ──────────────── */
.foro-topbar {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color, #1e2d3d);
    margin-bottom: 12px;
}

/* ── Jugador card: rank badge top-right ──────────────────────── */
.jugador-rank {
    position: absolute;
    top: 14px; right: 14px;
    font-size: .65rem;
    color: var(--text-muted, #8892a4);
    font-weight: 600;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 20px;
    padding: 1px 7px;
}
.jugador-rank.top1 { color: #d4af37; border-color: #d4af3744; background: rgba(212,175,55,.08); }
.jugador-rank.top2 { color: #94a3b8; border-color: #94a3b844; background: rgba(148,163,184,.08); }
.jugador-rank.top3 { color: #cd7f32; border-color: #cd7f3244; background: rgba(205,127,50,.08); }

/* ── Foro: topics list gap ──────────────────────────────────── */
#foroTopicsContainer {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ── Topic card: posición relativa para el pin ───────────────── */
.topic-card { position: relative; }

/* ── scrollbar del nav del foro en mobile ────────────────────── */
.foro-cat-select-mobile:focus { outline: none; }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .com-container { padding-top: 72px; }
    .com-hero { padding: 20px 0 16px; }
    .topic-card { grid-template-columns: 36px 1fr; }
    .topic-stats { display: none; }
    .jugadores-grid { gap: 10px; }
    .jugador-card { padding: 16px; }
}
