/*
Theme Name: Agente de Prensa
Theme URI: https://agentedeprensa.news
Author: Wiiitman / William Angarita
Description: Un tema moderno para noticias locales y nacionales.
Version: 1.0.0
Text Domain: agente-prensa
*/

/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
    /* Twitter (X) Official Light Palette */
    --bg-main: #ffffff;
    --bg-secondary: #f7f9f9;
    --text-primary: #0f1419;
    --text-secondary: #536471;
    --border-line: #eff3f4;
    --accent-blue: #1d9bf0;
    --accent-blue-hover: #1a8cd8;
    --accent-blue-light: rgba(29, 155, 240, 0.1);
    --hover-gray: #f7f7f7;
    --card-bg: #ffffff;
    --glow-color: transparent;
    --card-border: var(--border-line);
}

[data-theme="dark"] {
    --bg-main: #000000;
    --bg-secondary: #16181c;
    --text-primary: #e7e9ea;
    --text-secondary: #71767b;
    --border-line: #2f3336;
    --hover-gray: #181818;
    --accent-blue-light: rgba(29, 155, 240, 0.15);
    --card-bg: #16181c;
    --glow-color: transparent;
    --card-border: var(--border-line);
}

/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, sans-serif;
}

body {
    background: var(--bg-main);
    color: var(--text-primary);
    transition: background 0.3s, color 0.3s;
    overflow-x: hidden;
    line-height: 1.3;
}

/* ============================================
   DESKTOP LAYOUT (PC - CENTRADO MATEMÁTICO)
   ============================================ */
.app-grand-wrap {
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.main-layout-constraint {
    display: flex;
    width: 100%;
    max-width: 1250px;
    position: relative;
}

/* ============================================
   SIDEBAR IZQUIERDA — AI / NEURAL DESIGN
   ============================================ */

/* Keyframes for AI effects */
@keyframes neuroPulse {

    0%,
    100% {
        opacity: 1;
        filter: drop-shadow(0 0 6px rgba(29, 155, 240, 0.4));
    }

    50% {
        opacity: 0.85;
        filter: drop-shadow(0 0 14px rgba(29, 155, 240, 0.7));
    }
}

@keyframes neuralLine {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 0% 200%;
    }
}

@keyframes neuroPulse {
    0%, 100% { opacity: 0.8; filter: drop-shadow(0 0 5px var(--accent-blue)); }
    50% { opacity: 1; filter: drop-shadow(0 0 15px var(--accent-blue)); }
}

@keyframes dataScan {
    0% { transform: translateY(-100%); opacity: 0; }
    50% { opacity: 0.5; }
    100% { transform: translateY(100%); opacity: 0; }
}

@keyframes glowMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes neuralFlow {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(200%) rotate(45deg); }
}

@keyframes progressPulse {
    0% { box-shadow: 0 0 5px rgba(0, 255, 204, 0.2); }
    50% { box-shadow: 0 0 15px rgba(0, 255, 204, 0.6); }
    100% { box-shadow: 0 0 5px rgba(0, 255, 204, 0.2); }
}

@keyframes streamMove {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* --- SUPREME NEURAL LIKE ANIMATION --- */
@keyframes supremePop {
    0% { transform: scale(1) rotate(0); }
    30% { transform: scale(1.6) rotate(-20deg); }
    50% { transform: scale(0.8) rotate(15deg); }
    80% { transform: scale(1.2) rotate(-5deg); }
    100% { transform: scale(1) rotate(0); }
}

@keyframes neuralRing {
    0% { transform: translate(-50%, -50%) scale(0.1); opacity: 1; border-width: 8px; }
    100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; border-width: 1px; }
}

@keyframes neuralSpark {
    0% { transform: translate(-50%, -50%) scale(0) rotate(0); opacity: 0; }
    20% { opacity: 1; }
    100% { 
        transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0.8) rotate(360deg); 
        opacity: 0; 
    }
}

.like-trigger {
    position: relative;
    z-index: 10;
}

.like-trigger i {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
}

.like-trigger.active i,
.like-trigger.animating i {
    color: #00ffcc !important;
    filter: drop-shadow(0 0 12px #00ffcc);
    opacity: 1;
}

.like-trigger.animating i {
    animation: supremePop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.like-trigger::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 2px solid #00ffcc;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    pointer-events: none;
}

.like-trigger.animating::before {
    animation: neuralRing 0.5s ease-out;
}

/* Layered particles */
.like-trigger .neural-particle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: #00ffcc;
    border-radius: 2px;
    opacity: 0;
    pointer-events: none;
}

.like-trigger.animating .neural-particle:nth-child(1) { --tx: -20px; --ty: -20px; animation: neuralSpark 0.6s ease-out forwards; }
.like-trigger.animating .neural-particle:nth-child(2) { --tx: 20px; --ty: -20px; animation: neuralSpark 0.6s ease-out 0.05s forwards; }
.like-trigger.animating .neural-particle:nth-child(3) { --tx: -25px; --ty: 10px; animation: neuralSpark 0.6s ease-out 0.1s forwards; }
.like-trigger.animating .neural-particle:nth-child(4) { --tx: 25px; --ty: 10px; animation: neuralSpark 0.6s ease-out 0.15s forwards; }
.like-trigger.animating .neural-particle:nth-child(5) { --tx: 0px; --ty: -30px; animation: neuralSpark 0.6s ease-out 0.2s forwards; }


/* Adding more particle variations via CSS is hard without JS help, 
   but we can stack icons/elements if needed. For now, let's make the ring 
   and pop really solid. */

.sidebar-primary {
    width: 275px;
    border-right: 1px solid var(--border-line);
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 0 12px;
    display: flex;
    flex-direction: column;
    background: var(--bg-main);
    position: relative;
    overflow: hidden;
}

/* Neural accent line on right border */
[data-theme="dark"] .sidebar-primary {
    border-right-color: transparent;
    background: linear-gradient(180deg, #000000 0%, #050a14 50%, #000000 100%);
}

[data-theme="dark"] .sidebar-primary::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg,
            transparent 0%,
            rgba(0, 229, 255, 0.06) 15%,
            rgba(29, 155, 240, 0.3) 30%,
            rgba(0, 229, 255, 0.5) 50%,
            rgba(29, 155, 240, 0.3) 70%,
            rgba(0, 229, 255, 0.06) 85%,
            transparent 100%);
    background-size: 100% 200%;
    animation: neuralLine 6s linear infinite;
}

/* === LOGO AI === */
.x-logo-box {
    padding: 8px 0;
    color: var(--accent-blue);
    cursor: pointer;
    height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    margin: 8px 0 12px;
    position: relative;
    background: transparent;
    width: fit-content;
}

.x-logo-text {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    opacity: 0.9;
}

.x-logo-box i {
    animation: neuroPulse 3s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

.x-logo-box:hover {
    background: rgba(29, 155, 240, 0.12);
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(29, 155, 240, 0.15);
}

[data-theme="dark"] .x-logo-box {
    background: rgba(0, 229, 255, 0.06);
    color: #00e5ff;
}

[data-theme="dark"] .x-logo-box i {
    filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.5));
    animation: neuroPulse 3s ease-in-out infinite;
}

[data-theme="dark"] .x-logo-box:hover {
    background: rgba(0, 229, 255, 0.1);
    box-shadow: 0 0 28px rgba(0, 229, 255, 0.15);
}

/* Rotating glow ring on hover (dark mode only) */
[data-theme="dark"] .x-logo-box::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 18px;
    background: conic-gradient(from 0deg,
            transparent 0%,
            rgba(0, 229, 255, 0.3) 25%,
            transparent 50%,
            rgba(59, 130, 246, 0.3) 75%,
            transparent 100%);
    opacity: 0;
    transition: opacity 0.3s;
    animation: glowRotate 4s linear infinite;
    z-index: 0;
}

[data-theme="dark"] .x-logo-box:hover::before {
    opacity: 1;
}

/* === NAV MENU === */
.x-nav-menu {
    margin-top: 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.x-nav-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 20px 12px 14px;
    font-size: 1.15rem;
    border-radius: 14px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.25s cubic-bezier(0.34, 1.2, 0.64, 1);
    width: fit-content;
    position: relative;
    letter-spacing: 0.01em;
}

.x-nav-item:hover {
    background: rgba(29, 155, 240, 0.06);
    padding-left: 18px;
}

.x-nav-item.active {
    font-weight: 800;
    color: var(--accent-blue);
    background: rgba(29, 155, 240, 0.08);
}

/* Active indicator dot */
.x-nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    border-radius: 0 4px 4px 0;
    background: var(--accent-blue);
}

.x-nav-item i {
    font-size: 1.4rem;
    width: 28px;
    text-align: center;
    transition: all 0.25s;
}

.x-nav-item:hover i {
    transform: scale(1.1);
}

.x-nav-item.active i {
    filter: drop-shadow(0 0 4px rgba(29, 155, 240, 0.4));
}

/* Dark mode nav enhancements */
[data-theme="dark"] .x-nav-item:hover {
    background: rgba(0, 229, 255, 0.04);
    color: #e2e8f0;
}

[data-theme="dark"] .x-nav-item.active {
    color: #00e5ff;
    background: rgba(0, 229, 255, 0.06);
}

[data-theme="dark"] .x-nav-item.active::before {
    background: linear-gradient(180deg, #00e5ff, #3b82f6);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

[data-theme="dark"] .x-nav-item.active i {
    filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.5));
}

[data-theme="dark"] .x-nav-item:hover i {
    color: #00e5ff;
}

/* === SIDEBAR BOTTOM — PROFILE PILL AI === */
.sidebar-bottom-area {
    padding-bottom: 20px;
}

.profile-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.profile-pill:hover {
    background: rgba(29, 155, 240, 0.06);
    border-color: rgba(29, 155, 240, 0.1);
}

.p-avatar-circle {
    position: relative;
}

.p-avatar-circle img {
    border-radius: 50%;
    width: 42px;
    height: 42px;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.profile-pill:hover .p-avatar-circle img {
    border-color: var(--accent-blue);
}

.p-names-column {
    display: flex;
    flex-direction: column;
}

.d-text {
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

.h-text {
    color: var(--text-secondary);
    font-size: 0.82rem;
    letter-spacing: 0.01em;
}

/* Dark mode profile pill */
[data-theme="dark"] .profile-pill:hover {
    background: rgba(0, 229, 255, 0.04);
    border-color: rgba(0, 229, 255, 0.08);
}

[data-theme="dark"] .profile-pill:hover .p-avatar-circle img {
    border-color: #00e5ff;
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.2);
}

[data-theme="dark"] .profile-pill .p-avatar-circle::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #050a14;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

/* Mode toggle icon in pill */
[data-theme="dark"] .profile-pill .fa-circle-half-stroke {
    color: #00e5ff !important;
    opacity: 0.8 !important;
    filter: drop-shadow(0 0 4px rgba(0, 229, 255, 0.3));
}

/* FEED CENTRAL (600px) */
.feed-main-col {
    width: 600px;
    border-right: 1px solid var(--border-line);
    background: var(--bg-main);
    min-height: 100vh;
}

/* ============================================
   SINGLE POST VIEW
   ============================================ */
.single-header-row {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 10px 16px;
}

.single-back-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.15rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.single-back-btn:hover {
    background: var(--hover-gray);
}

.single-header-info h2 {
    font-size: 1.2rem;
    font-weight: 900;
    padding: 0;
}

.single-article {
    padding: 0 16px 40px;
}

/* Author row */
.single-author-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
}

.single-author-avatar img {
    border-radius: 50%;
    width: 48px;
    height: 48px;
    object-fit: cover;
    border: 2px solid var(--border-line);
}

.single-author-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.single-author-name {
    font-weight: 800;
    font-size: 1rem;
    color: var(--text-primary);
}

.single-author-handle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.single-follow-btn {
    padding: 7px 20px;
    border-radius: 99px;
    background: var(--text-primary);
    color: var(--bg-main);
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
}

.single-follow-btn:hover {
    opacity: 0.85;
}

.single-follow-btn.is-following {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-line);
    font-weight: 700;
}

.single-follow-btn.is-following:hover {
    border-color: #f4212e;
    color: #f4212e;
    opacity: 1;
}

/* Title */
.single-title {
    font-size: 1.65rem;
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: 16px;
    color: var(--text-primary);
}

/* Featured image */
.single-featured-img {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid var(--border-line);
}

.single-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Content */
.single-content {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text-primary);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.single-content p {
    margin-bottom: 16px;
}

.single-content a {
    color: var(--accent-blue);
    text-decoration: none;
}

.single-content a:hover {
    text-decoration: underline;
}

.single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 12px 0;
}

.single-content h2,
.single-content h3,
.single-content h4 {
    margin: 24px 0 12px;
    font-weight: 800;
    line-height: 1.3;
}

.single-content h2 {
    font-size: 1.4rem;
}

.single-content h3 {
    font-size: 1.2rem;
}

.single-content h4 {
    font-size: 1.1rem;
}

.single-content blockquote {
    border-left: 3px solid var(--accent-blue);
    padding: 12px 20px;
    margin: 16px 0;
    background: var(--bg-secondary);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: var(--text-secondary);
}

.single-content ul,
.single-content ol {
    padding-left: 24px;
    margin-bottom: 16px;
}

.single-content li {
    margin-bottom: 6px;
}

/* Embeds & iframes */
.single-content iframe,
.single-content .wp-block-embed {
    max-width: 100%;
    border-radius: 12px;
    margin: 16px 0;
}

/* Meta row */
.single-meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 16px 0;
    border-top: 1px solid var(--border-line);
    margin-top: 16px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.single-dot {
    color: var(--text-secondary);
}

.single-views strong {
    color: var(--text-primary);
}

/* Engagement bar */
.single-engagement-bar {
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    border-top: 1px solid var(--border-line);
    border-bottom: 1px solid var(--border-line);
}

.single-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: 99px;
    cursor: pointer;
    transition: 0.2s;
}

.single-stat:hover {
    background: var(--accent-blue-light);
    color: var(--accent-blue);
}

.single-stat i {
    font-size: 1.1rem;
}

/* Tags row */
.single-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 0;
}

.single-tag {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-blue);
    text-decoration: none;
    padding: 5px 14px;
    border-radius: 99px;
    background: var(--accent-blue-light);
    transition: 0.2s;
}

.single-tag:hover {
    background: rgba(29, 155, 240, 0.2);
}

[data-theme="dark"] .single-tag {
    color: #00e5ff;
    background: rgba(0, 229, 255, 0.08);
}

[data-theme="dark"] .single-tag:hover {
    background: rgba(0, 229, 255, 0.15);
}

/* Related articles */
.single-comments-wrap {
    border-top: 1px solid var(--border-line);
    padding: 20px;
}
.single-comments-wrap .comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}
.single-comments-wrap .comment-body {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-line);
    font-size: 0.92rem;
    color: var(--text-primary);
}
.single-comments-wrap .comment-author b { font-weight: 700; }
.single-comments-wrap .comment-metadata { font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 6px; }
.single-comments-wrap #respond { padding-top: 16px; }
.single-comments-wrap #respond h3 { font-size: 1.05rem; font-weight: 800; margin-bottom: 12px; }
.single-comments-wrap textarea, .single-comments-wrap input[type="text"], .single-comments-wrap input[type="email"] {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border-line); border-radius: 10px;
    background: var(--bg-secondary); color: var(--text-primary); font-size: 0.9rem; margin-bottom: 10px;
}
.single-comments-wrap input[type="submit"] {
    background: var(--accent-blue); color: #fff; border: none; border-radius: 99px;
    padding: 9px 22px; font-weight: 700; font-size: 0.9rem; cursor: pointer;
}

.single-related-section {
    margin-top: 8px;
    border-top: 1px solid var(--border-line);
    padding-top: 16px;
}

.single-related-title {
    font-size: 1.15rem;
    font-weight: 900;
    margin-bottom: 12px;
}

.single-related-card {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-line);
    text-decoration: none;
    color: inherit;
    align-items: flex-start;
    transition: 0.15s;
}

.single-related-card:hover {
    opacity: 0.8;
}

.related-text-side {
    flex: 1;
    min-width: 0;
}

.related-author-line {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.related-author-line img {
    border-radius: 50%;
    width: 20px;
    height: 20px;
}

.related-text-side h4 {
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--text-primary);
}

.related-thumb {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-line);
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mobile single header */
.mobile-single-header .single-back-btn {
    margin-right: 8px;
}

@media (max-width: 700px) {
    .single-title {
        font-size: 1.35rem;
    }

/* --- NEURAL AI COMMENT STYLING --- */
.neural-ai-comment {
    background: rgba(29, 155, 240, 0.05) !important;
    border-left: 3px solid #1d9bf0 !important;
    position: relative;
    padding-left: 15px !important;
    margin-top: 10px;
    border-radius: 0 12px 12px 0;
}

[data-theme="dark"] .neural-ai-comment {
    background: rgba(0, 255, 204, 0.03) !important;
    border-left-color: #00ffcc !important;
    box-shadow: inset 5px 0 15px rgba(0, 255, 204, 0.05);
}

.neural-ai-comment .comment-author b::after,
.neural-ai-comment .comment-author cite::after {
    content: 'AGENTE IA';
    font-size: 9px;
    background: #1d9bf0;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
    font-weight: 800;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .neural-ai-comment .comment-author b::after,
[data-theme="dark"] .neural-ai-comment .comment-author cite::after {
    background: #00ffcc;
    color: #000;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.3);
}

.neural-ai-comment .comment-content {
    font-style: italic;
    color: var(--text-primary);
    opacity: 0.95;
    line-height: 1.5;
}

/* Neural animation for AI appearing */
@keyframes neuralAppear {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.neural-ai-comment {
    animation: neuralAppear 0.5s ease-out;
}

    .single-content {
        font-size: 1rem;
    }

    .single-featured-img {
        border-radius: 0;
        margin-left: -16px;
        margin-right: -16px;
        border: none;
        border-bottom: 1px solid var(--border-line);
    }
}

/* HEADERS */
.sticky-feed-header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-line);
    width: 100%;
}

[data-theme="dark"] .sticky-feed-header {
    background: rgba(0, 0, 0, 0.85);
}

.pc-header-content h2 {
    padding: 14px 16px;
    font-size: 1.25rem;
    font-weight: 900;
}

.pc-tabs-wrapper {
    display: flex;
}

.header-tab {
    flex: 1;
    text-align: center;
    padding: 16px;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: 0.2s;
    font-size: 0.95rem;
}

.header-tab:hover {
    background: var(--hover-gray);
}

.header-tab.active {
    color: var(--text-primary);
}

.header-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 4px;
    background: var(--accent-blue);
    border-radius: 10px;
}

/* HERO (ESTILO X REFINADO) */
.featured-impact-hero {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-bottom: 1px solid var(--border-line);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.hero-img-full {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-text-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.hero-main-title {
    font-size: 1.4rem;
    font-weight: 900;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* CARDS DE NOTICIAS */
.x-tweet-card-style {
    position: relative;
    display: flex;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border-line);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: 0.15s;
    text-decoration: none;
    color: inherit;
}

/* Stretched link that covers the entire card — works on all devices */
.card-link-overlay {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Interactive inner elements float above the overlay */
.x-tweet-card-style .tweet-left-avatar,
.x-tweet-card-style .tweet-actions-bar,
.x-tweet-card-style .mobile-stats-row {
    position: relative;
    z-index: 2;
}

.x-tweet-card-style:hover {
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .x-tweet-card-style:hover {
    background: rgba(255, 255, 255, 0.03);
}

.tweet-left-avatar img {
    border-radius: 50%;
    width: 52px;
    height: 52px;
    object-fit: cover;
    border: 1px solid var(--border-line);
}

.tweet-right-main {
    flex: 1;
    min-width: 0;
}

.tweet-author-line {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
    flex-wrap: wrap;
}

.tr-name {
    font-weight: 800;
    color: var(--text-primary);
}

.tr-user,
.tr-divider,
.tr-date {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.tweet-content-flex {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-top: 4px;
}

.tweet-text-side {
    flex: 1;
    min-width: 0;
}

.tr-post-title {
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.tr-post-title a {
    color: inherit;
    text-decoration: none;
    display: block;
}

.tr-excerpt-small {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.4;
    font-weight: 400;
}

.tweet-thumbnail-side {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border-line);
}

.tweet-thumbnail-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tweet-actions-bar {
    display: flex;
    justify-content: space-between;
    max-width: 425px;
    margin-top: 15px;
    color: var(--text-secondary);
}

.ta-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    padding: 8px;
    border-radius: 99px;
    transition: 0.2s;
}

.ta-btn:hover {
    background: var(--accent-blue-light);
    color: var(--accent-blue);
}

/* SIDEBAR DERECHA (TENDENCIAS) */
.sidebar-secondary {
    width: 350px;
    padding: 0 0 20px 20px;
    border-left: none;
}

.sidebar-secondary-sticky {
    position: sticky;
    top: 0;
    padding-top: 6px;
}

.pc-search-pill-box {
    background: var(--bg-secondary);
    border-radius: 99px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 20px;
    margin-top: 10px;
    border: 1px solid transparent;
}

.pc-search-pill-box input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 1rem;
    color: var(--text-primary);
}

.trends-widget-box {
    background: var(--bg-secondary);
    border-radius: 16px;
    margin-top: 16px;
    overflow: hidden;
    border: 1px solid var(--border-line);
}

.trends-widget-box h3 {
    padding: 14px 20px;
    font-size: 1.25rem;
    font-weight: 900;
}

.trend-cell {
    padding: 12px 20px;
    border-top: 1px solid var(--border-line);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-decoration: none;
    color: inherit;
}

.trend-cell:hover {
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .trend-cell:hover {
    background: rgba(255, 255, 255, 0.03);
}

.cell-cat {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.cell-title {
    font-weight: 800;
    font-size: 1rem;
    color: var(--text-primary);
}

.cell-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ============================
   AVISO COMUNIDAD (PC sidebar)
   ============================ */
.community-notice {
    background: var(--bg-secondary);
    border: 1px solid var(--border-line);
    border-radius: 16px;
    padding: 16px 18px;
    margin-top: 16px;
}

.cn-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.cn-header i {
    color: var(--accent-blue);
    font-size: 1rem;
}

.cn-header span {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.cn-text {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 10px;
}

.cn-text strong {
    color: var(--text-primary);
    font-weight: 700;
}

.cn-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.cn-tags span {
    font-size: 0.73rem;
    font-weight: 700;
    color: var(--accent-blue);
    background: var(--accent-blue-light);
    padding: 3px 10px;
    border-radius: 99px;
}

/* Dark mode */
[data-theme="dark"] .community-notice {
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid rgba(0, 229, 255, 0.07);
    backdrop-filter: blur(12px);
}

[data-theme="dark"] .cn-header i {
    color: #00e5ff;
}

[data-theme="dark"] .cn-tags span {
    color: #00e5ff;
    background: rgba(0, 229, 255, 0.08);
}

/* AVISO COMUNIDAD MOBILE (oculto por defecto) */
.community-notice-mobile {
    display: none;
}

/* ============================
   BANNER COOKIES
   ============================ */
.ck-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 8000;
    padding: 14px 20px;
    background: var(--bg-main);
    border-top: 1px solid var(--border-line);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
    transition: transform 0.5s cubic-bezier(0.34, 1.2, 0.64, 1), opacity 0.4s ease;
}

@keyframes ckSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ck-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.ck-text-side {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.ck-icon {
    font-size: 1.5rem;
    color: var(--accent-blue);
    flex-shrink: 0;
    margin-top: 2px;
}

.ck-title {
    font-weight: 800;
    font-size: 0.95rem;
    margin-bottom: 3px;
    color: var(--text-primary);
}

.ck-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.ck-link {
    color: var(--accent-blue);
    text-decoration: none;
    display: inline-block;
    padding: 2px 0;
}

.ck-link:hover {
    text-decoration: underline;
}

.ck-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.ck-btn {
    padding: 10px 20px;
    border-radius: 99px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
}

.ck-btn-reject {
    background: transparent;
    border: 1.5px solid var(--border-line);
    color: var(--text-primary);
}

.ck-btn-reject:hover {
    background: var(--hover-gray);
}

.ck-btn-accept {
    background: var(--accent-blue);
    border: 1.5px solid transparent;
    color: #fff;
}

.ck-btn-accept:hover {
    background: var(--accent-blue-hover);
}

/* Dark mode */
[data-theme="dark"] .ck-banner {
    background: rgba(10, 14, 26, 0.97);
    border-top: 1px solid rgba(0, 229, 255, 0.1);
    box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(16px);
}

[data-theme="dark"] .ck-icon {
    color: #00e5ff;
}

[data-theme="dark"] .ck-btn-accept {
    background: linear-gradient(135deg, #00e5ff, #3b82f6);
    color: #050810;
}

[data-theme="dark"] .ck-btn-accept:hover {
    box-shadow: 0 0 16px rgba(0, 229, 255, 0.35);
}

[data-theme="dark"] .ck-btn-reject {
    border-color: rgba(0, 229, 255, 0.15);
    color: #a0aec0;
}

[data-theme="dark"] .ck-btn-reject:hover {
    background: rgba(0, 229, 255, 0.06);
    color: #e8edf5;
}

/* Mobile: banner encima de la navbar */
@media (max-width: 700px) {
    .ck-banner {
        bottom: 62px;
        padding: 12px 16px;
    }

    [data-theme="dark"] .ck-banner {
        bottom: 72px;
    }

    .ck-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .ck-actions {
        width: 100%;
        justify-content: stretch;
    }

    .ck-btn {
        flex: 1;
        text-align: center;
        padding: 11px 12px;
    }
}

/* ============================
   MODAL LOGIN
   ============================ */
.lm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    padding: 16px;
}

.lm-overlay.is-open {
    display: flex;
}

.lm-box {
    background: var(--bg-main);
    border: 1px solid var(--border-line);
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    padding: 36px 32px 28px;
    position: relative;
    animation: lmIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes lmIn {
    from {
        transform: scale(0.92) translateY(12px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.lm-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.lm-close:hover {
    background: var(--hover-gray);
    color: var(--text-primary);
}

.lm-logo {
    text-align: center;
    margin-bottom: 18px;
}

.lm-logo i {
    font-size: 2rem;
    color: var(--accent-blue);
}

.lm-title {
    font-size: 1.45rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 26px;
    line-height: 1.2;
}

/* Floating-label fields */
.lm-field {
    position: relative;
    margin-bottom: 14px;
}

.lm-field input {
    width: 100%;
    padding: 18px 14px 6px;
    border: 1.5px solid var(--border-line);
    border-radius: 8px;
    background: transparent;
    font-size: 1rem;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
}

.lm-field label {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    font-size: 0.95rem;
    color: var(--text-secondary);
    pointer-events: none;
    transition: all 0.18s;
}

/* label sube cuando el input tiene contenido o está enfocado */
.lm-field input:focus~label,
.lm-field input:not(:placeholder-shown)~label {
    top: 8px;
    transform: translateY(0);
    font-size: 0.72rem;
    color: var(--accent-blue);
}

.lm-field input:focus {
    border-color: var(--accent-blue);
}

/* wrapper de contraseña con ojo */
.lm-pwd-wrap input {
    padding-right: 44px;
}

.lm-eye {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.95rem;
    padding: 4px;
}

.lm-eye:hover {
    color: var(--text-primary);
}

.lm-btn-submit {
    width: 100%;
    padding: 13px;
    margin-top: 6px;
    border-radius: 99px;
    border: none;
    background: var(--accent-blue);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s;
}

.lm-btn-submit:hover {
    background: var(--accent-blue-hover);
}

.lm-forgot {
    display: block;
    text-align: center;
    margin-top: 14px;
    font-size: 0.88rem;
    color: var(--accent-blue);
    text-decoration: none;
}

.lm-forgot:hover {
    text-decoration: underline;
}

.lm-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0 14px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.lm-divider::before,
.lm-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-line);
}

.lm-btn-register {
    display: block;
    width: 100%;
    padding: 12px;
    border-radius: 99px;
    border: 1.5px solid var(--border-line);
    background: transparent;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s;
}

.lm-btn-register:hover {
    background: var(--hover-gray);
}

/* MOBILE: slide-up sheet */
@media (max-width: 500px) {
    .lm-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .lm-box {
        border-radius: 24px 24px 0 0;
        max-width: 100%;
        max-height: 90vh;
        overflow-y: auto;
        padding: 28px 20px env(safe-area-inset-bottom, 24px);
        animation: lmUp 0.28s cubic-bezier(0.34, 1.2, 0.64, 1);
    }

    @keyframes lmUp {
        from {
            transform: translateY(100%);
            opacity: 0;
        }

        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
}

/* ============================
   MODAL REGISTRO
   ============================ */
.rm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    padding: 16px;
}

.rm-overlay.is-open {
    display: flex;
}

.rm-box {
    background: var(--bg-main);
    border: 1px solid var(--border-line);
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    padding: 36px 32px 28px;
    position: relative;
    animation: rmIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes rmIn {
    from {
        transform: scale(0.92) translateY(12px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.rm-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.rm-close:hover {
    background: var(--hover-gray);
    color: var(--text-primary);
}

.rm-logo {
    text-align: center;
    margin-bottom: 14px;
}

.rm-logo i {
    font-size: 2rem;
    color: var(--accent-blue);
}

.rm-title {
    font-size: 1.55rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 6px;
    line-height: 1.2;
}

.rm-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 24px;
    line-height: 1.4;
}

/* Google Sign-In Button */
.rm-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 13px 16px;
    border-radius: 99px;
    border: 1.5px solid var(--border-line);
    background: var(--bg-main);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', -apple-system, sans-serif;
}

.rm-google-btn:hover {
    background: var(--hover-gray);
    border-color: var(--text-secondary);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

.rm-google-btn:active {
    transform: scale(0.98);
}

.rm-google-icon {
    flex-shrink: 0;
}

[data-theme="dark"] .rm-google-btn {
    background: transparent;
    border-color: var(--border-line);
}

[data-theme="dark"] .rm-google-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--text-secondary);
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.3);
}

/* Divider */
.rm-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.rm-divider::before,
.rm-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-line);
}

/* Floating-label fields */
.rm-field {
    position: relative;
    margin-bottom: 14px;
}

.rm-field input {
    width: 100%;
    padding: 18px 14px 6px;
    border: 1.5px solid var(--border-line);
    border-radius: 8px;
    background: transparent;
    font-size: 1rem;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
    font-family: 'Inter', -apple-system, sans-serif;
}

.rm-field label {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    font-size: 0.95rem;
    color: var(--text-secondary);
    pointer-events: none;
    transition: all 0.18s;
}

.rm-field input:focus~label,
.rm-field input:not(:placeholder-shown)~label {
    top: 8px;
    transform: translateY(0);
    font-size: 0.72rem;
    color: var(--accent-blue);
}

.rm-field input:focus {
    border-color: var(--accent-blue);
}

.rm-pwd-wrap input {
    padding-right: 44px;
}

.rm-eye {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.95rem;
    padding: 4px;
}

.rm-eye:hover {
    color: var(--text-primary);
}

/* Error & Success */
.rm-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #ef4444;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 14px;
    line-height: 1.4;
}

.rm-success {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: #22c55e;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 14px;
    line-height: 1.4;
}

/* Submit */
.rm-btn-submit {
    width: 100%;
    padding: 13px;
    margin-top: 4px;
    border-radius: 99px;
    border: none;
    background: var(--accent-blue);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', -apple-system, sans-serif;
}

.rm-btn-submit:hover {
    background: var(--accent-blue-hover);
    box-shadow: 0 2px 12px rgba(29, 155, 240, 0.3);
}

.rm-btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Terms */
.rm-terms {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 18px;
    line-height: 1.5;
}

.rm-terms a {
    color: var(--accent-blue);
    text-decoration: none;
}

.rm-terms a:hover {
    text-decoration: underline;
}

/* Login link */
.rm-login-link {
    text-align: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-line);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.rm-login-link a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 700;
    margin-left: 4px;
}

.rm-login-link a:hover {
    text-decoration: underline;
}

/* Dark mode enhancements */
[data-theme="dark"] .rm-box {
    background: #16181c;
    border-color: var(--border-line);
}

[data-theme="dark"] .rm-btn-submit {
    background: linear-gradient(135deg, #1d9bf0, #0d8bd9);
}

[data-theme="dark"] .rm-btn-submit:hover {
    box-shadow: 0 2px 20px rgba(29, 155, 240, 0.4);
}

[data-theme="dark"] .rm-error {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
}

[data-theme="dark"] .rm-success {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.3);
}

/* MOBILE: slide-up sheet */
@media (max-width: 500px) {
    .rm-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .rm-box {
        border-radius: 24px 24px 0 0;
        max-width: 100%;
        max-height: 92vh;
        overflow-y: auto;
        padding: 28px 20px env(safe-area-inset-bottom, 24px);
        animation: rmUp 0.28s cubic-bezier(0.34, 1.2, 0.64, 1);
    }

    @keyframes rmUp {
        from {
            transform: translateY(100%);
            opacity: 0;
        }

        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
}

/* ============================================
   MOBILE BOTTOM NAV LABELS (hidden by default)
   ============================================ */
.mob-nav-label {
    display: none;
}

/* ============================================
   MOBILE PROMPT BAR (hidden by default)
   ============================================ */
.mobile-prompt-bar {
    display: none;
}

/* ============================================
   CARD CATEGORY TAG (hidden by default)
   ============================================ */
.card-category-tag {
    display: none;
}

/* ============================================
   MOBILE STATS ROW (hidden by default)
   ============================================ */
.mobile-stats-row {
    display: none;
}

/* ============================================
   three dots on author line (hidden by default)
   ============================================ */
.tr-more-dots {
    display: none;
}

/* =============================================
   🔥🔥🔥 MOBILE DARK NEURALFEED REDESIGN 🔥🔥🔥
   ============================================= */
@media (max-width: 700px) {

    /* ---- Override CSS Variables in mobile ---- */
    [data-theme="dark"] {
        --bg-main: #0a0e1a;
        --bg-secondary: #111827;
        --text-primary: #e8edf5;
        --text-secondary: #6b7a99;
        --border-line: rgba(56, 189, 248, 0.08);
        --accent-blue: #00e5ff;
        --accent-blue-hover: #00b8d4;
        --accent-blue-light: rgba(0, 229, 255, 0.08);
        --hover-gray: rgba(255, 255, 255, 0.04);
        --card-bg: rgba(17, 24, 39, 0.7);
        --glow-color: rgba(0, 229, 255, 0.12);
        --card-border: rgba(56, 189, 248, 0.12);
    }

    /* ---- Body & Layout ---- */
    body {
        padding-bottom: 82px;
    }

    [data-theme="dark"] body {
        background: #0a0e1a;
        background-image:
            radial-gradient(ellipse at 20% 0%, rgba(0, 229, 255, 0.04) 0%, transparent 50%),
            radial-gradient(ellipse at 80% 100%, rgba(59, 130, 246, 0.03) 0%, transparent 50%);
        background-attachment: fixed;
    }

    .main-layout-constraint {
        display: block;
    }

    .sidebar-primary,
    .sidebar-secondary,
    .pc-header-content {
        display: none !important;
    }

    .feed-main-col {
        width: 100%;
        border: none;
        background: transparent;
    }

    /* ---- Mobile Header: NeuralFeed Style ---- */
    .mobile-explore-header {
        display: block !important;
    }

    [data-theme="dark"] .sticky-feed-header {
        background: rgba(10, 14, 26, 0.92);
        backdrop-filter: blur(20px) saturate(1.6);
        -webkit-backdrop-filter: blur(20px) saturate(1.6);
        border-bottom: 1px solid rgba(0, 229, 255, 0.06);
    }

    /* Top bar: avatar + logo + settings (ambos temas) */
    .m-top-search-row {
        display: flex;
        align-items: center;
        padding: 12px 16px 10px;
        gap: 12px;
    }

    .m-avatar-top {
        flex-shrink: 0;
        cursor: pointer;
    }

    .m-avatar-top img {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: 1px solid var(--border-line);
    }

    /* Logo centrado */
    .m-brand-logo {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        text-decoration: none;
        color: var(--text-primary);
        font-weight: 900;
        font-size: 1.2rem;
        letter-spacing: -0.02em;
    }

    .m-brand-logo i {
        color: var(--accent-blue);
        font-size: 1.1rem;
    }

    /* Dark overrides para avatar y logo */
    [data-theme="dark"] .m-avatar-top img {
        border: 2px solid rgba(0, 229, 255, 0.25);
        box-shadow: 0 0 12px rgba(0, 229, 255, 0.15);
    }

    [data-theme="dark"] .m-brand-logo {
        color: #e8edf5;
    }

    [data-theme="dark"] .m-brand-logo i {
        color: #00e5ff;
        text-shadow: 0 0 14px rgba(0, 229, 255, 0.45);
    }

    .m-settings-btn {
        font-size: 1.2rem;
        color: var(--text-secondary);
        cursor: pointer;
        transition: color 0.2s, text-shadow 0.2s;
        padding: 6px;
        flex-shrink: 0;
    }

    .m-settings-btn:hover {
        color: var(--accent-blue);
    }

    [data-theme="dark"] .m-settings-btn:hover {
        text-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
    }

    /* ---- Category Tabs (Discover / Nodes / Synthetics style) ---- */
    [data-theme="dark"] .m-category-tabs {
        display: flex;
        gap: 0;
        padding: 0 16px;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        border-bottom: 1px solid rgba(0, 229, 255, 0.06);
    }

    [data-theme="dark"] .m-category-tabs::-webkit-scrollbar {
        display: none;
    }

    [data-theme="dark"] .m-category-tabs .cat-tab {
        flex-shrink: 0;
        padding: 12px 18px;
        font-size: 0.88rem;
        font-weight: 600;
        color: var(--text-secondary);
        text-decoration: none;
        white-space: nowrap;
        position: relative;
        transition: color 0.25s;
        letter-spacing: 0.01em;
    }

    [data-theme="dark"] .m-category-tabs .cat-tab:hover {
        color: var(--text-primary);
    }

    [data-theme="dark"] .m-category-tabs .cat-tab.active {
        color: var(--accent-blue);
        font-weight: 700;
    }

    [data-theme="dark"] .m-category-tabs .cat-tab.active::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 60%;
        height: 3px;
        background: var(--accent-blue);
        border-radius: 3px 3px 0 0;
        box-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
    }

    /* ---- Category Tabs: LIGHT MODE ---- */
    .m-category-tabs {
        display: flex;
        gap: 0;
        padding: 0 4px;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        border-bottom: 1px solid var(--border-line);
        background: var(--bg-main);
    }

    .m-category-tabs::-webkit-scrollbar {
        display: none;
    }

    .m-category-tabs .cat-tab {
        flex-shrink: 0;
        padding: 12px 16px;
        font-size: 0.88rem;
        font-weight: 500;
        color: var(--text-secondary);
        text-decoration: none;
        white-space: nowrap;
        position: relative;
        transition: color 0.2s;
    }

    .m-category-tabs .cat-tab:hover {
        color: var(--text-primary);
    }

    .m-category-tabs .cat-tab.active {
        color: var(--text-primary);
        font-weight: 700;
    }

    .m-category-tabs .cat-tab.active::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 60%;
        height: 3px;
        background: var(--accent-blue);
        border-radius: 3px 3px 0 0;
    }

    /* Light mode sticky header */
    [data-theme="light"] .sticky-feed-header {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--border-line);
    }

    /* ---- Prompt Bar (NeuralFeed style: "Prompt the network...") ---- */
    [data-theme="dark"] .mobile-prompt-bar {
        display: flex !important;
        align-items: center;
        gap: 12px;
        padding: 14px 16px;
        border-bottom: 1px solid rgba(0, 229, 255, 0.06);
    }

    [data-theme="dark"] .mobile-prompt-bar .prompt-avatar img {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        opacity: 0.7;
    }

    [data-theme="dark"] .mobile-prompt-bar .prompt-text {
        flex: 1;
        color: var(--text-secondary);
        font-size: 0.92rem;
        opacity: 0.7;
    }

    [data-theme="dark"] .mobile-prompt-bar .prompt-actions {
        display: flex;
        align-items: center;
        gap: 14px;
    }

    [data-theme="dark"] .mobile-prompt-bar .prompt-actions i {
        color: var(--text-secondary);
        font-size: 1rem;
        opacity: 0.6;
        cursor: pointer;
        transition: 0.2s;
    }

    [data-theme="dark"] .mobile-prompt-bar .prompt-actions i:hover {
        color: var(--accent-blue);
        opacity: 1;
    }

    [data-theme="dark"] .mobile-prompt-bar .prompt-transmit-btn {
        background: linear-gradient(135deg, #00e5ff, #3b82f6);
        color: #0a0e1a;
        border: none;
        border-radius: 20px;
        padding: 7px 18px;
        font-size: 0.82rem;
        font-weight: 700;
        cursor: pointer;
        letter-spacing: 0.02em;
        text-transform: capitalize;
        transition: box-shadow 0.3s, transform 0.2s;
    }

    [data-theme="dark"] .mobile-prompt-bar .prompt-transmit-btn:hover {
        box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
        transform: translateY(-1px);
    }

    /* ---- News Cards: Glass Morphism NeuralFeed Style ---- */
    [data-theme="dark"] .x-tweet-card-style {
        background: var(--card-bg);
        border: 1px solid var(--card-border);
        border-radius: 16px;
        margin: 10px 12px;
        padding: 14px;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
            box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
            border-color 0.25s;
        position: relative;
        overflow: hidden;
    }

    [data-theme="dark"] .x-tweet-card-style::before {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: 16px;
        padding: 1px;
        background: linear-gradient(135deg, rgba(0, 229, 255, 0.15), transparent 60%);
        -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.3s;
    }

    [data-theme="dark"] .x-tweet-card-style:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 32px rgba(0, 229, 255, 0.08), 0 2px 8px rgba(0, 0, 0, 0.3);
        border-color: rgba(0, 229, 255, 0.2);
        background: rgba(17, 24, 39, 0.85);
    }

    [data-theme="dark"] .x-tweet-card-style:hover::before {
        opacity: 1;
    }

    /* Avatar glow */
    [data-theme="dark"] .tweet-left-avatar img {
        border: 2px solid rgba(0, 229, 255, 0.2);
        box-shadow: 0 0 8px rgba(0, 229, 255, 0.1);
        width: 44px;
        height: 44px;
    }

    /* Author line */
    [data-theme="dark"] .tr-name {
        font-weight: 700;
        font-size: 0.92rem;
    }

    [data-theme="dark"] .tr-user {
        color: #4b6a9b;
        font-size: 0.82rem;
    }

    [data-theme="dark"] .tr-date {
        font-size: 0.82rem;
    }

    /* three dots shown in dark mobile */
    [data-theme="dark"] .tr-more-dots {
        display: inline-block;
        margin-left: auto;
        color: var(--text-secondary);
        cursor: pointer;
        font-size: 1rem;
        opacity: 0.5;
        transition: opacity 0.2s;
    }

    [data-theme="dark"] .tr-more-dots:hover {
        opacity: 1;
        color: var(--accent-blue);
    }

    /* Post title */
    [data-theme="dark"] .tr-post-title {
        font-size: 1rem;
        font-weight: 700;
        line-height: 1.35;
        margin-bottom: 6px;
    }

    /* Excerpt */
    [data-theme="dark"] .tr-excerpt-small {
        font-size: 0.88rem;
        line-height: 1.45;
        color: #8899b4;
    }

    /* Featured thumbnail - full width inside card */
    [data-theme="dark"] .tweet-content-flex {
        flex-direction: column;
        gap: 10px;
    }

    [data-theme="dark"] .tweet-thumbnail-side {
        width: 100%;
        height: 180px;
        border-radius: 12px;
        border: 1px solid rgba(0, 229, 255, 0.08);
        overflow: hidden;
        position: relative;
    }

    [data-theme="dark"] .tweet-thumbnail-side::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(to top, rgba(10, 14, 26, 0.3), transparent 40%);
        pointer-events: none;
    }

    [data-theme="dark"] .tweet-thumbnail-side img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    [data-theme="dark"] .x-tweet-card-style:hover .tweet-thumbnail-side img {
        transform: scale(1.05);
    }

    /* Category Tag badge visible on card */
    [data-theme="dark"] .card-category-tag {
        display: inline-block !important;
        background: linear-gradient(135deg, rgba(0, 229, 255, 0.15), rgba(59, 130, 246, 0.1));
        color: var(--accent-blue);
        font-size: 0.7rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        padding: 4px 10px;
        border-radius: 6px;
        margin-top: 8px;
        border: 1px solid rgba(0, 229, 255, 0.12);
    }

    /* Stats row visible in dark mobile */
    [data-theme="dark"] .mobile-stats-row {
        display: flex !important;
        align-items: center;
        gap: 16px;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid rgba(0, 229, 255, 0.06);
    }

    [data-theme="dark"] .mobile-stats-row .stat-item {
        display: flex;
        align-items: center;
        gap: 5px;
        color: var(--text-secondary);
        font-size: 0.78rem;
        cursor: pointer;
        transition: color 0.2s;
    }

    [data-theme="dark"] .mobile-stats-row .stat-item i {
        font-size: 0.85rem;
    }

    [data-theme="dark"] .mobile-stats-row .stat-item:hover {
        color: var(--accent-blue);
    }

    /* Hide default actions bar in dark mobile - replaced by stats row */
    [data-theme="dark"] .tweet-actions-bar {
        display: none;
    }

    /* ---- Hero Article: Reimagined ---- */
    [data-theme="dark"] .featured-impact-hero {
        margin: 10px 12px;
        border-radius: 18px;
        height: 220px;
        border: 1px solid rgba(0, 229, 255, 0.1);
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
        overflow: hidden;
    }

    [data-theme="dark"] .featured-impact-hero::after {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: 18px;
        box-shadow: inset 0 0 40px rgba(0, 229, 255, 0.04);
        pointer-events: none;
    }

    [data-theme="dark"] .hero-text-overlay {
        background: linear-gradient(transparent 10%, rgba(10, 14, 26, 0.9) 80%);
        padding: 16px;
    }

    [data-theme="dark"] .hero-main-title {
        font-size: 1.15rem;
        font-weight: 800;
        text-shadow: 0 2px 16px rgba(0, 0, 0, 0.7);
    }

    /* ---- Bottom Navigation: NeuralFeed Style ---- */
    .mobile-bottom-navbar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 2000;
        display: flex !important;
        justify-content: space-around;
        align-items: center;
        height: 60px;
        background: var(--bg-main);
        border-top: 1px solid var(--border-line);
    }

    .mobile-bottom-navbar a {
        color: var(--text-primary);
        text-decoration: none;
        font-size: 1.4rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        padding: 6px 10px;
        transition: 0.2s;
        position: relative;
    }

    .mobile-bottom-navbar a .mob-nav-label {
        display: block;
        font-size: 0.6rem;
        font-weight: 600;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    [data-theme="dark"] .mobile-bottom-navbar {
        background: rgba(10, 14, 26, 0.95);
        backdrop-filter: blur(24px) saturate(1.5);
        -webkit-backdrop-filter: blur(24px) saturate(1.5);
        border-top: 1px solid rgba(0, 229, 255, 0.08);
        height: 72px;
        padding-bottom: env(safe-area-inset-bottom, 4px);
    }

    [data-theme="dark"] .mobile-bottom-navbar a {
        color: #4b6a9b;
        font-size: 1.15rem;
    }

    [data-theme="dark"] .mobile-bottom-navbar a .mob-nav-label {
        color: #4b6a9b;
        font-size: 0.58rem;
    }

    [data-theme="dark"] .mobile-bottom-navbar a.active {
        color: var(--accent-blue);
    }

    [data-theme="dark"] .mobile-bottom-navbar a.active .mob-nav-label {
        color: var(--accent-blue);
    }

    [data-theme="dark"] .mobile-bottom-navbar a.active::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 24px;
        height: 2px;
        background: var(--accent-blue);
        border-radius: 0 0 3px 3px;
        box-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
    }

    /* FAB (Floating Action Button) in center of nav */
    [data-theme="dark"] .mobile-bottom-navbar .fab-post-btn {
        position: relative;
        width: 50px;
        height: 50px;
        background: linear-gradient(135deg, #00e5ff, #3b82f6);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 20px rgba(0, 229, 255, 0.35);
        margin-top: -20px;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s;
        font-size: 1.5rem;
    }

    [data-theme="dark"] .mobile-bottom-navbar .fab-post-btn i {
        color: #0a0e1a;
        font-size: 1.3rem;
    }

    [data-theme="dark"] .mobile-bottom-navbar .fab-post-btn:hover {
        transform: translateY(-3px) scale(1.05);
        box-shadow: 0 6px 28px rgba(0, 229, 255, 0.5);
    }

    [data-theme="dark"] .mobile-bottom-navbar .fab-post-btn .mob-nav-label {
        display: none;
    }

    /* ---- Mobile Login Modal Dark Overrides ---- */
    [data-theme="dark"] .lm-box {
        background: rgba(17, 24, 39, 0.95);
        border: 1px solid rgba(0, 229, 255, 0.1);
        backdrop-filter: blur(20px);
    }

    [data-theme="dark"] .lm-logo i {
        color: var(--accent-blue);
        text-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
    }

    [data-theme="dark"] .lm-btn-submit {
        background: linear-gradient(135deg, #00e5ff, #3b82f6);
        color: #0a0e1a;
    }

    [data-theme="dark"] .lm-btn-submit:hover {
        box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
    }

    /* ---- Infinite scroll trigger ---- */
    [data-theme="dark"] #infinite-scroll-trigger {
        color: var(--text-secondary);
    }

    [data-theme="dark"] #infinite-scroll-trigger i {
        color: var(--accent-blue) !important;
    }

    /* ---- NeuralFeed brand decorators ---- */
    [data-theme="dark"] .m-top-search-row::after {
        content: '✦';
        position: absolute;
        left: 50%;
        top: 16px;
        transform: translateX(52px);
        color: var(--accent-blue);
        font-size: 0.7rem;
        opacity: 0.6;
        animation: sparkle 2s ease-in-out infinite;
    }

    @keyframes sparkle {

        0%,
        100% {
            opacity: 0.3;
            transform: translateX(52px) scale(0.8);
        }

        50% {
            opacity: 0.8;
            transform: translateX(52px) scale(1.2);
        }
    }

    /* ---- Scrollbar for dark mobile ---- */
    [data-theme="dark"] ::-webkit-scrollbar {
        width: 3px;
    }

    [data-theme="dark"] ::-webkit-scrollbar-track {
        background: transparent;
    }

    [data-theme="dark"] ::-webkit-scrollbar-thumb {
        background: rgba(0, 229, 255, 0.15);
        border-radius: 3px;
    }

    /* ---- Feed posts list spacing ---- */
    [data-theme="dark"] .feed-posts-list {
        padding-bottom: 20px;
    }

    /* ---- Aviso comunidad mobile ---- */
    .community-notice-mobile {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 7px 16px;
        font-size: 0.75rem;
        color: var(--text-secondary);
        border-bottom: 1px solid var(--border-line);
        background: var(--bg-secondary);
    }

    .community-notice-mobile i {
        color: var(--accent-blue);
        font-size: 0.85rem;
        flex-shrink: 0;
    }

    [data-theme="dark"] .community-notice-mobile {
        background: rgba(10, 14, 26, 0.6);
        border-bottom: 1px solid rgba(0, 229, 255, 0.06);
        color: #4b6a9b;
    }

    [data-theme="dark"] .community-notice-mobile i {
        color: #00e5ff;
        text-shadow: 0 0 8px rgba(0, 229, 255, 0.3);
    }

    /* Light mode mobile keeps simple nav */
    [data-theme="light"] .mobile-bottom-navbar {
        height: 62px;
    }

    [data-theme="light"] .mobile-bottom-navbar a {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        color: var(--text-secondary);
        text-decoration: none;
        font-size: 1.3rem;
        padding: 6px 12px;
        transition: color 0.2s;
    }

    [data-theme="light"] .mobile-bottom-navbar a.active {
        color: var(--accent-blue);
    }

    [data-theme="light"] .mobile-bottom-navbar .mob-nav-label {
        font-size: 0.6rem;
        font-weight: 600;
        letter-spacing: 0.02em;
    }

    [data-theme="light"] .mobile-bottom-navbar .fab-post-btn {
        background: var(--accent-blue);
        width: 46px;
        height: 46px;
        border-radius: 50%;
        margin-top: -16px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(29, 155, 240, 0.3);
        color: #fff;
    }

    [data-theme="light"] .mobile-bottom-navbar .fab-post-btn .mob-nav-label {
        display: none;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 700px) {
    [data-theme="dark"] .x-tweet-card-style {
        animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
    }

    [data-theme="dark"] .x-tweet-card-style:nth-child(1) {
        animation-delay: 0.05s;
    }

    [data-theme="dark"] .x-tweet-card-style:nth-child(2) {
        animation-delay: 0.1s;
    }

    [data-theme="dark"] .x-tweet-card-style:nth-child(3) {
        animation-delay: 0.15s;
    }

    [data-theme="dark"] .x-tweet-card-style:nth-child(4) {
        animation-delay: 0.2s;
    }

    [data-theme="dark"] .x-tweet-card-style:nth-child(5) {
        animation-delay: 0.25s;
    }
}

/* =============================================
   PC DARK MODE — NeuralFeed Effects
   ============================================= */
@media (min-width: 701px) {

    /* Background atmosférico */
    [data-theme="dark"] body {
        background: #050810;
        background-image:
            radial-gradient(ellipse at 15% 0%, rgba(0, 229, 255, 0.05) 0%, transparent 45%),
            radial-gradient(ellipse at 85% 100%, rgba(59, 130, 246, 0.04) 0%, transparent 45%),
            radial-gradient(ellipse at 50% 50%, rgba(99, 102, 241, 0.02) 0%, transparent 60%);
        background-attachment: fixed;
    }

    /* Sidebar con glass */
    [data-theme="dark"] .sidebar-primary {
        background: rgba(5, 8, 16, 0.85);
        border-right: 1px solid rgba(0, 229, 255, 0.07);
        backdrop-filter: blur(12px);
    }

    /* Logo bolt glow */
    [data-theme="dark"] .x-logo-box {
        color: #00e5ff;
        transition: color 0.2s, text-shadow 0.2s, background 0.2s;
    }

    [data-theme="dark"] .x-logo-box:hover {
        background: rgba(0, 229, 255, 0.08);
        text-shadow: 0 0 20px rgba(0, 229, 255, 0.5);
    }

    /* Nav items */
    [data-theme="dark"] .x-nav-item {
        color: #a0aec0;
        transition: color 0.2s, background 0.2s, text-shadow 0.2s;
    }

    [data-theme="dark"] .x-nav-item:hover {
        background: rgba(0, 229, 255, 0.06);
        color: #e8edf5;
    }

    [data-theme="dark"] .x-nav-item.active {
        color: #00e5ff;
        font-weight: 800;
    }

    [data-theme="dark"] .x-nav-item i {
        transition: text-shadow 0.2s;
    }

    [data-theme="dark"] .x-nav-item:hover i {
        text-shadow: 0 0 12px rgba(0, 229, 255, 0.35);
    }

    /* Profile pill glow sutil */
    [data-theme="dark"] .profile-pill:hover {
        background: rgba(0, 229, 255, 0.05);
    }

    [data-theme="dark"] .p-avatar-circle img {
        border: 2px solid rgba(0, 229, 255, 0.2);
        box-shadow: 0 0 10px rgba(0, 229, 255, 0.1);
    }

    /* Feed col */
    [data-theme="dark"] .feed-main-col {
        background: transparent;
        border-right: 1px solid rgba(0, 229, 255, 0.07);
    }

    /* Sticky header */
    [data-theme="dark"] .sticky-feed-header {
        background: rgba(5, 8, 16, 0.88);
        backdrop-filter: blur(20px) saturate(1.5);
        -webkit-backdrop-filter: blur(20px) saturate(1.5);
        border-bottom: 1px solid rgba(0, 229, 255, 0.07);
    }

    /* Tabs */
    [data-theme="dark"] .header-tab {
        color: #4b6a9b;
        transition: color 0.2s, background 0.2s;
    }

    [data-theme="dark"] .header-tab:hover {
        background: rgba(0, 229, 255, 0.04);
        color: #8899b4;
    }

    [data-theme="dark"] .header-tab.active {
        color: #e8edf5;
    }

    [data-theme="dark"] .header-tab.active::after {
        background: #00e5ff;
        box-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
    }

    /* Cards glass morphism PC */
    [data-theme="dark"] .x-tweet-card-style {
        position: relative;
        border-bottom: 1px solid rgba(0, 229, 255, 0.05);
        transition: background 0.2s, transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
            box-shadow 0.22s;
        overflow: hidden;
    }

    [data-theme="dark"] .x-tweet-card-style::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(120deg, rgba(0, 229, 255, 0.04) 0%, transparent 60%);
        opacity: 0;
        transition: opacity 0.25s;
        pointer-events: none;
    }

    [data-theme="dark"] .x-tweet-card-style:hover {
        background: rgba(255, 255, 255, 0.025);
        transform: translateX(3px);
        box-shadow: -3px 0 0 rgba(0, 229, 255, 0.4),
            4px 0 20px rgba(0, 229, 255, 0.04);
    }

    [data-theme="dark"] .x-tweet-card-style:hover::before {
        opacity: 1;
    }

    /* Avatar glow PC */
    [data-theme="dark"] .tweet-left-avatar img {
        border: 2px solid rgba(0, 229, 255, 0.15);
        transition: border-color 0.2s, box-shadow 0.2s;
    }

    [data-theme="dark"] .x-tweet-card-style:hover .tweet-left-avatar img {
        border-color: rgba(0, 229, 255, 0.35);
        box-shadow: 0 0 12px rgba(0, 229, 255, 0.15);
    }

    /* Texto cards */
    [data-theme="dark"] .tr-post-title {
        color: #e8edf5;
    }

    [data-theme="dark"] .tr-excerpt-small {
        color: #6b7a99;
    }

    [data-theme="dark"] .tr-name {
        color: #c8d3e8;
    }

    [data-theme="dark"] .tr-user,
    [data-theme="dark"] .tr-date {
        color: #4b6a9b;
    }

    /* Thumbnail PC hover zoom */
    [data-theme="dark"] .tweet-thumbnail-side {
        border: 1px solid rgba(0, 229, 255, 0.08);
        overflow: hidden;
    }

    [data-theme="dark"] .tweet-thumbnail-side img {
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    [data-theme="dark"] .x-tweet-card-style:hover .tweet-thumbnail-side img {
        transform: scale(1.06);
    }

    /* Actions bar */
    [data-theme="dark"] .tweet-actions-bar {
        color: #4b6a9b;
    }

    /* --- SEARCH SUGGESTIONS --- */
    .pc-search-pill-box {
        position: relative;
    }

    .ap-search-results {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-main);
        border: 1px solid var(--border-line);
        border-radius: 12px;
        margin-top: 8px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.1);
        z-index: 1000;
        display: none;
        overflow: hidden;
    }

    .ap-search-results.active {
        display: block;
    }

    .ap-search-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 14px;
        text-decoration: none;
        color: var(--text-primary);
        transition: background 0.2s;
        border-bottom: 1px solid var(--border-line);
    }

    .ap-search-item:last-child {
        border-bottom: none;
    }

    .ap-search-item:hover {
        background: var(--bg-secondary);
    }

    .ap-search-item img {
        width: 40px;
        height: 40px;
        border-radius: 6px;
        object-fit: cover;
    }

    .ap-search-no-thumb {
        width: 40px;
        height: 40px;
        border-radius: 6px;
        background: var(--border-line);
    }

    .ap-search-info {
        flex: 1;
        min-width: 0;
    }

    .ap-search-title {
        display: block;
        font-size: 0.9rem;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .ap-search-no-results {
        padding: 16px;
        text-align: center;
        font-size: 0.9rem;
        color: var(--text-secondary);
    }

    [data-theme="dark"] .ap-search-results {
        background: #16181c;
        border-color: #2f3336;
        box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    }

    [data-theme="dark"] .ap-search-item:hover {
        background: rgba(255,255,255,0.05);
    }

    [data-theme="dark"] .ta-btn:hover {
        background: rgba(0, 229, 255, 0.08);
        color: #00e5ff;
        text-shadow: 0 0 8px rgba(0, 229, 255, 0.3);
    }

    /* Hero card PC */
    [data-theme="dark"] .featured-impact-hero {
        border-bottom: 1px solid rgba(0, 229, 255, 0.08);
        transition: opacity 0.2s;
    }

    [data-theme="dark"] .featured-impact-hero:hover {
        opacity: 0.92;
    }

    [data-theme="dark"] .hero-text-overlay {
        background: linear-gradient(transparent 5%, rgba(5, 8, 16, 0.92) 80%);
    }

    /* Right sidebar */
    [data-theme="dark"] .sidebar-secondary {
        border-left: none;
    }

    [data-theme="dark"] .pc-search-pill-box {
        background: rgba(17, 24, 39, 0.7);
        border: 1px solid rgba(0, 229, 255, 0.08);
        backdrop-filter: blur(8px);
        transition: border-color 0.2s, box-shadow 0.2s;
    }

    [data-theme="dark"] .pc-search-pill-box:focus-within {
        border-color: rgba(0, 229, 255, 0.3);
        box-shadow: 0 0 16px rgba(0, 229, 255, 0.08);
    }

    [data-theme="dark"] .pc-search-pill-box input {
        color: #e8edf5;
    }

    [data-theme="dark"] .pc-search-pill-box i {
        color: #4b6a9b;
    }

    [data-theme="dark"] .trends-widget-box {
        background: rgba(17, 24, 39, 0.6);
        border: 1px solid rgba(0, 229, 255, 0.07);
        backdrop-filter: blur(12px);
    }

    [data-theme="dark"] .trends-widget-box h3 {
        color: #e8edf5;
        border-bottom: 1px solid rgba(0, 229, 255, 0.06);
        padding-bottom: 14px;
    }

    [data-theme="dark"] .trend-cell {
        border-top: 1px solid rgba(0, 229, 255, 0.05);
        transition: background 0.2s, transform 0.2s;
    }

    [data-theme="dark"] .trend-cell:hover {
        background: rgba(0, 229, 255, 0.04);
        transform: translateX(4px);
    }

    [data-theme="dark"] .cell-cat {
        color: #4b6a9b;
    }

    [data-theme="dark"] .cell-title {
        color: #c8d3e8;
    }

    [data-theme="dark"] .cell-meta {
        color: #3d5478;
    }

    /* Scrollbar PC dark */
    [data-theme="dark"] ::-webkit-scrollbar {
        width: 4px;
    }

    [data-theme="dark"] ::-webkit-scrollbar-track {
        background: transparent;
    }

    [data-theme="dark"] ::-webkit-scrollbar-thumb {
        background: rgba(0, 229, 255, 0.12);
        border-radius: 4px;
    }

    [data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 229, 255, 0.25);
    }

    /* Login modal PC dark */
    [data-theme="dark"] .lm-box {
        background: rgba(10, 14, 26, 0.96);
        border: 1px solid rgba(0, 229, 255, 0.12);
        backdrop-filter: blur(24px);
        box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 229, 255, 0.05);
    }

    [data-theme="dark"] .lm-logo i {
        color: #00e5ff;
        text-shadow: 0 0 24px rgba(0, 229, 255, 0.45);
    }

    [data-theme="dark"] .lm-field input {
        border-color: rgba(0, 229, 255, 0.12);
        background: rgba(255, 255, 255, 0.03);
    }

    [data-theme="dark"] .lm-field input:focus {
        border-color: rgba(0, 229, 255, 0.4);
        box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.08);
    }

    [data-theme="dark"] .lm-btn-submit {
        background: linear-gradient(135deg, #00e5ff, #3b82f6);
        color: #050810;
    }

    [data-theme="dark"] .lm-btn-submit:hover {
        box-shadow: 0 0 24px rgba(0, 229, 255, 0.35);
    }

    [data-theme="dark"] .lm-btn-register {
        border-color: rgba(0, 229, 255, 0.15);
    }

    [data-theme="dark"] .lm-btn-register:hover {
        background: rgba(0, 229, 255, 0.06);
    }

    /* Card fade-in PC */
    [data-theme="dark"] .x-tweet-card-style {
        animation: fadeInUp 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
    }

    [data-theme="dark"] .x-tweet-card-style:nth-child(1) {
        animation-delay: 0.04s;
    }

    [data-theme="dark"] .x-tweet-card-style:nth-child(2) {
        animation-delay: 0.08s;
    }

    [data-theme="dark"] .x-tweet-card-style:nth-child(3) {
        animation-delay: 0.12s;
    }

    [data-theme="dark"] .x-tweet-card-style:nth-child(4) {
        animation-delay: 0.16s;
    }

    [data-theme="dark"] .x-tweet-card-style:nth-child(5) {
        animation-delay: 0.20s;
    }
}

/* ============================================
   MOBILE: COMPACT CARD & HERO SIZES
   ============================================ */
@media (max-width: 700px) {
    /* Shrink featured hero */
    .featured-impact-hero {
        height: 140px;
    }
    [data-theme="dark"] .featured-impact-hero {
        height: 150px;
    }
    .hero-main-title {
        font-size: 1.05rem;
    }
    .hero-text-overlay {
        padding: 10px 12px;
    }

    /* Hide excerpt on mobile — both themes */
    .tr-excerpt-small {
        display: none !important;
    }

    /* --- ADVANCED AI UI ENHANCEMENTS --- */
.x-tweet-card-style {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* AI Scanning Border on Hover */
.x-tweet-card-style::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, #00ffcc, transparent);
    transform: translateY(-100%);
    transition: transform 0.6s;
    z-index: 5;
}

.x-tweet-card-style:hover::before {
    animation: dataScan 1.5s infinite linear;
}

.x-tweet-card-style:hover {
    background: rgba(29, 155, 240, 0.03);
    border-left-color: #00ffcc;
    transform: translateX(4px);
}

[data-theme="dark"] .x-tweet-card-style:hover {
    background: rgba(0, 255, 204, 0.02);
}

/* AI Relevance Badge */
.ai-badge-neural {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 255, 204, 0.3);
    color: #00ffcc;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 10;
    text-transform: uppercase;
    animation: neuroPulse 2s infinite ease-in-out;
}

.ai-badge-neural i {
    font-size: 11px;
}

/* Neural Heading Effect */
.pc-header-content h2 {
    background: linear-gradient(90deg, var(--text-primary), var(--accent-blue), var(--text-primary));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: glowMove 4s linear infinite;
    font-weight: 900;
}

/* Data Processing Glow */
.trends-widget-box {
    border: 1px solid rgba(29, 155, 240, 0.1);
    background: linear-gradient(135deg, rgba(29, 155, 240, 0.02) 0%, transparent 100%);
}

[data-theme="dark"] .trends-widget-box {
    border-color: rgba(0, 255, 204, 0.05);
    background: linear-gradient(135deg, rgba(0, 255, 204, 0.03) 0%, transparent 100%);
    box-shadow: inset 0 0 40px rgba(0, 255, 204, 0.02);
}

.trend-cell {
    position: relative;
    overflow: hidden;
}

.trend-cell::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 204, 0.05), transparent);
    transform: skewX(-25deg);
    transition: none;
}

.trend-cell:hover::after {
    animation: neuralFlow 1s forwards;
}

/* Sidebar Logo Enhancement */
.x-logo-box::after {
    content: '';
    position: absolute;
    inset: -5px;
    background: radial-gradient(circle, rgba(0, 255, 204, 0.15) 0%, transparent 70%);
    opacity: 0.5;
    z-index: -1;
    animation: neuroPulse 3s infinite;
}

    /* --- NEURAL DATA STREAM LOADER --- */
.neural-loader-container {
    width: 100%;
    padding: 30px 20px;
    display: none; /* Controlled by JS */
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.neural-loader-container.active {
    display: flex;
}

.neural-progress-track {
    width: 200px;
    height: 4px;
    background: rgba(29, 155, 240, 0.1);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .neural-progress-track {
    background: rgba(0, 255, 204, 0.1);
}

.neural-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, transparent, #1d9bf0, transparent);
    animation: streamMove 1.2s infinite ease-in-out;
}

[data-theme="dark"] .neural-progress-bar {
    background: linear-gradient(90deg, transparent, #00ffcc, transparent);
}

.neural-loader-text {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.neural-loader-text i {
    animation: neuroPulse 1.5s infinite;
}

[data-theme="dark"] .neural-loader-text {
    color: #00ffcc;
    text-shadow: 0 0 8px rgba(0, 255, 204, 0.3);
}
    .x-tweet-card-style {
        padding: 10px 12px;
        gap: 10px;
    }
    .tr-post-title {
        font-size: 1rem;
        font-weight: 700;
        margin-bottom: 0;
    }
    .tweet-thumbnail-side {
        width: 88px;
        height: 88px;
        flex-shrink: 0;
    }

    /* Dark mode cards: restore row layout + compact thumbnail */
    [data-theme="dark"] .x-tweet-card-style {
        padding: 10px 12px;
        margin: 5px 8px;
    }
    [data-theme="dark"] .tweet-content-flex {
        flex-direction: row !important;
        gap: 10px;
        align-items: flex-start;
    }
    [data-theme="dark"] .tweet-thumbnail-side {
        width: 88px !important;
        height: 88px !important;
        border-radius: 10px;
        flex-shrink: 0;
    }
    [data-theme="dark"] .tweet-thumbnail-side::after {
        display: none;
    }
    [data-theme="dark"] .tr-post-title {
        font-size: 1rem;
        font-weight: 700;
        margin-bottom: 0;
    }
    [data-theme="dark"] .tr-excerpt-small {
        display: none !important;
    }
}