/* ========================================================
   AEMEATH LINK - ESTILOS E SISTEMA DE DESIGN ANIME WAIFU TECH
   ======================================================== */

/* --- VARIÁVEIS E TEMAS BASE --- */
:root {
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-tech: 'Orbitron', 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-width: 500px;
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  --btn-radius: 9999px; /* pill */
  --card-radius: 26px;
}

/* 1. TEMA CYBER STARLIGHT (WAIFU TECH) - PADRÃO DA PLATAFORMA */
[data-theme="cyber-neon"] {
  --bg-page: #0b0917;
  --bg-gradient: radial-gradient(circle at 50% 0%, #1c1335 0%, #0b0917 80%);
  --bg-card: rgba(18, 14, 34, 0.85);
  --card-border: rgba(6, 182, 212, 0.32);
  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --text-subtle: #94a3b8;

  --link-bg: rgba(26, 21, 50, 0.75);
  --link-border: rgba(6, 182, 212, 0.25);
  --link-text: #ffffff;
  --link-subtitle: #cbd5e1;
  --link-hover-bg: linear-gradient(135deg, rgba(6, 182, 212, 0.3), rgba(236, 72, 153, 0.3));
  --link-hover-border: #06b6d4;

  --accent-color: #06b6d4;
  --accent-gradient: linear-gradient(135deg, #06b6d4, #a855f7, #ec4899);
  --accent-glow: rgba(6, 182, 212, 0.45);

  --highlight-bg: linear-gradient(135deg, rgba(6, 182, 212, 0.22), rgba(236, 72, 153, 0.22));
  --highlight-border: #ec4899;
  --highlight-badge-bg: linear-gradient(135deg, #06b6d4, #ec4899);
  --highlight-badge-text: #ffffff;

  --social-bg: rgba(6, 182, 212, 0.1);

  --modal-bg: #110d24;
  --modal-border: rgba(6, 182, 212, 0.35);
  --input-bg: rgba(26, 21, 50, 0.85);
  --input-border: rgba(6, 182, 212, 0.3);
}

/* 2. TEMA GOLDEN DARKNESS (BLACK & GOLD) */
[data-theme="black-gold"] {
  --bg-page: #0a0a0c;
  --bg-gradient: radial-gradient(circle at 50% 0%, #1c1a17 0%, #0a0a0c 80%);
  --bg-card: rgba(18, 18, 22, 0.85);
  --card-border: rgba(234, 179, 8, 0.28);
  --text-main: #fefce8;
  --text-muted: #e2e8f0;
  --text-subtle: #a1a1aa;

  --link-bg: rgba(28, 28, 34, 0.8);
  --link-border: rgba(234, 179, 8, 0.22);
  --link-text: #fefce8;
  --link-subtitle: #cbd5e1;
  --link-hover-bg: rgba(45, 42, 35, 0.95);
  --link-hover-border: #facc15;
  --link-hover-text: #ffffff;

  --accent-color: #f59e0b;
  --accent-gradient: linear-gradient(135deg, #f59e0b, #fbbf24, #d97706);
  --accent-glow: rgba(234, 179, 8, 0.4);

  --highlight-bg: linear-gradient(135deg, rgba(234, 179, 8, 0.18), rgba(217, 119, 6, 0.22));
  --highlight-border: #facc15;
  --highlight-badge-bg: linear-gradient(135deg, #f59e0b, #eab308);
  --highlight-badge-text: #0a0a0c;

  --social-bg: rgba(234, 179, 8, 0.08);

  --modal-bg: #121216;
  --modal-border: rgba(234, 179, 8, 0.25);
  --input-bg: rgba(24, 24, 30, 0.85);
  --input-border: rgba(234, 179, 8, 0.25);
}

/* 3. TEMA PASTEL SAKURA */
[data-theme="pastel-sakura"] {
  --bg-page: #faf8f9;
  --bg-gradient: radial-gradient(circle at 50% 0%, #fff1f2 0%, #faf8f9 85%);
  --bg-card: rgba(255, 255, 255, 0.94);
  --card-border: rgba(244, 114, 182, 0.28);
  --text-main: #1e1322;
  --text-muted: #57465e;
  --text-subtle: #9885a0;

  --link-bg: #ffffff;
  --link-border: #fed7e2;
  --link-text: #1e1322;
  --link-subtitle: #6d5b74;
  --link-hover-bg: #fff1f2;
  --link-hover-border: #f43f5e;

  --accent-color: #f43f5e;
  --accent-gradient: linear-gradient(135deg, #fb7185, #f43f5e, #c084fc);
  --accent-glow: rgba(244, 63, 94, 0.25);

  --highlight-bg: linear-gradient(135deg, #fff1f2, #faf5ff);
  --highlight-border: #f43f5e;
  --highlight-badge-bg: #f43f5e;
  --highlight-badge-text: #ffffff;

  --social-bg: #fff1f2;

  --modal-bg: #ffffff;
  --modal-border: #fbcfe8;
  --input-bg: #fff5f7;
  --input-border: #fecdd3;
}

/* 4. TEMA OBSIDIAN GLASS */
[data-theme="dark-modern"] {
  --bg-page: #0b0f19;
  --bg-gradient: radial-gradient(circle at 50% 0%, #1e293b 0%, #0b0f19 80%);
  --bg-card: rgba(17, 24, 39, 0.85);
  --card-border: rgba(255, 255, 255, 0.1);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  --link-bg: rgba(30, 41, 59, 0.7);
  --link-border: rgba(255, 255, 255, 0.1);
  --link-text: #f1f5f9;
  --link-subtitle: #94a3b8;
  --link-hover-bg: rgba(51, 65, 85, 0.9);
  --link-hover-border: rgba(56, 189, 248, 0.5);

  --accent-color: #38bdf8;
  --accent-gradient: linear-gradient(135deg, #38bdf8, #818cf8);
  --accent-glow: rgba(56, 189, 248, 0.35);

  --highlight-bg: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(129, 140, 248, 0.18));
  --highlight-border: #38bdf8;
  --highlight-badge-bg: #38bdf8;
  --highlight-badge-text: #0b0f19;

  --social-bg: rgba(255, 255, 255, 0.06);

  --modal-bg: #111827;
  --modal-border: rgba(255, 255, 255, 0.12);
  --input-bg: rgba(31, 41, 55, 0.85);
  --input-border: rgba(255, 255, 255, 0.12);
}

/* Formatos de Botão */
body.btn-shape-rounded-pill { --btn-radius: 9999px; }
body.btn-shape-rounded-md { --btn-radius: 14px; }
body.btn-shape-square { --btn-radius: 6px; }

/* --- RESET & REGRAS BÁSICAS --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-page);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, textarea, select {
  font-family: inherit;
}

/* ========================================================
   CAMADA DE WALLPAPER PERSONALIZADO
   ======================================================== */
.wallpaper-layer {
  position: fixed;
  inset: -15px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.4s ease, filter 0.3s ease;
}

.wallpaper-layer.active {
  opacity: 1;
}

.wallpaper-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s ease, background-color 0.3s ease;
}

.wallpaper-overlay.active {
  opacity: 1;
}

/* Efeito de Estrelas / Partículas Ambientais */
.ambient-stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.star {
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
  animation: twinkle 4s infinite ease-in-out alternate;
}

.star-1 { top: 15%; left: 10%; width: 3px; height: 3px; background: var(--accent-color); animation-delay: 0s; }
.star-2 { top: 30%; right: 12%; width: 4px; height: 4px; background: #ec4899; animation-delay: 1.5s; }
.star-3 { bottom: 25%; left: 8%; width: 3px; height: 3px; background: #38bdf8; animation-delay: 2.2s; }
.star-4 { bottom: 15%; right: 15%; width: 5px; height: 5px; background: var(--accent-color); animation-delay: 0.8s; }

@keyframes twinkle {
  0% { opacity: 0.2; transform: scale(0.8); }
  100% { opacity: 0.9; transform: scale(1.3); }
}

/* --- BARRA SUPERIOR DE CONTROLES RÁPIDOS --- */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  transition: padding-right var(--transition-normal);
}

.brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(18, 18, 22, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  font-family: var(--font-tech);
  letter-spacing: 0.04em;
}

.brand-sparkle {
  color: var(--accent-color);
  font-size: 0.9rem;
  animation: spinSlow 10s linear infinite;
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(18, 18, 22, 0.7);
  backdrop-filter: blur(12px);
  padding: 6px;
  border-radius: 9999px;
  border: 1px solid var(--card-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--link-border);
  background: var(--social-bg);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  background: var(--accent-color);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-admin-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 9999px;
  background: var(--accent-gradient);
  color: #ffffff;
  border: none;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--accent-glow);
  transition: all var(--transition-fast);
}

.btn-admin-trigger:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.1);
}

/* --- CONTAINER PRINCIPAL (MOBILE-FIRST) --- */
.page-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 10px 16px 40px 16px;
  z-index: 10;
  transition: padding-right var(--transition-normal);
}

@media (min-width: 1120px) {
  body.admin-open .page-wrapper {
    padding-right: 568px;
  }
  body.admin-open .top-nav {
    padding-right: 568px;
  }
}

.linktree-card {
  width: 100%;
  max-width: var(--max-width);
  background: var(--bg-card);
  backdrop-filter: blur(18px);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  padding: 34px 22px 28px 22px;
  box-shadow: 0 20px 45px -15px rgba(0, 0, 0, 0.4), 0 0 1px rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 26px;
  transition: transform var(--transition-normal);
  position: relative;
}

/* Efeito sutil de tech bracket no topo do card */
.waifu-card::before {
  content: '✦ AEMEATH LINK';
  position: absolute;
  top: 10px;
  left: 20px;
  font-family: var(--font-tech);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--accent-color);
  opacity: 0.6;
}

/* --- CABEÇALHO DO PERFIL & AVATAR WAIFU TECH --- */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.avatar-wrapper {
  position: relative;
  display: inline-block;
  margin-top: 6px;
}

.avatar-ring {
  width: 106px;
  height: 106px;
  border-radius: 50%;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all var(--transition-normal);
}

/* Molduras de Avatar Estilizadas */
.avatar-ring.frame-gold {
  background: linear-gradient(135deg, #f59e0b, #fbbf24, #d97706);
  box-shadow: 0 0 25px rgba(234, 179, 8, 0.45);
}

.avatar-ring.frame-hologram {
  background: linear-gradient(135deg, #06b6d4, #a855f7, #ec4899);
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.45);
}

.avatar-ring.frame-sakura {
  background: linear-gradient(135deg, #fb7185, #f43f5e, #c084fc);
  box-shadow: 0 0 25px rgba(244, 63, 94, 0.35);
}

.avatar-ring.frame-minimal {
  background: var(--card-border);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-page);
}

.avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  text-transform: uppercase;
}

/* Mascote / Badge de Status Anime no Canto */
.mascot-status-badge {
  position: absolute;
  bottom: 0px;
  right: -6px;
  background: var(--modal-bg);
  border: 1.5px solid var(--accent-color);
  padding: 3px 8px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  animation: badgeBreathe 3s infinite ease-in-out alternate;
}

@keyframes badgeBreathe {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

.profile-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  max-width: 90%;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.profile-name {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.profile-handle {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent-color);
}

.profile-bio {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-top: 4px;
}

/* --- LISTA DE LINKS --- */
.links-section {
  width: 100%;
}

.links-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

/* Divisores de Categoria */
.category-header {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-color);
  margin-top: 14px;
  margin-bottom: 2px;
  padding-left: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--card-border);
}

/* Card de Link Individual */
.link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--link-bg);
  border: 1.5px solid var(--link-border);
  border-radius: var(--btn-radius);
  color: var(--link-text);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-fast);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.link-card:hover {
  background: var(--link-hover-bg);
  border-color: var(--link-hover-border);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
  color: var(--link-hover-text, var(--link-text));
}

.link-card:active {
  transform: scale(0.985);
}

.link-main-content {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.link-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  border: 1px solid var(--link-border);
  color: var(--accent-color);
  overflow: hidden;
}

.link-icon-box svg {
  width: 22px;
  height: 22px;
}

.link-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.link-text-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-align: left;
}

.link-title {
  font-weight: 700;
  font-size: 1.02rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.link-subtitle {
  font-size: 0.83rem;
  color: var(--link-subtitle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.link-action-indicator {
  display: flex;
  align-items: center;
  margin-left: 12px;
  color: var(--text-subtle);
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.link-card:hover .link-action-indicator {
  transform: translateX(3px);
  color: var(--accent-color);
}

/* ========================================================
   CARD RARO / DESTAQUE ESPECIAL (SSR HOLOGRAPHIC)
   ======================================================== */
.link-card.highlighted {
  background: var(--highlight-bg);
  border-color: var(--highlight-border);
  box-shadow: 0 0 20px var(--accent-glow);
  animation: rareCardPulse 3.5s infinite alternate ease-in-out;
}

@keyframes rareCardPulse {
  0% { box-shadow: 0 0 12px var(--accent-glow); border-color: var(--highlight-border); }
  50% { box-shadow: 0 0 28px var(--accent-glow), 0 0 8px rgba(236, 72, 153, 0.3); border-color: #facc15; }
  100% { box-shadow: 0 0 18px var(--accent-glow); border-color: var(--highlight-border); }
}

.highlight-badge {
  position: absolute;
  top: 0;
  right: 20px;
  background: var(--highlight-badge-bg);
  color: var(--highlight-badge-text);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Estado de lista vazia */
.empty-state {
  text-align: center;
  padding: 34px 20px;
  background: var(--link-bg);
  border: 2px dashed var(--link-border);
  border-radius: 16px;
}

.empty-state h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 380px;
  margin: 0 auto;
}

/* --- RODAPÉ --- */
.tree-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
}

.btn-copy-url {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 9999px;
  background: var(--social-bg);
  border: 1px solid var(--link-border);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-copy-url:hover {
  background: var(--accent-color);
  color: #ffffff;
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.branding {
  font-size: 0.8rem;
  color: var(--text-subtle);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ========================================================
   MODAIS E PAINEL LATERAL DE ADMINISTRAÇÃO
   ======================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* Painel Lateral de Gerenciamento no Canto Direito (Não bloqueia a visualização!) */
.admin-drawer-backdrop {
  z-index: 90;
  background: transparent;
  backdrop-filter: none;
  justify-content: flex-end;
  align-items: stretch;
  padding: 14px;
  pointer-events: none;
}

.admin-drawer-backdrop.open {
  pointer-events: none;
}

.admin-drawer-backdrop.open .modal-dialog-admin {
  pointer-events: auto;
  transform: translateX(0);
}

@media (max-width: 1079px) {
  .admin-drawer-backdrop.open {
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    pointer-events: auto;
  }
}

.modal-dialog {
  background: var(--modal-bg);
  border: 1px solid var(--modal-border);
  border-radius: 24px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55);
  transform: translateY(20px) scale(0.97);
  transition: transform var(--transition-normal);
}

.modal-backdrop.open .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-dialog-admin {
  max-width: 540px;
  height: calc(100vh - 28px);
  max-height: calc(100vh - 28px);
  border-radius: 22px;
  transform: translateX(48px);
  box-shadow: -12px 0 45px rgba(0, 0, 0, 0.45);
}

.modal-dialog-sm {
  max-width: 520px;
}

.modal-dialog-xs {
  max-width: 390px;
}

.logout-confirm-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 28px 24px;
}

.logout-confirm-body h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
}

.logout-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
}

.modal-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--modal-border);
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.modal-title-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-gradient);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-header h2, .modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.25;
}

.modal-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-subtle);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.modal-close-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

/* Abas de Navegação (4 colunas visíveis sem cortar texto) */
.admin-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--modal-border);
  background: rgba(0, 0, 0, 0.22);
}

.tab-btn {
  padding: 10px 4px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.tab-btn svg {
  width: 17px;
  height: 17px;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
  background: rgba(255, 255, 255, 0.03);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.tab-panel {
  display: none;
  flex-direction: column;
  gap: 20px;
}

.tab-panel.active {
  display: flex;
}

.tab-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.tab-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Lista de Gerenciamento de Links no Admin */
.admin-links-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.admin-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 14px;
  padding: 12px 16px;
  gap: 12px;
  transition: all var(--transition-fast);
}

.admin-link-item.inactive {
  opacity: 0.55;
  background: rgba(0, 0, 0, 0.15);
}

.admin-link-item.dragging {
  opacity: 0.4;
  border-style: dashed;
}

.drag-handle {
  cursor: grab;
  color: var(--text-subtle);
  display: flex;
  align-items: center;
  padding: 4px;
}

.admin-link-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.admin-link-icon {
  font-size: 1.25rem;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  overflow: hidden;
}

.icon-custom-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.link-icon-preview-mini {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  color: var(--accent-color);
  font-size: 1.25rem;
}

.link-icon-preview-mini svg {
  width: 20px;
  height: 20px;
}

.admin-link-icon svg {
  width: 20px;
  height: 20px;
}

.admin-link-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-link-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-link-title {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-featured {
  background: var(--accent-color);
  color: #000;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.admin-link-url {
  font-size: 0.8rem;
  color: var(--text-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-link-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-ctrl {
  background: none;
  border: 1px solid transparent;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-ctrl:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-color: var(--input-border);
}

.btn-ctrl.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: #ef4444;
}

/* ========================================================
   SMART URL & PLATAFORMAS (@ E / RESOLVER)
   ======================================================== */
.smart-url-container {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.url-prefix-tag {
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid var(--input-border);
  border-right: none;
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: monospace;
}

.smart-url-input {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

.smart-url-hint code {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent-color);
}

.link-resolved-preview {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--text-subtle);
  word-break: break-all;
}

.link-resolved-preview strong {
  color: var(--accent-color);
}

.platform-detect-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.4);
  color: var(--accent-color);
  font-size: 0.82rem;
  font-weight: 600;
  animation: fadeIn 0.3s ease;
}

.platform-detect-badge svg {
  width: 18px;
  height: 18px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.platform-svg-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
  max-height: 150px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--input-border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
}

.platform-btn-pick {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.platform-btn-pick svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.platform-btn-pick:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-color);
  transform: translateY(-1px);
}

.platform-btn-pick.active {
  background: var(--accent-color);
  color: #000000;
  border-color: var(--accent-color);
}

/* ========================================================
   CONFIGURAÇÃO DE WALLPAPER
   ======================================================== */
.wallpaper-config-box {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--input-border);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-gradient);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wallpaper-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
}

.wp-preset-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--input-bg);
  border: 2px solid var(--input-border);
  border-radius: 12px;
  padding: 6px;
  cursor: pointer;
  color: var(--text-main);
  font-size: 0.75rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.wp-preset-card:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.wp-preset-card.active {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px var(--accent-color), 0 4px 14px var(--accent-glow);
}

.wp-thumb {
  width: 100%;
  height: 54px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
}

.wp-thumb-none {
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.05), rgba(255,255,255,0.05) 8px, transparent 8px, transparent 16px);
  border: 1px dashed var(--input-border);
}

.wallpaper-inputs-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.flex-1 { flex: 1; }

.wallpaper-sliders-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  background: var(--input-bg);
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid var(--input-border);
}

.slider-control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slider-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.slider-label-row span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.range-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  cursor: pointer;
  accent-color: var(--accent-color);
}

/* ========================================================
   SISTEMA DE CONTAS & LINK ÚNICO
   ======================================================== */
.account-panel-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.account-card-highlight {
  background: var(--highlight-bg);
  border: 1.5px solid var(--accent-color);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.account-badge-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-color);
}

.account-url-display {
  display: block;
  font-family: var(--font-heading);
  font-size: 1rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  padding: 10px 14px;
}

.url-prefix {
  color: var(--text-muted);
  font-weight: 500;
}

.url-handle {
  color: var(--text-main);
  font-weight: 800;
}

.account-url-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.account-url-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

/* --- FORMULÁRIOS & CAMPOS --- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.full-width {
  grid-column: 1 / -1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.input-field {
  width: 100%;
  padding: 12px 14px;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: 12px;
  color: var(--text-main);
  font-size: 0.92rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input-field:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.char-count {
  font-size: 0.75rem;
  color: var(--text-subtle);
  align-self: flex-end;
}

.helper-text {
  font-size: 0.78rem;
  color: var(--text-subtle);
}

/* Avatar Edit Row */
.avatar-edit-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 4px;
}

.avatar-preview-box {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--accent-color);
  flex-shrink: 0;
}

.avatar-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-inputs {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upload-or-divider {
  font-size: 0.78rem;
  color: var(--text-subtle);
}

/* Switch Controls */
.switch-control {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch-control input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: 0.3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-color);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.checkbox-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  padding: 14px 18px;
  border-radius: 12px;
}

.checkbox-details {
  display: flex;
  flex-direction: column;
}

.checkbox-details strong {
  font-size: 0.92rem;
}

.checkbox-details span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Botões Globais */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.84rem;
  border-radius: 8px;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #0a0a0c;
  font-weight: 700;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--input-border);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.btn-danger:hover {
  background: #ef4444;
  color: #ffffff;
}

.full-width {
  width: 100%;
}

.file-upload-btn {
  cursor: pointer;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
}

/* Seletor de Emojis Rápidos */
.emoji-presets {
  display: flex;
  gap: 4px;
}

.preset-emoji {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  padding: 6px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.preset-emoji:hover {
  transform: scale(1.2);
}

/* --- GRADE DE TEMAS --- */
.themes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.theme-card {
  border: 2px solid var(--input-border);
  border-radius: 16px;
  padding: 12px;
  cursor: pointer;
  background: var(--input-bg);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all var(--transition-fast);
}

.theme-card:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.theme-card.active {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px var(--accent-color), 0 8px 20px var(--accent-glow);
}

.theme-preview-box {
  height: 75px;
  border-radius: 10px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.preview-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}

.preview-line {
  width: 50px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.3);
}

.preview-btn {
  width: 80%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.preview-black-gold { background: #121215; border: 1px solid #f59e0b; }
.preview-black-gold .preview-avatar { background: #f59e0b; }
.preview-black-gold .preview-btn { background: rgba(245, 158, 11, 0.35); }

.preview-cyber-neon { background: #0b0917; border: 1px solid #06b6d4; }
.preview-cyber-neon .preview-avatar { background: #ec4899; }
.preview-cyber-neon .preview-btn { background: rgba(6, 182, 212, 0.4); }

.preview-pastel-sakura { background: #faf8f9; border: 1px solid #fb7185; }
.preview-pastel-sakura .preview-avatar { background: #f43f5e; }
.preview-pastel-sakura .preview-btn { background: #fecdd3; }

.preview-dark-modern { background: #0f172a; }

.theme-info strong {
  display: block;
  font-size: 0.9rem;
}

.theme-info span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.button-shape-selector {
  margin-top: 24px;
}

.button-shape-selector h4 {
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.shape-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.shape-btn {
  padding: 8px 16px;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  color: var(--text-main);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.shape-btn:hover {
  border-color: var(--accent-color);
}

.shape-btn.active {
  background: var(--accent-color);
  color: #0a0a0c;
  font-weight: 700;
  border-color: var(--accent-color);
}

/* --- ZONA DE PERIGO (CONTA) --- */
.danger-zone {
  margin-top: 28px;
  padding: 20px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.danger-info h4 {
  font-size: 0.95rem;
}

.danger-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- MODAL DE COMPARTILHAMENTO --- */
.share-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.qr-code-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.qr-code-img {
  width: 180px;
  height: 180px;
  object-fit: contain;
}

.qr-caption {
  font-size: 0.78rem;
  color: #475569;
}

.copy-box {
  display: flex;
  gap: 8px;
  width: 100%;
}

.share-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.social-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
  transition: transform var(--transition-fast);
}

.social-share-btn svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.social-share-btn:hover {
  transform: translateY(-2px);
}

.btn-wa { background: #25d366; }
.btn-tw { background: #000000; border: 1px solid rgba(255, 255, 255, 0.18); }
.btn-li { background: #0a66c2; }
.btn-tg { background: #229ed9; }

/* --- TOAST NOTIFICATIONS (CANTO INFERIOR ESQUERDO) --- */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 250;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  pointer-events: none;
  max-width: calc(100vw - 48px);
}

.toast {
  background: #111827;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  padding: 12px 20px;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: auto;
}

.toast.success {
  border-left: 4px solid var(--accent-color);
}

.toast.error {
  border-left: 4px solid #ef4444;
}

@keyframes toastSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================================
   TELA DE CARREGAMENTO, AUTENTICAÇÃO E 404
   ======================================================== */
.state-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px 20px;
  z-index: 10;
}

.loading-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--accent-color);
  animation: spinLoader 0.85s linear infinite;
}

@keyframes spinLoader {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.auth-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 16px 48px 16px;
  z-index: 10;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  padding: 36px 26px 28px 26px;
  box-shadow: 0 25px 55px -15px rgba(0, 0, 0, 0.5), 0 0 1px rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
}

.auth-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.auth-card h2 {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.auth-header p, .not-found-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.setup-notice {
  background: rgba(245, 158, 11, 0.1);
  border: 1px dashed var(--accent-color);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.setup-notice-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-color);
  font-size: 0.86rem;
}

.setup-notice code {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-main);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--input-border);
  border-radius: 14px;
  padding: 4px;
}

.auth-tab-btn {
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.auth-tab-btn:hover {
  color: var(--text-main);
}

.auth-tab-btn.active {
  background: var(--accent-gradient);
  color: #0a0a0c;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-inline-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
}

.text-link-btn {
  background: none;
  border: none;
  color: var(--accent-color);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
}

.text-link-btn:hover {
  text-decoration: underline;
}

.username-feedback {
  font-size: 0.78rem;
  font-weight: 600;
  min-height: 16px;
}

.username-feedback.ok {
  color: #10b981;
}

.username-feedback.err {
  color: #f87171;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--card-border);
}

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

.btn-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--input-border);
  transition: all var(--transition-fast);
}

.btn-oauth-google {
  background: #ffffff;
  color: #1f2937;
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-oauth-google:hover {
  background: #f3f4f6;
  transform: translateY(-2px);
}

.btn-oauth-discord {
  background: #5865F2;
  color: #ffffff;
  border-color: #5865F2;
}

.btn-oauth-discord:hover {
  background: #4752C4;
  transform: translateY(-2px);
}

.btn-logout-icon:hover {
  background: #ef4444;
  border-color: #ef4444;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

.not-found-card {
  text-align: center;
  align-items: center;
}

.not-found-card h2 span {
  color: var(--accent-color);
}

.not-found-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
}

/* ========================================================
   CONTAS CONECTADAS (VINCULAR GOOGLE / DISCORD)
   ======================================================== */
.connected-accounts-card {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--input-border);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.connected-email-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  font-size: 0.82rem;
  color: var(--text-muted);
  word-break: break-all;
}

.connected-email-pill svg {
  width: 15px;
  height: 15px;
  color: var(--accent-color);
  flex-shrink: 0;
}

.identities-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.identity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
}

.identity-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.identity-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.identity-icon.google {
  background: #ffffff;
}

.identity-icon.discord {
  background: #5865F2;
  color: #ffffff;
}

.identity-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.identity-meta strong {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.identity-meta span {
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.identity-status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
}

.identity-action-btn {
  flex-shrink: 0;
}

/* ========================================================
   MASCOTES ANIMADOS & GALERIA DE STICKERS AEMEATH (GIF)
   ======================================================== */
.auth-mascot-ring {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  padding: 3px;
  background: var(--accent-gradient);
  box-shadow: 0 8px 26px var(--accent-glow);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.auth-mascot-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-page);
}

.mascot-hero-gif {
  width: 82px;
  height: 82px;
  border-radius: 18px;
  object-fit: contain;
  filter: drop-shadow(0 6px 18px var(--accent-glow));
}

.mascot-empty-gif {
  width: 84px;
  height: 84px;
  border-radius: 16px;
  object-fit: contain;
  margin: 0 auto 10px auto;
  display: block;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.35));
}

.mascot-badge-gif {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.aemeath-stickers-wrap {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.aemeath-sticker-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 6px;
  max-height: 128px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--input-border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
}

.sticker-pick-btn {
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 3px;
  border-radius: 10px;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.sticker-pick-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 7px;
  display: block;
}

.sticker-pick-btn:hover {
  transform: scale(1.08);
  border-color: var(--accent-color);
}

.sticker-pick-btn.active {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px var(--accent-color), 0 4px 12px var(--accent-glow);
}

/* ========================================================
   LOGOS OFICIAIS AEMEATH LINK (WORDMARK TRANSPARENTE)
   ======================================================== */
.nav-wordmark-img {
  height: 26px;
  width: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 0 6px var(--accent-glow));
}

.auth-wordmark-img {
  width: 196px;
  max-width: 78%;
  height: auto;
  display: block;
  object-fit: contain;
  margin: 4px auto 2px auto;
  filter: drop-shadow(0 4px 14px var(--accent-glow));
}

.footer-logo-emblem {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--accent-color);
}

.footer-wordmark-img {
  height: 18px;
  width: auto;
  display: block;
  object-fit: contain;
}

.modal-logo-icon {
  padding: 2px;
  overflow: hidden;
  background: #0a0d16;
  border: 1.5px solid var(--accent-color);
}

.modal-logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9px;
}

/* --- RESPONSIVIDADE ADICIONAL --- */
@media (max-width: 600px) {
  .page-wrapper {
    padding: 6px 12px 30px 12px;
  }
  .linktree-card {
    padding: 26px 16px 22px 16px;
    border-radius: 20px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .wallpaper-sliders-grid {
    grid-template-columns: 1fr;
  }
  .wallpaper-inputs-row {
    flex-direction: column;
    align-items: stretch;
  }
  .danger-zone {
    flex-direction: column;
    text-align: center;
  }
  .avatar-edit-row {
    flex-direction: column;
    text-align: center;
  }
  .modal-dialog {
    border-radius: 18px;
  }
  .admin-drawer-backdrop {
    padding: 8px;
  }
  .modal-dialog-admin {
    max-width: 100%;
    height: calc(100vh - 16px);
    max-height: calc(100vh - 16px);
  }
  .toast-container {
    left: 14px;
    bottom: 14px;
    max-width: calc(100vw - 28px);
  }
}
