/* =======================================
   GeekSphere — main.css
   ======================================= */
:root {
    --primary: #3b82f6;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;
    --secondary: #10b981;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --bg: #000000;
    --bg-2: #16181c;
    --bg-3: #202327;
    --surface: #000000;
    --surface-2: #16181c;
    --surface-3: #202327;
    --border: #2f3336;
    --border-light: #3e4144;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --shadow: 0 4px 20px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.6);
    --sidebar-width: 260px;
    --topbar-height: 60px;
    --transition: 0.2s ease;
    --font: 'Inter', system-ui, -apple-system, sans-serif;
}

[data-theme="light"] {
    --bg: #f8fafc;
    --bg-2: #ffffff;
    --bg-3: #f1f5f9;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --surface-3: #f1f5f9;
    --border: #e2e8f0;
    --border-light: #cbd5e1;
    --text: #0f172a;
    --text-muted: #475569;
    --text-dim: #64748b;
    --shadow: 0 4px 20px rgba(0,0,0,0.08); /* Suaviza as sombras no claro */
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
}

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

html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; transition: background 0.3s ease, color 0.3s ease; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ===== App Layout ===== */
.app-body { display: flex; min-height: 100vh; }

/* ===== Sidebar ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: transform var(--transition);
}
.sidebar-logo { padding: 1.5rem 1.25rem 1rem; border-bottom: 1px solid var(--border); }
.logo-link { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; }
.logo-icon { font-size: 1.5rem; }
.logo-text { font-size: 1.1rem; font-weight: 800; background: linear-gradient(135deg, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; letter-spacing: -0.02em; }

.sidebar-nav { flex: 1; padding: 1rem 0.75rem; display: flex; flex-direction: column; gap: 0.25rem; }
.nav-item {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.75rem 1rem; border-radius: var(--radius-sm);
    color: var(--text-muted); text-decoration: none; font-weight: 500;
    transition: all var(--transition); position: relative;
}
.nav-item svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--primary-light); color: var(--primary); }
.nav-item .badge { background: var(--danger); color: #fff; font-size: 0.65rem; font-weight: 700; padding: 0.1rem 0.4rem; border-radius: 999px; min-width: 18px; text-align: center; }

.sidebar-user { padding: 1rem; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 0.75rem; }
.sidebar-user-info { flex: 1; display: flex; align-items: center; gap: 0.75rem; text-decoration: none; min-width: 0; }
.sidebar-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary); flex-shrink: 0; }
.sidebar-name { font-size: 0.85rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-username { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-logout { color: var(--text-dim); display: flex; padding: 0.4rem; border-radius: var(--radius-sm); transition: color var(--transition); }
.sidebar-logout:hover { color: var(--danger); }

/* User Dropdown */
.user-dropdown-container { position: relative; }
.user-dropdown-toggle {
    background: none; border: none; cursor: pointer; color: var(--text-dim);
    display: flex; align-items: center; justify-content: center;
    padding: 0.5rem; border-radius: 50%; transition: all var(--transition);
}
.user-dropdown-toggle:hover { background: var(--surface-2); color: var(--text); }
.user-dropdown-toggle svg { width: 18px; height: 18px; transition: transform 0.3s ease; }
.user-dropdown-container.active .user-dropdown-toggle svg { transform: rotate(180deg); }

.user-dropdown-menu {
    position: absolute; bottom: calc(100% + 10px); right: 0;
    min-width: 180px; background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
    display: none; flex-direction: column; padding: 0.5rem; z-index: 1000;
    animation: slideUp 0.2s ease;
}
@keyframes slideUp { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.user-dropdown-menu.show { display: flex; }
.user-dropdown-item {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem;
    color: var(--text); text-decoration: none; border: none; background: none;
    cursor: pointer; font-family: var(--font); font-size: 0.875rem;
    border-radius: var(--radius-sm); transition: background 0.2s;
    width: 100%; text-align: left;
}
.user-dropdown-item:hover { background: var(--surface-3); }
.user-dropdown-item.danger { color: var(--danger); }
.user-dropdown-item.danger:hover { background: rgba(239, 68, 68, 0.1); }
.user-dropdown-item svg, .user-dropdown-item .menu-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.user-dropdown-divider { height: 1px; background: var(--border); margin: 0.4rem 0.5rem; }

/* ===== Main Content ===== */
.main-content { margin-left: var(--sidebar-width); flex: 1; padding: 2rem 1.5rem; max-width: calc(1200px + var(--sidebar-width)); min-height: 100vh; }

/* ===== Mobile Header ===== */
.mobile-header { display: none; position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-height); background: rgba(0,0,0,0.85); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); z-index: 99; align-items: center; justify-content: space-between; padding: 0 1rem; }
.hamburger, .mobile-msg-icon { background: none; border: none; color: var(--text); cursor: pointer; padding: 0.5rem; display: flex; align-items: center; position: relative; width: 40px; height: 40px; justify-content: center; }
.hamburger svg, .mobile-msg-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.mobile-logo-wrap { flex: 1; display: flex; align-items: center; justify-content: center; }
.mobile-logo { font-size: 1.1rem; font-weight: 800; color: var(--text); text-decoration: none; }
.badge-sm { position: absolute; top: 2px; right: 2px; background: var(--danger); color: #fff; font-size: 0.6rem; font-weight: 700; border-radius: 999px; min-width: 16px; padding: 0.05rem 0.3rem; text-align: center; }

/* ===== Overlay ===== */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99; }

/* ===== Cards ===== */
.card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.clickable-card { cursor: pointer; transition: background 0.2s ease; position: relative; }
.clickable-card:hover { background: var(--bg-2); }
.clickable-card * { pointer-events: auto; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); }

/* ===== Buttons ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
    padding: 0.55rem 1.25rem; border-radius: 9999px; font-weight: 700; font-size: 0.9rem;
    cursor: pointer; border: none; text-decoration: none; transition: background 0.2s; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { filter: brightness(0.9); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border-light); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(0.9); }
.btn-full { width: 100%; }
.btn-lg { padding: 0.75rem 1.75rem; font-size: 1rem; }
.btn-sm { padding: 0.35rem 0.85rem; font-size: 0.8rem; }
.btn-xs { padding: 0.2rem 0.6rem; font-size: 0.75rem; }
.btn-xl { padding: 1rem 2rem; font-size: 1.1rem; }
.btn-icon { background: none; border: none; cursor: pointer; color: var(--text-muted); display: flex; align-items: center; padding: 0.25rem; border-radius: var(--radius-sm); }
.btn-icon:hover { color: var(--danger); background: rgba(239,68,68,0.1); }
.btn-outline-light { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.4); }
.btn-outline-light:hover { background: rgba(255,255,255,0.1); }

/* ===== Forms ===== */
.form-group { margin-bottom: 1rem; }
.form-label { display: flex; justify-content: space-between; font-size: 0.85rem; font-weight: 600; color: var(--text); margin-bottom: 0.4rem; }
.form-label-link { font-weight: 400; color: var(--primary); font-size: 0.8rem; text-decoration: none; }
.form-label-link:hover { text-decoration: underline; }
.form-input {
    width: 100%; padding: 0.65rem 0.9rem; background: var(--bg-2); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text); font-size: 0.9rem; font-family: var(--font);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,58,237,0.15); }
.form-input::placeholder { color: var(--text-dim); }
.form-input-sm { padding: 0.45rem 0.75rem; font-size: 0.8rem; }
.form-input-xs { padding: 0.25rem 0.5rem; font-size: 0.75rem; }
.form-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.3rem; display: block; }
.form-terms { font-size: 0.8rem; color: var(--text-muted); margin: 0.75rem 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-section { padding: 1.25rem; background: var(--bg-2); border-radius: var(--radius-sm); margin-bottom: 1rem; }
.form-section-title { font-size: 0.95rem; font-weight: 700; color: var(--text); margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); }
.form-actions { display: flex; gap: 0.75rem; justify-content: flex-end; padding-top: 1rem; }
.required { color: var(--danger); }
.input-prefix-wrap { position: relative; }
.input-prefix { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.9rem; }
.form-input.has-prefix { padding-left: 2rem; }
.input-eye-wrap { position: relative; }
.eye-toggle { position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 0.25rem; }
.eye-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.form-input.has-prefix { padding-left: 2rem; }
.form-check { margin: 0.5rem 0; }
.check-label { display: flex; align-items: center; gap: 0.6rem; cursor: pointer; font-size: 0.875rem; color: var(--text-muted); }
.check-input { display: none; }
.check-custom { width: 18px; height: 18px; border: 2px solid var(--border-light); border-radius: 4px; background: var(--bg-2); flex-shrink: 0; transition: all var(--transition); position: relative; }
.check-input:checked ~ .check-custom { background: var(--primary); border-color: var(--primary); }
.check-input:checked ~ .check-custom::after { content: ''; position: absolute; left: 3px; top: 0px; width: 5px; height: 9px; border: 2px solid #fff; border-top: none; border-left: none; transform: rotate(45deg); }

/* Password strength */
.password-strength { margin-top: 0.4rem; display: flex; align-items: center; gap: 0.5rem; }
.strength-bar { flex: 1; height: 4px; background: var(--bg-3); border-radius: 2px; overflow: hidden; }
.strength-fill { height: 100%; width: 0; border-radius: 2px; transition: width 0.3s, background 0.3s; }
.strength-label { font-size: 0.75rem; color: var(--text-muted); min-width: 60px; }

/* ===== Alerts ===== */
.alert { padding: 0.85rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: 0.875rem; display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; }
.alert-success { background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.3); color: #6ee7b7; }
.alert-error { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.alert-warning { background: rgba(245,158,11,0.15); border: 1px solid rgba(245,158,11,0.3); color: #fcd34d; }
.alert-info { background: rgba(59,130,246,0.15); border: 1px solid rgba(59,130,246,0.3); color: #93c5fd; }
.alert-close { background: none; border: none; color: inherit; cursor: pointer; font-size: 1.1rem; padding: 0; line-height: 1; opacity: 0.7; flex-shrink: 0; }
.alert-close:hover { opacity: 1; }
.error-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.2rem; }

/* ===== Modals ===== */
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.7); }
.modal-content { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal-sm { max-width: 380px; }
.modal-header { padding: 1.25rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { font-size: 1rem; font-weight: 700; }
.modal.show { display: flex !important; pointer-events: auto; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.4rem; cursor: pointer; padding: 0; line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 1.25rem; }
.modal-footer { padding: 1rem 1.25rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 0.75rem; }

/* Cropper Modal Specifics */
#cropperModal .modal-content {
    max-width: 1000px;
    width: 95%;
}
#cropperModal .modal-body {
    padding: 0;
    background: #000;
    overflow: hidden;
}
.cropper-container {
    max-height: 80vh;
}

#cropperRotate {
    background: var(--bg-3);
    border: 1px solid var(--border);
    color: var(--text);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}
#cropperRotate:hover {
    background: var(--surface-3);
}
#cropperConfirm {
    padding-left: 2rem;
    padding-right: 2rem;
}

/* ===== Search dropdown ===== */
.search-results-dropdown { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); max-height: 280px; overflow-y: auto; z-index: 50; box-shadow: var(--shadow); }
.search-result-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; cursor: pointer; text-decoration: none; color: var(--text); transition: background var(--transition); }
.search-result-item:hover { background: var(--surface-3); }
.search-result-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.search-result-name { font-weight: 600; font-size: 0.875rem; }
.search-result-username { font-size: 0.75rem; color: var(--text-muted); }
.user-search-wrap { position: relative; }

/* ===== Status badges ===== */
.status-badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.status-active { background: rgba(16,185,129,0.2); color: #6ee7b7; }
.status-banned { background: rgba(239,68,68,0.2); color: #fca5a5; }
.status-suspended { background: rgba(245,158,11,0.2); color: #fcd34d; }
.status-pending { background: rgba(59,130,246,0.2); color: #93c5fd; }
.status-resolved { background: rgba(16,185,129,0.2); color: #6ee7b7; }
.status-dismissed { background: rgba(100,116,139,0.2); color: #94a3b8; }
.status-inactive { background: rgba(100,116,139,0.2); color: #94a3b8; }

/* ===== Pagination ===== */
.pagination { display: flex; justify-content: center; gap: 0.5rem; padding: 1rem; flex-wrap: wrap; }
.page-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); text-decoration: none; font-size: 0.875rem; transition: all var(--transition); }
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== Link ===== */
.link { color: var(--primary); text-decoration: none; }
.link:hover { text-decoration: underline; }

/* ===== Profile page ===== */
.profile-page { max-width: 700px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.profile-cover { height: 240px; border-radius: var(--radius-lg); overflow: hidden; position: relative; margin-bottom: -80px; background: linear-gradient(135deg, var(--primary-dark), var(--secondary)); }
.profile-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.4) 100%); pointer-events: none; }
.cover-img { width: 100%; height: 100%; object-fit: cover; }
.cover-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--secondary) 100%); }
.profile-header { position: relative; padding: 1.5rem; padding-top: 90px; }
.profile-avatar { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; border: 4px solid var(--surface); box-shadow: 0 0 0 3px var(--primary), 0 8px 24px rgba(0,0,0,0.4); position: absolute; top: -55px; left: 1.5rem; transition: box-shadow var(--transition); }
.profile-avatar:hover { box-shadow: 0 0 0 3px var(--secondary), 0 8px 24px rgba(0,0,0,0.4); }
.profile-header-top { display: flex; justify-content: flex-end; align-items: flex-start; margin-bottom: 0.75rem; min-height: 2.5rem; }
.profile-info { min-width: 0; }
.profile-names { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.35rem; }
.profile-display-name { font-size: 1.45rem; font-weight: 800; }
.profile-username { color: var(--text-muted); font-size: 0.95rem; }
.profile-bio { color: var(--text-muted); font-size: 0.9rem; line-height: 1.55; margin-bottom: 0.6rem; }
.profile-meta { display: flex; gap: 1rem; flex-wrap: wrap; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.profile-meta a { color: var(--primary); text-decoration: none; }
.profile-meta a:hover { text-decoration: underline; }
.profile-geek { margin-top: 0.5rem; }
.geek-badge { display: inline-flex; align-items: center; gap: 0.3rem; background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(16,185,129,0.15)); border: 1px solid rgba(59,130,246,0.4); padding: 0.3rem 0.85rem; border-radius: 999px; font-size: 0.8rem; color: var(--text); }
.profile-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.profile-stats { display: flex; gap: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--bg); }
.stat-item { flex: 1; text-align: center; padding: 1rem 0.75rem; text-decoration: none; color: var(--text); transition: background var(--transition); border-right: 1px solid var(--border); }
.stat-item:last-child { border-right: none; }
.stat-item:hover { background: var(--surface-2); }
.stat-value { display: block; font-size: 1.5rem; font-weight: 800; background: linear-gradient(135deg, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); }
.profile-posts { display: flex; flex-direction: column; gap: 1rem; }

/* ===== Followers / Following page ===== */
.followers-header { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; }
.followers-header-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 3px solid var(--primary); flex-shrink: 0; }
.followers-header-info { flex: 1; min-width: 0; }
.followers-header-name { font-weight: 800; font-size: 1.1rem; margin: 0 0 0.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.followers-header-username { color: var(--text-muted); font-size: 0.875rem; }
.followers-back-link { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.825rem; color: var(--text-muted); text-decoration: none; padding: 0.45rem 0.85rem; border: 1px solid var(--border); border-radius: var(--radius-sm); transition: background var(--transition), color var(--transition); white-space: nowrap; }
.followers-back-link:hover { background: var(--surface-2); color: var(--text); }
.followers-title-card { display: flex; align-items: center; justify-content: space-between; margin-top: 0.75rem; padding: 0.9rem 1.25rem; }
.followers-title-card h2 { margin: 0; font-size: 1rem; font-weight: 700; }
.followers-count-badge { font-size: 0.8rem; font-weight: 500; color: var(--text-muted); background: var(--bg-2); border: 1px solid var(--border); border-radius: 999px; padding: 0.2rem 0.65rem; }
.followers-list { list-style: none; margin: 0; padding: 0; }
.followers-item { display: flex; align-items: center; gap: 0.85rem; padding: 0.85rem 1.25rem; border-bottom: 1px solid var(--border); transition: background var(--transition); }
.followers-item:last-child { border-bottom: none; }
.followers-item:hover { background: var(--surface-2); }
.followers-user-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid var(--border); transition: border-color var(--transition); }
.followers-item:hover .followers-user-avatar { border-color: var(--primary); }
.followers-user-info { flex: 1; min-width: 0; }
.followers-user-name { font-weight: 600; font-size: 0.925rem; color: var(--text); text-decoration: none; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.followers-user-name:hover { color: var(--primary); }
.followers-user-username { color: var(--text-muted); font-size: 0.825rem; }
.followers-empty { padding: 3rem 1.25rem; text-align: center; color: var(--text-muted); }
.followers-empty-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.followers-empty p { margin: 0; font-size: 0.9rem; }

/* ===== Edit Profile ===== */
.profile-edit-card { max-width: 700px; margin: 0 auto; }
.edit-avatars { position: relative; margin-bottom: 1rem; }
.edit-cover-wrap { height: 160px; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.edit-cover-preview { width: 100%; height: 100%; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; position: relative; }
.edit-cover-btn { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.4); color: #fff; font-size: 1.5rem; cursor: pointer; opacity: 0; transition: opacity var(--transition); }
.edit-cover-preview:hover .edit-cover-btn { opacity: 1; }
.edit-avatar-wrap { position: absolute; left: 1.5rem; bottom: -36px; }
.edit-avatar-img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid var(--surface); }
.edit-avatar-btn { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.4); color: #fff; font-size: 1rem; border-radius: 50%; cursor: pointer; opacity: 0; transition: opacity var(--transition); }
.edit-avatar-wrap:hover .edit-avatar-btn { opacity: 1; }

/* ===== Feed layout ===== */
.feed-layout { display: grid; grid-template-columns: 1fr 300px; gap: 1.5rem; max-width: 1000px; margin: 0 auto; }
.feed-main { display: flex; flex-direction: column; gap: 1rem; }
.feed-sidebar { display: flex; flex-direction: column; gap: 1rem; }
.sidebar-section-title { font-size: 0.9rem; font-weight: 700; margin-bottom: 1rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.sidebar-profile { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.sidebar-profile-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary); }
.sidebar-profile-info { display: flex; flex-direction: column; }
.sidebar-profile-info strong { font-size: 0.875rem; }
.sidebar-profile-info span { font-size: 0.75rem; color: var(--text-muted); }

/* ===== Post composer ===== */
.composer-header { display: flex; align-items: center; gap: 1rem; }
.composer-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary); flex-shrink: 0; }
.composer-trigger { flex: 1; padding: 0.75rem 1rem; background: var(--bg-2); border: 1px solid var(--border); border-radius: 999px; color: var(--text-muted); text-align: left; cursor: pointer; font-size: 0.9rem; transition: border-color var(--transition); font-family: var(--font); }
.composer-trigger:hover { border-color: var(--primary); }
.composer-form { margin-top: 1rem; border-top: 1px solid var(--border); padding-top: 1rem; }
.composer-textarea { width: 100%; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); padding: 0.75rem; font-family: var(--font); font-size: 0.9rem; resize: vertical; min-height: 80px; }
.composer-textarea:focus { outline: none; border-color: var(--primary); }
.composer-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 0.75rem; }
.composer-actions { display: flex; align-items: center; gap: 0.5rem; }
.composer-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 0.4rem; border-radius: var(--radius-sm); display: flex; transition: color var(--transition); }
.composer-btn:hover { color: var(--primary); }
.composer-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.char-counter { font-size: 0.75rem; color: var(--text-dim); }
.composer-preview { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.composer-preview-item { position: relative; width: 80px; height: 80px; border-radius: var(--radius-sm); overflow: hidden; }
.composer-preview-item img, .composer-preview-item video { width: 100%; height: 100%; object-fit: cover; }
.composer-preview-remove { position: absolute; top: 2px; right: 2px; background: rgba(0,0,0,0.7); color: #fff; border: none; cursor: pointer; border-radius: 50%; width: 18px; height: 18px; font-size: 0.7rem; display: flex; align-items: center; justify-content: center; }

/* ===== Post card ===== */
.post-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 0.75rem; }
.post-author-link { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; flex: 1; min-width: 0; }
.post-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); flex-shrink: 0; }
.post-author-info { display: flex; flex-direction: column; }
.post-display-name { font-weight: 700; font-size: 0.9rem; color: var(--text); }
.post-username { font-size: 0.78rem; color: var(--text-muted); }
.post-time { font-size: 0.75rem; color: var(--text-dim); }
.post-content { font-size: 0.9rem; line-height: 1.65; margin-bottom: 0.75rem; word-break: break-word; }
.post-content a { color: var(--primary); }
.post-menu { position: relative; }
.post-menu-btn { background: none; border: none; color: var(--text-dim); cursor: pointer; padding: 0.35rem; border-radius: var(--radius-sm); transition: all var(--transition); }
.post-menu-btn:hover { background: var(--surface-2); color: var(--text); }
.post-menu-btn svg { width: 18px; height: 18px; fill: currentColor; }
.post-menu-dropdown { position: absolute; right: 0; top: calc(100% + 4px); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); min-width: 140px; box-shadow: var(--shadow); z-index: 10; display: none; }
.post-menu.open .post-menu-dropdown { display: block; }
.post-menu-item { display: block; width: 100%; text-align: left; padding: 0.65rem 1rem; background: none; border: none; color: var(--text); cursor: pointer; font-size: 0.875rem; transition: background var(--transition); white-space: nowrap; }
.post-menu-item:hover { background: var(--surface-3); }
.post-menu-item.danger { color: var(--danger); }
.post-menu-item form { margin: 0; }
.delete-form { margin: 0; }

/* Post media */
.post-media { display: grid; gap: 4px; border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 0.75rem; }
.post-media.media-count-1 { grid-template-columns: 1fr; }
.post-media.media-count-2 { grid-template-columns: 1fr 1fr; }
.post-media.media-count-3 { grid-template-columns: 1fr 1fr; }
.post-media.media-count-3 .media-item:first-child { grid-column: 1 / -1; }
.post-media.media-count-4 { grid-template-columns: 1fr 1fr; }
.media-item { display: block; aspect-ratio: 16/9; overflow: hidden; background: var(--bg-3); }
.media-item img, .media-item video { width: 100%; height: 100%; object-fit: cover; }
.media-item video { width: 100%; max-height: 400px; object-fit: contain; background: #000; }

/* Post actions */
.post-actions { display: flex; gap: 1rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.post-action-btn { display: flex; align-items: center; gap: 0.4rem; background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.875rem; padding: 0.3rem 0.5rem; border-radius: var(--radius-sm); transition: all var(--transition); text-decoration: none; font-family: var(--font); }
.post-action-btn:hover { background: var(--surface-2); color: var(--text); }
@keyframes heartBurst { 0% { transform: scale(1); } 25% { transform: scale(1.3); } 50% { transform: scale(0.9); } 100% { transform: scale(1); } }
.post-action-btn.liked { color: var(--secondary); }
.post-action-btn.liked svg { fill: var(--secondary); animation: heartBurst 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.post-action-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.post-view-header { margin-bottom: 1rem; }

/* Comments */
.comments-section { padding-top: 0.75rem; border-top: 1px solid var(--border); margin-top: 0.25rem; }
.comments-full-section { margin-top: 1rem; }
.comments-title { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.comment-form { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 1rem; }
.comment-form-full { padding: 1rem; background: var(--bg-2); border-radius: var(--radius-sm); }
.comment-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.comment-input-wrap { flex: 1; display: flex; gap: 0.5rem; }
.comment-input { border-radius: 999px; }
.comment-item { display: flex; gap: 0.75rem; margin-bottom: 0.75rem; }
.comment-body { flex: 1; background: var(--bg-2); padding: 0.65rem 0.85rem; border-radius: var(--radius-sm); }
.comment-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; flex-wrap: wrap; }
.comment-author { font-weight: 700; font-size: 0.85rem; color: var(--text); text-decoration: none; }
.comment-author:hover { color: var(--primary); }
.comment-time { font-size: 0.72rem; color: var(--text-dim); }
.comment-content { font-size: 0.875rem; color: var(--text-muted); }
.empty-comments { text-align: center; color: var(--text-muted); padding: 2rem; font-size: 0.9rem; }
.empty-feed { text-align: center; padding: 3rem 1rem; }
.empty-feed .empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-feed h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.empty-feed p { color: var(--text-muted); margin-bottom: 1.5rem; font-size: 0.9rem; }
.comments-list.full { display: flex; flex-direction: column; }
.load-more-wrap { margin-top: 0.5rem; }

/* ===== Messages ===== */
.messages-layout { display: flex; height: calc(100vh - 4rem); gap: 0; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; max-width: 900px; margin: 0 auto; box-shadow: var(--shadow); }
.messages-sidebar { width: 320px; flex-shrink: 0; border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.messages-sidebar-header { padding: 1rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.messages-sidebar-header h2 { font-size: 1rem; font-weight: 700; }
.conv-search-wrap { padding: 0.75rem; border-bottom: 1px solid var(--border); }
.conversations-list { flex: 1; overflow-y: auto; }
.conv-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem 1rem; text-decoration: none; color: var(--text); transition: background var(--transition); border-bottom: 1px solid var(--border); }
.conv-item:hover { background: var(--surface-2); }
.conv-item.active { background: rgba(124, 58, 237, 0.15); border-left: 3px solid var(--primary); padding-left: calc(1rem - 3px); }
.conv-avatar-wrap { position: relative; flex-shrink: 0; }
.conv-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.online-dot { position: absolute; bottom: 1px; right: 1px; width: 10px; height: 10px; border-radius: 50%; background: var(--success); border: 2px solid var(--surface); }
.conv-info { flex: 1; min-width: 0; }
.conv-name-row { display: flex; justify-content: space-between; align-items: baseline; gap: 0.25rem; }
.conv-name { font-weight: 600; font-size: 0.875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-time { font-size: 0.72rem; color: var(--text-dim); flex-shrink: 0; }
.conv-preview-row { display: flex; justify-content: space-between; align-items: center; gap: 0.25rem; }
.conv-preview { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.has-unread .conv-preview, .has-unread .conv-name { color: var(--text); font-weight: 700; }
.unread-badge { background: var(--primary); color: #fff; font-size: 0.65rem; font-weight: 700; border-radius: 999px; min-width: 18px; padding: 0.1rem 0.4rem; text-align: center; flex-shrink: 0; }
.empty-conv { text-align: center; padding: 2rem 1rem; color: var(--text-muted); font-size: 0.875rem; }
.messages-main { flex: 1; display: flex; flex-direction: column; }
.messages-empty-state { align-items: center; justify-content: center; }
.messages-empty { text-align: center; padding: 2rem; }
.messages-empty .empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.messages-empty h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.messages-empty p { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 1rem; }

/* Chat */
.chat-header { padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 0.75rem; }
.chat-back { display: none; }
.chat-user-info { flex: 1; display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--text); }
.chat-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.chat-user-name { font-weight: 700; font-size: 0.9rem; }
.chat-user-sub { font-size: 0.75rem; color: var(--text-muted); }
.chat-actions { display: flex; gap: 0.5rem; }
.chat-messages { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.25rem; }
.chat-start { text-align: center; padding: 1rem; color: var(--text-muted); font-size: 0.875rem; }
.chat-start-avatar img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; margin-bottom: 0.75rem; }
.chat-date-divider { text-align: center; margin: 0.75rem 0; }
.chat-date-divider span { background: var(--surface-2); padding: 0.25rem 0.75rem; border-radius: 999px; font-size: 0.72rem; color: var(--text-dim); }
.chat-msg { display: flex; align-items: flex-end; gap: 0.5rem; max-width: 75%; }
.chat-msg.sent { align-self: flex-end; flex-direction: row-reverse; }
.chat-msg.received { align-self: flex-start; }
.msg-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.msg-bubble { padding: 0.6rem 0.85rem; border-radius: var(--radius-lg); max-width: 100%; }
.sent .msg-bubble { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.received .msg-bubble { background: var(--surface-2); color: var(--text); border-bottom-left-radius: 4px; }
.msg-text { font-size: 0.875rem; word-break: break-word; }
.msg-time { font-size: 0.65rem; opacity: 0.65; margin-top: 0.2rem; display: block; text-align: right; }
.msg-status { font-size: 0.65rem; opacity: 0.65; }
.msg-img { max-width: 220px; border-radius: var(--radius-sm); display: block; margin-bottom: 0.3rem; cursor: pointer; }
.msg-file { display: flex; align-items: center; gap: 0.4rem; color: inherit; text-decoration: none; font-size: 0.825rem; }
.chat-input-area { padding: 0.85rem; border-top: 1px solid var(--border); }
.chat-form { display: flex; align-items: flex-end; gap: 0.6rem; }
.chat-attach-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 0.5rem; display: flex; flex-shrink: 0; }
.chat-attach-btn:hover { color: var(--primary); }
.chat-attach-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.chat-input-wrap { flex: 1; }
.chat-textarea { width: 100%; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-lg); color: var(--text); padding: 0.6rem 1rem; font-family: var(--font); font-size: 0.875rem; resize: none; max-height: 120px; overflow-y: auto; }
.chat-textarea:focus { outline: none; border-color: var(--primary); }
.chat-send-btn { background: var(--primary); border: none; color: #fff; cursor: pointer; padding: 0.6rem; border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background var(--transition); }
.chat-send-btn:hover { background: var(--primary-dark); }
.chat-send-btn svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.chat-file-preview { background: var(--bg-2); border-radius: var(--radius-sm); padding: 0.5rem; margin-bottom: 0.5rem; display: flex; align-items: center; justify-content: space-between; font-size: 0.8rem; color: var(--text-muted); }

/* ===== Skeleton Loading / UX ===== */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}
.skeleton-loading {
    animation: shimmer 2s infinite linear;
    background: linear-gradient(to right, var(--surface-2) 4%, var(--surface-3) 25%, var(--surface-2) 36%);
    background-size: 1000px 100%;
    border-radius: var(--radius-sm);
    position: relative;
    overflow: hidden;
}
.skeleton-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.1);
}

/* ===== Lightbox ===== */
.lightbox-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 2000; display: flex; align-items: center; justify-content: center; }
.lightbox-close { position: absolute; top: 20px; right: 20px; background: none; border: none; font-size: 2.5rem; color: #fff; cursor: pointer; z-index: 2001; }
.lightbox-overlay img { max-width: 95vw; max-height: 90vh; object-fit: contain; animation: zoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes zoomIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ===== Bottom Nav (Instagram Style) ===== */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1000;
    align-items: center;
    justify-content: space-around;
    padding: 0 0.5rem;
    padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    color: var(--text-muted);
    text-decoration: none;
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-nav .nav-item svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: transform 0.2s ease;
}

.bottom-nav .nav-item.active {
    color: var(--text);
    background: transparent; /* Fix override from sidebar active class */
}

.bottom-nav .nav-item.active svg {
    fill: currentColor; /* Filled icons look more like native apps */
    stroke: none;
}

.bottom-nav .nav-item:active {
    transform: scale(0.9);
}

/* Central Composer Button (Instagram-like) */
.bottom-nav .fab-composer {
    width: 44px;
    height: 44px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 12px; /* Smooth rounded square */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bottom-nav .fab-composer:active {
    transform: scale(0.85);
}

.bottom-nav .fab-composer svg {
    width: 22px;
    height: 22px;
    stroke: white;
    stroke-width: 3;
}

/* Nav Profile Img */
.nav-profile-img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.nav-item.active .nav-profile-img {
    border-color: var(--primary);
}

/* Notification Badge on Nav */
.bottom-nav .badge-sm {
    position: absolute;
    top: 15px;
    right: 25%;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #000;
    z-index: 5;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.active { display: block; }
    .mobile-header { display: flex; }
    .main-content { margin-left: 0; padding-top: calc(var(--topbar-height) + 1rem); }
    .feed-layout { grid-template-columns: 1fr; }
    .feed-sidebar { display: none; }
    .profile-header-top { justify-content: flex-start; }
    .profile-actions { width: 100%; }
    .form-row { grid-template-columns: 1fr; }
    .messages-layout { height: calc(100vh - var(--topbar-height) - 1rem); border-radius: var(--radius); }
    .messages-sidebar { width: 280px; }
    .bottom-nav { display: flex; }
    .main-content { padding-bottom: calc(65px + env(safe-area-inset-bottom) + 1rem); }
}
@media (max-width: 640px) {
    .messages-sidebar { display: none; }
    .messages-sidebar.show-mobile { display: flex; width: 100%; }
    .chat-back { display: flex; }
    .chat-active .messages-sidebar { display: none; }
    .main-content { padding: calc(var(--topbar-height) + 0.75rem) 0.75rem 1rem; }
    .post-media.media-count-3, .post-media.media-count-4 { grid-template-columns: 1fr; }
}

/* ===== Explore Page ===== */
.explore-page {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 2rem;
}

.explore-search-header {
    position: sticky;
    top: calc(var(--topbar-height) + 1rem);
    background: var(--bg);
    padding: 1rem 0;
    z-index: 10;
    margin-bottom: 2rem;
}

.explore-search-header .user-search-wrap {
    position: relative;
    max-width: 100%;
}

.explore-search-header .form-input {
    padding-left: 2.8rem;
    height: 48px;
    border-radius: 12px;
    background: var(--bg-2);
}

.explore-search-header .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

.section-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--text);
    padding-left: 0.5rem;
}

.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

.suggestion-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.suggestion-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

.suggestion-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid var(--primary);
}

.suggestion-info {
    margin-bottom: 1.25rem;
    width: 100%;
}

.suggestion-name {
    display: block;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
    text-decoration: none;
    margin-bottom: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.4rem;
}

.suggestion-species {
    font-size: 0.78rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--primary);
    background: rgba(124, 58, 237, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

.follow-form {
    width: 100%;
}

.follow-form .btn {
    width: 100%;
}

@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.active { display: block; }
    .mobile-header { display: flex; }
    .main-content { margin-left: 0; padding-top: calc(var(--topbar-height) + 1rem); }
    .feed-layout { grid-template-columns: 1fr; }
    .feed-sidebar { display: none; }
    .profile-header-top { justify-content: flex-start; }
    .profile-actions { width: 100%; }
    .form-row { grid-template-columns: 1fr; }
    .messages-layout { height: calc(100vh - var(--topbar-height) - 1rem); border-radius: var(--radius); }
    .messages-sidebar { width: 280px; }
    
    /* Ativar Bottom Nav */
    .bottom-nav { display: flex; }
    
    /* Espaçamento para o conteúdo não ficar escondido atrás do menu */
    .main-content { padding-bottom: calc(75px + env(safe-area-inset-bottom) + 1rem); }
    
    /* Configurações da página Explore no mobile */
    .explore-search-header {
        top: var(--topbar-height);
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 640px) {
    .messages-sidebar { display: none; }
    .messages-sidebar.show-mobile { display: flex; width: 100%; }
    .chat-back { display: flex; }
    .chat-active .messages-sidebar { display: none; }
    .hide-on-mobile { display: none !important; }
    .main-content { padding: calc(var(--topbar-height) + 0.75rem) 0.75rem 1rem; padding-bottom: calc(85px + env(safe-area-inset-bottom)); }
    .post-media.media-count-3, .post-media.media-count-4 { grid-template-columns: 1fr; }
    
    /* Transformar o Chat Mobile em Tela Cheia Nativa */
    .messages-layout {
        position: fixed;
        top: var(--topbar-height);
        left: 0;
        right: 0;
        bottom: calc(70px + env(safe-area-inset-bottom));
        height: auto;
        width: 100%;
        margin: 0;
        border: none;
        border-radius: 0;
        box-shadow: none;
        z-index: 50;
        max-width: none;
    }
    
    /* Impedir rolagem dupla */
    body:has(.messages-layout) {
        overflow: hidden;
    }
}


