/* ═══════════════════════════════════════════════════════════════════════════
   RUST BRASIL — Design System v2.0
   Glassmorphism Sutil | Comunidade Gamer | SPA
═══════════════════════════════════════════════════════════════════════════ */

/* ═══ 1. VARIÁVEIS & RESET ═══ */
:root {
  --bg-main: #0E1012;
  --bg-card: rgba(22, 25, 28, 0.75);
  --bg-elevated: rgba(30, 33, 36, 0.85);
  --bg-hover: rgba(35, 38, 42, 0.9);
  --brand-rust: #CE561A;
  --brand-rust-hover: #e0621f;
  --brand-rust-glow: rgba(206, 86, 26, 0.15);
  --brand-success: #3D6E2E;
  --brand-success-hover: #4a8536;
  --brand-danger: #c0392b;
  --text-primary: #FFFFFF;
  --text-secondary: #9AA0A6;
  --text-muted: #5f6368;
  --glass-border: rgba(255, 255, 255, 0.05);
  --glass-border-hover: rgba(255, 255, 255, 0.1);
  --glass-blur: 8px;
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --sidebar-width: 260px;
  --widgets-width: 320px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; -webkit-tap-highlight-color: transparent; }

body {
  font-family: var(--font-main);
  background: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: var(--brand-rust); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--brand-rust-hover); }
img, video { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; }
input, textarea, select { font-family: inherit; }

/* ═══ 2. LAYOUT — 3 COLUNAS (Desktop) ═══ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  border-right: 1px solid var(--glass-border);
  display: flex; flex-direction: column;
  padding: 24px 16px;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px; margin-bottom: 32px;
}
.sidebar-logo-icon {
  width: 40px; height: 40px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
}
.sidebar-logo-text { font-size: 1.1rem; font-weight: 800; letter-spacing: 1px; color: var(--text-primary); }
.sidebar-logo-sub { font-size: 0.6rem; font-weight: 600; color: var(--brand-rust); letter-spacing: 2px; text-transform: uppercase; }

.sidebar-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 500; color: var(--text-secondary);
  transition: var(--transition);
}
.sidebar-nav a:hover { background: var(--bg-hover); color: var(--text-primary); }
.sidebar-nav a.active { background: var(--brand-rust-glow); color: var(--brand-rust); font-weight: 600; }
.sidebar-nav a svg { width: 20px; height: 20px; opacity: 0.7; flex-shrink: 0; }
.sidebar-nav a.active svg { opacity: 1; }

.sidebar-profile {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  margin-top: auto;
  transition: var(--transition);
}
.sidebar-profile:hover { border-color: var(--glass-border-hover); background: var(--bg-hover); }
.sidebar-profile img { width: 32px; height: 32px; border-radius: var(--radius-full); }
.sidebar-profile-name { font-size: 0.82rem; font-weight: 600; color: var(--text-primary); }
.sidebar-profile-tag { font-size: 0.68rem; color: var(--text-muted); }

/* Main Content */
.main-content {
  margin-left: var(--sidebar-width);
  margin-right: var(--widgets-width);
  flex: 1;
  min-height: 100vh;
  padding: 32px;
}

/* Widgets (Right Sidebar) */
.widgets {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: var(--widgets-width);
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  border-left: 1px solid var(--glass-border);
  padding: 24px 16px;
  overflow-y: auto;
  z-index: 100;
}

.widget-card {
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
  transition: var(--transition);
}
.widget-card:hover { border-color: var(--glass-border-hover); }
.widget-title {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-muted); margin-bottom: 12px;
}

/* ═══ 3. GLASSMORPHISM CARDS ═══ */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: var(--transition);
}
.glass-card:hover {
  border-color: var(--glass-border-hover);
  box-shadow: var(--shadow-sm);
}

/* ═══ 4. BUTTONS ═══ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.3px;
  border: 1px solid transparent; cursor: pointer; transition: var(--transition);
  text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--brand-rust); color: #fff; border-color: var(--brand-rust); }
.btn-primary:hover { background: var(--brand-rust-hover); border-color: var(--brand-rust-hover); transform: translateY(-1px); box-shadow: 0 4px 12px var(--brand-rust-glow); color: #fff; }
.btn-secondary { background: var(--bg-elevated); color: var(--text-primary); border-color: var(--glass-border); }
.btn-secondary:hover { border-color: var(--glass-border-hover); background: var(--bg-hover); color: #fff; }
.btn-success { background: var(--brand-success); color: #fff; border-color: var(--brand-success); }
.btn-success:hover { background: var(--brand-success-hover); border-color: var(--brand-success-hover); color: #fff; }
.btn-danger { background: var(--brand-danger); color: #fff; border-color: var(--brand-danger); }
.btn-danger:hover { opacity: 0.9; color: #fff; }
.btn-ghost { background: transparent; color: var(--text-secondary); border-color: transparent; }
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-hover); }
.btn-sm { padding: 7px 14px; font-size: 0.75rem; }
.btn-lg { padding: 14px 28px; font-size: 0.9rem; }
.btn svg { width: 16px; height: 16px; }
.btn.loading { pointer-events: none; opacity: 0.6; }

/* ═══ 5. POST CARD (Feed) ═══ */
.post-card {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  overflow: hidden;
  transition: var(--transition);
}
.post-card:hover { border-color: var(--glass-border-hover); }

.post-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px 0;
}
.post-avatar { width: 40px; height: 40px; border-radius: var(--radius-full); border: 2px solid var(--glass-border); flex-shrink: 0; }
.post-author { flex: 1; }
.post-author-name { font-size: 0.88rem; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: 6px; }
.post-author-name .verified { color: var(--brand-rust); }
.post-author-time { font-size: 0.72rem; color: var(--text-muted); }
.post-menu-btn { background: none; border: none; color: var(--text-muted); font-size: 1.3rem; padding: 4px 8px; cursor: pointer; border-radius: var(--radius-sm); transition: var(--transition); }
.post-menu-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

.post-content { padding: 12px 20px; font-size: 0.9rem; line-height: 1.7; color: var(--text-primary); word-wrap: break-word; }
.post-content .edited { font-size: 0.68rem; color: var(--text-muted); font-style: italic; }

.post-media { width: 100%; }
.post-media img, .post-media video { width: 100%; max-height: 500px; object-fit: contain; background: #000; cursor: pointer; }
.post-media iframe { width: 100%; aspect-ratio: 16/9; border: none; }

.post-footer {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-top: 1px solid var(--glass-border);
  background: rgba(14, 16, 18, 0.4);
}
.post-action {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--radius-full);
  font-size: 0.78rem; font-weight: 500; color: var(--text-secondary);
  background: transparent; border: 1px solid var(--glass-border);
  cursor: pointer; transition: var(--transition);
}
.post-action:hover { border-color: var(--brand-rust); color: var(--brand-rust); }
.post-action.liked { border-color: var(--brand-danger); color: var(--brand-danger); }
.post-action svg { width: 16px; height: 16px; }

/* ═══ 6. RANKINGS TABLE ═══ */
.rank-table {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.rank-row {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--glass-border);
  transition: var(--transition);
}
.rank-row:last-child { border-bottom: none; }
.rank-row:hover { background: var(--bg-hover); }
.rank-row.top-3 { background: var(--brand-rust-glow); }
.rank-pos { width: 32px; font-size: 0.9rem; font-weight: 800; text-align: center; }
.rank-pos.gold { color: #f2a62a; }
.rank-pos.silver { color: #c8c8c8; }
.rank-pos.bronze { color: #cd7f32; }
.rank-avatar { width: 36px; height: 36px; border-radius: var(--radius-full); }
.rank-name { flex: 1; font-size: 0.85rem; font-weight: 500; color: var(--text-primary); }
.rank-value { font-size: 0.95rem; font-weight: 700; color: var(--brand-rust); }
.rank-unit { font-size: 0.65rem; color: var(--text-muted); margin-left: 3px; }

.rank-xp-bar { width: 100px; height: 4px; background: rgba(255,255,255,0.05); border-radius: 2px; overflow: hidden; margin-left: auto; }
.rank-xp-fill { height: 100%; background: linear-gradient(90deg, var(--brand-rust), #e0621f); border-radius: 2px; }

.rank-tabs {
  display: flex; gap: 4px; padding: 12px 16px;
  background: var(--bg-elevated); border-radius: var(--radius-md);
  margin-bottom: 16px;
}
.rank-tab {
  flex: 1; padding: 8px 12px; text-align: center;
  font-size: 0.78rem; font-weight: 600; color: var(--text-secondary);
  border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition);
  background: transparent; border: none;
}
.rank-tab:hover { color: var(--text-primary); background: var(--bg-hover); }
.rank-tab.active { background: var(--brand-rust); color: #fff; }

/* ═══ 7. GUIAS PAGE ═══ */
.guides-layout { display: flex; gap: 24px; }
.guides-filters {
  width: 200px; flex-shrink: 0;
  display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 32px; align-self: flex-start;
}
.guides-filter-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 0.82rem; font-weight: 500; color: var(--text-secondary);
  background: transparent; border: none; cursor: pointer; transition: var(--transition);
  text-align: left; width: 100%;
}
.guides-filter-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.guides-filter-btn.active { background: var(--brand-rust-glow); color: var(--brand-rust); font-weight: 600; }

.guides-grid { flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

.guide-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden; cursor: pointer; transition: var(--transition);
}
.guide-card:hover { border-color: var(--glass-border-hover); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.guide-card-cover { width: 100%; height: 140px; object-fit: cover; background: var(--bg-elevated); }
.guide-card-body { padding: 16px; }
.guide-card-title { font-size: 0.92rem; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.guide-card-meta { font-size: 0.72rem; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.guide-card-rating { display: flex; gap: 2px; }
.guide-card-rating .star { color: var(--brand-rust); font-size: 0.8rem; }
.guide-card-rating .star.empty { color: var(--text-muted); }
.guide-card-tag {
  display: inline-block; padding: 3px 8px; border-radius: 4px;
  font-size: 0.62rem; font-weight: 700; text-transform: uppercase;
  background: var(--brand-rust-glow); color: var(--brand-rust); margin-top: 8px;
}

/* ═══ 8. SKELETON LOADING ═══ */
.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, rgba(50,53,57,0.8) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease infinite;
  border-radius: var(--radius-sm);
}
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-text.w-40 { width: 40%; }
.skeleton-text.w-70 { width: 70%; }
.skeleton-text.w-full { width: 100%; }
.skeleton-avatar { width: 40px; height: 40px; border-radius: var(--radius-full); }
.skeleton-img { width: 100%; height: 200px; border-radius: var(--radius-sm); }
.skeleton-card { padding: 20px; border-radius: var(--radius-md); border: 1px solid var(--glass-border); margin-bottom: 16px; }

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ═══ 9. TOP LOADING BAR ═══ */
#top-loader {
  position: fixed; top: 0; left: 0; height: 3px; z-index: 9999;
  background: linear-gradient(90deg, var(--brand-rust), #f2a62a);
  width: 0%; pointer-events: none;
  box-shadow: 0 0 8px var(--brand-rust-glow);
  transition: width 0.3s ease;
}
#top-loader.loading { width: 70%; transition: width 0.8s ease; }
#top-loader.done { width: 100%; opacity: 0; transition: width 0.2s, opacity 0.3s 0.2s; }

/* ═══ 10. EMPTY STATES ═══ */
.empty-state { text-align: center; padding: 48px 24px; }
.empty-state-icon {
  width: 72px; height: 72px; margin: 0 auto 16px;
  border-radius: var(--radius-full);
  background: rgba(206, 86, 26, 0.08);
  display: flex; align-items: center; justify-content: center;
}
.empty-state-icon svg { width: 32px; height: 32px; color: var(--text-muted); }
.empty-state h3 { font-size: 1rem; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.empty-state p { font-size: 0.85rem; color: var(--text-muted); }

/* ═══ 11. FORMS & INPUTS ═══ */
.input {
  width: 100%; padding: 10px 14px;
  background: var(--bg-elevated); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-size: 0.85rem; outline: none; transition: var(--transition);
}
.input:focus { border-color: var(--brand-rust); box-shadow: 0 0 0 3px var(--brand-rust-glow); }
.input::placeholder { color: var(--text-muted); }
textarea.input { min-height: 80px; resize: vertical; font-family: inherit; }
select.input { cursor: pointer; }

/* ═══ 12. BADGES & TAGS ═══ */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 3px 8px; border-radius: 4px;
  font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px;
}
.badge-rust { background: var(--brand-rust-glow); color: var(--brand-rust); }
.badge-success { background: rgba(61, 110, 46, 0.2); color: #6bbf45; }
.badge-danger { background: rgba(192, 57, 43, 0.2); color: #e74c3c; }
.badge-muted { background: rgba(255,255,255,0.05); color: var(--text-secondary); }

.badge-tip { position: relative; display: inline-block; cursor: default; }
.badge-tip::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--bg-elevated); border: 1px solid var(--glass-border); color: var(--text-primary);
  padding: 4px 10px; border-radius: var(--radius-sm); font-size: 0.68rem;
  white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.15s;
}
.badge-tip:hover::after { opacity: 1; }

/* ═══ 13. SEARCH ═══ */
.search-container { position: relative; }
.search-input {
  background: var(--bg-elevated); border: 1px solid var(--glass-border);
  border-radius: var(--radius-full); color: var(--text-primary);
  padding: 8px 14px 8px 36px; font-size: 0.82rem; width: 100%;
  outline: none; transition: var(--transition);
}
.search-input:focus { border-color: var(--brand-rust); box-shadow: 0 0 0 3px var(--brand-rust-glow); }
.search-input::placeholder { color: var(--text-muted); }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--bg-elevated); border: 1px solid var(--glass-border);
  border-radius: var(--radius-md); overflow: hidden; overflow-y: auto;
  max-height: 350px; z-index: 9999; box-shadow: var(--shadow-lg);
}
.search-results.hidden { display: none; }
.search-result-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer; transition: var(--transition);
  border-bottom: 1px solid var(--glass-border); overflow: hidden;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg-hover); }
.search-result-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result-type { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; padding: 2px 6px; border-radius: 3px; background: var(--brand-rust-glow); color: var(--brand-rust); flex-shrink: 0; }

/* ═══ 14. PROFILE ═══ */
.profile-header {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 24px; margin-bottom: 16px;
  position: relative; overflow: hidden;
}
.profile-header-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0.15; filter: blur(2px);
}
.profile-stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--glass-border); border-radius: var(--radius-md);
  overflow: hidden; margin-bottom: 16px;
}
.profile-stat {
  padding: 16px; background: var(--bg-card); text-align: center;
}
.profile-stat-value { font-size: 1.4rem; font-weight: 800; color: var(--text-primary); }
.profile-stat-label { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* ═══ 15. HERO (Home) ═══ */
.hero {
  position: relative; padding: 64px 0;
  background: url('/img/banner1.webp') center/cover no-repeat;
  border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 24px;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(14,16,18,0.95) 0%, rgba(14,16,18,0.7) 50%, rgba(14,16,18,0.4) 100%);
}
.hero-content { position: relative; z-index: 2; padding: 0 40px; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 900; line-height: 1.1; margin-bottom: 12px; }
.hero h1 .rust-orange { color: var(--brand-rust); }
.hero-sub { color: var(--text-secondary); font-size: 0.92rem; max-width: 440px; margin-bottom: 24px; line-height: 1.6; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ═══ 16. SECTION HEADERS ═══ */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--text-muted);
}
.section-link { font-size: 0.75rem; font-weight: 600; color: var(--brand-rust); }
.section-link:hover { color: var(--brand-rust-hover); }

/* ═══ 17. TOAST & MODALS ═══ */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--bg-elevated); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); padding: 12px 20px;
  color: var(--text-primary); font-size: 0.85rem;
  z-index: 9998; animation: slideInRight 0.25s ease;
  box-shadow: var(--shadow-md); max-width: 350px;
}
.toast.error { border-color: var(--brand-danger); }
.toast.success { border-color: var(--brand-success); }
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  z-index: 9999; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.modal {
  background: var(--bg-elevated); border: 1px solid var(--glass-border);
  border-radius: var(--radius-md); padding: 28px; max-width: 420px; width: 90%;
  box-shadow: var(--shadow-lg); text-align: center;
}
.modal h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.modal p { font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 20px; }

/* ═══ 18. SCROLL TO TOP ═══ */
#scroll-top-btn {
  position: fixed; bottom: 24px; right: 24px; z-index: 900;
  width: 42px; height: 42px; border-radius: var(--radius-full);
  background: var(--brand-rust); border: none; color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0; pointer-events: none;
  transition: var(--transition); box-shadow: 0 4px 12px var(--brand-rust-glow);
}
#scroll-top-btn.visible { opacity: 1; pointer-events: auto; }
#scroll-top-btn:hover { transform: translateY(-2px); }

/* ═══ 19. LINK EMBEDS ═══ */
.link-embed {
  display: flex; gap: 12px; background: var(--bg-elevated);
  border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
  padding: 12px; margin-top: 8px; cursor: pointer; transition: var(--transition);
}
.link-embed:hover { border-color: var(--brand-rust); }
.link-embed-thumb { width: 80px; height: 60px; border-radius: 6px; object-fit: cover; flex-shrink: 0; background: var(--bg-main); }
.link-embed-info { flex: 1; min-width: 0; }
.link-embed-title { font-size: 0.82rem; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-embed-domain { font-size: 0.65rem; color: var(--text-muted); margin-top: 4px; }

/* ═══ 20. LIVE / VOICE USERS ═══ */
.voice-user {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0;
}
.voice-user img { width: 24px; height: 24px; border-radius: var(--radius-full); }
.voice-user-name { font-size: 0.78rem; color: var(--text-primary); }
.voice-channel-name { font-size: 0.75rem; font-weight: 600; color: var(--brand-success); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }

/* ═══ 21. FOOTER (desktop hidden, mobile visible) ═══ */
.footer-desktop { display: none; }

/* ═══ 22. UTILITY ═══ */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.w-full { width: 100%; }
.overflow-hidden { overflow: hidden; }

/* ═══════════════════════════════════════════════════════════════════════════
   23. RESPONSIVE — MOBILE
═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1279px) {
  .widgets { display: none; }
  .main-content { margin-right: 0; }
}

@media (max-width: 1023px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; margin-right: 0; padding: 16px; padding-bottom: 80px; }
  .widgets { display: none; }
  .guides-layout { flex-direction: column; }
  .guides-filters { width: 100%; flex-direction: row; flex-wrap: wrap; position: static; }
  .guides-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .profile-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { border-radius: var(--radius-md); padding: 40px 0; }
  .hero-content { padding: 0 20px; }
  .hero h1 { font-size: 1.6rem; }
}

/* Bottom Navigation Bar (Mobile) */
.mobile-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--bg-card); backdrop-filter: blur(12px);
  border-top: 1px solid var(--glass-border);
  padding: 8px 0; z-index: 1000;
  justify-content: space-around; align-items: center;
}
@media (max-width: 1023px) {
  .mobile-nav { display: flex; }
}
.mobile-nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 12px; border-radius: var(--radius-sm);
  color: var(--text-muted); text-decoration: none; transition: var(--transition);
  font-size: 0.62rem; font-weight: 500;
}
.mobile-nav-item:hover, .mobile-nav-item.active { color: var(--brand-rust); }
.mobile-nav-item svg { width: 22px; height: 22px; }

@media (max-width: 480px) {
  .hero { padding: 32px 0; }
  .hero h1 { font-size: 1.4rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .guides-grid { grid-template-columns: 1fr; }
  .post-header { padding: 12px 14px 0; }
  .post-content { padding: 10px 14px; }
  .post-footer { padding: 10px 14px; }
  .glass-card { padding: 16px; }
  .profile-stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ═══ 24. ANIMATIONS ═══ */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.main-content { animation: fadeIn 0.3s ease; }

/* ═══ 25. SCROLLBAR ═══ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ═══ 26. INLINE GRID RESPONSIVE ═══ */
@media (max-width: 768px) {
  [style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
  [style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }
  .hero { padding: 40px 0; }
  .hero h1 { font-size: 1.5rem; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   27. OVERRIDES PARA PÁGINAS JS (Compatibilidade com inline styles)
   Abordagem: classes conhecidas + mínimo de !important
═══════════════════════════════════════════════════════════════════════════ */

/* Main content — largura correta no desktop */
.main-content {
  width: 100%;
  max-width: none;
}

/* Section card (usado em TODAS as páginas JS) */
.section-card {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}
.section-card[style*="background:"] {
  background: unset;
}
.section-card:hover {
  border-color: var(--glass-border-hover);
}

/* Section header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--brand-rust);
}
.section-link {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--brand-rust);
}

/* Stat card */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}
.stat-card:hover { border-color: var(--glass-border-hover); }

/* Buttons antigos (mapeamento) */
.btn-orange { background: var(--brand-rust); color: #fff; border: 1px solid var(--brand-rust); border-radius: var(--radius-sm); }
.btn-orange:hover { background: var(--brand-rust-hover); border-color: var(--brand-rust-hover); color: #fff; }
.btn-outline { background: var(--bg-elevated); color: var(--text-primary); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); }
.btn-outline:hover { border-color: var(--glass-border-hover); background: var(--bg-hover); color: #fff; }
.btn-green { background: var(--brand-success); color: #fff; border: 1px solid var(--brand-success); border-radius: var(--radius-sm); }
.btn-green:hover { background: var(--brand-success-hover); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 0.76rem; }

/* Feed container */
#feed-container > .section-card {
  margin-bottom: 16px;
}

/* Inputs antigos */
input[type="text"], textarea, select {
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}
input[type="text"]:focus, textarea:focus, select:focus {
  border-color: var(--brand-rust);
  box-shadow: 0 0 0 3px var(--brand-rust-glow);
}

/* Dropdown menus */
[id^="post-menu-"], [id^="profile-post-menu-"], [id^="pub-post-menu-"], [id^="guide-menu-"] {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-md);
}

/* Badge tooltip */
.badge-tip { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.badge-tip::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--bg-elevated); border: 1px solid var(--glass-border); color: var(--text-primary);
  padding: 4px 10px; border-radius: var(--radius-sm); font-size: 0.68rem;
  white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.15s;
}
.badge-tip:hover::after { opacity: 1; }

/* Hidden utility */
.hidden { display: none !important; }


/* ═══ STATS CARDS — Perfil ═══ */
.stat-card {
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
}
.stat-card .stat-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-card .stat-icon.orange { background: var(--brand-rust-glow); color: var(--brand-rust); }
.stat-card .stat-icon.green { background: rgba(61,110,46,0.15); color: #6bbf45; }
.stat-card .stat-icon.yellow { background: rgba(242,166,42,0.12); color: #f2a62a; }
.stat-card .stat-icon.purple { background: rgba(155,124,245,0.12); color: #9b7cf5; }
.stat-card .stat-icon svg { width: 18px; height: 18px; }
.stat-card .stat-value { font-size: 1.8rem; font-weight: 800; color: var(--text-primary); line-height: 1; }
.stat-card .stat-label { font-size: 0.7rem; color: var(--text-muted); margin-top: 4px; }


/* ═══ Stats do perfil — esconder ícones e centralizar ═══ */
.stat-card .stat-icon { display: none; }
.stat-card {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}


/* ═══ PERFIL MOBILE FIX ═══ */
@media (max-width: 640px) {
  /* Header do perfil — empilhar vertical */
  .section-card > div[style*="display:flex"][style*="gap:1.5rem"] {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center;
    gap: 12px !important;
  }

  /* Avatar centralizado */
  .section-card img[style*="border-radius:50%"][style*="width:80px"] {
    margin: 0 auto;
  }

  /* Info do perfil — centralizar */
  .section-card > div[style*="display:flex"][style*="gap:1.5rem"] > div[style*="flex:1"] {
    align-items: center;
    display: flex;
    flex-direction: column;
  }

  /* Contadores (guias, posts, seguidores) — wrap */
  [style*="display:flex"][style*="gap:0.6rem"][style*="margin:0.3rem"] {
    justify-content: center !important;
    flex-wrap: wrap !important;
  }

  /* Badges — centralizar */
  [style*="display:flex"][style*="gap:0.3rem"][style*="flex-wrap:wrap"] {
    justify-content: center !important;
  }

  /* Botões de ação (Editar, Sair, Admin) — row horizontal */
  [style*="flex-direction:column"][style*="min-width:130px"],
  [style*="flex-direction:column"][style*="min-width:100px"] {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    min-width: unset !important;
    width: 100% !important;
    gap: 6px !important;
  }

  /* Steam section — empilhar */
  [style*="justify-content:space-between"][style*="border-top"] {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  [style*="justify-content:space-between"][style*="border-top"] > div {
    justify-content: center;
    text-align: center;
  }
  [style*="justify-content:space-between"][style*="border-top"] > div:last-child {
    justify-content: center !important;
    display: flex;
    gap: 6px;
  }

  /* Stats grid — 2 colunas */
  [style*="grid-template-columns:repeat(auto-fit, minmax(180px"] {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  /* Stats 4 col (perfil público) — 2 colunas */
  [style*="grid-template-columns:repeat(4"] {
    grid-template-columns: 1fr 1fr !important;
  }

  /* XP bar — full width */
  [style*="padding:1rem 1.5rem"][style*="border-radius:8px"],
  [style*="padding:0.8rem 1.2rem"] {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Tabs posts/guias — full width */
  [style*="display:flex"][style*="gap:0.3rem"][style*="margin-bottom:1rem"] {
    width: 100%;
  }
  [style*="display:flex"][style*="gap:0.3rem"][style*="margin-bottom:1rem"] .btn {
    flex: 1;
    justify-content: center !important;
    text-align: center;
  }
}
