/* ============================================================
 * RESSENHERA · base.css — tema escuro padrão, componentes comuns
 * ============================================================ */
:root {
  --bg: #0b0c0f;
  --bg-2: #111319;
  --card: #161a22;
  --card-2: #1d222d;
  --border: #272e3a;
  --border-2: #333c4d;
  --text: #f2f4f8;
  --muted: #8b94a7;
  --accent: #2ee6a8;
  --accent-dim: rgba(46, 230, 168, 0.14);
  --accent-2: #7c5cff;
  --danger: #ff5470;
  --warn: #ffb020;
  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 9px;
  --nav-h: 64px;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { color-scheme: dark; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100dvh;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; }
img, video { display: block; max-width: 100%; }
::selection { background: var(--accent); color: #06251a; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }
[hidden], .hidden { display: none !important; }
h1, h2, h3 { line-height: 1.2; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; border-radius: var(--r-md); padding: 12px 18px;
  transition: transform 0.12s, filter 0.2s, background 0.2s, border-color 0.2s;
  user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--accent), #19b585); color: #04241a; box-shadow: 0 6px 18px rgba(46, 230, 168, 0.25); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost { background: var(--card-2); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--border-2); }
.btn-danger { background: linear-gradient(135deg, var(--danger), #c2334d); color: #fff; }
.btn-block { width: 100%; }
.btn.sm { padding: 8px 14px; font-size: 13px; border-radius: var(--r-sm); }

/* ---------- inputs ---------- */
.input {
  width: 100%; background: var(--card); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--r-md); padding: 12px 14px; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.input::placeholder { color: var(--muted); }
select.input option { background: var(--card); color: var(--text); }

/* ---------- chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px;
  border-radius: 999px; background: var(--card-2); border: 1px solid var(--border);
  font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; transition: 0.2s;
}
.chip:hover { color: var(--text); border-color: var(--border-2); }
.chip.on { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
.chip-tag { padding: 4px 10px; font-size: 12px; }
.chip b { color: var(--accent); font-weight: 800; }

/* ---------- avatar ---------- */
.avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border-2); flex-shrink: 0; }
.avatar.sm { width: 30px; height: 30px; }
.avatar.lg { width: 92px; height: 92px; border-width: 3px; }
.avatar-fallback {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--card-2); color: var(--accent); font-weight: 800;
}

/* ---------- loader ---------- */
.fullscreen-loader {
  position: fixed; inset: 0; background: var(--bg); z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  transition: opacity 0.35s;
}
.spinner { width: 46px; height: 46px; border: 4px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loader-brand { font-weight: 900; letter-spacing: 0.28em; font-size: 12px; color: var(--accent); }

/* ---------- toasts ---------- */
#toast-container {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 300;
  display: flex; flex-direction: column; gap: 8px; width: min(92vw, 380px); pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--card-2); border: 1px solid var(--border-2); border-left: 3px solid var(--accent);
  border-radius: var(--r-md); padding: 12px 16px; font-weight: 600; font-size: 14px;
  box-shadow: var(--shadow); opacity: 0; transform: translateY(-12px); transition: 0.28s;
}
.toast.show { opacity: 1; transform: none; }
.toast i { color: var(--accent); }
.toast-error { border-left-color: var(--danger); }
.toast-error i { color: var(--danger); }

/* ---------- modais (bottom sheets) ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(5, 6, 9, 0.72); backdrop-filter: blur(4px);
  z-index: 90; display: none; align-items: flex-end; justify-content: center;
}
.modal-overlay.open { display: flex; animation: fadeIn 0.2s; }
.sheet {
  background: var(--bg-2); width: min(100%, 560px); max-height: 92dvh;
  border-radius: 22px 22px 0 0; border: 1px solid var(--border); border-bottom: 0;
  display: flex; flex-direction: column;
  animation: slideUp 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes slideUp { from { transform: translateY(40px); opacity: 0.4; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.sheet-head h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.x-btn { width: 34px; height: 34px; border-radius: 50%; background: var(--card-2); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); flex-shrink: 0; }
.x-btn:hover { color: var(--text); }

/* ---------- estados ---------- */
.fade-in { animation: fadeIn 0.3s both; }
.empty-state { text-align: center; padding: 52px 20px; color: var(--muted); }
.empty-state i { font-size: 34px; margin-bottom: 12px; display: block; opacity: 0.5; }
.empty-state h2 { margin-bottom: 6px; color: var(--text); }
.skeleton-card {
  height: 340px; border-radius: var(--r-lg); margin-bottom: 16px;
  background: linear-gradient(100deg, var(--card) 40%, var(--card-2) 50%, var(--card) 60%);
  background-size: 200% 100%; animation: shimmer 1.3s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- marca d'água (overlay do player de vídeo) ---------- */
.wm-overlay {
  position: absolute; right: 10px; bottom: 10px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(2px);
  color: #fff; font-weight: 800; font-size: 12px;
  padding: 5px 11px; border-radius: 999px; pointer-events: none;
}
.wm-overlay i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; }

/* botão seguir (usado nos cards e no perfil) */
.btn-follow {
  background: var(--accent-dim); color: var(--accent); border: 1px solid transparent;
  font-weight: 800; padding: 7px 14px; border-radius: 999px; font-size: 12px; flex-shrink: 0;
}
.btn-follow:hover { border-color: var(--accent); }
.btn-follow.on { background: var(--card-2); color: var(--muted); border-color: var(--border); }
.btn-follow.lg { padding: 10px 22px; font-size: 13.5px; }
