/* ======================
   RESET & BASE
   ====================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body { font-family: Arial, sans-serif; color: #fff; background: #0c0c0c; }

.hidden { display: none !important; }

/* ======================
   FUNDO EM VÍDEO
   ====================== */
.video-background { position: fixed; top:0; left:0; width:100%; height:100%; overflow:hidden; z-index:-1; }
.video-background video { min-width:100%; min-height:100%; object-fit:cover; }

/* ======================
   OVERLAY GERAL
   ====================== */
.video-overlay { position:relative; z-index:1; background:rgba(0,0,0,0.5); min-height:100vh; display:flex; flex-direction:column; }

/* ======================
   HEADER
   ====================== */
.app-header { display:flex; justify-content:center; align-items:center; padding:1rem 2rem; background:rgba(0,0,0,0.6); }
.global-nav a { margin:0 .75rem; color:#ccc; text-decoration:none; padding-bottom:2px; transition:color .3s, border-color .3s; border-bottom:2px solid transparent; }
.global-nav a[aria-current="page"], .global-nav a:hover { color:#fff; border-color:dodgerblue; }

/* ======================
   MAIN VIEW
   ====================== */
.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;  /* chave para o overflow interno funcionar */
}

/* ======================
   HOME
   ====================== */
.home-welcome { text-align:center; margin-bottom:2rem; }
.hero-title { font-family:'Poppins', sans-serif; font-size:2.2rem; margin-bottom:.5rem; }
.hero-subtitle { font-size:1.1rem; color: #e9e9e9; }

/* ======================
   GRID & CARDS BÁSICOS
   ====================== */
.grid { display:flex; flex-wrap:wrap; gap:1.5rem; justify-content:center; padding:1rem; }

.card-link { text-decoration:none; color:inherit; }
.card { background:rgba(30,30,30,0.85); border-radius:10px; overflow:hidden; width:220px; display:flex; flex-direction:column; transition:transform .3s, box-shadow .3s; position:relative; }

.card__media { width:100%; height:140px; overflow:hidden; display:flex; align-items:center; justify-content:center; background:rgba(255,255,255,0.03); position: relative; }
.card__media img { width:100%; height:100%; object-fit:cover; display:block; color:transparent; }

.card__body { padding:1rem; text-align:center; }
.card__title { font-size:1rem; font-weight:700; margin-bottom:.25rem; }
.card__meta { font-size:.85rem; color:#ccc; }

/* ======================
   AÇÕES / BOTÕES
   ====================== */
.card__actions { position:absolute; top:8px; right:8px; display:flex; gap:4px; }
.btn-icon { background:rgba(0,0,0,.6); border:none; color:#fff; font-size:.9rem; cursor:pointer; padding:4px 6px; border-radius:4px; transition:background .2s; }
.btn-icon:hover { background:rgba(0,0,0,.9); }

.badge { position:absolute; bottom:8px; left:8px; background:dodgerblue; color:#fff; font-size:.7rem; padding:2px 6px; border-radius:4px; }

.btn { appearance:none; border:1px solid rgba(255,255,255,0.2); background:rgba(255,255,255,0.08); color:#fff; padding:.55rem .9rem; border-radius:8px; cursor:pointer; transition:filter .2s, background .2s, border-color .2s; }
.btn:hover { filter:brightness(1.1); }
.btn-primary { background:dodgerblue; border-color:dodgerblue; color:#fff; }

/* ======================
   MENU LOCAL
   ====================== */
.local-menu {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 1rem 0;
}

.local-menu-center,
.local-menu-right {
  display: flex;
  gap: .75rem;
}

.local-menu-center {
  flex: 1;
  justify-content: center;
}

/* ======================
   FOOTER
   ====================== */
.app-footer { padding:1rem; text-align:center; background:rgba(0,0,0,0.6); }

/* ======================
   ANIMAÇÕES
   ====================== */
.fade-in { opacity:0; animation:fadeIn 1s ease forwards; }
.fade-in-up { opacity:0; transform:translateY(20px); animation:fadeInUp 1s ease forwards; animation-delay:.3s; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
@keyframes fadeInUp { from{opacity:0; transform:translateY(20px)} to{opacity:1; transform:translateY(0)} }

/* ======================
   HOME vs SUBPÁGINAS
   ====================== */
body.home-bg .video-overlay { background: rgba(0,0,0,0.7); }
body.subpage-bg .video-overlay { background: rgba(0,0,0,0.1); }

body.subpage-bg {
  background: url("../assets/img/background02.png") no-repeat center center fixed;
  background-size: cover;
}

body.home-bg .video-background.home-only { display: block; }
body.subpage-bg .video-background.home-only { display: none; }

/* ======================
   RESPONSIVO
   ====================== */
@media (max-width: 560px) {
  .card { width: 160px; }
  .card__media { height: 100px; }
}
/* Mantém .btn-primary mais simples */
.btn-primary {
  background: #444;   /* fundo sólido */
  color: #fff;        /* texto branco */
  border: 1px solid #666;
}

/* Ajuste da altura em subpáginas (ex: Áudios) */
body.subpage-bg .video-overlay {
  min-height: auto;   /* não força 100vh */
  height: 100%;       /* ocupa só o espaço disponível */
}
/* Subpáginas: remover o excesso de espaço vertical do <main> */
body.subpage-bg .content {
  padding: 1rem 1.25rem;   /* antes: 4rem 2rem */
}

/* Subpáginas: não forçar 100vh no overlay */
body.subpage-bg .video-overlay {
  min-height: 0;
  height: 100%;
}

/* =========================================
   📱 MENU RESPONSIVO (Hambúrguer)
   ========================================= */
.menu-toggle {
  display: none;
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 1.8rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  z-index: 1001;
  transition: opacity 0.2s ease;
}

.menu-toggle:hover {
  opacity: 0.7;
}

@media (max-width: 768px) {
  /* Camada de fundo escurecida (overlay do menu) */
  .menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75); /* 🔹 opaco, bloqueia cliques */
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .menu-overlay.active {
    opacity: 1;
    pointer-events: all;
  }

  .global-nav {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    background: rgba(25, 25, 25, 0.95);
    width: 75%;
    max-width: 300px;
    height: 100%;
    padding: 60px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.4);
    transform: translateX(100%);
    opacity: 0;
    z-index: 1001;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .global-nav.open {
    display: flex;
    transform: translateX(0);
    opacity: 1;
  }

  .global-nav a {
    color: #fff;
    font-size: 1.1rem;
    text-decoration: none;
    transition: color 0.2s ease;
  }

  .global-nav a:hover {
    color: rgba(255, 225, 120, 0.9);
  }

  .menu-toggle {
    display: block;
    z-index: 1100;
  }
}

/* =========================================
   📱 AJUSTE DE GRID E CARDS NA HOME
   ========================================= */
@media (max-width: 768px) {
  /* Garante que o grid tenha 2 colunas proporcionais */
  .grid.fade-in-up,
  .grid.grid--collection {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 0 12px;
  }

  /* Cada card ocupa bem o espaço e mantém proporção */
  .grid.fade-in-up .card,
  .grid.grid--collection .card {
    width: 100%;
    height: auto;
    min-height: 120px;
    border-radius: 14px;
    overflow: hidden;
  }

  /* Evita que o texto encoste nas bordas */
  .grid.fade-in-up a.card-link {
    display: block;
    width: 100%;
  }

  /* Pequeno ajuste na área de boas-vindas */
  .home-welcome {
    padding: 20px 16px;
    text-align: center;
  }
  .home-welcome .hero-title {
    font-size: 1.6rem;
  }
  .home-welcome .hero-subtitle {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  /* =========================================
     🟡 AJUSTE FINAL DE CARDS NA HOME (mobile)
     ========================================= */
  .grid.fade-in-up .card {
    width: 100%;
    height: 100%;
    min-height: 120px;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;      /* 🔹 Centraliza verticalmente o conteúdo */
    justify-content: center;  /* 🔹 Centraliza horizontalmente */
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(4px);
  }

  /* Corpo do card — centralização total e espaçamento equilibrado */
  .grid.fade-in-up .card__body {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 16px;
    height: 100%;
  }

  /* 🔹 Label (título) centralizada e amarela opaca */
  .grid.fade-in-up .card__title {
    font-size: 1.05rem;
    font-weight: 600;
    color: rgba(255, 225, 120, 0.85); /* amarelo dourado opaco */
    line-height: 1.3;
    text-shadow: 0 0 6px rgba(255, 255, 200, 0.15);
  }

  /* Opcional: um leve brilho ao tocar */
  .grid.fade-in-up .card:active {
    transform: scale(0.98);
    transition: transform 0.15s ease;
    box-shadow: 0 0 12px rgba(255, 225, 120, 0.25);
  }
}

/* ============================================================
   ESTILO DAS NOTIFICAÇÕES
   ============================================================ */
.notify-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notify {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #fff;
  background: #333;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  opacity: 0.95;
  animation: fadeIn 0.3s ease;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.notify.success { background: #2ecc71; }  /* Verde */
.notify.error   { background: #e74c3c; }  /* Vermelho */
.notify.info    { background: #3498db; }  /* Azul */
.notify.warning { background: #f39c12; }  /* Amarelo */

.notify.fade-out {
  opacity: 0;
  transform: translateY(10px);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dialog-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  overflow: hidden;
}

body.dialog-open {
  overflow: hidden !important;
}

.dialog-box {
  background: #222;
  color: #eee;
  border-radius: 10px;
  padding: 20px 24px;
  width: 320px;
  max-width: 90%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  text-align: center;
  font-family: "Poppins", sans-serif;
}

.dialog-box p {
  margin-bottom: 15px;
}

.dialog-box input {
  width: 100%;
  padding: 8px 10px;
  background: #333;
  border: 1px solid #444;
  color: #fff;
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 14px;
}

.dialog-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* Bloqueia cliques residuais enquanto fecha modal */
body.no-clicks * {
  pointer-events: none !important;
}

@media (max-width: 900px){

  /* sobe o menu acima do dock do player (que está em ~7000) */
  :root{
    --zMenuOverlay: 16000;
    --zMenuPanel:   16001;
    --zMenuBtn:     16002;
  }

  /* overlay (pode continuar escurecendo a tela) */
  .menu-overlay{
    z-index: var(--zMenuOverlay) !important;
    backdrop-filter: none !important;          /* tira o “fosco borrado” */
    -webkit-backdrop-filter: none !important;  /* iOS */
    background: rgba(0,0,0,0.80) !important;   /* escurece sem blur */
  }

  /* painel do menu: sólido (sem transparência) */
  .global-nav{
    z-index: var(--zMenuPanel) !important;
    background: #121212 !important;  /* ou #0f0f0f */
  }

  /* botão hambúrguer */
  .menu-toggle{
    z-index: var(--zMenuBtn) !important;
  }
}

