/* Siriuz — camada de tema: vidro (transparência), fundo em mídia, fontes e bolinha de música.
   Carrega depois do app.css; tudo é controlado por variáveis definidas no <head>. */

:root {
  --glass: color-mix(in srgb, var(--panel) var(--glass-op, 38%), transparent);
  --glass-soft: color-mix(in srgb, var(--panel) calc(var(--glass-op, 38%) * .6), transparent);
  --tint: color-mix(in srgb, var(--red) 14%, transparent);
  --tint-strong: color-mix(in srgb, var(--red) 28%, transparent);
}

/* ---------- tipografia ---------- */
body, input, textarea, select, button { font-family: var(--font-body, 'Outfit', sans-serif); }
h1, h2, h3, .brand, .brand .lockup, .sec-title, .kicker, .stat b, .footer strong, .d-head, .login-box h2,
.form-box h2, .div-card h3, .splash h1, .owner-copy strong, .tile-body h3 {
  font-family: var(--font-head, 'Outfit', sans-serif);
}
h1, h2, .sec-title, .hero h1 { font-weight: var(--head-weight, 700); }
.hero h1 { font-size: calc(clamp(34px, 9vw, 64px) * var(--fs, 1)); }
.hero p, .lead { font-size: calc(16px * var(--fs, 1)); }
.section h2, .sec-title { font-size: calc(28px * var(--fs, 1)); }
.tile-body h3 { font-size: calc(15px * var(--fs, 1)); }

/* ---------- fundo (imagem, GIF ou vídeo mudo) ---------- */
body { isolation: isolate; }
.bg-media, .bg-overlay { position: fixed; inset: 0; pointer-events: none; }
.bg-media { z-index: -3; overflow: hidden; }
.bg-media video, .bg-media .bg-img {
  position: absolute; inset: -2%; width: 104%; height: 104%;
  object-fit: cover; object-position: var(--bg-pos, center);
  background-size: cover; background-position: var(--bg-pos, center); background-repeat: no-repeat;
  filter: blur(var(--bg-blur, 0px));
}
.bg-overlay { z-index: -2; background: color-mix(in srgb, var(--bg) calc(var(--bg-overlay, .55) * 100%), transparent); display: none; }
body.has-bg .bg-overlay { display: block; }
body.has-bg { background: var(--bg); }
body.has-bg::before { z-index: -1; opacity: .55; }       /* brilhos do app.css ficam sutis sobre a mídia */
body.has-bg.light .bg-overlay { background: color-mix(in srgb, var(--bg) calc(var(--bg-overlay, .55) * 100%), transparent); }
@media (prefers-reduced-motion: reduce) { .bg-media video { display: none; } }

/* ---------- vidro: painéis semitransparentes ---------- */
body.glass .top,
body.glass .drawer,
body.glass .tile,
body.glass .stat,
body.glass .div-card,
body.glass .gcard,
body.glass .staff,
body.glass .owner-bar,
body.glass .rank-row,
body.glass .form-box,
body.glass .login-box,
body.glass .empty-note,
body.glass .preview-card,
body.glass .modal .box,
body.glass .footer,
body.glass .search,
body.glass .select,
body.glass .chip,
body.glass .pill,
body.glass .ghost-sq,
body.glass .view-toggle {
  background: var(--glass);
  -webkit-backdrop-filter: blur(var(--glass-blur, 16px)) saturate(1.25);
  backdrop-filter: blur(var(--glass-blur, 16px)) saturate(1.25);
  border-color: var(--line);
}
body.glass .top { background: color-mix(in srgb, var(--panel) calc(var(--glass-op, 38%) * .8), transparent); }
body.glass .drawer { background: color-mix(in srgb, var(--bg2) 82%, transparent); }
body.glass input, body.glass textarea, body.glass select { background: var(--glass-soft); }
body.glass .footer { border-top: 1px solid var(--line); margin-top: 20px; }
body.glass .tile-art::after, body.glass .gcard .cover::after { background: linear-gradient(to top, color-mix(in srgb, var(--panel) 70%, transparent), transparent 70%); }

/* cantos arredondados controlados pelo painel */
.tile, .stat, .div-card, .gcard, .staff, .owner-bar, .rank-row, .form-box, .empty-note, .modal .box { border-radius: var(--radius, 16px); }
.search, .select, .btn, .chip { border-radius: min(var(--radius, 16px), 14px); }

/* acentos seguem a cor escolhida (o app.css tinha o vermelho fixo) */
.nav-desk a:hover, .nav-desk a.on, .icon-btn:hover, .menu-btn:hover { background: var(--tint); border-color: var(--line); }
.btn-ghost:hover { background: var(--tint); }
.brand .mark { background: var(--tint); border-color: var(--red); }
.drawer a:hover, .drawer a.on, .drawer button.linkish:hover { background: linear-gradient(90deg, var(--tint-strong), transparent); }
.splash { background: color-mix(in srgb, var(--bg) 96%, #000); }
.splash h1 { color: var(--text); }
.splash-logo { border-color: var(--line); }
.splash .enter { background: linear-gradient(90deg, var(--red), var(--red2)); background-size: 160% 100%; }
.btn-red { background: linear-gradient(135deg, var(--red), color-mix(in srgb, var(--red) 70%, var(--red2))); }

/* formato do ícone da marca */
.brand .mark { overflow: hidden; }
.brand .mark img { width: 100%; height: 100%; object-fit: cover; }
.brand .mark.shape-circulo { border-radius: 50%; }
.brand .mark.shape-quadrado { border-radius: 4px; }
.brand .mark.shape-arredondado { border-radius: 10px; }

/* ---------- bolinha de música ---------- */
.music-bubble {
  position: fixed; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 120;
  display: flex; align-items: center; gap: 8px;
}
.music-bubble.side-right { right: 18px; flex-direction: row-reverse; }
.music-bubble.side-left { left: 18px; }
.music-bubble.is-hidden { display: none; }
.mb-btn {
  position: relative; width: 54px; height: 54px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; color: var(--text);
  border: 1px solid var(--line); background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 10px 30px rgba(0,0,0,.35), 0 0 0 0 var(--red-glow);
  transition: transform .2s ease, box-shadow .3s ease;
}
.mb-btn:hover { transform: scale(1.06); }
.mb-btn:active { transform: scale(.96); }
.mb-btn::after {
  content: ''; position: absolute; inset: -5px; border-radius: 50%;
  border: 1px solid var(--red); opacity: 0; pointer-events: none;
}
.music-bubble.playing .mb-btn { box-shadow: 0 10px 30px rgba(0,0,0,.35), 0 0 22px var(--red-glow); }
.music-bubble.playing .mb-btn::after { animation: mbPulse 2s ease-out infinite; }
@keyframes mbPulse { 0% { opacity: .65; transform: scale(.92); } 100% { opacity: 0; transform: scale(1.35); } }
.mb-btn .mb-off { font-size: 18px; color: var(--muted); }
.mb-btn .eq { display: none; align-items: flex-end; gap: 3px; height: 20px; }
.mb-btn .eq i { width: 3px; border-radius: 2px; background: var(--red2); height: 6px; animation: eq 1s ease-in-out infinite; }
.mb-btn .eq i:nth-child(2) { animation-delay: .2s; } .mb-btn .eq i:nth-child(3) { animation-delay: .4s; } .mb-btn .eq i:nth-child(4) { animation-delay: .1s; }
@keyframes eq { 0%, 100% { height: 5px; } 50% { height: 20px; } }
.music-bubble.playing .eq { display: flex; }
.music-bubble.playing .mb-off { display: none; }
.mb-vol {
  width: 0; opacity: 0; transition: width .25s ease, opacity .25s ease; accent-color: var(--red);
  padding: 0; border: 0; background: transparent; min-height: 0; height: 20px; box-shadow: none;
}
@media (hover: hover) { .music-bubble:hover .mb-vol, .music-bubble:focus-within .mb-vol { width: 96px; opacity: 1; } }

/* ---------- modo edição (iframe do painel) ---------- */
body.edit-mode { cursor: default; }
body.edit-mode [data-edit] {
  outline: 1px dashed color-mix(in srgb, var(--red2) 55%, transparent); outline-offset: 4px; border-radius: 4px;
  cursor: text; transition: outline-color .2s, background .2s;
}
body.edit-mode [data-edit]:hover { outline-color: var(--red2); background: var(--tint); }
body.edit-mode [data-edit]:focus { outline: 2px solid var(--red2); background: var(--tint); }
body.edit-mode [data-edit]:empty::before { content: attr(data-placeholder); opacity: .5; }
body.edit-mode a { pointer-events: none; }
body.edit-mode [data-edit] { pointer-events: auto; }
body.edit-mode .brand { pointer-events: none; }
body.edit-mode .brand .lockup { pointer-events: auto; }
