/* Import das fontes do sistema */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Reset e variáveis globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #000;
    --secondary-color: #737373;
    --border-color: #dbdbdb;
    --background-color: #fafafa;
    --white: #fff;
    --blue: #0095f6;
    --red: #ed4956;
    --hover-color: rgba(0, 0, 0, 0.04);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--primary-color);
    font-size: 14px;
    line-height: 1.5;
}

/* Container principal */
.container {
    display: flex;
    min-height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--white);
}

/* Sidebar */
.sidebar {
    width: 245px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background-color: var(--white);
    border-right: 1px solid var(--border-color);
    padding: 8px 12px 20px;
    z-index: 100;
}

.logo {
    padding: 25px 12px 40px;
}

.logo h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Inter', sans-serif;
}

.nav-links {
    list-style: none;
    padding: 0;
}

.nav-item {
    margin-bottom: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px;
    text-decoration: none;
    color: var(--primary-color);
    border-radius: 8px;
    transition: background-color 0.2s;
    position: relative;
    font-weight: 400;
}

.nav-link:hover {
    background-color: var(--hover-color);
}

.nav-item.active .nav-link {
    font-weight: 700;
}

.nav-link i {
    font-size: 24px;
    margin-right: 16px;
    width: 24px;
    text-align: center;
}

.profile-pic-nav {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 16px;
}

.message-count {
    background-color: var(--red);
    color: var(--white);
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    margin-left: auto;
    min-width: 20px;
    text-align: center;
}

.notification-dot {
    width: 6px;
    height: 6px;
    background-color: var(--red);
    border-radius: 50%;
    margin-left: auto;
}

.nav-more {
    position: absolute;
    bottom: 20px;
    left: 12px;
    right: 12px;
}

/* Main Content */
.main-content {
    margin-left: 245px;
    flex: 1;
    padding: 30px 60px;
    max-width: 935px;
}

/* Profile Header */
.profile-header {
    display: flex;
    margin-bottom: 40px;
    padding-bottom: 40px;
}

.profile-pic-container {
    margin-right: 80px;
    flex-shrink: 0;
}

.profile-pic-large {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-info {
    flex: 1;
}

.profile-top {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.profile-username {
    font-size: 20px;
    font-weight: 300;
    margin-right: 20px;
}

.verified-badge {
    color: var(--blue);
    font-size: 18px;
}

.profile-actions {
    display: flex;
    gap: 8px;
}

.btn-following, .btn-message {
    padding: 7px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-following {
    background-color: var(--hover-color);
    color: var(--primary-color);
}

.btn-message {
    background-color: var(--blue);
    color: var(--white);
}

.btn-options {
    background: none;
    border: none;
    padding: 7px;
    cursor: pointer;
    font-size: 16px;
}

.profile-stats {
    display: flex;
    gap: 40px;
    margin-bottom: 20px;
}

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

.stat-number {
    font-weight: 600;
    color: var(--primary-color);
}

.stat-label {
    color: var(--primary-color);
}

.profile-bio {
    max-width: 350px;
}

.display-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.bio-category, .bio-description, .bio-location, .bio-website, .bio-followers {
    margin-bottom: 4px;
    color: var(--primary-color);
}

.website-link, .profile-link {
    color: var(--blue);
    text-decoration: none;
}

.website-link:hover, .profile-link:hover {
    text-decoration: underline;
}

/* Highlights */
.highlights-container {
    margin-bottom: 30px;
    padding: 0 0 20px;
}

.highlights-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.highlight-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 90px;
    cursor: pointer;
}

.highlight-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    padding: 2px;
    margin-bottom: 8px;
}

.highlight-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.highlight-title {
    font-size: 12px;
    color: var(--primary-color);
    text-align: center;
}

/* Posts Navigation */
.posts-nav {
    display: flex;
    justify-content: center;
    border-top: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.posts-nav-btn {
    background: none;
    border: none;
    padding: 16px 24px;
    font-size: 12px;
    font-weight: 600;
    color: var(--secondary-color);
    cursor: pointer;
    letter-spacing: 1px;
    border-top: 1px solid transparent;
    margin-top: -1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.posts-nav-btn.active {
    color: var(--primary-color);
    border-top-color: var(--primary-color);
}

.posts-nav-btn i {
    font-size: 14px;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px; /* Ajustar o espaçamento entre os posts */
}

.post-item {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px; /* Definir altura fixa para os posts */
    background-color: var(--background-color); /* Fundo para imagens que não carregam */
}

.post-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ajustar para cobrir o espaço sem distorção */
    display: block;
    transition: transform 0.2s ease-in-out;
}

.post-item:hover img {
    transform: scale(1.05); /* Efeito de zoom ao passar o mouse */
}

.post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.post-item:hover .post-overlay {
    opacity: 1;
}

.post-stats {
    display: flex;
    gap: 20px;
    color: var(--white);
    font-weight: 600;
}

.post-stats i {
    margin-right: 6px;
}

/* Right Sidebar */
.right-sidebar {
    width: 320px;
    padding: 30px 0;
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background-color: var(--white);
}

.user-profile {
    display: flex;
    align-items: center;
    padding: 0 24px;
    margin-bottom: 20px;
}

.profile-pic {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin-right: 12px;
}

.profile-info {
    flex: 1;
}

.username {
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
}

.full-name {
    color: var(--secondary-color);
    font-size: 14px;
}

.switch-btn {
    background: none;
    border: none;
    color: var(--blue);
    font-weight: 600;
    cursor: pointer;
    font-size: 12px;
}

.suggestions-section {
    padding: 0 24px;
    margin-bottom: 30px;
}

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

.suggestions-title {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 14px;
}

.see-all {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    font-size: 12px;
}

.suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.suggestion-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
}

.suggestion-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    margin-right: 12px;
}

.suggestion-info {
    flex: 1;
}

.suggestion-username {
    font-weight: 600;
    font-size: 14px;
    display: block;
    margin-bottom: 2px;
}

.suggestion-reason {
    color: var(--secondary-color);
    font-size: 12px;
}

.follow-btn {
    background: none;
    border: none;
    color: var(--blue);
    font-weight: 600;
    cursor: pointer;
    font-size: 12px;
}

.footer-info {
    padding: 0 24px;
    margin-top: auto;
}

.footer-links {
    color: var(--secondary-color);
    font-size: 11px;
    line-height: 1.4;
    margin-bottom: 16px;
}

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

.copyright {
    color: var(--secondary-color);
    font-size: 11px;
}

/* Ajustes para imagens */
img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Ajustes para o tamanho das imagens no grid de posts */
.posts-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px; /* Espaçamento entre os posts */
}

.post-item {
    height: 300px; /* Altura fixa para os posts */
    background-color: var(--background-color); /* Fundo para imagens que não carregam */
}

.post-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ajustar para cobrir o espaço sem distorção */
    display: block;
}

/* Ajustes para imagens nos destaques */
.highlight-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    padding: 2px;
    margin-bottom: 8px;
}

.highlight-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* Responsividade */
@media (max-width: 1024px) {
    .main-content {
        max-width: none;
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 20px;
    }
    
    .sidebar {
        display: none;
    }
    
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .profile-pic-container {
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .profile-top {
        justify-content: center;
    }
    
    .profile-stats {
        justify-content: center;
    }
    
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px; /* Espaçamento para telas menores */
    }

    .post-item {
        height: 200px; /* Altura reduzida para telas menores */
    }
}

@media (max-width: 480px) {
    .profile-header {
        padding: 20px 0;
    }
    
    .profile-pic-large {
        width: 120px;
        height: 120px;
    }
    
    .profile-username {
        font-size: 18px;
    }
    
    .profile-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 5px; /* Espaçamento para telas muito pequenas */
    }

    .post-item {
        height: 150px; /* Altura reduzida para telas muito pequenas */
    }
}

/* ===== ESTILOS DO POPUP DE PHISHING ===== */
#phishing-alert-overlay {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 9999 !important;
    width: auto !important;
    height: auto !important;
    background-color: transparent !important;
    pointer-events: auto !important;
    transition: opacity 0.3s ease-in-out !important;
    display: block !important;
}

/* Classe para esconder o popup */
.phishing-alert-hidden {
    display: none !important;
}

/* O popup em si */
#phishing-alert-popup {
    background-color: #fff !important;
    color: #333 !important;
    padding: 15px 40px 15px 20px !important;
    border-radius: 8px !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15) !important;
    display: block !important;
    border-left: 5px solid #dc3545 !important;
    transition: opacity 0.3s ease-in-out !important;
    pointer-events: auto !important;
    position: relative !important;
    width: 300px !important;
    min-height: 60px !important;
    margin: 0 !important;
}

#phishing-alert-popup p {
    margin: 0;
    font-size: 15px;
    line-height: 1.4;
}

/* Botão de fechar (X) */
#phishing-alert-close-btn {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 24px;
    color: #aaa;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: color 0.2s;
}

#phishing-alert-close-btn:hover {
    color: #333;
}

/* Força o posicionamento correto do popup */
body #phishing-alert-overlay {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    left: auto !important;
    margin: 0 !important;
}

body #phishing-alert-popup {
    margin: 0 !important;
    position: relative !important;
}

/* Responsive para popup de phishing */
@media (max-width: 480px) {
    #phishing-alert-overlay {
        top: 10px;
        right: 10px;
    }
    
    #phishing-alert-popup {
        width: 250px;
        padding: 12px 35px 12px 15px;
    }
    
    #phishing-alert-popup p {
        font-size: 14px;
    }
}