:root {
    --bg-dark: #0f0f1a;
    --bg-panel: #18182a;
    --bg-card: #1e1e32;
    --bg-hover: rgba(139, 92, 246, 0.08);
    
    --text-main: #f0f0ff;
    --text-muted: #9d9db5;
    
    --accent-purple: #A78BFA;
    --accent-magenta: #FF2D95;
    --accent-blue: #60A5FA;
    --accent-green: #34D399;
    --accent-red: #F87171;
    
    --border-color: rgba(167, 139, 250, 0.15);
    --neon-glow: 0 0 20px rgba(167, 139, 250, 0.4);
    
    --nav-height: 70px;
    --sidebar-left-width: 200px;

    --error-bg: rgba(248, 113, 113, 0.1);
    --error-border: rgba(248, 113, 113, 0.3);
    --error-text: #F87171;
    --sidebar-right-width: 320px;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

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

body {
    background: transparent;
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

/* --- VALIDATION ERRORS --- */
.field-error {
    display: none;
    color: var(--error-text);
    font-size: 13px;
    margin-top: 6px;
    align-items: center;
    gap: 6px;
}

.field-error.visible {
    display: flex;
}

.field-error i {
    font-size: 14px;
    flex-shrink: 0;
}

input.error,
select.error,
textarea.error {
    border-color: var(--error-text) !important;
    box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.2) !important;
}

.alert-error {
    background: var(--error-bg);
    border-left: 4px solid var(--error-text);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--error-text);
    font-size: 14px;
    line-height: 1.5;
}

.alert-error i {
    font-size: 18px;
    flex-shrink: 0;
}

.alert-success {
    background: rgba(52, 211, 153, 0.1);
    border-left: 4px solid var(--accent-green);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent-green);
    font-size: 14px;
    line-height: 1.5;
}

.alert-success i {
    font-size: 18px;
    flex-shrink: 0;
}

.flash-container {
    max-width: 900px;
    margin: 16px auto 0;
    padding: 0 16px;
}

.flash-container .alert-error,
.flash-container .alert-success {
    margin-bottom: 8px;
}

.field-wrapper {
    position: relative;
}

button {
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

input, textarea {
    font-family: inherit;
}

/* === LAYOUT === */
.app-layout {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* === TOP NAVBAR === */
.top-nav {
    height: var(--nav-height);
    position: relative;
    background: rgba(15, 15, 26, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.top-nav::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-magenta), var(--accent-blue));
    opacity: 0.6;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 32px;
    width: var(--sidebar-left-width);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-magenta));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--neon-glow);
}

.logo-icon i {
    color: white;
    font-size: 18px;
}

.logo span {
    background: linear-gradient(135deg, #ffffff 60%, var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-center {
    flex: 1;
    max-width: 600px;
    padding: 0 24px;
}

.nav-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 10px 20px;
    transition: border-color 0.3s ease;
    flex: 1;
}

.search-bar:focus-within {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.search-bar input {
    background: none;
    border: none;
    color: var(--text-main);
    width: 100%;
    outline: none;
    font-size: 14px;
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

.search-btn-plane {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-magenta));
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

.search-btn-plane:hover {
    transform: scale(1.05);
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.4);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-magenta));
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--neon-glow);
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s ease;
    position: relative;
}

.icon-btn:hover {
    background-color: var(--bg-hover);
    color: var(--text-main);
}

.badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: var(--accent-magenta);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-panel);
}

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px 6px 6px;
    border-radius: var(--radius-full);
    border: none;
    background: transparent;
    cursor: pointer;
    font: inherit;
    color: inherit;
    transition: background-color 0.2s ease;
}

.user-profile-btn:hover {
    background-color: var(--bg-hover);
}

.user-menu-container {
    position: relative;
}

.user-menu-chevron {
    font-size: 10px;
    margin-left: 4px;
    transition: transform 0.2s ease;
}

#user-menu-toggle[aria-expanded="true"] .user-menu-chevron {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: linear-gradient(135deg, var(--bg-panel) 0%, rgba(30, 30, 50, 0.98) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    z-index: 100;
    min-width: 200px;
}

.dropdown-menu.show {
    display: block !important;
    animation: dropdownSlideDown 0.2s ease;
}

@keyframes dropdownSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-menu-dropdown {
    width: 260px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.85);
    overflow: hidden;
}

.user-menu-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.25);
}

.user-menu-header-avatar .avatar-frame {
    width: 44px;
    height: 44px;
}

.user-menu-header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.user-menu-header-text strong {
    color: white;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-menu-header-text span {
    color: var(--text-muted);
    font-size: 12px;
}

.user-menu-body,
.user-menu-footer {
    padding: 6px;
}

.user-menu-footer {
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.15);
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    color: #e5e7eb;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.user-menu-item i {
    width: 18px;
    text-align: center;
    color: var(--text-muted);
}

.user-menu-item:hover {
    background: var(--bg-hover);
    color: white;
}

.user-menu-item:hover i {
    color: var(--accent-purple);
}

.user-menu-item--danger {
    color: #fca5a5;
}

.user-menu-item--danger i {
    color: #f87171;
}

.user-menu-item--danger:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
}

.notif-dropdown-menu {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
}

.avatar-frame {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border: 2px solid var(--accent-purple);
}

.avatar-img {
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: none;
    box-shadow: none;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
}

/* === MAIN CONTENT AREA — Grid 12 cols (Tailwind-equivalent) === */
.content-wrapper {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    width: 100%;
    display: flex;
    justify-content: center;
}

.layout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    width: 100%;
    max-width: 1400px;
    height: 100%;
    min-height: 0;
}

/* Móvil: ocultar sidebar y panel derecho */
.layout-sidebar {
    display: none;
}

.layout-feed {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
}

.layout-right-panel {
    display: none;
}

.layout-right-panel:empty {
    display: none !important;
}

/* === LEFT SIDEBAR === */
.left-sidebar {
    display: none;
    width: 100%;
    background: rgba(12, 10, 22, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-right: 1px solid var(--border-color);
    flex-direction: column;
    overflow-y: auto;
    padding: 20px 0;
    min-height: 0;
}

/* === HAMBURGER OVERLAY (< 1024px) === */
@media (max-width: 1023px) {
    .hamburger-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: white;
        font-size: 22px;
        cursor: pointer;
        padding: 8px;
        border-radius: 8px;
        margin-right: 8px;
    }

    .hamburger-btn:hover {
        background: rgba(255,255,255,0.08);
    }

    .left-sidebar {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: min(260px, 80vw);
        height: 100vh;
        z-index: 999;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        background: var(--bg-panel);
        border-right: 1px solid var(--border-color);
        flex-direction: column;
        overflow-y: auto;
        padding: 0;
    }

    .left-sidebar.open {
        transform: translateX(0);
    }

    .sidebar-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        border-bottom: 1px solid var(--border-color);
        background: rgba(0,0,0,0.2);
    }

    .sidebar-header .logo {
        font-size: 18px;
        gap: 8px;
    }

    .sidebar-header .logo-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .sidebar-close-btn {
        background: none;
        border: none;
        color: var(--text-muted);
        font-size: 20px;
        cursor: pointer;
        padding: 6px 10px;
        border-radius: 6px;
        transition: all 0.2s;
    }

    .sidebar-close-btn:hover {
        color: white;
        background: rgba(255,255,255,0.1);
    }

    .left-sidebar .menu-group {
        padding: 0;
        margin-bottom: 0;
    }

    .left-sidebar .menu-item {
        padding: 12px 18px;
        font-size: 13px;
    }

    .left-sidebar .menu-title {
        padding: 16px 20px 8px;
    }

    .left-sidebar #mini-chat-messages {
        margin: 0 16px 12px;
    }

    .left-sidebar .menu-group form,
    .left-sidebar .menu-group > div {
        margin: 0 16px 16px;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.65);
        z-index: 998;
        backdrop-filter: blur(2px);
    }

    .sidebar-overlay.is-open {
        display: block;
    }

    .user-info {
        display: none;
    }

    .nav-create-label {
        display: none;
    }

    .nav-center {
        display: none;
    }

    .mobile-search-row {
        display: flex;
        padding: 8px 12px 12px;
        background: var(--bg-panel);
        border-bottom: 1px solid var(--border-color);
    }

    .mobile-search-form {
        display: flex;
        align-items: center;
        background: var(--bg-dark);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-full);
        padding: 10px 16px;
        width: 100%;
        transition: border-color 0.3s ease;
    }

    .mobile-search-form:focus-within {
        border-color: var(--accent-purple);
        box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
    }

    .mobile-search-form input {
        background: none;
        border: none;
        color: var(--text-main);
        width: 100%;
        outline: none;
        font-size: 14px;
    }

    .mobile-search-form input::placeholder {
        color: var(--text-muted);
    }

    .top-nav {
        padding: 0 12px;
    }
}

@media (min-width: 1024px) {
    .hamburger-btn {
        display: none;
    }

    .sidebar-header {
        display: none;
    }

    .sidebar-overlay {
        display: none !important;
    }

    .mobile-search-row {
        display: none;
    }
}

/* --- MÓVIL (< 768px): espaciado, textos, grids --- */
@media (max-width: 767px) {
    .main-feed {
        padding: 12px;
    }

    .feed-tabs {
        gap: 12px;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .feed-tab {
        flex-shrink: 0;
        font-size: 13px;
        white-space: nowrap;
    }

    .create-post {
        padding: 16px;
    }

    .create-post-header {
        gap: 10px;
    }

    .create-post-avatar {
        width: 36px;
        height: 36px;
    }

    .create-post input,
    .create-post textarea {
        font-size: 14px;
    }

    .create-post-actions {
        flex-wrap: wrap;
        gap: 8px;
    }

    .create-post-actions .icon-btn {
        font-size: 13px;
        padding: 8px 10px;
    }

    .post-card {
        padding: 16px;
    }

    .post-card .post-header {
        gap: 10px;
    }

    .post-card .post-avatar {
        width: 36px;
        height: 36px;
    }

    .post-card .post-body {
        font-size: 14px;
        line-height: 1.5;
    }

    .post-card .post-actions {
        flex-wrap: wrap;
        gap: 6px;
    }

    .post-card .post-actions button {
        font-size: 12px;
        padding: 6px 10px;
    }

    .profile-banner {
        height: 140px;
    }

    .profile-info-container {
        padding: 0 12px 12px;
        margin-top: -50px;
        gap: 12px;
        flex-direction: row;
        align-items: flex-end;
    }

    .profile-avatar-wrapper {
        width: 95px;
        height: 95px;
        min-width: 95px;
        min-height: 95px;
        box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.35);
    }

    .profile-avatar-frame {
        width: 100%;
        height: 100%;
    }

    .profile-avatar {
        width: 100%;
        height: 100%;
        min-width: 100%;
        min-height: 100%;
    }

    .profile-name {
        font-size: 1.1rem;
        word-break: break-word;
        gap: 4px 6px;
        margin-bottom: 2px;
    }

    .profile-handle {
        font-size: 12px;
        word-break: break-word;
        gap: 4px 8px;
        margin-bottom: 0;
    }

    .profile-role-badge {
        font-size: 10px;
        padding: 2px 8px;
    }

    .profile-details {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        margin-top: 0;
        flex: 1;
        min-width: 0;
    }

    .profile-meta {
        width: auto;
    }

    .profile-tags {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 0;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 12px;
    }

    .profile-tags .tag {
        justify-content: flex-start;
        text-align: left;
        padding: 4px 6px;
        font-size: 12px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .profile-tags .tag + .tag::before {
        content: '•';
        margin-right: 6px;
        color: var(--text-muted);
        opacity: 0.4;
    }

    .profile-actions {
        flex-direction: row;
        width: 100%;
        gap: 6px;
    }

    .profile-actions .btn-secondary,
    .profile-actions .btn-primary {
        flex: 1;
        justify-content: center;
        padding: 10px 12px;
        font-size: 13px;
    }

    .profile-actions .btn-icon {
        width: 42px;
        height: 42px;
        flex-shrink: 0;
    }

    .profile-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 8px 12px 4px;
        gap: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .tab {
        font-size: 13px;
        padding: 10px 12px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .about-section {
        padding: 16px;
    }

    .about-section .section-title {
        font-size: 16px;
        word-break: break-word;
    }

    .about-text {
        font-size: 14px;
        line-height: 1.5;
    }

    .info-cards {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .info-card {
        padding: 12px;
    }

    .info-card i {
        font-size: 18px;
    }

    .info-card-content strong {
        font-size: 14px;
    }

    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .game-card {
        height: 120px;
    }

    .game-card-mini {
        min-width: 70px;
        height: 90px;
    }

    .top-nav {
        padding: 0 8px;
    }

    .top-nav .logo span {
        font-size: 16px;
    }

    .top-nav .logo-icon {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }

    .nav-left {
        gap: 4px;
    }

    .nav-left .logo {
        gap: 6px;
    }

    .nav-right .btn-primary {
        padding: 4px 8px !important;
        font-size: 12px !important;
        gap: 4px !important;
    }

    .nav-right .icon-btn {
        padding: 6px;
        font-size: 14px;
    }

    .nav-right {
        gap: 4px;
    }

    .btn-primary,
    .btn-secondary,
    .btn-danger {
        padding: 10px 16px;
        font-size: 14px;
    }

    input, select, textarea {
        font-size: 16px !important;
    }

    .search-bar input {
        font-size: 14px;
    }

    .dropdown-menu {
        min-width: 180px;
        right: 0;
        left: auto;
    }

    .user-menu-dropdown {
        width: 240px;
    }

    .notif-dropdown-menu {
        max-width: 300px !important;
    }

    .clan-container [style*="grid-template-columns: 1fr 350px"] {
        grid-template-columns: 1fr !important;
    }

    .community-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px;
    }

    .wallet-container,
    .comunidades-container,
    .edit-profile-container {
        padding: 12px;
    }

    .premium-card,
    .pricing-card {
        padding: 20px 16px;
    }

    .pricing-card h3 {
        font-size: 18px;
    }

    .pricing-card .price {
        font-size: 24px;
    }

    .pricing-card ul li {
        font-size: 13px;
    }

    .edit-profile-form {
        padding: 16px;
    }

    .edit-profile-form label {
        font-size: 13px;
    }

    .edit-profile-form input,
    .edit-profile-form select,
    .edit-profile-form textarea {
        font-size: 14px;
        padding: 10px 12px;
    }

    .feed-right-container {
        flex-direction: column;
        width: 100%;
    }

    .feed-sidebar-col {
        width: 100%;
        min-width: 0;
        border-left: none;
        border-bottom: 1px solid var(--border-color);
        padding: 12px;
    }

    .nav-center {
        padding: 0 8px;
    }

    .search-bar {
        padding: 8px 12px;
    }

    .nav-search-form {
        gap: 6px;
    }

    .search-btn-plane {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

.left-sidebar::-webkit-scrollbar {
    width: 6px;
}
.left-sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.menu-group {
    margin-bottom: 24px;
}

.menu-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 700;
    padding: 0 24px;
    margin-bottom: 12px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.menu-item i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.menu-item:hover, .menu-item.active {
    color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.03);
}

.menu-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10%;
    height: 80%;
    width: 4px;
    background-color: var(--accent-purple);
    border-radius: 0 4px 4px 0;
    box-shadow: var(--neon-glow);
}

.menu-item.premium {
    color: var(--accent-purple);
}

.menu-item.premium i {
    color: var(--accent-magenta);
}

.game-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: cover;
}

.status-widget {
    margin-top: auto;
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
}

.status-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.status-card::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-magenta));
}

.status-indicator {
    width: 10px;
    height: 10px;
    background-color: var(--accent-green);
    border-radius: 50%;
    position: absolute;
    bottom: 0;
    right: 0;
    border: 2px solid var(--bg-card);
}

.status-text {
    font-size: 13px;
    color: var(--text-muted);
    display: block;
    margin-top: 4px;
}

/* === CENTER FEED === */
.main-feed {
    background: transparent;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 32px;
    min-height: 0;
    width: 100%;
    box-sizing: border-box;
}

/* Carrusel historias/juegos — scroll horizontal sin romper layout */
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.main-feed::-webkit-scrollbar {
    width: 8px;
}
.main-feed::-webkit-scrollbar-thumb {
    background-color: rgba(255,255,255,0.1);
    border-radius: 10px;
}

/* PROFILE BANNER & HEADER */
.profile-header {
    background-color: var(--bg-panel);
    border-radius: var(--radius-lg);
    overflow: visible;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    max-width: 100%;
}

.profile-banner {
    height: 160px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow: hidden;
}

.profile-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to top, var(--bg-panel), transparent);
}

.profile-info-container {
    padding: 0 clamp(16px, 4vw, 32px) 28px;
    display: flex;
    gap: 24px;
    position: relative;
    margin-top: -60px;
    align-items: flex-start;
    min-width: 0;
}

.profile-avatar-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    min-width: 120px;
    min-height: 120px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-panel);
    z-index: 10;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.35);
}

.profile-avatar-frame {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border: 3px solid var(--accent-purple);
}

.profile-avatar {
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: none;
    box-shadow: none;
}

.post-avatar-wrap {
    display: inline-block;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    vertical-align: middle;
    box-sizing: border-box;
}

.post-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: none;
    box-shadow: none;
}

.level-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--bg-panel);
    border: 2px solid var(--accent-purple);
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

.profile-details {
    margin-top: 70px;
    flex: 1;
    min-width: 0;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.profile-meta {
    flex: 1 1 200px;
    min-width: 0;
    max-width: 100%;
}

.profile-name {
    font-size: clamp(1.35rem, 4.5vw, 1.75rem);
    font-weight: 800;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    margin: 0 0 6px;
    line-height: 1.2;
    word-break: break-word;
}

.profile-name-text {
    min-width: 0;
}

.profile-name-badges {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.profile-crown {
    color: #FACC15;
    font-size: 1.15rem;
    text-shadow: 0 0 10px rgba(250, 204, 21, 0.5);
}

.verified-icon {
    color: var(--accent-purple);
    font-size: 1.1rem;
}

.profile-handle {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    color: var(--text-muted);
    font-size: 15px;
    margin: 0 0 12px;
    line-height: 1.4;
}

.profile-username {
    color: var(--text-muted);
    word-break: break-all;
}

.profile-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

.profile-role-badge--gamer {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: white;
}
.profile-role-badge--gamer i { color: var(--accent-green); }

.profile-role-badge--streamer {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: white;
}
.profile-role-badge--streamer i { color: var(--accent-red); font-size: 8px; }

.profile-role-badge--pro-player {
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: white;
}
.profile-role-badge--pro-player i { color: #FBBF24; }

.profile-role-badge--creador {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: white;
}
.profile-role-badge--creador i { color: var(--accent-blue); }

.profile-role-badge--caster {
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: white;
}
.profile-role-badge--caster i { color: var(--accent-purple); }

.profile-role-badge--disenador {
    background: rgba(236, 72, 153, 0.15);
    border: 1px solid rgba(236, 72, 153, 0.3);
    color: white;
}
.profile-role-badge--disenador i { color: #EC4899; }

.profile-role-badge--store {
    background: rgba(255, 0, 85, 0.12);
    border: 1px solid rgba(255, 0, 85, 0.35);
    color: #ff6b9d;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.profile-role-badge--store i {
    color: #ff0055;
}

.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    font-size: 13px;
    color: var(--text-muted);
    width: 100%;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: normal;
    text-align: left;
    line-height: 1.35;
    max-width: 100%;
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex-shrink: 0;
    align-items: center;
}

.btn-secondary {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.btn-icon {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* TABS */
.profile-tabs {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-color);
    padding: 8px 20px 0;
    gap: 8px 20px;
    overflow: visible;
    max-width: 100%;
    box-sizing: border-box;
}

.tab {
    padding: 14px 4px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 15px;
    position: relative;
    cursor: pointer;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.tab:hover {
    color: white;
}

.tab.active {
    color: white;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-purple);
    box-shadow: 0 -2px 10px rgba(139, 92, 246, 0.5);
}

/* ABOUT SECTION */
.about-section {
    background-color: var(--bg-panel);
    border-radius: var(--radius-lg);
    padding: clamp(16px, 4vw, 24px);
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 0;
}

.about-section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.about-edit-btn {
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.profile-info-edit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.profile-info-edit-grid__full {
    grid-column: 1 / -1;
}

.about-text {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 16px;
    width: 100%;
}

.info-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border: 1px solid var(--border-color);
    min-width: 0;
}

.info-card i {
    color: var(--text-muted);
    font-size: 20px;
    margin-top: 2px;
}

.info-card-content span {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.info-card-content strong {
    font-size: 15px;
    color: white;
    word-break: break-word;
    line-height: 1.35;
}

.info-card-content {
    min-width: 0;
    flex: 1;
}

/* GAMES SECTION */
.games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.game-card {
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    height: 160px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-purple);
}

.game-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.game-card:hover .game-bg {
    opacity: 0.8;
}

.game-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
}

.game-card h3 {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.game-card p {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

.game-card-add {
    background-color: var(--bg-card);
    border: 1px dashed var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-muted);
}

.game-card-add i {
    font-size: 24px;
}

.game-card-add:hover {
    border-color: var(--accent-purple);
    color: var(--accent-purple);
    background-color: rgba(139, 92, 246, 0.05);
}

/* CREATE POST */
.create-post {
    background-color: var(--bg-panel);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.create-post-header {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.post-input {
    flex: 1;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    color: white;
    resize: none;
    height: 60px;
    font-size: 15px;
}

.post-input:focus {
    outline: none;
    border-color: var(--accent-purple);
}

.create-post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.post-types {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.post-type-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.post-type-btn:hover {
    background-color: var(--bg-card);
    color: white;
}

.post-type-btn.image i { color: #10B981; }
.post-type-btn.clip i { color: #8B5CF6; }
.post-type-btn.poll i { color: #3B82F6; }

.post-type-btn.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(255, 45, 149, 0.2));
    border: 1px solid var(--accent-purple);
    color: white;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.15);
}

.post-section {
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.post-file-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-dark);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.post-file-label:hover {
    border-color: var(--accent-purple);
    color: white;
    background: rgba(139, 92, 246, 0.1);
}

/* ===== FACEBOOK-STYLE CREATE POST BAR ===== */
.fb-create-post {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 20px 8px;
    margin-bottom: 16px;
}

.fb-create-post-top {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding-bottom: 12px;
}

.fb-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.fb-placeholder {
    flex: 1;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 10px 16px;
    color: var(--text-muted);
    font-size: 14px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.fb-create-post-top:hover .fb-placeholder {
    border-color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.05);
    color: rgba(255,255,255,0.7);
}

.fb-create-post-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0 0 8px;
}

.fb-create-post-actions {
    display: flex;
    justify-content: space-around;
    gap: 4px;
}

.fb-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
}

.fb-action-btn:hover {
    background: var(--bg-dark);
    color: white;
}

/* ===== POST MODAL OVERLAY ===== */
.post-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.post-modal-container {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.25s ease;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.post-modal-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.post-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.post-modal-x {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
}

.post-modal-x:hover {
    background: rgba(255, 45, 149, 0.15);
    color: #FF2D95;
}

.post-modal-body {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    align-items: flex-start;
}

.post-modal-body .fb-avatar {
    margin-top: 4px;
}

.modal-textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 15px;
    line-height: 1.5;
    resize: none;
    outline: none;
    min-height: 60px;
    font-family: inherit;
}

.modal-textarea::placeholder {
    color: var(--text-muted);
}

/* Modal sections */
.modal-section {
    padding: 0 20px 16px;
}

.modal-section-inner {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
}

.modal-upload-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.modal-file-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px dashed var(--accent-purple);
    border-radius: 10px;
    color: var(--accent-purple);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-file-label:hover {
    background: rgba(139, 92, 246, 0.2);
    color: #C4B5FD;
}

.modal-or {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}

.modal-url-input {
    flex: 1;
    min-width: 140px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 14px;
    color: white;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

.modal-url-input:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15), 0 0 12px rgba(139, 92, 246, 0.08);
}

.modal-preview {
    position: relative;
    margin-top: 12px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-panel);
}

.modal-preview img,
.modal-preview video {
    display: block;
    max-height: 200px;
    width: 100%;
    object-fit: contain;
    background: #000;
}

.modal-preview-clear {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s;
}

.modal-preview-clear:hover {
    background: rgba(255,45,95,0.8);
}

.modal-section-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-muted);
}

/* POLL */
.modal-poll-question {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}

.modal-poll-input {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 14px;
    color: white;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.modal-poll-input:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15), 0 0 12px rgba(139, 92, 246, 0.08);
}

.modal-poll-opts {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.modal-poll-opt {
    display: flex;
    gap: 10px;
    align-items: center;
}

.modal-poll-letter {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
}

.modal-poll-add {
    background: transparent;
    border: none;
    color: var(--accent-purple);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    border-radius: 8px;
    margin-bottom: 6px;
}

.modal-poll-add:hover {
    background: rgba(139, 92, 246, 0.1);
}

.modal-poll-opt-del {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    font-size: 14px;
}
.modal-poll-opt-del:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
}

.poll-config-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 4px;
}
.poll-config-row .poll-config-label {
    padding: 0;
    font-size: 13px;
    color: var(--text-muted);
}
.poll-duration-select {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 32px 8px 12px;
    color: white;
    font-size: 13px;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23888' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color 0.2s;
    min-width: 130px;
}
.poll-duration-select:focus {
    border-color: var(--accent-purple);
}
.poll-duration-select option {
    background: #1a1a2e;
    color: white;
}

/* TOURNAMENT */
.tourn-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.tourn-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    flex: 1;
}
.tourn-name { flex: 3; }
.tourn-game { flex: 2; }
.tourn-prize { flex: 3; }
.tourn-format { flex: 2; }
.tourn-small { flex: 1; min-width: 100px; }
.tourn-full { flex: 1 1 100%; }
.tourn-field label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}
.tourn-field input,
.tourn-field select,
.tourn-field textarea {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 14px;
    color: white;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}
.tourn-field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23888' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    cursor: pointer;
    color: var(--text-muted);
}
.tourn-field select option {
    background: #1a1a2e;
    color: white;
}
.tourn-field input:focus,
.tourn-field select:focus,
.tourn-field textarea:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15), 0 0 12px rgba(139, 92, 246, 0.08);
}
.tourn-field textarea {
    resize: vertical;
    min-height: 80px;
}
.tourn-field input[type="number"]::-webkit-inner-spin-button {
    opacity: 1;
}

/* Modal footer */
.post-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 20px 16px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.modal-game-select {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 14px;
    color: white;
    font-size: 13px;
    cursor: pointer;
    min-width: 140px;
}

.modal-submit-btn {
    padding: 10px 32px;
    border: none;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
    color: white;
    background: linear-gradient(135deg, #FF2D95, #8B5CF6);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}
.modal-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 45, 149, 0.4);
}

@media (max-width: 500px) {
    .fb-create-post-actions {
        flex-wrap: wrap;
    }
    .fb-action-btn {
        flex: 1 1 45%;
        font-size: 12px;
        padding: 8px 6px;
    }
    .post-modal-container {
        max-height: 95vh;
    }
    .modal-upload-row {
        flex-direction: column;
    }
    .modal-or {
        align-self: center;
    }
    .tourn-row {
        flex-direction: column;
    }
    .tourn-small { min-width: 0; }
}

/* POSTS FEED */
.post-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(30, 30, 50, 0.9) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

.post-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.game-tag {
    background-color: rgba(139, 92, 246, 0.1);
    color: var(--accent-purple);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.game-tag.minecraft { background-color: rgba(16, 185, 129, 0.1); color: #10B981; }

.post-content {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.post-media {
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-media img {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    display: block;
}

.post-actions {
    display: flex;
    gap: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

button.action-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}

.action-btn:hover {
    color: #C084FC;
}

.action-btn.liked {
    color: var(--accent-magenta);
}

/* ===== POST DROPDOWN (three dots menu) ===== */
.post-dropdown {
    position: relative;
}
.post-dropdown-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 16px;
}
.post-dropdown-btn:hover {
    background: rgba(139, 92, 246, 0.12);
    color: #C084FC;
}
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 100;
    min-width: 220px;
    background: #1e1b2e;
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(139, 92, 246, 0.08);
    padding: 6px;
    display: none;
    margin-top: 4px;
}
.dropdown-menu.open {
    display: block;
}
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #ccc;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
    font-family: inherit;
}
.dropdown-item i {
    width: 16px;
    text-align: center;
    color: var(--text-muted);
    flex-shrink: 0;
}
.dropdown-item:hover {
    background: rgba(139, 92, 246, 0.1);
    color: white;
}
.dropdown-item:hover i {
    color: #C084FC;
}
.dropdown-item-danger {
    color: #f87171;
}
.dropdown-item-danger i {
    color: #f87171;
}
.dropdown-item-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}
.dropdown-item-danger:hover i {
    color: #EF4444;
}

/* Boost: color solo en nombre de perfil y chat */
.nombre-boost--rapido {
    color: #3B82F6 !important;
    text-shadow: 0 0 8px rgba(59, 130, 246, 0.45);
}
.nombre-boost--mega {
    color: #A855F7 !important;
    text-shadow: 0 0 8px rgba(168, 85, 247, 0.45);
}
.nombre-boost--titan {
    color: #FACC15 !important;
    text-shadow: 0 0 8px rgba(250, 204, 21, 0.5);
}

.post-card--vip-author {
    border: 1px solid rgba(250, 204, 21, 0.3);
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.1);
}

.post-card--boosted {
    border: 1px solid rgba(168, 85, 247, 0.4);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.15);
    position: relative;
    overflow: hidden;
}

.post-card--boosted::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3B82F6, #A855F7, #FACC15);
}

.boost-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
}

.boost-rapido {
    background: rgba(59, 130, 246, 0.2);
    color: #3B82F6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.boost-mega {
    background: rgba(168, 85, 247, 0.2);
    color: #A855F7;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.boost-titan {
    background: rgba(250, 204, 21, 0.15);
    color: #FACC15;
    border: 1px solid rgba(250, 204, 21, 0.3);
}

/* ===== POLL IN POSTS ===== */
.post-poll {
    margin-top: 14px;
    padding: 16px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.post-poll-question {
    font-size: 15px;
    font-weight: 700;
    color: white;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-poll-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.post-poll-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-panel);
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    text-align: left;
    width: 100%;
    font-family: inherit;
}

.post-poll-option:hover {
    border-color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.08);
}

.post-poll-voted .post-poll-option {
    cursor: default;
}

.post-poll-voted .post-poll-option:hover {
    border-color: var(--border-color);
    background: var(--bg-panel);
}

.post-poll-radio {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: all 0.2s;
}

.post-poll-option:hover .post-poll-radio {
    border-color: var(--accent-purple);
}

.post-poll-voted-opt .post-poll-radio {
    border-color: var(--accent-purple);
    background: var(--accent-purple);
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
}

.post-poll-voted-opt .post-poll-radio::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

.post-poll-text {
    position: relative;
    z-index: 1;
    font-size: 14px;
    color: white;
    font-weight: 500;
    flex: 1;
}

.post-poll-bar {
    position: absolute;
    inset: 0;
    background: rgba(139, 92, 246, 0.12);
    border-radius: 9px;
    transition: width 0.5s ease;
}

.post-poll-pct {
    position: relative;
    z-index: 1;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-purple);
    flex-shrink: 0;
}

.post-poll-voted-opt .post-poll-bar {
    background: rgba(139, 92, 246, 0.2);
}

.post-poll-total {
    margin: 10px 0 0;
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ===== POLL CONFIG BADGES ===== */
.post-poll-config-badges {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.poll-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 10px;
}

.poll-badge.multiple {
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.poll-badge.changeable {
    background: rgba(59, 130, 246, 0.15);
    color: #60A5FA;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

/* ===== POLL CONFIG TOGGLES IN MODAL ===== */
.poll-config {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.poll-config-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 0;
    font-size: 13px;
    color: var(--text-muted);
    transition: color 0.2s;
}

.poll-config-label:hover {
    color: white;
}

.poll-config-label input {
    display: none;
}

.poll-config-toggle {
    width: 38px;
    height: 22px;
    border-radius: 11px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    position: relative;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.poll-config-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: all 0.25s ease;
}

.poll-config-label input:checked + .poll-config-toggle {
    background: rgba(139, 92, 246, 0.25);
    border-color: var(--accent-purple);
}

.poll-config-label input:checked + .poll-config-toggle::after {
    left: 18px;
    background: var(--accent-purple);
    box-shadow: 0 0 6px rgba(139, 92, 246, 0.4);
}

.poll-config-text {
    flex: 1;
}

/* === RIGHT SIDEBAR === */
.right-sidebar {
    width: var(--sidebar-right-width);
    background: transparent;
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 24px;
    gap: 24px;
}

.right-sidebar::-webkit-scrollbar {
    width: 6px;
}
.right-sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.widget {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--border-color);
}

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

.widget-title {
    font-size: 15px;
    font-weight: 700;
}

.widget-link {
    font-size: 13px;
    color: var(--accent-purple);
    font-weight: 600;
}

/* LEVEL WIDGET */
.level-widget {
    text-align: center;
    padding: 24px 20px;
}

.level-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(255, 45, 149, 0.2));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.level-icon i {
    font-size: 32px;
    color: var(--accent-purple);
}

.progress-container {
    margin-top: 16px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 600;
}

.progress-bar {
    height: 6px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-magenta));
    border-radius: 3px;
}

/* STATS WIDGET */
.stats-grid {
    display: grid;
    gap: 12px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 14px;
}

.stat-label i {
    color: var(--accent-purple);
}

.stat-value {
    font-weight: 700;
    font-size: 14px;
}

/* ACHIEVEMENTS WIDGET */
.achievement-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.achiev-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.achiev-icon.gold {
    background: rgba(250, 204, 21, 0.1);
    color: #FACC15;
}

.achiev-icon.purple {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-purple);
}

.achiev-info {
    flex: 1;
}

.achiev-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}

.achiev-desc {
    font-size: 12px;
    color: var(--text-muted);
}

.achiev-xp {
    font-size: 12px;
    font-weight: 700;
    color: #FACC15;
}

/* FRIENDS WIDGET */
.friends-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.friend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.friend-info-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.friend-avatar-wrap {
    position: relative;
}

.friend-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.status-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}

.status-dot.online { background-color: var(--accent-green); }
.status-dot.ingame { background-color: var(--accent-purple); }

.friend-details h5 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.friend-state {
    font-size: 12px;
    color: var(--text-muted);
}

.friend-state.ingame {
    color: var(--accent-purple);
}

.friend-game-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    object-fit: cover;
}

/* === FEED SPECIFIC STYLES === */
.games-horizontal-list {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 16px;
    margin-bottom: 24px;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
}

.games-horizontal-list:not(.no-scrollbar)::-webkit-scrollbar {
    height: 6px;
}
.games-horizontal-list:not(.no-scrollbar)::-webkit-scrollbar-thumb {
    background-color: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.game-card-mini {
    min-width: 90px;
    height: 120px;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 12px 8px;
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.game-card-mini:hover {
    border-color: var(--accent-purple);
    transform: translateY(-2px);
}

.game-card-mini .game-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.5;
    z-index: 1;
}

.game-card-mini.add-new {
    border: 1px dashed var(--border-color);
    color: var(--text-muted);
    justify-content: center;
    gap: 12px;
}

.game-card-mini.add-new:hover {
    color: var(--accent-purple);
    background-color: rgba(139, 92, 246, 0.05);
}

.game-card-mini span {
    position: relative;
    z-index: 2;
    font-size: 12px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.game-icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    position: relative;
    z-index: 2;
    margin-bottom: 8px;
    border: 2px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.feed-tabs {
    display: flex;
    gap: 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.feed-tab {
    padding: 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
    text-decoration: none;
    display: block;
}

.feed-tab:hover {
    color: var(--text-main);
}

.feed-tab.active {
    color: var(--text-main);
}

.feed-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-purple);
    box-shadow: var(--neon-glow);
}

/* Panel derecho */
.feed-right-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    background-color: var(--bg-dark);
    min-height: 0;
}

.feed-sidebar-col {
    width: 100%;
    padding: 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 24px;
    border-left: 1px solid var(--border-color);
    overflow-y: auto;
    background-color: var(--bg-panel);
}

.feed-sidebar-col::-webkit-scrollbar {
    width: 6px;
}
.feed-sidebar-col::-webkit-scrollbar-thumb {
    background-color: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.profile-summary-card {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

.profile-summary-card .banner {
    height: 100px;
    background: url('https://images.unsplash.com/photo-1605806616949-1e87b487cb2a?q=80&w=600&auto=format&fit=crop') center/cover;
}

.profile-summary-card .info {
    padding: 0 16px 16px;
    text-align: center;
    position: relative;
    margin-top: -30px;
}

.profile-summary-card .avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid var(--bg-panel);
    margin: 0 auto 8px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-magenta));
    padding: 2px;
}
.profile-summary-card .avatar img {
    width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
}

.main-feed.feed-view {
    max-width: 700px;
}

/* --- Botón panel lateral (solo < xl) --- */
.nav-panel-toggle {
    display: flex;
}

@media (min-width: 1280px) {
    .nav-panel-toggle {
        display: none !important;
    }
}

/* --- Barra inferior móvil (lg:hidden) --- */
.mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background-color: var(--bg-panel);
    border-top: 1px solid var(--border-color);
    justify-content: space-around;
    align-items: center;
    padding: 10px 8px calc(10px + env(safe-area-inset-bottom, 0px));
    gap: 4px;
}

.mobile-bottom-nav::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-magenta), var(--accent-blue));
    opacity: 0.6;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 10px;
    font-weight: 600;
    padding: 6px 8px;
    border-radius: 10px;
    min-width: 56px;
    transition: color 0.2s, background 0.2s;
}

.mobile-nav-item i {
    font-size: 18px;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.1);
}

body.has-mobile-nav-padding .layout-feed,
body.has-mobile-nav-padding .main-feed {
    padding-bottom: 80px;
}

body.panel-open {
    overflow: hidden;
}

.layout-right-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 90;
    backdrop-filter: blur(2px);
}

.layout-right-overlay.is-open {
    display: block;
}

.layout-right-panel.is-open {
    display: block !important;
    position: fixed;
    top: var(--nav-height);
    right: 0;
    bottom: 0;
    width: min(100%, 380px);
    max-width: 100vw;
    z-index: 100;
    background: transparent;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
    border-left: 1px solid var(--border-color);
    animation: slidePanelIn 0.25s ease;
}

@keyframes slidePanelIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.layout-right-panel.is-open .feed-right-container {
    flex-direction: column;
    width: 100%;
}

.layout-right-panel.is-open .feed-sidebar-col {
    width: 100%;
    min-width: 0;
    border-left: none;
    border-bottom: 1px solid var(--border-color);
}

.layout-right-panel-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-panel);
    position: sticky;
    top: 0;
    z-index: 2;
    font-weight: 700;
    color: white;
    font-size: 15px;
}

.layout-right-panel-header span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.layout-right-panel.is-open .layout-right-panel-header {
    display: flex;
}

@media (min-width: 1280px) {
    .layout-right-panel-header {
        display: none !important;
    }
}

/* md (768px+): tablet — perfil y nav ajustados */
@media (min-width: 768px) {
    body.has-mobile-nav-padding .layout-feed,
    body.has-mobile-nav-padding .main-feed {
        padding-bottom: 32px;
    }

    .top-nav {
        padding: 0 20px;
    }

    .profile-banner {
        height: 200px;
    }
}

/* lg (1024px+): sidebar visible, feed ancho */
@media (min-width: 1024px) {
    .layout-grid {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        gap: 12px;
        padding: 0 24px;
        box-sizing: border-box;
        height: 100%;
        max-width: 1400px;
        margin: 0 auto;
        width: 100%;
    }

    .left-sidebar {
        display: flex;
        grid-column: span 3;
        max-width: 220px;
        border-right: none;
        border-radius: var(--radius-lg);
        border: 1px solid var(--border-color);
    }

    .layout-feed {
        grid-column: span 9;
    }

    .layout-right-panel {
        display: none !important;
    }

    .mobile-bottom-nav {
        display: none;
    }

    body.has-mobile-nav-padding .layout-feed,
    body.has-mobile-nav-padding .main-feed {
        padding-bottom: 32px;
    }
}

/* xl (1280px+): panel derecho visible */
@media (min-width: 1280px) {
    .layout-right-panel {
        display: none !important;
    }

    .feed-right-container {
        flex-direction: row;
        flex-wrap: nowrap;
        width: 100%;
        align-items: stretch;
    }

    /* Dos columnas fijas dentro del panel: chats | perfil (no mover ni apilar) */
    .feed-sidebar-col {
        flex: 1 1 0;
        width: 50%;
        min-width: 0;
        max-width: 50%;
        padding: 16px 12px;
    }
}

/* === ANUNCIOS ADSENSE === */
.ad-container {
    margin: 16px 0;
    text-align: center;
    overflow: hidden;
}

.ad-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    opacity: 0.4;
}

.ad-banner {
    max-width: 100%;
    overflow-x: hidden;
}

.ad-square {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
}

.ad-responsive {
    width: 100%;
    padding: 16px 0;
}

.ad-skyscraper {
    display: none;
}

@media (min-width: 1400px) {
    .ad-skyscraper {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

/* === SEARCH RESULTS === */
.search-results-page {
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
}

.search-results-header h1 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: white;
    word-break: break-word;
}

.search-results-header h1 i {
    color: var(--accent-purple);
    margin-right: 10px;
}

.search-section {
    margin-bottom: 28px;
}

.search-section h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-section h2 .count {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-purple);
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 20px;
}

.search-user-list,
.search-clan-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-user-card,
.search-clan-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: background 0.2s;
}

.search-user-card:hover,
.search-clan-card:hover {
    background: var(--bg-hover);
}

.search-user-card .avatar {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.search-user-info strong,
.search-clan-info strong {
    display: block;
    color: white;
    font-size: 14px;
    margin-bottom: 2px;
}

.search-user-info span {
    font-size: 12px;
    color: var(--text-muted);
}

.search-clan-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(139, 92, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--accent-purple);
    flex-shrink: 0;
    overflow: hidden;
}

.search-clan-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-clan-info span {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
    line-height: 1.4;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.2;
}

.empty-state h3 {
    font-size: 1.2rem;
    color: white;
    margin-bottom: 8px;
}

@media (max-width: 767px) {
    .search-results-page {
        padding: 0 4px;
    }
    .search-results-header h1 {
        font-size: 1.05rem;
        margin-bottom: 16px;
        word-break: break-all;
    }
    .search-section {
        margin-bottom: 20px;
    }
    .search-user-card,
    .search-clan-card {
        padding: 10px 12px;
        gap: 10px;
    }
    .search-user-card .avatar {
        width: 36px;
        height: 36px;
    }
    .search-clan-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
        min-width: 36px;
    }
    .search-user-info strong,
    .search-clan-info strong {
        font-size: 13px;
    }
    .search-user-info span,
    .search-clan-info span {
        font-size: 11px;
    }
    .empty-state {
        padding: 40px 16px;
    }
    .empty-state i {
        font-size: 36px;
    }
    .empty-state h3 {
        font-size: 1rem;
    }
}

/* === RESPONSIVE UTILITIES === */
/* Evitar overflow horizontal en cualquier resolución */
img, video, iframe, embed, object {
    max-width: 100%;
    height: auto;
}

table {
    word-break: break-word;
}

/* ========== MENSAJES PRIVADOS ========== */
.messages-page-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.mensajes-app {
    flex: 1;
    min-height: 0;
    display: flex;
    gap: 0;
    background: var(--bg-panel);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.mensajes-sidebar {
    width: 340px;
    min-width: 340px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    background: var(--bg-dark);
}

.mensajes-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.mensajes-sidebar-header h3 {
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
}

.mensajes-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.mensajes-search i {
    color: var(--text-muted);
    font-size: 14px;
}

.mensajes-search input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 14px;
    outline: none;
}

.mensajes-search input::placeholder {
    color: var(--text-muted);
}

.busqueda-usuarios {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-color);
    z-index: 20;
    max-height: 260px;
    overflow-y: auto;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.busqueda-title {
    padding: 10px 20px 4px;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.busqueda-item, .modal-usuario-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.15s;
}

.busqueda-item:hover, .modal-usuario-item:hover {
    background: var(--bg-hover);
}

.busqueda-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
}

.busqueda-item div, .modal-usuario-item div {
    display: flex;
    flex-direction: column;
}

.busqueda-item strong, .modal-usuario-item strong {
    font-size: 14px;
    color: var(--text-main);
}

.busqueda-item span, .modal-usuario-item span {
    font-size: 12px;
    color: var(--text-muted);
}

.busqueda-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.conversaciones-list {
    flex: 1;
    overflow-y: auto;
}

.conversaciones-loading,
.conversaciones-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.conversaciones-empty i {
    font-size: 40px;
    margin-bottom: 12px;
    display: block;
}

.conversaciones-empty p {
    font-size: 14px;
}

.conv-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.conv-item:hover {
    background: var(--bg-hover);
}

.conv-item-active {
    background: var(--bg-hover) !important;
    border-left: 3px solid var(--accent-purple);
}

.conv-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.conv-info {
    flex: 1;
    min-width: 0;
}

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

.conv-top strong {
    font-size: 14px;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conv-time {
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.conv-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.conv-last-msg {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conv-badge {
    background: var(--accent-purple);
    color: white;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    flex-shrink: 0;
    margin-left: 6px;
}

/* ---- CHAT PANEL ---- */
.mensajes-chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chat-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    gap: 8px;
}

.chat-placeholder-icon i {
    font-size: 64px;
    color: var(--border-color);
}

.chat-placeholder h3 {
    font-size: 20px;
    color: var(--text-muted);
}

.chat-placeholder p {
    font-size: 14px;
    opacity: 0.7;
}

.chat-activo {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-dark);
}

.chat-header-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-header-info {
    display: flex;
    flex-direction: column;
}

.chat-header-info strong {
    font-size: 15px;
    color: var(--text-main);
}

.chat-header-info span {
    font-size: 12px;
    color: var(--text-muted);
}

.chat-back-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    scroll-behavior: smooth;
}

.chat-messages-inner {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: auto;
}

.chat-loading,
.chat-empty-msg {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 0;
    font-size: 14px;
}

.chat-date-sep {
    text-align: center;
    margin: 16px 0 8px;
    position: relative;
}

.chat-date-sep::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--border-color);
}

.chat-date-sep span {
    background: var(--bg-panel);
    padding: 0 12px;
    font-size: 11px;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

.msg {
    display: flex;
    gap: 8px;
    max-width: 75%;
    margin-bottom: 1px;
}

.msg-mine {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.msg-other {
    align-self: flex-start;
}

.msg-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    align-self: flex-end;
    flex-shrink: 0;
}

.msg-avatar-spacer {
    width: 30px;
    flex-shrink: 0;
}

.msg-bubble {
    padding: 10px 14px;
    border-radius: var(--radius-md);
    position: relative;
    transition: box-shadow 0.15s;
}

.msg-bubble:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.msg-mine .msg-bubble {
    background: var(--chat-self, linear-gradient(135deg, #8B5CF6, #A78BFA));
    color: white;
    border-bottom-right-radius: 4px;
}

.msg-other .msg-bubble {
    background: var(--bg-card);
    color: var(--text-main);
    border-bottom-left-radius: 4px;
}

.msg-text {
    font-size: 14px;
    line-height: 1.45;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.msg-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.msg-time {
    font-size: 10px;
    opacity: 0.6;
}

.msg-other .msg-time {
    color: var(--text-muted);
}

.msg-read {
    font-size: 10px;
    opacity: 0.4;
}

.msg-read-yes {
    opacity: 1;
    color: var(--accent-blue);
}

.status-dot.online {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    display: inline-block;
    margin-left: 4px;
    flex-shrink: 0;
    box-shadow: 0 0 6px rgba(34,197,94,0.5);
}

/* ---- INPUT ---- */
.chat-input-area {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-dark);
    position: relative;
}

.chat-input-area form {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.chat-input-area textarea {
    flex: 1;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-main);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    resize: none;
    min-height: 40px;
    max-height: 120px;
    line-height: 1.4;
    font-family: inherit;
    scrollbar-width: thin;
}

.chat-input-area textarea:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(139,92,246,0.1);
}

.chat-input-area textarea::placeholder {
    color: var(--text-muted);
}

.chat-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--accent-purple);
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    background: #8B5CF6;
    transform: scale(1.05);
}

/* Modal */
.modal-usuario-item {
    padding: 12px 16px;
}

.modal-usuario-item div {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

/* Responsive */
@media (max-width: 767px) {
    .mensajes-sidebar {
        width: 100%;
        min-width: 100%;
    }

    .mensajes-chat-panel {
        width: 100%;
    }

    .chat-back-btn {
        display: block !important;
    }

    .msg {
        max-width: 85%;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .mensajes-sidebar {
        width: 300px;
        min-width: 300px;
    }
}

/* ——— Guest Profile Styles ——— */
.guest-banner {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(255, 45, 149, 0.05));
    border: 1px solid rgba(167, 139, 250, 0.12);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 20px;
    animation: guestBannerIn 0.6s ease;
}
@keyframes guestBannerIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.guest-banner-content {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.guest-banner-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(255, 45, 149, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #A78BFA;
    flex-shrink: 0;
}
.guest-banner-text {
    flex: 1;
    min-width: 180px;
}
.guest-banner-text strong {
    display: block;
    color: #C4B5FD;
    font-size: 14px;
    margin-bottom: 2px;
}
.guest-banner-text span {
    display: block;
    color: rgba(157, 157, 181, 0.6);
    font-size: 12px;
    line-height: 1.4;
}
.guest-banner-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #7C3AED, #FF2D95);
    border-radius: 10px;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.guest-banner-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(124, 58, 237, 0.3);
    color: #fff;
}

.guest-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(255, 45, 149, 0.1));
    border: 1px solid rgba(167, 139, 250, 0.15);
    color: #A78BFA;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    vertical-align: middle;
    margin-left: 6px;
}

.profile-banner-guest-tag {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: rgba(167, 139, 250, 0.7);
    border: 1px solid rgba(167, 139, 250, 0.1);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ===== MENU BADGE (sidebar) ===== */
.menu-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--accent-purple);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    margin-left: auto;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}

/* ===== NOTIFICATION DROPDOWN ===== */
.notif-dropdown-item:hover {
    background: var(--bg-dark) !important;
}

/* ===== NOTIFICACIONES PAGE ===== */
.notif-page {
    max-width: 720px;
    margin: 0 auto;
}

.notif-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.notif-page-header h1 {
    font-size: 24px;
    font-weight: 800;
    color: white;
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notif-page-header p {
    margin: 0;
    font-size: 14px;
}

.notif-page-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notif-page-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
}

.notif-page-item:hover {
    background: var(--bg-card);
    border-color: rgba(139, 92, 246, 0.2);
    transform: translateX(4px);
}

.notif-page-item.notif-unread {
    background: rgba(139, 92, 246, 0.08);
    border-left: 3px solid var(--accent-purple);
}

.notif-page-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
    font-size: 16px;
}

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

.notif-page-message {
    margin: 0 0 4px 0;
    color: white;
    font-size: 14px;
    line-height: 1.5;
}

.notif-page-time {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.notif-page-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-purple);
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
    flex-shrink: 0;
    margin-top: 6px;
}

.notif-page-empty {
    text-align: center;
    padding: 80px 20px;
    background: var(--bg-panel);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.notif-page-empty i {
    font-size: 56px;
    color: var(--text-muted);
    opacity: 0.15;
    margin-bottom: 16px;
}

.notif-page-empty h3 {
    color: white;
    font-size: 20px;
    margin: 0 0 8px 0;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 24px;
    gap: 8px;
}

@media (max-width: 600px) {
    .notif-page-header {
        flex-direction: column;
    }
    .notif-page-item {
        padding: 12px;
    }
    .notif-page-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    .notif-page-message {
        font-size: 13px;
    }
}

/* ===== SUBIR CLIP PAGE ===== */
.upload-clip-page {
    max-width: 640px;
    margin: 48px auto;
    padding: 0 16px;
}
.upload-clip-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px 32px;
}
.upload-clip-header {
    text-align: center;
    margin-bottom: 28px;
}
.upload-clip-header i {
    font-size: 48px;
    color: #8B5CF6;
    margin-bottom: 12px;
}
.upload-clip-header h2 {
    font-size: 22px;
    font-weight: 800;
    color: white;
    margin: 0 0 6px 0;
}
.upload-clip-header p {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
}
.upload-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: 14px;
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    background: var(--bg-dark);
}
.upload-dropzone:hover,
.upload-dropzone.drag-over {
    border-color: #8B5CF6;
    background: rgba(139, 92, 246, 0.06);
}
.upload-dropzone i {
    font-size: 40px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 12px;
}
.upload-dropzone span {
    display: block;
    color: var(--text-muted);
    font-size: 15px;
}
.upload-hint {
    font-size: 12px !important;
    opacity: 0.6;
    margin-top: 6px;
}
.upload-file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--bg-dark);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}
.upload-file-info i {
    font-size: 24px;
    color: #8B5CF6;
}
.upload-file-details {
    flex: 1;
    min-width: 0;
}
.upload-file-name {
    display: block;
    color: white;
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.upload-file-size {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}
.upload-file-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 22px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.upload-file-remove:hover {
    color: #EF4444;
}
.upload-progress-bar {
    margin-top: 20px;
    height: 8px;
    border-radius: 10px;
    background: var(--bg-dark);
    overflow: hidden;
}
.upload-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 10px;
    background: linear-gradient(90deg, #8B5CF6, #6D28D9);
    transition: width 0.3s ease;
}
.upload-progress-text {
    display: block;
    text-align: right;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 6px;
}
.upload-submit {
    width: 100%;
    margin-top: 20px;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #8B5CF6, #6D28D9);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.upload-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35);
}
.upload-submit:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.upload-success {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: #22C55E;
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.upload-error {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #EF4444;
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
@media (max-width: 500px) {
    .upload-clip-card { padding: 24px 16px; }
    .upload-dropzone { padding: 32px 16px; }
    .upload-dropzone i { font-size: 32px; }
}

/* ===== LIGHTBOX ===== */
.lightbox-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.92);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    padding: 20px;
}
.lightbox-img {
    max-width: 95%;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 60px rgba(0,0,0,0.8);
    cursor: default;
}
.lightbox-close {
    position: absolute;
    top: 16px;
    right: 24px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    line-height: 1;
    z-index: 10;
}
.lightbox-close:hover {
    opacity: 1;
}

/* ===== POST DETAIL PAGE ===== */
.post-detail-page {
    max-width: 680px;
    margin: 32px auto;
    padding: 0 16px;
}
.post-detail-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
}
.post-detail-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 20px;
    transition: color 0.2s;
}
.post-detail-back:hover {
    color: var(--accent-purple);
}
.post-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}
.post-detail-author {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.post-detail-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}
.post-detail-author-info h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: white;
}
.post-detail-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}
.post-detail-content {
    font-size: 15px;
    line-height: 1.6;
    color: white;
    margin-bottom: 20px;
}
.post-detail-media {
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.post-detail-media img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    display: block;
    cursor: zoom-in;
}
.post-detail-stats {
    display: flex;
    gap: 24px;
    padding: 16px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-muted);
}
.post-detail-stats i {
    margin-right: 6px;
}

/* ===== DETAIL COMMENTS ===== */
.detail-comments-header {
    font-size: 16px;
    font-weight: 700;
    color: white;
    margin: 0 0 16px 0;
}
.detail-comment-form {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
}
.detail-comment-form input {
    flex: 1;
    min-width: 0;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    border-radius: 20px;
    color: white;
    font-size: 14px;
    outline: none;
}
.detail-comment-form input:focus {
    border-color: var(--accent-purple);
}
.detail-comment-form button {
    background: transparent;
    border: none;
    color: var(--accent-purple);
    cursor: pointer;
    padding: 8px;
    font-size: 18px;
}
.post-detail-comments {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
@media (max-width: 500px) {
    .post-detail-card { padding: 16px; }
}

/* ===== POST AUTHOR — Facebook style ===== */
.post-author {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}
.post-avatar-link {
    flex-shrink: 0;
    line-height: 0;
}
.author-info {
    min-width: 0;
}
.author-info h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}
.author-name-link {
    text-decoration: none;
    color: white;
    transition: color 0.2s;
}
.author-name-link:hover {
    color: var(--accent-purple);
    text-decoration: underline;
}
.post-meta-link {
    text-decoration: none;
    color: var(--text-muted);
    transition: color 0.2s;
}
.post-meta-link:hover {
    color: var(--accent-purple);
    text-decoration: underline;
}
.ph-game-tag {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    background: rgba(139, 92, 246, 0.2);
    color: #C4B5FD;
    text-decoration: none;
    line-height: 1.4;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    vertical-align: middle;
}
.ph-game-tag:hover {
    background: rgba(139, 92, 246, 0.4);
    color: white;
}
.ph-game-tag--general {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: default;
    pointer-events: none;
}
.ph-game-tag--general:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}
.repost-embed {
    margin-top: 10px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    background: rgba(255,255,255,0.02);
}
.repost-embed .repost-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    text-decoration: none;
    color: inherit;
}
.repost-embed .repost-header:hover .repost-name {
    text-decoration: underline;
}
.repost-embed .repost-header img {
    width: 24px; height: 24px; border-radius: 50%; object-fit: cover;
    flex-shrink: 0;
}
.repost-embed .repost-header .repost-name {
    font-size: 12px; font-weight: 600; color: white;
}
.repost-embed .repost-content {
    font-size: 13px; color: rgba(255,255,255,0.8);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.repost-embed .repost-content img,
.repost-embed .repost-content video {
    display: none;
}

/* ——— Modal Overlay (generic) ——— */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99990;
    backdrop-filter: blur(4px);
}
.modal-overlay.is-open { display: flex; }
.modal-box {
    background: var(--bg-card, #1e1e2e);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 90%;
    max-width: 420px;
    animation: modalSlideIn 0.25s ease;
    overflow: hidden;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}
.modal-header h3 { margin: 0; font-size: 16px; color: white; display: flex; align-items: center; gap: 8px; }
.modal-close {
    background: none; border: none; color: var(--text-muted);
    font-size: 24px; cursor: pointer; padding: 0; line-height: 1;
}
.modal-body { padding: 20px; }
.modal-body .form-group { margin-bottom: 16px; }
.modal-body .form-group label { display: block; margin-bottom: 6px; color: var(--text-muted); font-size: 13px; font-weight: 600; }
.modal-body .form-group select,
.modal-body .form-group textarea,
.modal-body .form-group .form-input {
    width: 100%; background: var(--bg-dark, #151522);
    border: 1px solid var(--border-color); border-radius: 8px;
    padding: 10px 12px; color: white; font-size: 14px; outline: none;
    box-sizing: border-box;
}
.modal-body .form-group select:focus,
.modal-body .form-group textarea:focus,
.modal-body .form-group .form-input:focus {
    border-color: var(--accent-purple);
}
.modal-footer {
    display: flex; gap: 8px; justify-content: flex-end;
    padding: 12px 20px; border-top: 1px solid var(--border-color);
}
.modal-footer .btn {
    padding: 8px 16px; border-radius: 8px; font-size: 13px;
    font-weight: 600; cursor: pointer; border: none; transition: all 0.2s;
}
.modal-footer .btn-secondary { background: var(--border-color); color: white; }
.modal-footer .btn-secondary:hover { background: rgba(255,255,255,0.15); }
.modal-footer .btn-danger { background: var(--accent-magenta, #e74c3c); color: white; }
.modal-footer .btn-danger:hover { opacity: 0.85; }
.confirm-message { color: var(--text-muted); font-size: 14px; line-height: 1.5; margin: 0; }

/* ——— Pin Badge ——— */
.pin-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.12);
    padding: 2px 10px;
    border-radius: 20px;
    margin-left: 8px;
    font-weight: 600;
}

/* ——— Toast Slide-in animation ——— */
@keyframes slideIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

/* ——— Post clickable area ——— */
.post-content,
.post-media {
    cursor: pointer;
    transition: opacity 0.15s;
}
.post-content:hover,
.post-media:hover {
    opacity: 0.92;
}
.post-content:active,
.post-media:active {
    opacity: 0.85;
}

/* ===== SHARE MENU ===== */
@keyframes shareMenuIn {
    from { opacity: 0; transform: scale(0.95) translateY(-4px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.share-menu button:active {
    transform: scale(0.97);
}

/* ===== LIKED STATE ===== */
button.liked i.fa-heart,
button.liked {
    color: #ef4444 !important;
}