/* Paleta Mariana + Pokémon (dark) */
:root {
  --bg: #2b2f3a;
  --bg-alt: #232733;
  --panel: rgba(40, 46, 56, 0.6);
  --border: #3c4454;
  --text: #c9d1d9;
  --muted: #8b98a5;
  --accent: #99c794; /* verde original */
  --accent-2: #6699cc; /* azul Mariana */
  --magenta: #c594c5;
  --gold: #f6c177;
  --danger: #e06c75;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { 
  height: 100%; 
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
}
body {
  margin: 0;
  padding: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 800px at 10% -10%, #202632 0%, transparent 60%),
              radial-gradient(1000px 600px at 110% 0%, #1e2430 0%, transparent 60%),
              var(--bg);
  overflow-x: hidden;
  width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  display: block;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(16px, 4vw, 40px);
  position: sticky;
  top: 0;
  backdrop-filter: blur(12px) saturate(1.1);
  background: linear-gradient(180deg, rgba(25, 29, 38, 0.75), rgba(25, 29, 38, 0.35));
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  z-index: 100; /* acima dos cards e abaixo do modal */
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo { 
  width: 44px; 
  height: 44px; 
  object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(102, 153, 204, 0.25)); 
}
.brand .titles { display: grid; line-height: 1.05; }
.brand strong { font-weight: 700; letter-spacing: 0.3px; }
.brand span { font-size: 12px; color: var(--muted); }

.actions { display: flex; align-items: center; gap: 10px; }
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255,255,255,0.02));
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.mic-viz { display: inline-flex; gap: 3px; height: 14px; align-items: flex-end; }
.mic-viz span { width: 2px; height: 4px; background: var(--accent-2); border-radius: 2px; opacity: 0.6; transition: height 0.08s linear; }
.mic-viz.active span { opacity: 1; }
.hidden { display: none !important; }
.search input {
  width: min(52vw, 520px);
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 14px;
}
.ghost {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: transform 0.15s ease, color 0.2s ease;
}
.ghost:hover { transform: scale(1.08); color: var(--accent-2); }

.shiny-btn {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(246, 193, 119, 0.2), rgba(246, 193, 119, 0.05));
  color: var(--gold);
  cursor: pointer;
  box-shadow: var(--shadow);
}
.shiny .shiny-btn { filter: drop-shadow(0 0 16px rgba(246,193,119,0.45)); }

.filters {
  padding: 6px clamp(16px, 4vw, 40px) 14px;
  position: sticky; 
  top: 72px; 
  z-index: 99; /* logo abaixo do header */
  backdrop-filter: blur(8px) saturate(1.15);
}
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.chip.active {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #0f1320;
  border-color: transparent;
}

.container { 
  padding: 12px clamp(16px, 4vw, 40px) 40px; 
  flex: 1 0 auto;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.card {
  display: grid;
  grid-template-rows: 160px auto;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(246,193,119,0.5); box-shadow: 0 18px 40px rgba(0,0,0,0.5); }
.thumb { position: relative; background: #0f1320; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(0.9) contrast(0.95) brightness(0.9); transform: scale(1.02); }
.thumb::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.0) 40%, rgba(0,0,0,0.35) 100%); pointer-events: none; }
.thumb::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(180px 120px at 20% 20%, rgba(246,193,119,0.25) 0%, transparent 60%),
              radial-gradient(200px 200px at 80% 40%, rgba(102,153,204,0.25) 0%, transparent 65%);
}
.badge {
  position: absolute; top: 10px; left: 10px;
  font-size: 11px; padding: 6px 8px; border-radius: 10px;
  background: rgba(0,0,0,0.45); color: #cbd5e1;
  border: 1px solid rgba(255,255,255,0.1);
}
.play {
  position: absolute; bottom: 10px; right: 10px;
  padding: 10px 12px; border-radius: 12px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1);
  color: #e5e7eb; font-size: 12px;
}
.meta { padding: 14px; display: grid; gap: 8px; }
.title { font-size: 15px; font-weight: 600; }
.desc { font-size: 12px; color: var(--muted); height: 35px; overflow: hidden; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 11px; padding: 4px 8px; border-radius: 999px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); color: #cbd5e1; }
.channel {
  position: relative;
  display: inline-block;
  font-size: 12px;
  color: #a7b0bb;
  padding-bottom: 4px;
  text-decoration: none;
}
a.channel { text-decoration: none; color: inherit; }
a.channel:hover { color: var(--text); }
.channel::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 72px; /* mais longo, alinhado à esquerda */
  background: linear-gradient(90deg, var(--accent), rgba(255,255,255,0.7), var(--accent-2));
  border-radius: 2px;
  opacity: 0.95;
  transform-origin: left center;
  animation: channelSweep 2.6s ease-in-out infinite;
}
@keyframes channelSweep {
  0%   { transform: translateX(0) scaleX(0.85); opacity: 0.75; }
  25%  { transform: translateX(18px) scaleX(1.05); opacity: 0.95; }
  50%  { transform: translateX(34px) scaleX(0.9);  opacity: 0.8; }
  75%  { transform: translateX(18px) scaleX(1.05); opacity: 0.95; }
  100% { transform: translateX(0) scaleX(0.85);  opacity: 0.75; }
}
@media (prefers-reduced-motion: reduce) {
  .channel::after { animation: none; opacity: 0.75; }
}

.empty { text-align: center; color: var(--muted); padding: 40px 0; }
.hidden { display: none !important; }

.modal { position: fixed; inset: 0; display: none; z-index: 1000; }
.modal[aria-hidden="false"] { display: grid; place-items: center; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(10, 12, 18, 0.75); backdrop-filter: blur(6px); }
.modal__card { position: relative; width: min(92vw, 960px); aspect-ratio: 16/9; border-radius: 16px; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); box-shadow: var(--shadow); }
.modal__close { position: absolute; top: 8px; right: 8px; z-index: 2; border: 0; border-radius: 8px; padding: 8px 10px; background: rgba(0,0,0,0.45); color: #e2e8f0; cursor: pointer; }
.modal__frame, .modal__frame iframe { width: 100%; height: 100%; display: block; background: #0b0e14; }
.modal__frame { position: relative; }
/* .modal__open removido junto com o link 'Abrir no YouTube' */

.footer { 
  position: relative;
  display: grid; 
  place-items: center; 
  padding: 24px; 
  color: var(--muted); 
  font-size: 12px; 
  backdrop-filter: blur(10px) saturate(1.1);
  background: linear-gradient(180deg, rgba(25,29,38,0.35), rgba(25,29,38,0.65));
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Fade acima do footer para separar do conteúdo anterior */
.footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -60px;
  height: 60px;
  background: linear-gradient(180deg, rgba(25,29,38,0), rgba(25,29,38,0.5));
  pointer-events: none;
}

/* Shiny mode */
.shiny {
  --accent: var(--gold);
  --accent-2: #ffd27a;
}
.shiny .chip.active { color: #1d1308; }
.shiny .card:hover { border-color: rgba(246,193,119,0.5); }

/* Rocket (easter egg) */
.rocket { filter: contrast(1.05) saturate(1.1); }
.rocket::after {
  content: "TEAM ROCKET";
  position: fixed; bottom: 10px; right: 16px; letter-spacing: 6px;
  color: #ff4d6d; font-weight: 700; font-size: 12px; opacity: 0.25;
  pointer-events: none;
}

/* Responsivo */
@media (max-width: 720px) {
  .navbar { padding: 12px 14px; gap: 10px; flex-wrap: wrap; }
  .brand .logo { width: 36px; height: 36px; }
  .brand strong { font-size: 14px; }
  .brand span { font-size: 11px; }

  .actions { width: 100%; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; }
  .search { width: 100%; padding: 8px 10px; }
  .search input { width: 100%; font-size: 13px; }
  .shiny-btn { white-space: nowrap; padding: 8px 12px; }

  .filters { top: 66px; padding: 6px 14px 12px; }
}

@media (max-width: 420px) {
  .brand strong { font-size: 13px; }
  .actions { grid-template-columns: 1fr auto; }
  .search { padding: 8px; }
  .shiny-btn { padding: 6px 10px; font-size: 12px; }
  .filters { top: 62px; }
}

/* Toasts */
.toasts { position: fixed; right: 14px; bottom: 14px; display: grid; gap: 10px; z-index: 50; }
.toast { padding: 12px 14px; border-radius: 12px; background: rgba(0,0,0,0.7); color: #e5e7eb; border: 1px solid rgba(255,255,255,0.08); box-shadow: var(--shadow); font-size: 13px; display: flex; align-items: center; gap: 10px; }
.toast button { padding: 6px 10px; font-size: 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.08); color: #e5e7eb; cursor: pointer; }


