/* ==========================================
   Forums Component - RumorMX
   ========================================== */

:root {
    --forum-primary: #ff4500;
    --forum-primary-hover: #e63e00;
    --forum-primary-light: #fff2ec;
    --forum-bg: #f8fafc;
    --forum-text: #1e293b;
    --forum-muted: #64748b;
    --forum-border: #e2e8f0;
    --forum-card-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.05);
    --forum-card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body.forums-body {
    background-color: var(--forum-bg);
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--forum-text);
    padding-top: 0;
}

/* ── Header ── */
.forums-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.forums-header .header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.header-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 12px;
    border-left: 1px solid rgba(226, 232, 240, 0.8);
}

.forums-header .header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: flex-end;
}

.back-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: var(--forum-muted);
    text-decoration: none;
    transition: all 0.3s;
    font-size: 1.1rem;
}

.back-btn:hover {
    background: var(--forum-primary-light);
    color: var(--forum-primary);
    transform: translateX(-4px);
}

.header-auth-btn {
    background: white;
    border: 1px solid var(--forum-border);
    padding: 3px 14px 3px 3px;
    border-radius: 100px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.header-auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: var(--forum-primary-light);
}

.header-avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: #f1f5f9;
}

.header-avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#auth-username-link {
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    color: var(--forum-text);
    font-size: 0.9rem;
}

.forums-title-icon {
    font-size: 1.5rem;
}

.forums-title-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #ff4500, #ff8717);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ── Main Container ── */
.forums-container {
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
    padding: 0;
}

/* ── Tabs ── */
.forums-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.forums-tabs::-webkit-scrollbar { display: none; }

.forum-tab {
    padding: 10px 18px;
    border-radius: 100px;
    border: 1px solid var(--forum-border);
    background: white;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--forum-muted);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
}

.forum-tab:hover {
    border-color: var(--forum-primary-light);
    color: var(--forum-primary);
    background: var(--forum-primary-light);
}

.forum-tab.active {
    background: linear-gradient(135deg, #ff4500, #ff8717);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(255, 69, 0, 0.3);
}

/* ── Forum Cards ── */
.forum-card {
    background: white;
    border-radius: 20px;
    margin-bottom: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--forum-card-shadow);
    border: 1px solid var(--forum-border);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.forum-card:hover {
    background: #fafbfc;
    border-color: var(--forum-primary-light);
}

.forum-card-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.forum-card-info {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.forum-icon-circle {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    transition: transform 0.3s;
}

.forum-card:hover .forum-icon-circle {
    transform: scale(1.1) rotate(5deg);
}

.forum-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

/* Category Colors */
.category-general i { color: #64748b; }
.category-seguridad i { color: #ef4444; }
.category-politica i { color: #3b82f6; }
.category-deportes i { color: #22c55e; }
.category-entretenimiento i { color: #a855f7; }
.category-noticias i { color: #f59e0b; }
.category-tecnologia i { color: #06b6d4; }
.category-otro i { color: #78716c; }

.forum-card-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1rem; /* Reducido de 1.15rem */
    color: var(--forum-text);
    line-height: 1.2;
    margin: 0;
}

.forum-card-desc {
    font-size: 0.88rem; /* Reducido de 0.92rem */
    color: var(--forum-muted);
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.forum-card-meta {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: var(--forum-muted);
}

.forum-card-meta .meta-dot { opacity: 0.5; }

.forum-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.forum-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--forum-muted);
}

.forum-stat i { font-size: 0.9rem; }
.forum-stat.threads i { color: var(--forum-primary); }
.forum-stat.replies i { color: #3b82f6; }

.forum-category-badge {
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.forum-category-badge i {
    font-size: 0.8rem;
}

.badge-general { background: #f1f5f9; color: #64748b; }
.badge-seguridad { background: #fef2f2; color: #ef4444; }
.badge-politica { background: #eff6ff; color: #3b82f6; }
.badge-deportes { background: #f0fdf4; color: #22c55e; }
.badge-entretenimiento { background: #faf5ff; color: #a855f7; }
.badge-noticias { background: #fffbeb; color: #f59e0b; }
.badge-tecnologia { background: #ecfeff; color: #06b6d4; }
.badge-otro { background: #fafaf9; color: #78716c; }

.forum-creator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--forum-muted);
}

.forum-creator-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.forum-creator-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ── Create Forum Button ── */
.create-forum-fab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff4500, #ff8717);
    color: white;
    border: none;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(255, 69, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
}

.create-forum-fab:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 12px 32px rgba(255, 69, 0, 0.5);
}

/* ── Create Forum Modal ── */
.create-forum-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.create-forum-overlay.active { display: flex; }

.create-forum-modal {
    background: white;
    border-radius: 28px;
    padding: 32px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    animation: modalSlideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.create-forum-modal h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 850;
    font-size: 1.4rem;
    margin-bottom: 24px;
    text-align: center;
}

.forum-form-group {
    margin-bottom: 18px;
}

.forum-form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.forum-form-group input,
.forum-form-group textarea,
.forum-form-group select {
    width: 100%;
    padding: 12px 16px;
    border-radius: 14px;
    border: 2px solid #f1f5f9;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    color: var(--forum-text);
    background: #f8fafc;
    transition: all 0.3s;
    box-sizing: border-box;
}

.forum-form-group input:focus,
.forum-form-group textarea:focus,
.forum-form-group select:focus {
    outline: none;
    border-color: var(--forum-primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 69, 0, 0.1);
}

.forum-form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.forum-category-picker {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.category-option {
    padding: 10px 8px;
    border-radius: 14px;
    border: 2px solid #f1f5f9;
    background: white;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--forum-muted);
}

.category-option:hover {
    border-color: var(--forum-primary-light);
    transform: translateY(-2px);
}

.category-option.selected {
    border-color: var(--forum-primary);
    background: var(--forum-primary-light);
    color: var(--forum-primary);
    box-shadow: 0 4px 12px rgba(255, 69, 0, 0.15);
}

.category-option-icon {
    font-size: 1.3rem;
    display: block;
    margin-bottom: 4px;
}

.forum-modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.forum-modal-actions button {
    flex: 1;
    padding: 14px;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
}

.btn-cancel {
    background: #f1f5f9;
    border: none;
    color: var(--forum-muted);
}

.btn-cancel:hover { background: #e2e8f0; }

.btn-submit-forum {
    background: linear-gradient(135deg, #ff4500, #ff8717);
    border: none;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 69, 0, 0.3);
}

.btn-submit-forum:hover {
    box-shadow: 0 6px 20px rgba(255, 69, 0, 0.4);
    transform: translateY(-2px);
}

/* ── Forum Detail View ── */
.forum-detail-header {
    background: white;
    border-radius: 24px;
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: var(--forum-card-shadow);
    border: 1px solid #f1f5f9;
}

.forum-detail-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 850;
    font-size: 1.6rem;
    margin: 12px 0 8px;
}

.forum-detail-desc {
    font-size: 1rem;
    color: var(--forum-muted);
    line-height: 1.5;
    margin-bottom: 16px;
}

.forum-detail-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* ── Thread Cards ── */
.thread-card {
    background: white;
    border-radius: 0;
    padding: 12px 16px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: none;
    border-bottom: 1px solid #f1f5f9;
    border-top: 1px solid #f1f5f9;
    cursor: pointer;
}

.thread-card:hover {
    background: #fafbfc;
    border-color: var(--forum-primary-light);
}

.thread-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.thread-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #f1f5f9;
}

.thread-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thread-author-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.thread-author-name {
    font-weight: 800;
    font-size: 0.92rem;
    font-family: 'Outfit', sans-serif;
}

.thread-time {
    font-size: 0.78rem;
    color: var(--forum-muted);
}

.thread-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1rem; /* Reducido de 1.1rem */
    color: var(--forum-text);
    line-height: 1.2;
}

.thread-snippet {
    font-size: 0.92rem; /* Reducido de 0.95rem */
    color: #475569;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.thread-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.thread-action {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: var(--forum-muted);
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
    padding: 4px 8px;
    border-radius: 8px;
    background: none;
    border: none;
    font-family: 'Inter', sans-serif;
}

.thread-action:hover { color: var(--forum-primary); background: var(--forum-primary-light); }
.thread-action.liked { color: var(--forum-primary); }
.thread-action.liked i { transform: scale(1.15); }

/* ── Thread Detail View ── */
.thread-detail-card {
    background: white;
    border-radius: 0;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: none;
    border-bottom: 1px solid #f1f5f9;
}

.thread-detail-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 850;
    font-size: 1.5rem;
    margin: 16px 0 12px;
    line-height: 1.3;
}

.thread-detail-content {
    font-size: 1.05rem;
    color: #334155;
    line-height: 1.7;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.thread-detail-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

/* ── Reply Cards ── */
.replies-section {
    margin-top: 0;
}

.replies-section-header {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--forum-text);
    padding: 12px 16px;
    margin-bottom: 0;
    background: #f8fafc;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #f1f5f9;
}

.reply-card {
    display: flex;
    gap: 14px;
    padding: 12px 16px;
    background: white;
    border-radius: 0;
    margin-bottom: 0;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s;
}

.reply-card:hover {
    background: #fafbfc;
    border-color: #e8ecf0;
}

.reply-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #f1f5f9;
}

.reply-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reply-body {
    flex: 1;
    min-width: 0;
}

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

.reply-author {
    font-weight: 800;
    font-size: 0.9rem;
    font-family: 'Outfit', sans-serif;
}

.reply-time {
    font-size: 0.78rem;
    color: var(--forum-muted);
}

.reply-content {
    font-size: 0.95rem;
    color: #334155;
    line-height: 1.5;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.reply-delete-btn {
    background: none;
    border: none;
    color: #cbd5e1;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s;
}

.reply-delete-btn:hover {
    color: #ef4444;
    background: #fef2f2;
}

/* ── Reply Input ── */
.reply-input-container {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 750px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 16px 20px;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 12px;
    align-items: center;
    z-index: 1100;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-bottom: none;
    box-sizing: border-box;
}

/* Spacer for fixed bottom input */
.forum-bottom-spacer {
    height: 120px;
}

.reply-input-container .reply-avatar {
    width: 36px;
    height: 36px;
}

.reply-input {
    flex: 1;
    padding: 12px 18px;
    border-radius: 100px;
    border: 2px solid #f1f5f9;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    color: var(--forum-text);
    background: #f8fafc;
    transition: all 0.3s;
}

.reply-input:focus {
    outline: none;
    border-color: var(--forum-primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 69, 0, 0.1);
}

.reply-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff4500, #ff8717);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex-shrink: 0;
}

.reply-send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 69, 0, 0.3);
}

/* ── Empty State ── */
.forums-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--forum-muted);
}

.forums-empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.forums-empty h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--forum-text);
    margin-bottom: 8px;
}

.forums-empty p {
    font-size: 1rem;
    line-height: 1.5;
}

/* ── Breadcrumb Nav ── */
.forum-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 0.88rem;
    color: var(--forum-muted);
}

.bc-path {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.forum-breadcrumb a {
    color: var(--forum-primary);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.forum-breadcrumb a:hover { opacity: 0.8; }

.forum-breadcrumb .bc-sep {
    color: #cbd5e1;
    font-size: 0.75rem;
}

.forums-search {
    flex: 0 1 400px;
    margin: 0 20px;
    position: relative;
    display: flex;
    align-items: center;
}

.forums-search input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border-radius: 18px;
    border: 1px solid transparent;
    background: #f1f5f9;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    color: var(--forum-text);
    transition: all 0.3s;
}

.forums-search input:focus {
    background: white;
    border-color: var(--forum-primary-light);
    box-shadow: 0 10px 15px -3px rgba(255, 69, 0, 0.1);
    outline: none;
}

.forums-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--forum-muted);
    pointer-events: none;
    transition: all 0.3s;
}

.mobile-search-close {
    display: none;
    background: none;
    border: none;
    color: var(--forum-muted);
    font-size: 1.1rem;
    padding: 8px;
    cursor: pointer;
    position: absolute;
    right: 10px;
    z-index: 2;
}

/* ── Join Forum Button ── */
.join-forum-btn-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    color: #334155;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid rgba(0,0,0,0.05);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    backdrop-filter: blur(10px);
}

.join-forum-btn-inline:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.join-forum-btn-inline.joined {
    background: #f1f5f9;
    color: #64748b;
}

.join-forum-btn-inline.joined:hover {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fca5a5;
}

/* ── Create Thread Button ── */
.new-thread-btn-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff4500, #ff8717);
    color: white;
    border: none;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(255, 69, 0, 0.2);
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

.new-thread-btn-inline:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 69, 0, 0.3);
}

/* ── Delete Forum Button ── */
.delete-forum-btn {
    background: none;
    border: none;
    color: #cbd5e1;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 10px;
    transition: all 0.2s;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.delete-forum-btn:hover {
    color: #ef4444;
    background: #fef2f2;
}

/* ── Skeleton ── */
.forum-skeleton {
    background: white;
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 16px;
    border: 1px solid #f1f5f9;
}

.forum-skeleton .skel {
    border-radius: 10px;
    background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
    background-size: 200% 100%;
    animation: skel-shimmer 1.5s linear infinite;
}

@keyframes skel-shimmer {
    to { background-position-x: -200%; }
}

.forum-skeleton .skel-title { height: 20px; width: 60%; margin-bottom: 12px; }
.forum-skeleton .skel-desc { height: 14px; width: 85%; margin-bottom: 8px; }
.forum-skeleton .skel-meta { height: 12px; width: 40%; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .stat-label { display: none; }
    
    .forums-header {
        padding: 10px 12px;
        gap: 8px;
    }

    .forums-header .header-left {
        flex: 1;
    }

    .forums-header .header-right {
        flex: 0;
        gap: 4px;
    }

    .forums-search {
        flex: 0 0 40px;
        height: 40px;
        margin: 0;
        background: #f1f5f9;
        border-radius: 50%;
        justify-content: center;
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        overflow: hidden;
        cursor: pointer;
    }

    .forums-search input {
        display: none;
        width: 0;
        padding: 0;
        opacity: 0;
    }

    .forums-search i {
        position: static;
        transform: none;
        font-size: 1rem;
    }

    .forums-search.active {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        background: white;
        z-index: 1001;
        margin: 0;
        padding: 0 16px;
        display: flex;
        align-items: center;
        flex: 1;
        cursor: default;
        box-sizing: border-box;
    }

    .forums-search.active input {
        display: block;
        width: 100%;
        opacity: 1;
        padding: 10px 45px 10px 45px;
        background: #f8fafc;
        border: 2px solid #f1f5f9;
        border-radius: 14px;
        box-sizing: border-box;
    }

    .forums-search.active i.fa-search {
        position: absolute;
        left: 32px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 0.9rem;
    }

    .forums-search.active .mobile-search-close {
        display: flex;
        align-items: center;
        justify-content: center;
        right: 20px;
        width: 32px;
        height: 32px;
        top: 50%;
        transform: translateY(-50%);
        padding: 0;
    }

    .forum-card { padding: 18px; border-radius: 20px; }
    .forum-icon-circle { width: 42px; height: 42px; font-size: 1.2rem; }
    .forum-card-title { font-size: 1.05rem; }

    .forum-category-picker {
        grid-template-columns: repeat(2, 1fr);
    }

    .create-forum-modal {
        border-radius: 20px;
        padding: 24px;
    }

    .forum-detail-header { padding: 20px; border-radius: 20px; }
    .forum-detail-title { font-size: 1.3rem; }

    .thread-card { padding: 16px 18px; border-radius: 16px; }
    .thread-detail-card { padding: 20px; border-radius: 20px; }
    .thread-detail-title { font-size: 1.2rem; }

    .create-forum-fab {
        bottom: 20px;
        right: 20px;
    }
}

/* ==========================================
   Desktop Responsive Layout (New)
   ========================================== */

.forums-layout-container {
    display: flex;
    justify-content: space-between; /* Empuja las barras a los extremos */
    align-items: flex-start;
    gap: 20px;
    padding: 24px;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

.forums-sidebar {
    display: none; /* Oculto por defecto en móvil */
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 94px; /* header + gap */
    height: fit-content;
}

@media (min-width: 1024px) {
    .forums-sidebar {
        display: block;
    }
    
    .forums-container {
        flex: 0 1 750px; /* Ancho fijo para el contenido */
        margin: 0 auto; /* Centrar en el espacio restante */
    }
}

/* Sidebar Left: Menu */
.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0; /* Alineado a la izquierda */
    border-radius: 14px;
    color: var(--forum-text);
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.2s;
}

.menu-item i {
    font-size: 1.4rem;
    width: 24px;
    text-align: center;
    color: var(--forum-muted);
}

.menu-item:hover {
    background: var(--forum-primary-light);
    color: var(--forum-primary);
    transform: translateX(4px);
}

.menu-item.active {
    background: var(--forum-primary-light);
    color: var(--forum-primary);
}

.menu-item.active i {
    color: var(--forum-primary);
}

.sidebar-divider {
    border: none;
    border-top: 1px solid var(--forum-border);
    margin: 16px 0;
}

.sidebar-footer-links {
    padding: 0;
    font-size: 0.8rem;
    color: var(--forum-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sidebar-footer-links a {
    color: var(--forum-muted);
    text-decoration: none;
}

.sidebar-footer-links a:hover {
    text-decoration: underline;
}

/* Sidebar Right: Widgets */
.sidebar-widget {
    background: white;
    border-radius: 20px;
    padding: 20px;
    border: 1px solid var(--forum-border);
    margin-bottom: 24px;
    box-shadow: var(--forum-card-shadow);
}

.widget-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 850;
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--forum-text);
}

.sidebar-rules {
    padding-left: 20px;
    margin: 0;
    font-size: 0.9rem;
    color: var(--forum-muted);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.help-widget p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--forum-muted);
    margin-bottom: 16px;
}

.help-btn {
    width: 100%;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid var(--forum-primary);
    background: transparent;
    color: var(--forum-primary);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.help-btn:hover {
    background: var(--forum-primary);
    color: white;
}

/* Ajustes para Móvil */
@media (max-width: 600px) {
    .forums-layout-container {
        padding: 0;
        gap: 0;
    }
    
    .forums-container {
        max-width: 100%;
    }
    
    .forum-card, .thread-card, .thread-detail-card {
        border-radius: 0;
        margin-bottom: 8px;
        border-left: none;
        border-right: none;
    }
}
