/* theme.css — Variáveis de tema para toda a plataforma ViralScope
   Inclua em TODAS as páginas: <link rel="stylesheet" href="theme.css">
   Antes do CSS específico da página.
*/

/* ── DARK MODE (padrão) ─────────────────────────────────── */
:root,
[data-theme="dark"] {
  --bg:        #080a0f;
  --surface:   #0e1118;
  --surface2:  #141720;
  --surface3:  #1a1f2e;
  --border:    #1e2535;
  --border2:   #2a3245;
  --accent:    #00e5ff;
  --accent2:   #ff2d6b;
  --accent3:   #a259ff;
  --text:      #e8eaf2;
  --text2:     #b0b7cc;
  --muted:     #5a6278;
  --green:     #00ff88;
  --yellow:    #ffd60a;

  /* Header */
  --header-bg: rgba(8,10,15,0.95);
  --header-border: rgba(30,37,53,1);

  /* Inputs */
  --input-bg:  #141720;
  --input-border: #1e2535;

  /* Grid bg */
  --grid-color: rgba(0,229,255,0.03);

  /* Cards */
  --card-bg:   #0e1118;
  --card-hover-border: rgba(0,229,255,0.3);

  /* Logo */
  --logo-src: url('assets/logo-dark.svg');

  /* Scrollbar */
  --scrollbar-bg:    #141720;
  --scrollbar-thumb: #2a3245;
}

/* ── LIGHT MODE ─────────────────────────────────────────── */
[data-theme="light"] {
  --bg:        #f4f6fb;
  --surface:   #ffffff;
  --surface2:  #eef1f8;
  --surface3:  #e5e9f5;
  --border:    #dde2ef;
  --border2:   #c8d0e4;
  --accent:    #0099bb;
  --accent2:   #e0194d;
  --accent3:   #7c3aed;
  --text:      #0f1624;
  --text2:     #3d4663;
  --muted:     #7a85a3;
  --green:     #00a854;
  --yellow:    #d4920a;

  /* Header */
  --header-bg: rgba(244,246,251,0.96);
  --header-border: rgba(221,226,239,1);

  /* Inputs */
  --input-bg:  #eef1f8;
  --input-border: #dde2ef;

  /* Grid bg */
  --grid-color: rgba(0,153,187,0.04);

  /* Cards */
  --card-bg:   #ffffff;
  --card-hover-border: rgba(0,153,187,0.4);

  /* Logo */
  --logo-src: url('assets/logo-light.svg');

  /* Scrollbar */
  --scrollbar-bg:    #eef1f8;
  --scrollbar-thumb: #c8d0e4;
}

/* ── GLOBAL BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Syne', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background .25s, color .25s;
}

/* Grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--scrollbar-bg); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 3px; }

/* ── SHARED HEADER ────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--header-border);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  transition: background .25s, border-color .25s;
}

/* ── LOGO ─────────────────────────────────────────────────── */
.vs-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.5px;
  text-decoration: none;
  color: var(--text);
  transition: color .2s;
}
.vs-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  transition: opacity .2s;
}
.vs-logo-name { color: var(--text); }
.vs-logo-name span { color: var(--accent); }

/* ── THEME TOGGLE BUTTON ─────────────────────────────────── */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface);
}

/* ── SHARED HEADER ELEMENTS ──────────────────────────────── */
.hdr-badge {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--green);
  color: var(--green);
  background: rgba(0,255,136,.06);
  letter-spacing: .5px;
}
.hdr-right { display: flex; align-items: center; gap: 10px; }

.btn-back {
  padding: 8px 14px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'Syne', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-back:hover { border-color: var(--accent); color: var(--accent); }

/* ── SHARED COMPONENTS ───────────────────────────────────── */
.pg-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,229,255,.08);
  border: 1px solid rgba(0,229,255,.2);
  color: var(--accent);
  font-size: 10px;
  font-family: 'Space Mono', monospace;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
  letter-spacing: 1px;
}

.surface-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  transition: border-color .2s, background .25s;
}
.surface-card:hover { border-color: var(--card-hover-border); }

/* inputs & selects */
input, select, textarea {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text);
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  border-radius: 9px;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .25s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,229,255,.1);
}
input::placeholder, textarea::placeholder { color: var(--muted); }
select option { background: var(--surface2); color: var(--text); }

/* buttons */
.btn-primary {
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 9px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .2s;
}
.btn-primary:hover { opacity: .88; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 9px;
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* user pill */
.user-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 5px 12px 5px 5px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color .2s, background .25s;
}
.user-pill:hover { border-color: var(--accent); }
.uavatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent3);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
  flex-shrink: 0; overflow: hidden;
}
.uavatar img { width: 100%; height: 100%; object-fit: cover; }
.uname { font-size: 12px; font-weight: 600; color: var(--text); }
.plan-pill {
  font-size: 9px;
  font-family: 'Space Mono', monospace;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(0,229,255,.12);
  color: var(--accent);
}
.plan-pill.pro { background: rgba(162,89,255,.15); color: var(--accent3); }

/* footer links row */
.footer-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  padding-top: 28px;
}
.footer-links a {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  font-family: 'Space Mono', monospace;
  transition: color .2s;
}
.footer-links a:hover { color: var(--accent); }

/* back to top */
.back-top {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 42px; height: 42px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; cursor: pointer;
  transition: all .2s;
  z-index: 50;
  opacity: 0; pointer-events: none;
  color: var(--muted);
}
.back-top.show { opacity: 1; pointer-events: auto; }
.back-top:hover { border-color: var(--accent); color: var(--accent); }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 768px) {
  header { padding: 0 16px; }
  .hdr-badge { display: none; }
}
@media (max-width: 500px) {
  .btn-back .bl { display: none; }
  .uname { display: none; }
}
