:root { 
  --bg: #050505; 
  --surface: rgba(15, 15, 20, 0.6); 
  --surface-hi: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.06); 
  --text: #ffffff; 
  --text-dim: #888892; 
  --radius: 16px; 
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow-x: hidden; }

body { 
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; 
  background-color: var(--bg); 
  background: radial-gradient(circle at 50% 0%, #15151e 0%, #000000 60%);
  color: var(--text); font-size: 14px; line-height: 1.5; 
  -webkit-font-smoothing: antialiased; overflow-y: hidden; 
}

::-webkit-scrollbar { display: none; }
* { scrollbar-width: none; -ms-overflow-style: none; }

#bg-canvas { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeRow { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes popIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(30px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes logoSpin { to { transform: rotate(360deg); } }
@keyframes orbFloat { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(30px, -20px) scale(1.1); } 66% { transform: translate(-20px, 30px) scale(0.95); } }
@keyframes pulseGlow { 0%, 100% { filter: drop-shadow(0 0 2px rgba(251, 191, 36, 0.4)); } 50% { filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.9)); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px) scale(0.94); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastOut { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(10px) scale(0.95); } }
@keyframes pulseLive { 0%, 100% { opacity: 1; box-shadow: 0 0 6px #ef4444, 0 0 12px rgba(239,68,68,0.4); } 50% { opacity: 0.5; box-shadow: 0 0 2px #ef4444, 0 0 4px rgba(239,68,68,0.2); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes spin { 100% { transform: rotate(360deg); } }

.reveal { animation: fadeUp 0.6s var(--ease-out) both; }
.reveal:nth-child(1) { animation-delay: 0.05s; }
.reveal:nth-child(2) { animation-delay: 0.15s; }
.reveal:nth-child(3) { animation-delay: 0.25s; }
.reveal:nth-child(4) { animation-delay: 0.35s; }

.app { display: none; height: 100vh; flex-direction: column; overflow: hidden; width: 100%; max-width: 100vw; }
.app.ready { display: flex; }

.toast-container { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 10px; z-index: 99999; pointer-events: none; }
.toast { background: rgba(15, 15, 20, 0.95); backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.1); color: #fff; padding: 14px 24px; border-radius: 100px; font-size: 13px; font-weight: 500; letter-spacing: 0.3px; box-shadow: 0 10px 40px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.1); display: flex; align-items: center; gap: 10px; animation: toastIn 0.3s var(--ease-out) forwards; }
.toast.removing { animation: toastOut 0.3s var(--ease-smooth) forwards; }

#login-overlay { position: fixed; inset: 0; z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(16px); overflow: hidden; }
#login-overlay::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px); background-size: 60px 60px; -webkit-mask-image: radial-gradient(circle at 50% 50%, black 0%, transparent 70%); mask-image: radial-gradient(circle at 50% 50%, black 0%, transparent 70%); pointer-events: none; }
.login-bg-orbs { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.55; animation: orbFloat 20s ease-in-out infinite; will-change: transform; }
.orb-1 { width: 450px; height: 450px; top: -120px; left: -120px; background: radial-gradient(circle, rgba(88,101,242,0.45), transparent 70%); }
.orb-2 { width: 380px; height: 380px; bottom: -100px; right: -80px; background: radial-gradient(circle, rgba(168,85,247,0.35), transparent 70%); animation-delay: -7s; }
.orb-3 { width: 320px; height: 320px; top: 50%; left: 50%; margin-left: -160px; margin-top: -160px; background: radial-gradient(circle, rgba(255,255,255,0.08), transparent 70%); animation-delay: -14s; }

.login-card { position: relative; background: rgba(10, 10, 12, 0.75); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); border: 1px solid rgba(255,255,255,0.08); border-radius: 28px; padding: 48px 40px 40px; display: flex; flex-direction: column; align-items: center; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.06); max-width: 420px; width: 90%; animation: cardIn 0.8s var(--ease-out); z-index: 1; }
.login-card::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent 30%, transparent 70%, rgba(88,101,242,0.25)); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.login-logo { position: relative; width: 100px; height: 100px; border-radius: 28px; display: grid; place-items: center; margin-bottom: 24px; isolation: isolate; }
.login-logo::before { content: ''; position: absolute; inset: -4px; border-radius: inherit; background: conic-gradient(from 0deg, rgba(88,101,242,0.7), rgba(168,85,247,0.4), rgba(88,101,242,0.7)); filter: blur(12px); opacity: 0.7; animation: logoSpin 10s linear infinite; z-index: -1; }
.login-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 24px; border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.login-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.login-brand h1 { font-size: 28px; font-weight: 800; letter-spacing: -1px; background: linear-gradient(135deg, #ffffff 0%, #a1a1aa 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; white-space: nowrap; }
.login-badge { font-size: 9px; font-weight: 700; padding: 3px 8px; border-radius: 100px; background: rgba(88,101,242,0.15); color: #7d87ff; border: 1px solid rgba(88,101,242,0.35); text-transform: uppercase; letter-spacing: 0.5px; }
.login-subtitle { color: #888892; margin-bottom: 32px; font-size: 14px; }
.login-btn { background: #5865F2; color: #fff; padding: 16px 32px; text-decoration: none; border-radius: 100px; font-weight: 600; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 12px; transition: transform 0.25s var(--ease-out), background-color 0.25s, box-shadow 0.25s; width: 100%; box-shadow: 0 8px 25px rgba(88, 101, 242, 0.35); position: relative; overflow: hidden; }
.login-btn::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent); transform: translateX(-100%); transition: transform 0.7s; }
.login-btn:hover { transform: translateY(-2px); background: #4752C4; box-shadow: 0 12px 35px rgba(88, 101, 242, 0.55); }
.login-btn:hover::before { transform: translateX(100%); }
.login-btn:active { transform: scale(0.97); }
.login-card > * { animation: fadeInUp 0.6s var(--ease-out) both; }
.login-card > .login-logo { animation-delay: 0.15s; }
.login-card > .login-brand { animation-delay: 0.25s; }
.login-card > .login-subtitle { animation-delay: 0.35s; }
.login-card > .login-btn { animation-delay: 0.45s; }

.top-nav { display: flex; align-items: center; justify-content: space-between; padding: 0 24px; height: 70px; background: rgba(5, 5, 5, 0.6); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-bottom: 1px solid rgba(255, 255, 255, 0.04); z-index: 100; position: relative; width: 100%; }
.nav-left, .nav-right { flex: 1; display: flex; align-items: center; }
.nav-right { justify-content: flex-end; }
.nav-center { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; pointer-events: none; }
.brand-top { display: flex; align-items: center; gap: 10px; white-space: nowrap; pointer-events: auto; }
.nav-logo { width: 26px; height: 26px; border-radius: 8px; object-fit: cover; }
.nav-brand-text { font-size: 18px; font-weight: 800; letter-spacing: -0.5px; color: #fff; white-space: nowrap; }
.menu-btn { background: none; border: none; color: var(--text); cursor: pointer; padding: 8px; border-radius: 8px; transition: background 0.2s; display: flex; align-items: center; }
.menu-btn:hover { background: var(--surface-hi); }
.menu-btn:active { transform: scale(0.9); }
.menu-btn svg { width: 24px; height: 24px; }
.user-profile-trigger { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 100px; background: var(--surface); border: 1px solid var(--border); cursor: pointer; transition: background 0.25s, border-color 0.25s; white-space: nowrap; }
.user-profile-trigger:hover { background: var(--surface-hi); border-color: rgba(255,255,255,0.15); }
.user-profile-trigger:active { transform: scale(0.96); }
.user-profile-trigger img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.nav-user-name { font-size: 13px; font-weight: 600; }
.chevron-icon { width: 14px; height: 14px; color: var(--text-dim); transition: transform 0.3s var(--ease-out); }
.user-profile-trigger.active .chevron-icon { transform: rotate(180deg); }

.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(6px); z-index: 998; opacity: 0; pointer-events: none; transition: opacity 0.3s var(--ease-out); }
.drawer-overlay.active { opacity: 1; pointer-events: auto; }
.side-drawer { position: fixed; top: 0; left: -80px; width: 80px; height: 100vh; background: rgba(10, 10, 12, 0.8); backdrop-filter: blur(30px); border-right: 1px solid var(--border); z-index: 999; display: flex; flex-direction: column; align-items: center; padding-top: 80px; transition: transform 0.3s var(--ease-out); }
.side-drawer.active { transform: translateX(80px); box-shadow: 15px 0 40px rgba(0,0,0,0.8); }
.drawer-nav { display: flex; flex-direction: column; gap: 32px; width: 100%; align-items: center; }
.nav-item { background: transparent; border: none; color: var(--text-dim); cursor: pointer; position: relative; display: flex; align-items: center; justify-content: center; transition: color 0.25s, transform 0.25s; padding: 8px; }
.nav-item svg { width: 24px; height: 24px; }
.nav-item:hover { color: var(--text); transform: scale(1.1); }
.nav-item:active { transform: scale(0.9); }
.nav-item.active { color: var(--text); }
.nav-item.active::after { content: ''; position: absolute; right: -14px; top: 50%; transform: translateY(-50%); width: 2px; height: 18px; background: #fff; border-radius: 2px; box-shadow: 0 0 12px #fff; }

/* Correção do Botão escondido no celular */
.main-content { 
  flex: 1; 
  overflow-y: auto; 
  overflow-x: hidden; 
  padding: 24px; 
  padding-bottom: calc(120px + env(safe-area-inset-bottom)); /* Adicionado Safe Area */
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  width: 100%; 
  max-width: 100vw; 
}

.panel { display: none; width: 100%; max-width: 900px; min-width: 0; }
.panel.active { display: flex; flex-direction: column; animation: fadeUp 0.5s var(--ease-out) both; }
.panel-header { margin-bottom: 24px; width: 100%; }
.panel-title { font-size: 28px; font-weight: 800; letter-spacing: -1px; }
.greeting-mobile { font-size: 24px; font-weight: 800; letter-spacing: -1px; margin-bottom: 24px; display: none; width: 100%; }
.greeting-mobile span { color: var(--text-dim); }

.stats-container { display: flex; flex-direction: column; gap: 20px; margin-bottom: 32px; width: 100%; min-width: 0; }
.stat-block { background: rgba(10, 10, 12, 0.6); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s; display: flex; flex-direction: column; min-width: 0; box-shadow: 0 4px 20px rgba(0,0,0,0.2); position: relative; }
.stat-block::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(135deg, rgba(255,255,255,0.08), transparent 40%, transparent 60%, rgba(255,255,255,0.04)); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.stat-glow { position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle at center, rgba(255,255,255,0.04) 0%, transparent 40%); opacity: 0; transition: opacity 0.5s; pointer-events: none; }
.stat-block:hover { border-color: rgba(255,255,255,0.15); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
.stat-block:hover .stat-glow { opacity: 1; }
.full-width { margin-bottom: 0; width: 100%; }
.stats-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; width: 100%; min-width: 0; }
.stat-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; width: 100%; min-width: 0; }
.stat-title { font-size: 12px; color: var(--text-dim); font-weight: 600; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-value { font-size: 32px; font-weight: 800; color: var(--text); line-height: 1; font-variant-numeric: tabular-nums; }
.chart-row { display: flex; gap: 4px; height: 36px; align-items: flex-end; margin-bottom: 16px; width: 100%; min-width: 0; }
.chart-col { flex: 1; background: rgba(255,255,255,0.03); border-radius: 4px; height: 100%; display: flex; align-items: flex-end; overflow: hidden; transition: background 0.3s; min-width: 0; }
.chart-col:hover { background: rgba(255,255,255,0.08); }
.chart-bar { width: 100%; background: #fff; border-radius: 4px; transition: height 0.8s var(--ease-out), box-shadow 0.3s; box-shadow: 0 -2px 10px rgba(255,255,255,0.2); }
.chart-col:hover .chart-bar { box-shadow: 0 -2px 15px rgba(255,255,255,0.5); }
.stat-meta { display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 500; margin-top: auto; width: 100%; }
.stat-trend { color: #ef4444; }
.stat-today { color: var(--text-dim); background: rgba(255,255,255,0.05); padding: 4px 8px; border-radius: 100px; }

.leaderboard-section { width: 100%; margin-bottom: 32px; display: flex; flex-direction: column; min-width: 0; }
.lb-header-box { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; width: 100%; }
.lb-title { font-size: 18px; font-weight: 800; }
.lb-cards-container { background: rgba(10, 10, 12, 0.6); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; height: 380px; position: relative; width: 100%; min-width: 0; }
.lb-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.03); transition: background 0.3s, padding-left 0.3s; cursor: default; animation: fadeRow 0.4s var(--ease-out) both; width: 100%; min-width: 0; }
.lb-item:hover { background: rgba(255,255,255,0.04); padding-left: 20px; }
.lb-item:last-child { border-bottom: none; }
.lb-left { display: flex; align-items: center; gap: 16px; position: relative; min-width: 0; flex: 1; }
.lb-avatar-wrap { position: relative; width: 46px; height: 46px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.1); padding: 2px; background: #000; flex-shrink: 0; overflow: visible; transition: border-color 0.35s, box-shadow 0.35s, transform 0.35s; box-shadow: 0 0 10px rgba(255,255,255,0.05); }
.lb-item:hover .lb-avatar-wrap { border-color: rgba(255,255,255,0.4); box-shadow: 0 0 20px rgba(255,255,255,0.2); transform: scale(1.05); }
.lb-avatar { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.lb-rank-badge { position: absolute; top: -10px; left: -8px; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; z-index: 10; }
.lb-rank-badge svg { width: 100%; height: 100%; }
.lb-rank-badge .gold-star { animation: pulseGlow 2.5s infinite ease-in-out; }
.lb-name { font-weight: 700; font-size: 15px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-score-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.lb-cookie-icon { width: 20px; height: 20px; opacity: 0.6; fill: currentColor; }
.lb-score-val { font-weight: 700; font-size: 15px; color: #fff; font-variant-numeric: tabular-nums; }

.skeleton-list { padding: 8px 0; }
.skeleton-row { display: flex; align-items: center; gap: 16px; padding: 12px 16px; }
.skel { background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%); background-size: 200% 100%; border-radius: 8px; animation: shimmer 1.8s infinite linear; }
.skel-avatar { width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; }
.skel-text { flex: 1; height: 14px; max-width: 140px; }

.live-section { width: 100%; margin-bottom: 32px; display: flex; flex-direction: column; min-width: 0; }
.live-header-center { text-align: center; margin-bottom: 16px; width: 100%; }
.live-title { font-size: 20px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 8px; }
.live-dot { width: 8px; height: 8px; background: #ef4444; border-radius: 50%; animation: pulseLive 2s infinite ease-in-out; }
.filters { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; width: 100%; justify-content: center; }
.filter-btn { padding: 8px 18px; border-radius: 100px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05); color: var(--text-dim); font-size: 13px; font-weight: 600; cursor: pointer; transition: background 0.3s, color 0.3s, border-color 0.3s; }
.filter-btn:hover { background: var(--surface-hi); color: var(--text); }
.filter-btn:active { transform: scale(0.95); }
.filter-btn.active { background: #fff; color: #000; border-color: #fff; box-shadow: 0 0 20px rgba(255,255,255,0.3); }

.live-table-container { background: rgba(10, 10, 12, 0.6); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid var(--border); border-radius: var(--radius); width: 100%; max-width: 100%; overflow-x: auto; overflow-y: auto; display: block; position: relative; min-width: 0; }
.live-table-container.fixed-height { height: 400px; }
.panel.full-screen-panel { height: calc(100vh - 130px); width: 100%; max-width: 100%; }
.live-table-container.expand-height { flex: 1; height: 100%; max-width: 100%; }
.live-table { width: 100%; min-width: 600px; border-collapse: collapse; }
.live-table thead { position: sticky; top: 0; z-index: 10; }
.live-table th { background: rgba(5, 5, 5, 0.9); backdrop-filter: blur(20px); text-align: left; padding: 16px; font-size: 11px; color: #71717a; text-transform: uppercase; border-bottom: 1px solid rgba(255, 255, 255, 0.05); font-weight: 700; letter-spacing: 1px; }
.th-content { display: flex; align-items: center; gap: 8px; }
.th-content svg { width: 14px; height: 14px; opacity: 0.7; }
.live-table td { padding: 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.03); font-size: 13px; color: #fff; transition: background 0.3s var(--ease-out); }
.live-table tr:hover td { background: rgba(255,255,255,0.04); }
.live-user-cell { display: flex; align-items: center; gap: 12px; }
.live-user-cell > div { display: flex; flex-direction: column; min-width: 0; }
.live-avatar { width: 32px; height: 32px; border-radius: 50%; background: #111; object-fit: cover; flex-shrink: 0; border: 1px solid rgba(255,255,255,0.1); }
.live-name { font-weight: 700; font-size: 14px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; color: #fff; }
.live-target { color: #71717a; font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 180px; }
.live-time { color: #a1a1aa; font-size: 12px; font-variant-numeric: tabular-nums; }
.live-val { font-weight: 600; font-variant-numeric: tabular-nums; }
.btn-ver-mais { background: transparent; color: #fff; border: 1px solid var(--border); padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; transition: background 0.25s, border-color 0.25s, transform 0.25s; }
.btn-ver-mais:hover { background: var(--surface-hi); border-color: rgba(255,255,255,0.2); transform: translateY(-1px); }
.btn-ver-mais:active { transform: scale(0.95); }

.card { background: rgba(10, 10, 12, 0.6); backdrop-filter: blur(24px); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; width: 100%; box-shadow: 0 4px 20px rgba(0,0,0,0.2); position: relative; transition: border-color 0.4s; }
.card::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(135deg, rgba(255,255,255,0.08), transparent 40%, transparent 60%, rgba(255,255,255,0.04)); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.card:hover { border-color: rgba(255,255,255,0.12); }
.card-title { font-size: 16px; font-weight: 600; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 8px; font-weight: 500; }
input[type=text], input[type=password] { width: 100%; padding: 14px 16px; background: rgba(0,0,0,0.4); border: 1px solid var(--border); border-radius: 12px; color: var(--text); font-size: 14px; outline: none; transition: border-color 0.3s, box-shadow 0.3s; }
input:focus { border-color: rgba(255,255,255,0.3); background: rgba(0,0,0,0.6); box-shadow: 0 0 0 4px rgba(255,255,255,0.05); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.input-action-group { display: flex; gap: 8px; }
.input-action-group input { flex: 1; }
.btn-icon { padding: 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--text-dim); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.25s, color 0.25s, border-color 0.25s; }
.btn-icon:hover { background: var(--surface-hi); color: var(--text); border-color: rgba(255,255,255,0.2); }
.btn-icon:active { transform: scale(0.9); }
.btn-icon svg { width: 20px; height: 20px; }

.upload-area { border: 2px dashed rgba(255,255,255,0.15); border-radius: 12px; padding: 24px; text-align: center; cursor: pointer; transition: all 0.2s; background: rgba(0,0,0,0.2); display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 120px; position: relative; }
.upload-area:hover { border-color: rgba(255,255,255,0.4); background: rgba(255,255,255,0.03); }
.upload-preview { display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--text-dim); font-size: 13px; font-weight: 500; }
.upload-preview svg { width: 24px; height: 24px; }
#imgPreview { max-width: 100px; max-height: 100px; object-fit: contain; border-radius: 8px; animation: popIn 0.3s ease-out; }

/* Loading */
.upload-loading { display: none; flex-direction: column; align-items: center; gap: 12px; color: var(--text-dim); font-size: 13px; font-weight: 500; }
.spinner { width: 24px; height: 24px; border: 3px solid rgba(255,255,255,0.1); border-radius: 50%; border-top-color: #fff; animation: spin 1s ease-in-out infinite; }

.btn { padding: 14px 24px; border-radius: 12px; border: none; font-weight: 600; font-size: 14px; cursor: pointer; transition: transform 0.25s, box-shadow 0.25s; display: inline-flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.btn-primary { background: #fff; color: #000; }
.btn-primary::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(0,0,0,0.05), transparent); transform: translateX(-100%); transition: transform 0.6s; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(255,255,255,0.2); }
.btn-primary:hover::before { transform: translateX(100%); }
.btn-primary:active { transform: scale(0.97); }
.btn-secondary { background: var(--surface-hi); border: 1px solid var(--border); color: var(--text); }
.btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); transform: translateY(-1px); }
.btn-secondary:active { transform: scale(0.97); }
.btn-block { width: 100%; }

.custom-select { position: relative; width: 100%; }
.select-trigger { width: 100%; padding: 14px 16px; background: rgba(0,0,0,0.4); border: 1px solid var(--border); border-radius: 12px; color: var(--text); font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; transition: border-color 0.3s, box-shadow 0.3s; font-family: inherit; text-align: left; }
.select-trigger:hover { border-color: rgba(255,255,255,0.2); }
.select-trigger:active { transform: scale(0.99); }
.custom-select.open .select-trigger { border-color: rgba(255,255,255,0.3); box-shadow: 0 0 0 4px rgba(255,255,255,0.05); }
.icon-chevron { width: 16px; height: 16px; transition: transform 0.3s var(--ease-out); }
.custom-select.open .icon-chevron { transform: rotate(180deg); }
.select-options { position: absolute; top: calc(100% + 6px); left: 0; width: 100%; background: rgba(15, 15, 20, 0.95); backdrop-filter: blur(24px); border: 1px solid var(--border); border-radius: 12px; padding: 6px; z-index: 1000; opacity: 0; pointer-events: none; transform: translateY(-6px) scale(0.98); transition: opacity 0.25s, transform 0.25s; box-shadow: 0 15px 40px rgba(0,0,0,0.8); transform-origin: top center; }
.custom-select.open .select-options { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.select-option { padding: 12px 14px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--text-dim); transition: background 0.2s, color 0.2s; }
.select-option:hover { background: var(--surface-hi); color: var(--text); }
.select-option:active { transform: scale(0.98); }
.select-option.active { background: var(--surface-hi); color: var(--text); font-weight: 600; }

/* ============ METHODS (Abas Internas e Design) ============ */
.panel[data-panel="methods"] { max-width: 720px; }

.panel-subtitle {
  font-size: 14px;
  color: var(--text-dim);
  margin-top: 6px;
  font-weight: 400;
}

/* Abas Internas */
.method-tabs {
  display: flex;
  gap: 8px;
  background: rgba(10, 10, 12, 0.6);
  padding: 6px;
  border-radius: 100px;
  border: 1px solid var(--border);
  margin-bottom: 24px;
  width: max-content;
}

.method-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 100px;
  background: transparent;
  color: var(--text-dim);
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
}

.method-tab-btn svg { width: 16px; height: 16px; }
.method-tab-btn:hover { color: var(--text); }
.method-tab-btn.active { background: #fff; color: #000; box-shadow: 0 2px 10px rgba(255,255,255,0.1); }

.method-tab-content { display: none; width: 100%; }
.method-tab-content.active { display: block; animation: fadeUp 0.3s var(--ease-out) both; }

/* Formulário */
.methods-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.method-section {
  display: flex;
  gap: 16px;
  background: rgba(10, 10, 12, 0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  transition: border-color 0.3s;
  z-index: 1;
}

.method-section::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), transparent 40%, transparent 60%, rgba(255,255,255,0.04));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.method-section:hover { border-color: rgba(255,255,255,0.12); }

.method-section:has(.custom-select.open) {
  z-index: 50;
}

.method-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.method-icon svg { width: 20px; height: 20px; }
.method-content { flex: 1; min-width: 0; }
.method-title { font-size: 14px; font-weight: 700; margin-bottom: 2px; color: #fff; }
.method-desc { font-size: 12px; color: var(--text-dim); margin-bottom: 14px; }

.method-section .form-group { margin-bottom: 0; }

.upload-area.compact {
  min-height: 78px;
  padding: 12px;
  border-radius: 10px;
}

.upload-area.compact .upload-preview svg { width: 18px; height: 18px; }
.upload-area.compact .upload-preview span { font-size: 11px; }
.upload-area.compact #imgPreview { max-width: 56px; max-height: 56px; }

.btn-generate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #d4d4d8 100%);
  color: #000;
  border: none;
  border-radius: 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s;
  box-shadow: 0 8px 25px rgba(255,255,255,0.15);
  margin-top: 4px;
}

.btn-generate:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(255,255,255,0.25);
}

.btn-generate:active { transform: scale(0.98); }

.btn-generate:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-generate svg { width: 18px; height: 18px; }

.profile-popover { position: absolute; top: 75px; right: 24px; width: 280px; background: rgba(10, 10, 12, 0.95); backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px); border: 1px solid var(--border); border-radius: 16px; z-index: 999; opacity: 0; pointer-events: none; transform: translateY(-8px) scale(0.97); transition: opacity 0.3s, transform 0.3s; box-shadow: 0 20px 50px rgba(0,0,0,0.9); }
.profile-popover::before { content: ''; position: absolute; top: -5px; right: 24px; width: 8px; height: 8px; background: rgba(10, 10, 12, 0.95); border-left: 1px solid var(--border); border-top: 1px solid var(--border); transform: rotate(45deg); }
.profile-popover.active { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.popover-content-new { padding: 16px; display: flex; flex-direction: column; align-items: center; }
.popover-avatar-wrap-new { width: 56px; height: 56px; margin-bottom: 8px; }
.popover-avatar-new { width: 100%; height: 100%; border-radius: 50%; border: 2px solid rgba(255,255,255,0.1); object-fit: cover; box-shadow: 0 0 20px rgba(255,255,255,0.05); }
.popover-header-new { width: 100%; text-align: center; }
.popover-header-new h4 { font-size: 14px; font-weight: 800; margin: 0 0 14px 0; color: #fff; }
.popover-stats-row { display: flex; justify-content: space-between; width: 100%; margin-bottom: 14px; text-align: center; gap: 6px; }
.pop-stat-new { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pop-stat-new span { font-size: 9px; color: var(--text-dim); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pop-stat-new strong { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.popover-rank-section { width: 100%; text-align: center; margin-bottom: 12px; background: rgba(255,255,255,0.03); padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); }
.rank-text { font-size: 10px; color: var(--text-dim); margin-bottom: 5px; }
.rank-progress-text { font-size: 9px; color: var(--text-dim); margin-bottom: 6px; font-weight: 600; }
.rank-progress-bar-bg { width: 100%; height: 4px; background: rgba(255,255,255,0.1); border-radius: 10px; overflow: hidden; margin-bottom: 8px; }
.rank-progress-bar { height: 100%; border-radius: 10px; transition: width 1s var(--ease-out); box-shadow: 0 0 10px currentColor; }
.rank-next { font-size: 10px; color: var(--text-dim); }
.popover-bottom-actions { width: 100%; }
.btn-logout-new { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239,68,68,0.2); font-size: 11px; font-weight: 600; cursor: pointer; padding: 8px; width: 100%; transition: background 0.25s, color 0.25s; border-radius: 8px; }
.btn-logout-new:hover { background: rgba(239, 68, 68, 0.2); color: #fff; }
.btn-logout-new:active { transform: scale(0.97); }

.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(8px); z-index: 10000; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s var(--ease-out); }
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-card { background: rgba(10, 10, 12, 0.95); backdrop-filter: blur(40px); border: 1px solid var(--border); border-radius: 24px; width: 90%; max-width: 600px; display: flex; flex-direction: column; transform: scale(0.95); transition: transform 0.3s var(--ease-out); box-shadow: 0 20px 60px rgba(0,0,0,0.9); }
.modal-overlay.active .modal-card { transform: scale(1); }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-size: 18px; font-weight: 600; }
.btn-close { background: none; border: none; color: var(--text-dim); font-size: 24px; cursor: pointer; transition: color 0.2s, transform 0.2s; }
.btn-close:hover { color: var(--text); transform: rotate(90deg); }
.modal-body { padding: 24px; overflow-y: auto; max-height: 70vh; }
.log-content { background: rgba(0,0,0,0.6); border: 1px solid var(--border); border-radius: 12px; padding: 16px; font-family: monospace; font-size: 12px; color: #fff; word-break: break-all; white-space: pre-wrap; max-height: 150px; overflow-y: auto; }

@media (max-width: 768px) {
  .top-nav { padding: 0 16px; }
  .nav-user-name { display: none; }
  .nav-logo { width: 24px; height: 24px; }
  .nav-brand-text { font-size: 16px; }
  .main-content { padding: 16px 12px; padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  .greeting-mobile { display: block; font-size: 24px; }
  .panel-title { font-size: 24px; }
  .stats-grid { gap: 12px; }
  .stat-block { padding: 16px 12px; }
  .stat-value { font-size: 28px; }
  .stat-title { font-size: 10px; }
  .chart-row { height: 30px; gap: 2px; }
  .lb-item { padding: 12px 14px; }
  .lb-avatar-wrap { width: 42px; height: 42px; }
  .lb-name { font-size: 14px; }
  .live-table-container.fixed-height { height: 380px; }
  .panel.full-screen-panel { height: calc(100vh - 100px); }
  .profile-popover { position: absolute; top: 65px; right: 12px; left: auto; width: 260px; transform: translateY(-8px) scale(0.97); }
  .profile-popover::before { right: 20px; }
  .profile-popover.active { transform: translateY(0) scale(1); }
  .login-card { padding: 40px 28px 32px; border-radius: 24px; }
  .login-brand h1 { font-size: 24px; }
  .login-logo { width: 84px; height: 84px; border-radius: 24px; }
  .login-logo img { border-radius: 20px; }
  .login-subtitle { font-size: 13px; margin-bottom: 28px; }
  .login-btn { padding: 14px 24px; font-size: 14px; }
  .orb-1, .orb-2 { filter: blur(60px); opacity: 0.4; }
  .orb-1 { width: 300px; height: 300px; }
  .orb-2 { width: 250px; height: 250px; }
  .panel[data-panel="methods"] { max-width: 100%; }
  input[type=text], input[type=password] { font-size: 16px; }
  .method-section { flex-direction: column; gap: 12px; padding: 16px; }
  .method-icon { width: 36px; height: 36px; }
  .method-icon svg { width: 18px; height: 18px; }
  .method-tabs { width: 100%; justify-content: center; }
}