/* --- LOUNGE ULTIMATE STYLE (COMPLETE & UNIFIED) --- */

:root {
    --bg-body: #09090b;
    --bg-card: #18181b;
    --bg-hover: #27272a;
    --border: #3f3f46;
    --primary: #5865F2;
    --accent: #F43F5E;
    --text-main: #f4f4f5;
    --text-dim: #a1a1aa;
    --recommend-color: #10b981;
    --support-color: #f59e0b;
    --header-height: 70px;
}

/* Global Reset */
* {
    box-sizing: border-box !important;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    line-height: 1.5;
}

/* --- LAYOUT GRID --- */
.lounge-layout {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 25px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 20px;
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
    align-items: start;
}

/* --- BASE CARD DESIGN (BORDER PROTECTION) --- */
.sidebar-section, 
.sidebar-widget, 
.create-post-box, 
.feed-post-card {
    background: var(--bg-card);
    border: 1px solid var(--border) !important;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: none;
    overflow: visible !important; /* Mantém as bordas visíveis */
    position: relative;
}

.widget-header, .section-header {
    padding: 15px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, rgba(255,255,255,0.03), transparent);
}

.widget-header h3, .section-header h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- SIDEBAR LEFT (PERFIL & FAVORITOS) --- */
.lounge-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.vault-mini-header {
    position: relative;
    background: linear-gradient(135deg, #1e1e24 0%, #0d0d0f 100%);
    border-radius: 12px;
    padding: 25px 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    text-align: center;
    box-shadow: none;
}

.edit-profile-btn-mini {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid transparent;
    color: var(--text-dim);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    z-index: 10;
}

.edit-profile-btn-mini:hover {
    background: var(--primary);
    color: white;
    border-color: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

.avatar-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    z-index: 1;
    border: 2px solid var(--primary);
}

.avatar-decoration {

    position: absolute;

    top: 50%; left: 50%;

    transform: translate(-50%, -50%);

    width: 135%; /* Molduras geralmente são maiores que o avatar */

    height: 135%;

    z-index: 2;

    pointer-events: none;

    display: none; /* Escondido por padrão para não mostrar ícone de erro */

    object-fit: contain;

}

.uic-info h3 {
    margin: 10px 0 0;
    font-size: 1.2rem;
    font-weight: 800;
    color: white;
}

.mini-badges-row {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 8px;
    min-height: 24px;
    flex-wrap: wrap;
}

.mini-badge-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.vault-counters {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 15px;
    margin-top: 15px;
}

.vc-item {
    display: flex;
    flex-direction: column;
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
}

/* Action Buttons Styling */
.expand-btn {
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #ffd700;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.75rem;
}

.expand-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: none;
    transform: rotate(15deg);
}

.close-media-btn {
    background: rgba(244, 63, 94, 0.1);
    border: 1px solid rgba(244, 63, 94, 0.2);
    color: var(--accent);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: 0.2s;
}

.close-media-btn:hover {
    background: var(--accent);
    color: white;
}

/* Favorites Cards */
#game-highlight-container, #anime-highlight-container {
    padding: 12px;
}

.pinned-card {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9; /* Força formato de banner */
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    background: #000;
}

.pinned-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: none;
}

.pinned-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pinned-overlay {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 20%, transparent);
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.pinned-title {
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    text-shadow: 0 2px 4px black;
    max-width: 80%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pinned-badge {
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    width: 24px; height: 24px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}

.empty-state-mini {
    text-align: center;
    padding: 25px 15px;
    color: var(--text-dim);
    font-size: 0.8rem;
    border: 1px dashed var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.empty-state-mini:hover {
    border-color: var(--primary);
    background: rgba(88, 101, 242, 0.05);
    color: white;
}

/* --- CENTER FEED --- */
.lounge-feed {
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
    padding: 0 10px;
}

/* Create Post Box */
.cp-tabs {
    display: flex;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid var(--border);
}

.cp-tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: 0.2s;
    border-bottom: 2px solid transparent;
}

.cp-tab:hover { color: white; background: rgba(255,255,255,0.03); }
.cp-tab.active { color: white; border-bottom-color: var(--primary); background: rgba(255,255,255,0.02); }
#tab-recommendation.active { border-bottom-color: var(--recommend-color); color: var(--recommend-color); }
#tab-support.active { border-bottom-color: var(--support-color); color: var(--support-color); }

.cp-body-wrapper { padding: 20px; }
.cp-input-area { display: flex; gap: 15px; }
.cp-avatar { width: 45px; height: 45px; border-radius: 50%; border: 1px solid var(--border); }
.cp-input-area textarea {
    flex: 1; background: transparent; border: none; color: white;
    font-family: inherit; font-size: 1rem; resize: none; min-height: 60px; outline: none;
}

.cp-context-row {
    margin-top: 15px; padding: 10px; background: rgba(255,255,255,0.03);
    border-radius: 8px; display: flex; align-items: center; gap: 10px;
}

/* Sub Options (New) */
.cp-sub-options {
    margin-top: 15px;
    padding: 0 5px;
}

.cp-sub-options label {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    display: block;
    margin-bottom: 8px;
}

.sub-opt-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sub-opt-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    display: flex; align-items: center; gap: 6px;
}

.sub-opt-btn:hover { background: rgba(255,255,255,0.1); color: white; }
.sub-opt-btn.active { 
    background: var(--primary); 
    color: white; 
    border-color: var(--primary);
}

/* Post Badges Colors (Feed) */
.tag-platinum { background: rgba(255, 215, 0, 0.2); color: #ffd700; border: 1px solid rgba(255, 215, 0, 0.3); }
.tag-playing { background: rgba(59, 130, 246, 0.2); color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.3); }
.tag-watching { background: rgba(168, 85, 247, 0.2); color: #a855f7; border: 1px solid rgba(168, 85, 247, 0.3); }
.tag-goty { background: rgba(255, 215, 0, 0.2); color: #ffd700; border: 1px solid #ffd700; box-shadow: none; }
.tag-build { background: rgba(88, 101, 242, 0.2); color: #5865F2; border: 1px solid rgba(88, 101, 242, 0.3); }
.tag-marathon { background: rgba(167, 139, 250, 0.2); color: #a78bfa; border: 1px solid rgba(167, 139, 250, 0.3); }
.tag-waifu { background: rgba(244, 63, 94, 0.2); color: #F43F5E; border: 1px solid rgba(244, 63, 94, 0.3); }
.tag-ending { background: rgba(255, 255, 255, 0.1); color: #fff; border: 1px solid rgba(255, 255, 255, 0.3); }
.tag-easteregg { background: rgba(0, 217, 255, 0.2); color: #00d9ff; border: 1px solid rgba(0, 217, 255, 0.3); }
.tag-dropped { background: rgba(244, 63, 94, 0.2); color: var(--accent); border: 1px solid rgba(244, 63, 94, 0.3); }

/* Media Display in Feed */
.post-media-content {
    margin: 15px 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #000;
}

.post-media-content img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    display: block;
}

.post-media-content iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
    display: block;
}

.cp-game-selector {
    display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,0.3);
    padding: 6px 14px; border-radius: 20px; font-size: 0.85rem;
    color: var(--primary); cursor: pointer; border: 1px dashed var(--border);
}

/* Poll Creation */
.cp-poll-row {
    margin-top: 15px; padding: 15px; background: rgba(0,0,0,0.2);
    border-radius: 10px; border: 1px solid var(--border);
}
.poll-inputs { display: flex; flex-direction: column; gap: 10px; }
.poll-opt {
    background: #000; border: 1px solid var(--border);
    padding: 10px 12px; border-radius: 8px; color: white; font-size: 0.9rem;
}
.add-opt-btn {
    background: transparent; border: 1px dashed var(--border);
    color: var(--text-dim); padding: 10px; border-radius: 8px;
    cursor: pointer; font-size: 0.8rem;
}

.cp-actions {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 20px; border-top: 1px solid var(--border); background: rgba(0,0,0,0.15);
}
.cp-action-btn { background: transparent; border: none; color: var(--text-dim); cursor: pointer; font-size: 1.1rem; transition: 0.2s; }
.cp-action-btn:hover { color: white; }
.cp-submit-btn {
    background: var(--primary); color: white; border: none;
    padding: 8px 25px; border-radius: 25px; font-weight: 700; cursor: pointer;
    transition: 0.2s;
}
.cp-submit-btn:hover { filter: brightness(1.1); transform: scale(1.05); }

/* Feed Filters */
.feed-filters { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 10px; }
.filter-group { display: flex; gap: 8px; }
.feed-filter {
    background: rgba(255,255,255,0.05); 
    border: 1px solid var(--border);
    color: var(--text-dim); 
    padding: 8px 20px; 
    border-radius: 20px;
    cursor: pointer; 
    font-weight: 600; 
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.feed-filter:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.feed-filter.active { 
    background: var(--primary); 
    color: white; 
    border-color: var(--primary);
    transform: scale(1.05);
    opacity: 1 !important;
}
.new-circle-btn {
    background: transparent; border: 1px dashed var(--border);
    color: var(--text-dim); padding: 8px 15px; border-radius: 20px;
    font-size: 0.8rem; cursor: pointer;
}

/* Feed Post Cards */
.feed-post-card {
    padding: 20px;
    border-left: 4px solid transparent !important;
    animation: fadeIn 0.4s ease-out;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes highlight-pulse { 
    0% { background-color: rgba(88, 101, 242, 0.2); } 
    100% { background-color: var(--bg-card); } 
}

.post-type-recommendation { border-left-color: var(--recommend-color) !important; }
.post-type-support { border-left-color: var(--support-color) !important; }

.post-meta { display: flex; justify-content: space-between; margin-bottom: 15px; }
.post-author { display: flex; align-items: center; cursor: pointer; }

/* Wrapper para avatar + moldura */
.post-avatar-wrapper {
    position: relative;
    width: 42px;
    height: 42px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.post-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--border);
    object-fit: cover;
    z-index: 1;
}

.post-avatar-deco {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 155%; /* Aumentado para cobrir bem as bordas */
    height: 155%;
    z-index: 2;
    pointer-events: none;
    object-fit: contain;
}

/* Filtros Ativos */
.feed-filter.active { 
    background: var(--primary) !important; 
    color: white !important; 
    border-color: var(--primary) !important;
    transform: scale(1.05);
    opacity: 1 !important;
}

.pa-info h5 { margin: 0; color: white; font-size: 1rem; }
.pa-info span { font-size: 0.8rem; color: var(--text-dim); }

.post-tag {
    font-size: 0.65rem; padding: 3px 8px; border-radius: 4px; margin-left: 8px;
    text-transform: uppercase; font-weight: 800; letter-spacing: 0.5px;
}
.tag-recommend { background: rgba(16, 185, 129, 0.15); color: var(--recommend-color); }
.tag-support { background: rgba(245, 158, 11, 0.15); color: var(--support-color); }

.post-text { color: #e4e4e7; font-size: 0.95rem; line-height: 1.6; margin-bottom: 15px; word-break: break-word; }

.vault-attachment {
    background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: 10px;
    display: flex; gap: 15px; padding: 12px; margin-bottom: 15px;
}
.vault-attachment img { width: 55px; height: 80px; object-fit: cover; border-radius: 6px; }
.va-info h6 { font-size: 1rem; color: white; margin: 0 0 4px 0; }
.va-info p { font-size: 0.8rem; color: var(--text-dim); margin: 0; }

.post-interactions { display: flex; gap: 20px; border-top: 1px solid var(--border); padding-top: 15px; }
/* Efeitos de Interação Premium */
.pi-btn {
    background: rgba(255,255,255,0.03); 
    border: 1px solid transparent; 
    color: var(--text-dim);
    cursor: pointer; 
    font-size: 0.9rem; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 8px 16px; 
    border-radius: 100px;
}

.pi-btn:hover { 
    background: rgba(255,255,255,0.08); 
    color: white;
    transform: translateY(-2px);
}

.pi-btn i { transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

/* Like Ativo (Roxo/Rosa Supremacy) */
.pi-btn.active-like { 
    color: #fff !important; 
    background: rgba(244, 63, 94, 0.2);
    border-color: rgba(244, 63, 94, 0.4);
    box-shadow: none;
}
.pi-btn.active-like i { 
    color: #F43F5E;
    animation: heart-beat 0.6s infinite alternate;
}

/* Dislike Ativo (Slate/Ice) */
.pi-btn.active-dislike { 
    color: #fff !important; 
    background: rgba(148, 163, 184, 0.2);
    border-color: rgba(148, 163, 184, 0.4);
    box-shadow: none;
}
.pi-btn.active-dislike i { 
    color: #94a3b8;
    transform: translateY(2px);
}

@keyframes heart-beat {
    from { transform: scale(1); }
    to { transform: scale(1.2); }
}

@keyframes click-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* Botão de Presente (Dourado) */
.tip-btn:hover {
    color: #F59E0B !important;
    background: rgba(245, 158, 11, 0.1) !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
}
.tip-btn i { color: #F59E0B; }

/* --- RIGHT SIDEBAR (TRENDS) --- */
.sidebar-widget { padding: 0; } /* Reset for list items */

.hype-list { list-style: none; padding: 0; margin: 0; }
.hype-item {
    display: flex; align-items: center; gap: 15px; padding: 15px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}
.hype-item:hover { background: rgba(255,255,255,0.02); }
.hype-date {
    font-size: 0.7rem; font-weight: 800; color: var(--accent);
    background: rgba(244, 63, 94, 0.1); padding: 6px 8px; border-radius: 6px;
    text-align: center; min-width: 50px;
}
.hype-info strong { display: block; color: white; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.hype-info span { font-size: 0.75rem; color: var(--text-dim); }

.widget-footer-link {
    width: 100%; padding: 12px; background: rgba(255,255,255,0.02);
    border: none; border-top: 1px solid var(--border);
    color: var(--text-dim); font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; cursor: pointer; display: block; text-align: center;
}
.widget-footer-link:hover { background: var(--primary); color: white; }

.circle-item { display: flex; align-items: center; gap: 12px; padding: 15px; border-bottom: 1px solid var(--border); }
.circle-item:last-child { border-bottom: none; }
.circle-item img { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); }
.circle-info strong { display: block; font-size: 0.9rem; color: white; }
.circle-info span { font-size: 0.75rem; color: var(--text-dim); }
.join-btn {
    margin-left: auto; background: transparent; border: 1px solid var(--border);
    color: white; font-size: 0.75rem; padding: 5px 12px; border-radius: 6px; cursor: pointer;
}
.join-btn:hover { background: white; color: black; }

.academy-spotlight .spotlight-content { padding: 25px; text-align: center; }
.spot-tag { font-size: 0.65rem; text-transform: uppercase; color: var(--primary); letter-spacing: 1.5px; font-weight: 800; display: block; margin-bottom: 10px; }
.spot-btn {
    background: var(--primary); color: white; border: none; width: 100%;
    padding: 10px; border-radius: 8px; font-size: 0.85rem; font-weight: 700; cursor: pointer;
}

/* --- RESPONSIVIDADE --- */
@media (max-width: 1100px) {
    .lounge-layout { grid-template-columns: 250px 1fr; }
    .sidebar-right { display: none; }
}

@media (max-width: 900px) {
    .lounge-layout { 
        display: flex; 
        flex-direction: column; 
        padding: 15px 10px; /* Padding reduzido nas laterais */
        gap: 20px; 
        width: 100%; 
        max-width: 100%; /* Garante que não ultrapasse */
        margin-top: 70px; 
        box-sizing: border-box;
    }
    
    .lounge-sidebar { 
        position: static !important; 
        width: 100% !important; 
        overflow: visible !important; 
    }
    
    .sidebar-left { order: 1; }
    .sidebar-right { order: 2; display: block !important; }
    
    .lounge-feed { 
        order: 3; 
        padding: 0; /* Remove padding extra */
        width: 100%; 
        max-width: 100%; 
    }
    
    /* Simplificação drástica para ocupar largura total disponível */
    .sidebar-section, .sidebar-widget, .create-post-box, .feed-post-card {
        width: 100% !important; 
        margin-left: 0 !important; 
        margin-right: 0 !important;
        border-radius: 12px; /* Mantém consistência */
        padding: 15px !important; /* Reduz padding interno para ganhar espaço */
    }

    /* Ajuste crítico para botões de interação não vazarem */
    .post-interactions {
        flex-wrap: wrap !important;
        gap: 10px !important;
        justify-content: space-between !important;
    }

    .pi-btn {
        flex: 1 1 auto; /* Botões crescem para preencher espaço */
        justify-content: center;
        padding: 8px 10px !important; /* Padding menor */
        font-size: 0.8rem !important;
        white-space: nowrap;
    }
}

/* --- DYNAMIC MODALS --- */
.modal {
    display: none; position: fixed !important; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 99999 !important; background: rgba(0,0,0,0.9); align-items: center; justify-content: center;
    backdrop-filter: blur(10px);
}

.modal.active {
    display: flex !important;
}

.vault-modal-content, .profile-card, .details-card {
    background: #121214; width: 95%; max-width: 600px;
    border-radius: 20px; border: 1px solid var(--border); position: relative;
    box-shadow: 0 0 50px black; animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 30px;
}

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

/* Botão Fechar Modal */
.close-modal-btn, .close-profile-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    font-size: 1.5rem;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    line-height: 1;
    z-index: 100;
}

.close-modal-btn:hover, .close-profile-btn:hover {
    background: var(--accent);
    color: white;
    transform: rotate(90deg);
}

/* Abas do Seletor (Vault Tabs) */
.vs-tab {
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 10px 20px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.3s;
    border-bottom: 2px solid transparent;
    letter-spacing: 1px;
}

.vs-tab:hover {
    color: white;
    background: rgba(255,255,255,0.03);
}

.vs-tab.active {
    color: var(--primary) !important;
    border-bottom-color: var(--primary);
    opacity: 1 !important;
}

/* --- POLL DISPLAY (ENHANCED) --- */
.poll-display {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.poll-option-row {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 18px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s ease;
}

.poll-option-row:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

.poll-bar {
    position: absolute;
    top: 0; left: 0; 
    height: 100%;
    background: linear-gradient(90deg, rgba(88, 101, 242, 0.3), rgba(88, 101, 242, 0.1));
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 0;
    border-right: 2px solid var(--primary);
}

.poll-label {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
}

.poll-label span:last-child {
    font-size: 0.8rem;
    color: var(--text-dim);
    background: rgba(0,0,0,0.3);
    padding: 2px 8px;
    border-radius: 20px;
}

/* --- COMMENTS SECTION --- */
.post-comments-section {
    margin-top: 15px;
    border-top: 1px solid var(--border);
    padding-top: 15px;
    background: rgba(0,0,0,0.1);
    border-radius: 0 0 12px 12px;
}

.comments-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 0 10px;
}

.comment-item {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    position: relative;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
}

.comment-body {
    background: rgba(255,255,255,0.05);
    padding: 10px 15px;
    border-radius: 12px;
    flex: 1;
}

.comment-meta {
    font-size: 0.75rem;
    margin-bottom: 4px;
}

.comment-meta strong { color: white; margin-right: 8px; }
.comment-meta span { color: var(--text-dim); }

.comment-text {
    font-size: 0.85rem;
    color: #e4e4e7;
    word-break: break-word;
}

.comment-item.is-solution .comment-body {
    border: 1px solid var(--support-color);
    background: rgba(245, 158, 11, 0.05);
}

.solution-badge {
    position: absolute;
    top: -5px; right: 10px;
    background: var(--support-color);
    color: black;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.mark-solution-btn {
    position: absolute;
    top: 5px; right: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.65rem;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.2s;
}

.mark-solution-btn:hover {
    background: var(--support-color);
    color: black;
    border-color: var(--support-color);
}

.comment-input-area {
    display: flex;
    gap: 10px;
    padding: 15px;
    border-top: 1px solid var(--border);
}

.comment-input {
    flex: 1;
    background: #000;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    color: white;
    font-size: 0.85rem;
}

.send-comment-btn {
    background: var(--primary);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.send-comment-btn:hover { transform: scale(1.1); }

/* Support Specific */
.sub-opt-btn-support {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    display: flex; align-items: center; gap: 6px;
}

.sub-opt-btn-support:hover { background: rgba(255,255,255,0.1); color: white; }
.sub-opt-btn-support.active { 
    background: var(--support-color); 
    color: black; 
    border-color: var(--support-color);
}

.post-resolved { border-left-color: #10b981 !important; }
.tag-resolved { background: rgba(16, 185, 129, 0.2); color: #10b981; border: 1px solid #10b981; }

#edit-profile-modal-lounge {
    z-index: 100000 !important;
}

/* --- LIBRARY PROFILE STYLES --- */

/* Modal Expandido */
.profile-modal-wide {
    width: 95%;
    max-width: 1100px; /* Mais largo para caber a biblioteca */
    height: 90vh; /* Altura máxima */
    display: flex;
    flex-direction: column;
    padding: 0 !important; /* Remove padding padrão */
    overflow: hidden; /* Scroll interno */
}

.profile-header-section {
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
}

/* Tabs do Perfil */
.profile-nav-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 0 20px;
    border-bottom: 1px solid var(--border);
    background: rgba(0,0,0,0.2);
}

.p-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 15px 20px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: 0.2s;
}

.p-tab-btn:hover { color: white; }
.p-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Conteúdo das Tabs */
.profile-tab-content {
    display: none;
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.profile-tab-content.active {
    display: block;
}

/* Library Grid */
.library-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.lib-filters {
    display: flex;
    gap: 10px;
}

.lib-filter-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
}

.lib-filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}

.lib-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border);
    transition: 0.2s;
    cursor: pointer;
}

.lib-card:hover {
    transform: translateY(-5px);
    box-shadow: none;
    border-color: var(--primary);
}

.lib-poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
}

.lib-info {
    padding: 10px;
    background: rgba(0,0,0,0.8);
    position: absolute;
    bottom: 0; left: 0; width: 100%;
}

.lib-title {
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.lib-status-badge {
    position: absolute;
    top: 5px; right: 5px;
    font-size: 0.65rem;
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 2px 5px black;
}

.status-completed { background: #10b981; color: black; }
.status-playing { background: #3b82f6; color: white; }
.status-watching { background: #8b5cf6; color: white; }
.status-dropped { background: #ef4444; color: white; }
.status-plan { background: #71717a; color: white; }

.lib-rating {
    color: #fbbf24;
    font-size: 0.75rem;
}

/* --- INTERNAL SEARCH STYLES --- */
.internal-search-header {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
}

.internal-search-input {
    flex: 1;
    background: #09090b;
    border: 1px solid var(--border);
    padding: 12px 15px;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    outline: none;
}

.internal-search-input:focus {
    border-color: var(--primary);
}

.back-btn-lib {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
    width: 40px; height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    transition: 0.2s;
}

.back-btn-lib:hover {
    background: var(--primary);
    color: white;
}

.internal-search-results-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.internal-result-row {
    display: flex;
    gap: 15px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: 0.2s;
    align-items: center;
}

.internal-result-row:hover {
    background: rgba(255,255,255,0.08);
    border-color: var(--primary);
}

.internal-result-row img {
    width: 50px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
}

.internal-result-info h4 {
    margin: 0 0 5px 0;
    font-size: 0.95rem;
    color: white;
}

.internal-result-info span {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* Config Internal */
.config-layout {
    display: flex;
    gap: 25px;
    max-width: 600px;
    margin: 0 auto;
    background: rgba(0,0,0,0.3);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.config-poster {
    width: 140px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: none;
}

.config-fields {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ========================================================================== */
/*                     MODAL DE CONFIGURAÇÃO (REDESIGN - PORTED)              */
/* ========================================================================== */

.config-tab-wrapper {
    position: relative;
    overflow: hidden;
    height: 100%;
    /* display: flex; REMOVED - Causes visibility bug */
    flex-direction: column;
}

/* Fix Visibility: Only flex when active */
.profile-tab-content.config-tab-wrapper.active {
    display: flex;
}

/* Background Blur Effect */
.config-backdrop-layer {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(30px) brightness(0.3);
    z-index: 0;
    opacity: 0.5;
    transition: background-image 0.5s ease;
}

.config-content-container {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 30px;
    padding: 20px 40px; /* Increased side padding */
    flex: 1; /* Take remaining height */
    min-height: 0; /* Allow scrolling inside flex item */
    overflow-y: auto;
    align-items: flex-start; /* Prevent stretching items weirdly */
}

/* Poster Column */
.poster-column {
    flex-shrink: 0;
    width: 220px; /* Slightly wider */
    display: flex;
    flex-direction: column;
    align-items: center;
    position: sticky; /* Keep poster visible if form scrolls? Optional */
    top: 0;
}

.modern-poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: none;
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.3s ease;
}

.modern-poster:hover {
    transform: scale(1.02);
}

/* Details Column */
.details-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%; /* Ensure it takes full width */
    max-width: 800px; /* Prevent too wide on huge screens */
}

.config-title-header {
    font-size: 1.8rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    line-height: 1.2;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim); /* Adapted var */
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
}

.modern-select, .modern-textarea {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    width: 100%;
    font-family: 'Inter', sans-serif; /* Fixed font family */
}

.modern-select:focus, .modern-textarea:focus {
    border-color: var(--primary); /* Adapted var */
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 15px rgba(88, 101, 242, 0.2);
    outline: none;
}

.modern-textarea {
    resize: none;
    height: 120px;
    line-height: 1.5;
}

/* Star Rating Moderno */
.star-rating-modern {
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.4);
    padding: 10px 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: fit-content;
    cursor: pointer;
}

.star-rating-modern i {
    font-size: 1.4rem;
    color: #444; /* Inactive color */
    transition: transform 0.2s, color 0.2s;
}

.star-rating-modern:hover i {
    transform: scale(1.1);
}

/* Save Button */
.save-action-btn {
    background: linear-gradient(135deg, var(--primary) 0%, #4752c4 100%); /* Adapted var */
    color: white;
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.3s;
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 5px 20px rgba(88, 101, 242, 0.4);
}

.save-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(88, 101, 242, 0.6);
    filter: brightness(1.1);
}

/* Responsividade do Modal Interno */
@media (max-width: 768px) {
    .config-content-container {
        flex-direction: column;
        align-items: center;
    }
    
    .poster-column {
        width: 140px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .config-title-header {
        text-align: center;
        font-size: 1.5rem;
    }
}

/* ========================================================================== */
/*                     PROFILE MODAL RESPONSIVE FIXES                         */
/* ========================================================================== */

/* Default Desktop Styles (matching previous inline logic) */
.profile-banner-container {
    height: 240px;
    position: relative;
    background-size: cover;
    background-position: center;
}

.profile-info-container {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 20px;
    padding: 0 20px;
    margin-top: -60px;
    position: relative;
    z-index: 10;
    width: 100%;
}

.profile-avatar-container {
    width: 110px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.profile-text-info {
    flex: 1;
    min-width: 250px;
    padding-bottom: 10px;
    text-align: left;
}

/* Mobile & Small Screen Adjustments (Identical to Community Page) */
@media (max-width: 768px) {
    /* Ajuste do modal principal para manter proporção da comunidade */
    .profile-modal-wide {
        width: 95% !important;
        height: 90vh !important;
        max-height: 90vh !important;
        border-radius: 20px !important;
        max-width: 95% !important;
    }

    /* Reduz altura do banner */
    .profile-banner-container {
        height: 150px !important;
    }

    /* Centraliza info do perfil */
    .profile-info-container {
        flex-direction: column;
        align-items: center !important;
        margin-top: -50px !important;
        gap: 10px !important;
        text-align: center;
    }

    /* Ajuste do avatar */
    .profile-avatar-container {
        width: 90px !important;
        height: 90px !important;
    }

    /* Container de texto */
    .profile-text-info {
        width: 100%;
        text-align: center !important;
        padding-bottom: 0;
        min-width: 0 !important;
    }

    /* Título do usuário */
    .profile-text-info h1 {
        font-size: 1.8rem !important;
        justify-content: center;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
    }

    /* Botões e Badges */
    .profile-actions-row {
        justify-content: center !important;
        flex-direction: column !important;
        gap: 15px !important;
    }

    .profile-buttons-group {
        margin-left: 0 !important;
        justify-content: center !important;
        width: 100%;
    }

    /* Abas de navegação */
    .profile-nav-tabs {
        padding: 0 10px !important;
        gap: 10px !important;
    }
    
    .p-tab-btn {
        padding: 12px 10px !important;
        font-size: 0.8rem !important;
        flex: 1;
    }

    /* Ajuste de cards de highlights */
    #ptab-overview > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important; /* Stack vertical */
    }
    
    /* Stats Box fix */
    #ptab-overview > div[style*="display:flex"][style*="background:#050505"] {
        flex-direction: row; /* Keep row but adjust size if needed, or wrap */
        gap: 5px;
    }

    /* Ajuste do grid de bibliotecas */
    .library-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)) !important;
    }
    
    /* Config Modal Interno Mobile */
    .config-content-container {
        padding: 15px !important;
    }
    
    .poster-column {
        width: 100% !important;
    }
    
    .modern-poster {
        width: 140px !important;
    }
}

/* --- BUMPHUB MINI LIST WIDGET --- */
.bumphub-mini-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bumphub-mini-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    transition: all 0.2s ease;
    cursor: pointer;
}

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

.bumphub-mini-item:hover {
    background: rgba(88, 101, 242, 0.05);
    transform: translateX(3px);
}

.bumphub-mini-avatar-wrapper {
    position: relative;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
}

.bumphub-mini-avatar-wrapper img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    border: 1px solid var(--border);
    object-fit: cover;
}

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

.bumphub-mini-name {
    display: block;
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bumphub-mini-meta {
    font-size: 0.7rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.bumphub-mini-rating {
    color: #ffd700;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 2px;
}

@keyframes float-bump {
    0% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
    100% { transform: translateY(0); }
}

.animate-bump {
    animation: float-bump 2s infinite ease-in-out;
}

/* --- DISCORD EXPIRED MEDIA FALLBACK --- */
.discord-expired-media {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(88, 101, 242, 0.05);
    border: 1px dashed rgba(88, 101, 242, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin: 10px 0;
    transition: all 0.3s ease;
}

.discord-expired-media:hover {
    background: rgba(88, 101, 242, 0.08);
    border-color: rgba(88, 101, 242, 0.5);
    box-shadow: none;
}

.dem-icon {
    font-size: 2.5rem;
    color: #5865F2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(88, 101, 242, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dem-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.dem-content h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
}

.dem-content p {
    margin: 0;
    font-size: 0.85rem;
    color: #e4e4e7;
}

.dem-tip {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 4px;
    font-style: italic;
}

@media (max-width: 600px) {
    .discord-expired-media {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 15px;
    }
    .dem-icon {
        width: 45px;
        height: 45px;
        font-size: 1.8rem;
    }
}