/* ═══════════════════ AXIVORFLIX — design premium ═══════════════════ */

:root {
  --bg: #090910;
  --bg-2: #10101a;
  --bg-3: #181824;
  --fg: #f4f4f6;
  --fg-dim: #a8a8b8;
  --fg-mute: #66667a;
  --accent: #e5091f;
  --accent-2: #ff2e43;
  --grad: linear-gradient(135deg, #e5091f, #ff5b3d);
  --radius: 10px;
  --topbar-h: 68px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; }
[hidden] { display: none !important; }

::-webkit-scrollbar { width: 10px; height: 0; }
::-webkit-scrollbar-thumb { background: #2c2c3c; border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }

/* ─────────────────────────── botões ─────────────────────────── */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 26px; border-radius: 8px;
  font-weight: 700; font-size: 15px; letter-spacing: .01em;
  transition: transform .15s, background .2s, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--fg); color: #000; }
.btn.primary:hover { background: #d6d6de; }
.btn.glass {
  background: rgba(255, 255, 255, .14); color: var(--fg);
  backdrop-filter: blur(12px);
}
.btn.glass:hover { background: rgba(255, 255, 255, .24); }
.btn.ghost {
  background: transparent; color: var(--fg-dim);
  border: 1px solid #33334a; font-weight: 600;
}
.btn.ghost:hover { color: var(--fg); border-color: #55556e; }
.btn.danger { background: #3a0d13; color: #ff8a94; font-weight: 600; }
.btn.danger:hover { background: #55121b; }
.btn svg { width: 22px; height: 22px; }

/* ─────────────────────── seleção de perfil ─────────────────────── */

.gate {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 34px; padding: 40px 20px;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(229, 9, 31, .14), transparent 60%),
    var(--bg);
  animation: fadeIn .5s ease;
}
.logo { display: flex; align-items: center; }
.gate h1 { font-size: clamp(24px, 4vw, 40px); font-weight: 500; }
.gate-grid {
  display: flex; flex-wrap: wrap; gap: 26px; justify-content: center; max-width: 900px;
}
.gate-card {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  width: 130px; transition: transform .18s;
}
.gate-card:hover { transform: scale(1.06); }
.gate-card .pfp { width: 116px; height: 116px; font-size: 52px; border-radius: 14px; }
.gate-card:hover .pfp { outline: 3px solid var(--fg); }
.gate-card b { font-weight: 500; color: var(--fg-dim); font-size: 15px; }
.gate-card:hover b { color: var(--fg); }
.gate-card.add .pfp {
  background: var(--bg-3); display: grid; place-items: center; color: var(--fg-mute);
}
.gate-card .edit-badge {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(0, 0, 0, .55); border-radius: 14px; opacity: 0;
  transition: opacity .15s;
}
.gate-card.editing .edit-badge { opacity: 1; }
.gate-card .pfp-wrap { position: relative; }
.gate-card .kids-tag {
  position: absolute; bottom: 6px; left: 50%; translate: -50% 0;
  background: #ffd12e; color: #000; font-size: 10px; font-weight: 800;
  border-radius: 4px; padding: 2px 7px; letter-spacing: .08em;
}

.pfp {
  display: grid; place-items: center;
  border-radius: 10px; font-weight: 800; color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .35); user-select: none;
}

/* ───────────────────────── overlays / sheets ───────────────────────── */

.overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(5, 5, 10, .78); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 24px;
  animation: fadeIn .22s ease;
  overflow-y: auto;
}
.sheet {
  background: var(--bg-2); border: 1px solid #23233a; border-radius: 16px;
  padding: 30px; width: min(480px, 94vw); box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 18px;
  animation: pop .25s cubic-bezier(.2, 1.2, .4, 1);
}
.sheet.slim { width: min(340px, 94vw); align-items: center; text-align: center; }
.sheet h2 { font-size: 22px; font-weight: 800; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span { font-size: 13px; color: var(--fg-dim); font-weight: 600; }
.field input {
  background: var(--bg-3); border: 1px solid #2a2a42; color: var(--fg);
  border-radius: 8px; padding: 12px 14px; outline: none;
}
.field input:focus { border-color: var(--accent); }
.avatar-pick { display: flex; flex-wrap: wrap; gap: 10px; }
.avatar-pick .pfp {
  width: 52px; height: 52px; font-size: 24px; cursor: pointer;
  opacity: .55; transition: opacity .15s, transform .15s;
}
.avatar-pick .pfp:hover { opacity: 1; transform: scale(1.08); }
.avatar-pick .pfp.on { opacity: 1; outline: 3px solid var(--fg); }
.switch-row {
  display: flex; align-items: center; gap: 14px; cursor: pointer;
  background: var(--bg-3); padding: 13px 16px; border-radius: 10px;
}
.switch-row small { color: var(--fg-mute); display: block; margin-top: 2px; }
.switch-row input { display: none; }
.switch-row i {
  flex: 0 0 44px; height: 24px; border-radius: 20px; background: #33334a;
  position: relative; transition: background .2s;
}
.switch-row i::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; transition: translate .2s;
}
.switch-row input:checked + i { background: var(--accent); }
.switch-row input:checked + i::after { translate: 20px 0; }
.sheet-actions { display: flex; gap: 10px; align-items: center; }
.sheet-actions .spacer { flex: 1; }
.pin-input {
  width: 160px; text-align: center; font-size: 34px; letter-spacing: .35em;
  background: var(--bg-3); border: 1px solid #2a2a42; color: var(--fg);
  border-radius: 10px; padding: 12px 0 12px .35em; outline: none;
}
.pin-input:focus { border-color: var(--accent); }
.pin-error { color: var(--accent-2); font-size: 14px; }

/* ─────────────────────────── topbar ─────────────────────────── */

#topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 34px; padding: 0 4vw;
  background: linear-gradient(180deg, rgba(5, 5, 12, .92), rgba(5, 5, 12, 0));
  transition: background .3s;
}
#topbar.solid { background: rgba(7, 7, 14, .96); box-shadow: 0 1px 0 #1c1c2e; }
.logo { font-size: 22px; }
#nav { display: flex; gap: 22px; }
#nav a {
  font-size: 14.5px; font-weight: 500; color: var(--fg-dim);
  transition: color .15s;
}
#nav a:hover { color: var(--fg); }
#nav a.on { color: var(--fg); font-weight: 700; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.searchbox {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid transparent; border-radius: 8px; padding: 7px 10px;
  transition: background .2s, border-color .2s;
}
.searchbox svg { width: 20px; height: 20px; color: var(--fg-dim); flex: none; cursor: pointer; }
.searchbox input {
  width: 0; opacity: 0; background: none; border: 0; outline: none; color: var(--fg);
  transition: width .28s ease, opacity .2s;
}
.searchbox.open, .searchbox:focus-within {
  background: rgba(9, 9, 16, .9); border-color: #33334a;
}
.searchbox.open input, .searchbox:focus-within input { width: min(240px, 40vw); opacity: 1; }
.avatar-btn { border-radius: 8px; overflow: hidden; width: 36px; height: 36px; }
.avatar-btn .pfp { width: 36px; height: 36px; font-size: 17px; border-radius: 8px; }
.avatar-btn:hover { outline: 2px solid var(--fg); }

/* ─────────────────────────── view / hero ─────────────────────────── */

#view { min-height: 100vh; animation: fadeIn .3s ease; }
.page { padding: calc(var(--topbar-h) + 22px) 4vw 80px; }

.hero {
  position: relative; height: min(82vh, 780px); min-height: 480px;
  display: flex; align-items: flex-end;
}
.hero-bg { position: absolute; inset: 0; overflow: hidden; }
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  animation: heroIn 1.1s ease;
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(9, 9, 16, .25) 0%, transparent 35%, rgba(9, 9, 16, .96) 92%),
    linear-gradient(90deg, rgba(9, 9, 16, .92) 0%, rgba(9, 9, 16, .25) 55%, transparent 75%);
}
.hero-content {
  position: relative; z-index: 2; padding: 0 4vw 8vh; max-width: 640px;
  display: flex; flex-direction: column; gap: 16px;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent-2); font-weight: 800; font-size: 13px; letter-spacing: .22em;
}
.hero-title { font-size: clamp(30px, 4.6vw, 58px); font-weight: 900; line-height: 1.04; }
.hero-meta { display: flex; gap: 14px; align-items: center; color: var(--fg-dim); font-size: 14px; flex-wrap: wrap; }
.hero-meta .vote { color: #46d369; font-weight: 800; }
.hero-overview {
  color: #d8d8e2; font-size: 15.5px; line-height: 1.55; max-width: 560px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-actions { display: flex; gap: 12px; margin-top: 6px; }
.hero-dots { position: absolute; right: 4vw; bottom: 5vh; z-index: 3; display: flex; gap: 7px; }
.hero-dots i {
  width: 8px; height: 8px; border-radius: 50%; background: #ffffff44; cursor: pointer;
  transition: background .2s, width .2s;
}
.hero-dots i.on { background: var(--accent); width: 22px; border-radius: 6px; }

/* ─────────────────────────── trilhos ─────────────────────────── */

.rails { display: flex; flex-direction: column; gap: 38px; padding: 0 0 80px; margin-top: -40px; position: relative; z-index: 3; }
.page .rails { margin-top: 0; }
.rail { display: flex; flex-direction: column; gap: 12px; }
.rail-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 0 4vw; }
.rail-head h2 { font-size: 19px; font-weight: 800; }
.rail-head a { font-size: 13px; color: var(--fg-mute); font-weight: 600; transition: color .15s; }
.rail-head a:hover { color: var(--fg); }
.rail-body { position: relative; }
.rail-track {
  display: flex; gap: 10px; overflow-x: auto; scroll-behavior: smooth;
  padding: 6px 4vw; scrollbar-width: none;
}
.rail-track::-webkit-scrollbar { display: none; }
.rail-arrow {
  position: absolute; top: 0; bottom: 0; width: 4vw; z-index: 5;
  display: grid; place-items: center;
  background: linear-gradient(90deg, rgba(9, 9, 16, .85), transparent);
  opacity: 0; transition: opacity .2s; font-size: 26px; color: #fff;
}
.rail-arrow.right { right: 0; background: linear-gradient(270deg, rgba(9, 9, 16, .85), transparent); }
.rail-arrow.left { left: 0; }
.rail-body:hover .rail-arrow { opacity: 1; }

/* ─────────────────────────── cards ─────────────────────────── */

.card {
  flex: 0 0 154px; width: 154px; cursor: pointer; position: relative;
  transition: transform .22s ease, z-index 0s .22s;
}
.card .poster {
  width: 100%; aspect-ratio: 2/3; border-radius: 8px; overflow: hidden;
  background: var(--bg-3); position: relative;
}
.card .poster img { width: 100%; height: 100%; object-fit: cover; }
.card .poster .noimg {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--fg-mute); font-size: 12px; font-weight: 700; text-align: center; padding: 10px;
}
.card:hover { transform: scale(1.13); z-index: 10; }
.card .shade {
  position: absolute; inset: 0; border-radius: 8px;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .92));
  opacity: 0; transition: opacity .2s; display: flex; flex-direction: column;
  justify-content: flex-end; padding: 10px; gap: 3px;
}
.card:hover .shade { opacity: 1; }
.card .shade b { font-size: 13px; line-height: 1.25; }
.card .shade small { color: var(--fg-dim); font-size: 11px; display: flex; gap: 8px; }
.card .shade .vote { color: #46d369; font-weight: 800; }
.card .progress {
  position: absolute; left: 6px; right: 6px; bottom: 6px; height: 3px;
  background: #ffffff2e; border-radius: 3px; overflow: hidden;
}
.card .progress i { display: block; height: 100%; background: var(--accent); }
.card .ep-tag {
  position: absolute; top: 6px; left: 6px; background: rgba(0, 0, 0, .75);
  font-size: 10.5px; font-weight: 800; padding: 3px 7px; border-radius: 5px;
  backdrop-filter: blur(4px);
}

/* canais ao vivo */
.card.live { flex-basis: 200px; width: 200px; }
.card.live .poster {
  aspect-ratio: 16/10; display: grid; place-items: center; padding: 18px;
  background: radial-gradient(120% 120% at 50% 0%, #1c1c2c, #101018);
  border: 1px solid #22223a;
}
.card.live .poster img { object-fit: contain; max-height: 70px; width: auto; max-width: 80%; }
.card.live .live-name { font-size: 12.5px; font-weight: 600; color: var(--fg-dim); margin-top: 8px; text-align: center; }
.card.live:hover { transform: scale(1.06); }

/* ─────────────────────────── grid pages ─────────────────────────── */

.page-title { font-size: clamp(24px, 3vw, 34px); font-weight: 900; margin-bottom: 18px; }
.pills { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 14px; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill {
  flex: none; padding: 8px 16px; border-radius: 20px; font-size: 13.5px; font-weight: 600;
  background: var(--bg-3); color: var(--fg-dim); border: 1px solid #23233a;
  transition: all .15s; white-space: nowrap;
}
.pill:hover { color: var(--fg); border-color: #3c3c5a; }
.pill.on { background: var(--fg); color: #000; border-color: var(--fg); }
.prov-row { margin-top: -6px; }
.pill.prov { background: #131322; border-color: #2a2a44; }
.pill.prov.on { background: var(--grad); color: #fff; border-color: transparent; font-weight: 700; }
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px 10px; padding-top: 10px;
}
.grid .card { width: auto; flex: none; }
.grid .card:hover { transform: scale(1.06); }
.grid-live { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.sentinel { height: 10px; }
.empty {
  padding: 80px 20px; text-align: center; color: var(--fg-mute); font-size: 15px;
  display: flex; flex-direction: column; gap: 10px; align-items: center;
}
.empty b { font-size: 20px; color: var(--fg-dim); }

/* ─────────────────────────── busca ─────────────────────────── */

.search-section { margin-bottom: 34px; }
.search-section h2 { font-size: 18px; font-weight: 800; margin-bottom: 12px; color: var(--fg-dim); }

/* ─────────────────────────── detalhes ─────────────────────────── */

.overlay.wide { padding: 4vh 20px; align-items: start; }
.detail {
  width: min(880px, 96vw); background: var(--bg-2); border-radius: 16px;
  overflow: hidden; box-shadow: var(--shadow); border: 1px solid #23233a;
  animation: pop .3s cubic-bezier(.2, 1.2, .4, 1); margin: auto;
  position: relative;
}
.detail-close {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(9, 9, 16, .8); display: grid; place-items: center; font-size: 17px;
}
.detail-close:hover { background: var(--accent); }
.detail-hero { position: relative; aspect-ratio: 16/8; background: var(--bg-3); }
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, var(--bg-2) 98%);
}
.detail-hero .dh-title {
  position: absolute; left: 34px; bottom: 22px; right: 34px; z-index: 2;
  font-size: clamp(24px, 3.6vw, 42px); font-weight: 900; line-height: 1.05;
  text-shadow: 0 4px 24px rgba(0, 0, 0, .6);
}
.detail-body { padding: 22px 34px 36px; display: flex; flex-direction: column; gap: 18px; }
.detail-meta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; color: var(--fg-dim); font-size: 14px; }
.detail-meta .vote { color: #46d369; font-weight: 800; }
.detail-meta .tag {
  border: 1px solid #33334a; font-size: 11px; padding: 2px 8px; border-radius: 4px;
  color: var(--fg-mute); font-weight: 700;
}
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.detail-overview { color: #d8d8e2; line-height: 1.6; font-size: 15px; }
.detail-facts { color: var(--fg-mute); font-size: 13.5px; line-height: 1.7; }
.detail-facts b { color: var(--fg-dim); font-weight: 600; }

/* ─────────────────────── custom select ─────────────────────── */

.cselect { position: relative; width: max-content; min-width: 210px; user-select: none; }
.cselect-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  width: 100%; padding: 11px 14px 11px 16px;
  background: var(--bg-3); border: 1px solid #2a2a42; border-radius: 10px;
  font-weight: 700; font-size: 15px; color: var(--fg);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.cselect-btn:hover { border-color: #3d3d5e; background: #1d1d2e; }
.cselect.open .cselect-btn {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(229, 9, 31, .18);
}
.cselect-arrow {
  width: 18px; height: 18px; color: var(--fg-dim); flex: none;
  transition: transform .28s cubic-bezier(.34, 1.56, .64, 1);
}
.cselect.open .cselect-arrow { transform: rotate(180deg); color: var(--accent-2); }

.cselect-menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 40;
  min-width: 100%; max-height: 290px; overflow-y: auto; overscroll-behavior: contain;
  background: rgba(16, 16, 27, .92); backdrop-filter: blur(18px);
  border: 1px solid #2c2c46; border-radius: 12px; padding: 6px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
  opacity: 0; transform: translateY(-8px) scale(.96); transform-origin: top left;
  pointer-events: none;
  transition: opacity .18s ease, transform .24s cubic-bezier(.34, 1.4, .64, 1);
}
.cselect.open .cselect-menu { opacity: 1; transform: none; pointer-events: auto; }
.cselect-menu::-webkit-scrollbar { width: 8px; }

.cselect-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px;
  font-weight: 600; font-size: 14.5px; color: var(--fg-dim);
  opacity: 0; translate: 0 -6px;
  transition: background .12s, color .12s;
}
.cselect.open .cselect-opt {
  animation: cselIn .28s cubic-bezier(.22, 1, .36, 1) forwards;
  animation-delay: calc(var(--i) * 26ms);
}
.cselect-opt:hover, .cselect-opt:focus-visible {
  background: #ffffff10; color: var(--fg); outline: none;
}
.cselect-opt svg { width: 16px; height: 16px; flex: none; opacity: 0; scale: .5; transition: opacity .18s, scale .25s cubic-bezier(.34, 1.56, .64, 1); }
.cselect-opt.on { color: var(--fg); }
.cselect-opt.on svg { opacity: 1; scale: 1; color: var(--accent-2); }
.cselect-opt.on span { font-weight: 800; }

@keyframes cselIn { to { opacity: 1; translate: 0 0; } }
.ep-list { display: flex; flex-direction: column; }
.ep-row {
  display: grid; grid-template-columns: 34px 150px 1fr; gap: 16px; align-items: center;
  padding: 14px 10px; border-radius: 10px; cursor: pointer; transition: background .15s;
}
.ep-row:hover { background: var(--bg-3); }
.ep-row + .ep-row { border-top: 1px solid #1c1c2e; }
.ep-num { color: var(--fg-mute); font-size: 20px; font-weight: 700; text-align: center; }
.ep-thumb {
  aspect-ratio: 16/9; border-radius: 6px; background: var(--bg-3);
  overflow: hidden; position: relative;
}
.ep-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ep-thumb .progress {
  position: absolute; left: 4px; right: 4px; bottom: 4px; height: 3px;
  background: #ffffff2e; border-radius: 3px; overflow: hidden;
}
.ep-thumb .progress i { display: block; height: 100%; background: var(--accent); }
.ep-thumb .ep-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(0,0,0,.35); opacity: 0; transition: opacity .15s; font-size: 26px;
}
.ep-row:hover .ep-play { opacity: 1; }
.ep-info b { font-size: 14.5px; display: block; margin-bottom: 4px; }
.ep-info small { color: var(--fg-mute); font-size: 12.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep-info .dur { color: var(--fg-dim); font-weight: 600; margin-left: 8px; }

/* ─────────────────────────── skeleton / toast ─────────────────────────── */

.skel { position: relative; overflow: hidden; background: var(--bg-3); border-radius: 8px; }
.skel::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, #ffffff0d, transparent);
  animation: shimmer 1.4s infinite;
}
.skel-rail { display: flex; gap: 10px; padding: 6px 4vw; }
.skel-card { flex: 0 0 154px; aspect-ratio: 2/3; }
.skel-hero { height: min(82vh, 780px); min-height: 480px; border-radius: 0; }

#toast-root { position: fixed; bottom: 26px; left: 50%; translate: -50% 0; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--bg-3); border: 1px solid #2c2c46; border-radius: 10px;
  padding: 12px 20px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow);
  animation: pop .25s ease;
}
.toast.err { border-color: #5c1a22; color: #ff9aa4; }
.toast.ok { border-color: #1c4a2a; color: #7ce69a; }

.sync-note {
  margin: 0 4vw 20px; padding: 14px 18px; border-radius: 10px;
  background: #161626; border: 1px solid #26263e; color: var(--fg-dim); font-size: 14px;
  display: flex; align-items: center; gap: 12px;
}
.sync-note .spin {
  width: 16px; height: 16px; border: 2px solid #33334a; border-top-color: var(--accent);
  border-radius: 50%; animation: rot 1s linear infinite; flex: none;
}

/* ─────────────────────────── animações ─────────────────────────── */

@keyframes fadeIn { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(10px); } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes heroIn { from { opacity: .2; transform: scale(1.04); } }
@keyframes rot { to { transform: rotate(360deg); } }

/* ─────────────────────────── responsivo ─────────────────────────── */

@media (max-width: 900px) {
  #nav { gap: 14px; }
  #nav a { font-size: 13px; }
  #topbar { gap: 18px; }
}
@media (max-width: 640px) {
  .logo { font-size: 17px; }
  #nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
    background: rgba(7,7,14,.97); justify-content: space-around; padding: 12px 8px;
    box-shadow: 0 -1px 0 #1c1c2e; }
  .card { flex-basis: 118px; width: 118px; }
  .hero { height: 68vh; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .ep-row { grid-template-columns: 26px 110px 1fr; gap: 10px; }
  .page { padding-bottom: 120px; }
  .rails { padding-bottom: 120px; }
}

/* ─────────────────────── login / conta ─────────────────────── */

.auth-card {
  width: min(420px, 94vw); display: flex; flex-direction: column; gap: 18px;
  background: var(--bg-2); border: 1px solid #23233a; border-radius: 16px;
  padding: 34px 32px; box-shadow: var(--shadow);
  animation: pop .3s cubic-bezier(.2, 1.2, .4, 1);
}
.auth-card h1 { font-size: 26px; font-weight: 900; }
.auth-sub { color: var(--fg-dim); font-size: 14.5px; line-height: 1.5; margin-top: -8px; }
.auth-card .field input { font-size: 17px; letter-spacing: .02em; }
.auth-btn { justify-content: center; margin-top: 4px; }
.auth-btn:disabled { opacity: .6; cursor: default; }
.gate-actions { display: flex; gap: 12px; }

/* avatar com foto */
.pfp.has-photo { overflow: hidden; background: var(--bg-3); }
.pfp.has-photo img { width: 100%; height: 100%; object-fit: cover; }
.avatar-pick .photo-pick {
  width: 52px; height: 52px; border-radius: 10px; overflow: hidden;
  display: grid; place-items: center; cursor: pointer; opacity: .8;
  background: var(--bg-3); border: 1px dashed #3d3d5e; color: var(--fg-dim);
  transition: opacity .15s, transform .15s, border-color .15s;
}
.avatar-pick .photo-pick:hover { opacity: 1; transform: scale(1.08); border-color: var(--accent); color: var(--fg); }
.avatar-pick .photo-pick svg { width: 24px; height: 24px; }
.avatar-pick .photo-pick.has { border-style: solid; opacity: 1; outline: 3px solid var(--fg); }
.avatar-pick .photo-pick img { width: 100%; height: 100%; object-fit: cover; }

/* ─────────────────── menu do perfil (topbar) ─────────────────── */

.profile-wrap { position: relative; }
.pmenu {
  position: absolute; top: calc(100% + 12px); right: 0; z-index: 60;
  width: 286px; padding: 8px;
  background: rgba(16, 16, 27, .95); backdrop-filter: blur(20px);
  border: 1px solid #2c2c46; border-radius: 14px;
  box-shadow: 0 26px 64px rgba(0, 0, 0, .66);
  animation: pmenuIn .22s cubic-bezier(.22, 1, .36, 1);
}
@keyframes pmenuIn { from { opacity: 0; transform: translateY(-10px) scale(.97); } }

.pmenu-head {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 10px 12px; border-bottom: 1px solid #23233a; margin-bottom: 6px;
}
.pmenu-head .pfp { width: 42px; height: 42px; font-size: 20px; border-radius: 9px; flex: none; }
.pmenu-head-txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pmenu-head-txt b { font-size: 14.5px; font-weight: 700; }
.pmenu-head-txt small { color: var(--fg-mute); font-size: 12px; }
.kids-chip {
  margin-left: auto; background: #ffd12e; color: #000; font-size: 9.5px;
  font-weight: 800; border-radius: 4px; padding: 3px 6px; letter-spacing: .08em;
}

.pmenu-label {
  padding: 8px 12px 5px; font-size: 11px; font-weight: 800;
  color: var(--fg-mute); letter-spacing: .1em; text-transform: uppercase;
}
.pmenu-sep { height: 1px; background: #23233a; margin: 6px 4px; }

.pmenu-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 10px 11px; border-radius: 9px; text-align: left;
  font-size: 14px; font-weight: 600; color: var(--fg-dim);
  transition: background .13s, color .13s;
}
.pmenu-item:hover { background: #ffffff10; color: var(--fg); }
.pmenu-item .pmenu-ico { width: 19px; height: 19px; flex: none; opacity: .85; }
.pmenu-item .pfp.mini { width: 26px; height: 26px; font-size: 13px; border-radius: 7px; flex: none; }
.pmenu-item .pmenu-hint {
  margin-left: auto; font-style: normal; font-size: 11px; color: var(--fg-mute);
  display: flex; align-items: center;
}
.pmenu-item .pmenu-hint svg { width: 14px; height: 14px; }
.pmenu-item.danger-item { color: #ff8a94; }
.pmenu-item.danger-item:hover { background: #3a0d1355; color: #ffa8b0; }

/* dispositivos conectados */
.sessions { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.session-row {
  display: flex; align-items: baseline; gap: 10px;
  background: var(--bg-3); border: 1px solid #23233a; border-radius: 8px; padding: 9px 12px;
}
.session-row b { font-size: 13.5px; font-weight: 600; }
.session-row small { margin-left: auto; color: var(--fg-mute); font-size: 11.5px; }
.session-row.current { border-color: #2c5c3a; }
.session-row.current small { color: #7ce69a; }
.muted { color: var(--fg-mute); font-size: 12.5px; }

@media (max-width: 640px) {
  .pmenu { width: min(300px, calc(100vw - 24px)); right: -4px; }
}

/* ─────────────────────────── splash ─────────────────────────── */

.splash {
  position: fixed; inset: 0; z-index: 300;
  background:
    radial-gradient(900px 520px at 50% 45%, rgba(229, 9, 31, .13), transparent 65%),
    #0B0B0F;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 34px;
  transition: opacity .55s ease, visibility .55s;
}
.splash img {
  width: min(440px, 66vw);
  animation: splashLogo 1s cubic-bezier(.2, .9, .25, 1) both;
  filter: drop-shadow(0 10px 40px rgba(229, 9, 31, .25));
}
/* barrinha de carregamento, no lugar de um spinner genérico */
.splash-bar {
  width: min(180px, 40vw); height: 3px; border-radius: 3px;
  background: #ffffff14; overflow: hidden; position: relative;
  animation: fadeIn .5s .5s both;
}
.splash-bar::after {
  content: ''; position: absolute; inset: 0; width: 40%;
  border-radius: 3px; background: var(--grad);
  animation: splashBar 1.1s ease-in-out infinite;
}
.splash.done { opacity: 0; visibility: hidden; }

@keyframes splashLogo {
  from { opacity: 0; transform: scale(.9); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes splashBar {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* logo como imagem */
.gate-logo { height: 42px; width: auto; }
.logo img { height: 26px; width: auto; display: block; }
@media (max-width: 640px) {
  .gate-logo { height: 32px; }
  .logo img { height: 20px; }
}
