@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
:root {
  --bg: #080b12;
  --bg2: #0d1120;
  --surface: rgba(255,255,255,0.04);
  --surface-hover: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(139,92,246,0.4);
  --accent: #8b5cf6;
  --accent2: #6d28d9;
  --accent-glow: rgba(139,92,246,0.15);
  --text: #f1f5f9;
  --text-muted: #64748b;
  --text-dim: #334155;
  --error: #f87171;
  --success: #34d399;
  --nav-h: 64px;
}


/* 2. RESET E ESTRUTURA GLOBAL */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  transition: background 0.3s, color 0.3s; /* Transição suave ao trocar tema */
}

/* Efeito de brilho no fundo - Ajustado para sumir um pouco no modo claro se desejar */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background:
    radial-gradient(ellipse 60% 40% at 70% 10%, var(--accent-glow) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 10% 80%, rgba(99,102,241,0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* 3. BOTÃO DE TROCA DE TEMA (UI) */
.theme-toggle {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 4px;
  gap: 4px;
  width: fit-content;
}

.theme-btn {
  border: none;
  background: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}

.theme-btn.active {
  background: var(--accent);
  color: white;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background:
    radial-gradient(ellipse 60% 40% at 70% 10%, rgba(139,92,246,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 10% 80%, rgba(99,102,241,0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Ajuste para o link de suporte (WhatsApp) */
.support-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.support-link:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

/* Container do ícone + texto */
.support-link .left {
  display: flex;
  align-items: center; /* Alinha o ícone e o texto lado a lado */
  gap: 12px; /* Espaçamento entre o ícone e as informações */
}

/* Box do ícone */
.support-link .icon {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0; /* Impede o ícone de achatar */
  box-shadow: 0 4px 12px var(--accent-glow);
}

.support-link .icon i {
  font-size: 20px;
  color: #fff;
}

/* Estilização do texto interno */
.support-link strong {
  display: block;
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
}

.support-link p {
  font-size: 11px;
  color: var(--text-muted);
}


.page {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding-bottom: var(--nav-h);
  position: relative;
  z-index: 1;
}
.page::-webkit-scrollbar { display: none; }

.inner {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px;
}

.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.2s, background 0.2s;
}
.glass:hover { background: var(--surface-hover); border-color: var(--border-hover); }

.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(8,11,18,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
}

.sidebar{
  right: -100%;
  left: auto;
  transition: right .3s ease;
}

.sidebar.open{
  right: 0;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.5px;
  padding: 8px 20px;
  border-radius: 14px;
  transition: color 0.2s;
  -webkit-user-select: none;
  user-select: none;
}
.nav-item i { font-size: 20px; }
.nav-item.active { color: var(--accent); }
.nav-item.active i { filter: drop-shadow(0 0 6px var(--accent)); }

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.badge-admin { background: rgba(139,92,246,0.15); color: var(--accent); border: 1px solid rgba(139,92,246,0.3); }
.badge-premium { background: rgba(251,191,36,0.1); color: #fbbf24; border: 1px solid rgba(251,191,36,0.25); }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: 14px;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  -webkit-user-select: none;
  user-select: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent2); box-shadow: 0 0 20px var(--accent-glow); }
.btn-ghost { background: var(--surface); color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface-hover); color: var(--text); border-color: var(--border-hover); }
.btn-full { width: 100%; }
.btn:active { opacity: 0.8; transform: scale(0.98); }

input, textarea {
  font-family: 'Inter', sans-serif;
  width: 100%;
  padding: 13px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
input::placeholder { color: var(--text-dim); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.loading {
  position: fixed;
  inset: 0;
  background: rgba(8,11,18,0.9);
  backdrop-filter: blur(8px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.loading.show { display: flex; }
.loading-ring {
  width: 38px; height: 38px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { color: var(--text-muted); font-size: 12px; letter-spacing: 1px; }

.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  backdrop-filter: blur(12px);
  white-space: nowrap;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { border-color: rgba(52,211,153,0.3); color: var(--success); }
.toast.error { border-color: rgba(248,113,113,0.3); color: var(--error); }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  font-size: 12px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.xp-bar-wrap {
  height: 4px;
  background: var(--surface);
  border-radius: 100px;
  overflow: hidden;
}
.xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  border-radius: 100px;
  transition: width 0.6s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 0 8px var(--accent-glow);
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-box-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; }
.stat-box-val { font-size: 22px; font-weight: 700; color: var(--text); }
.stat-box-icon { font-size: 18px; color: var(--accent); margin-bottom: 4px; opacity: 0.8; }

.section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.key-box {
  background: rgba(139,92,246,0.06);
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.key-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 1px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.key-copy { color: var(--text-muted); cursor: pointer; font-size: 16px; transition: color 0.2s; flex-shrink: 0; }
.key-copy:hover { color: var(--accent); }

.level-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(139,92,246,0.1);
  border: 1px solid rgba(139,92,246,0.25);
  border-radius: 100px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.5px;
}

.avatar {
  border-radius: 18px;
  background-size: cover;
  background-position: center;
  border: 2px solid rgba(139,92,246,0.3);
  flex-shrink: 0;
}

.flash { padding: 12px 16px; border-radius: 12px; font-size: 13px; font-weight: 500; margin-bottom: 16px; }
.flash-success { background: rgba(52,211,153,0.07); border: 1px solid rgba(52,211,153,0.2); color: var(--success); }
.flash-error { background: rgba(248,113,113,0.07); border: 1px solid rgba(248,113,113,0.2); color: var(--error); }

.menu-dots-btn{
  width:36px;
  height:36px;
  border-radius:10px;
  border:1px solid var(--border);
  background:rgba(0,0,0,0.4);
  color:var(--text);
  display:flex;
  align-items:center;
  justify-content:center;
}

.menu-dropdown{
  position:absolute;
  top:40px;
  right:0;
  width:180px;
  background:#080b12;
  border:1px solid var(--border);
  border-radius:12px;
  display:none;
  flex-direction:column;
  padding:6px;
}

.menu-dropdown button{
  background:none;
  border:none;
  color:var(--text);
  padding:10px;
  text-align:left;
  border-radius:8px;
  display:flex;
  gap:8px;
}

.menu-dropdown button:hover{
  background:rgba(255,255,255,0.05);
}

.menu-dropdown .danger{
  color:#f87171;
}

@media (min-width: 768px) {
  .inner { padding: 28px 24px; }
}
