/* ============================================
   CineStream - Bottom Navigation Bar (Mobile)
   Adicione ao final do assets/css/style.css
   ============================================ */

/* ======================== BOTTOM NAV */

/* Desktop: esconde sem trocar display (evita flash ao navegar no mobile) */
.bottom-nav {
  display: flex;
  align-items: center;
  justify-content: space-around;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: 68px;
  padding: 0 8px;
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 768px) {

  body {
    padding-bottom: 80px;
  }

  .bottom-nav {
    visibility: visible;
    pointer-events: auto;
    padding-bottom: env(safe-area-inset-bottom, 0px); /* iPhone notch support */

    background: rgba(13, 13, 20, 0.97);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);

    border-top: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.6);
  }

  /* Item comum */
  .bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;

    flex: 1;
    padding: 8px 0;
    min-width: 0;

    color: var(--text-muted);
    text-decoration: none;
    cursor: pointer;
    transition: color var(--transition), transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
  }

  .bottom-nav__item:active {
    transform: scale(0.92);
  }

  .bottom-nav__item.active {
    color: var(--accent);
  }

  /* Ícone SVG */
  .bottom-nav__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    position: relative;
  }

  .bottom-nav__icon svg {
    width: 22px;
    height: 22px;
    transition: stroke var(--transition);
  }

  .bottom-nav__item.active .bottom-nav__icon svg {
    stroke: var(--accent);
    filter: drop-shadow(0 0 6px var(--accent-glow));
  }

  /* Avatar do usuário */
  .bottom-nav__avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--text-muted);
    transition: border-color var(--transition);
  }

  .bottom-nav__item.active .bottom-nav__avatar {
    border-color: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
  }

  /* Label texto */
  .bottom-nav__label {
    font-size: 10px;
    font-weight: 500;
    font-family: var(--font-body);
    letter-spacing: 0.2px;
    white-space: nowrap;
    transition: color var(--transition);
  }

  /* ===== BOTÃO CENTRAL (Buscar) ===== */
  .bottom-nav__item--center {
    flex: 0 0 auto;
    padding: 0;
    margin: 0 4px;
    /* Remove o comportamento de item comum para o label */
    gap: 0;
  }

  .bottom-nav__item--center .bottom-nav__label {
    position: absolute;
    bottom: -2px; /* Posiciona label abaixo do botão central */
    font-size: 10px;
    color: var(--text-muted);
    transition: color var(--transition);
  }

  /* Wrapper para centralizar botão + label */
  .bottom-nav__item--center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    position: relative;
    padding-bottom: 4px;
    /* espaço para o label */
    margin-top: -20px; /* sobe o botão acima da barra */
    color: var(--text-muted);
  }

  .bottom-nav__item--center .bottom-nav__label {
    position: static;
    margin-top: 4px;
    font-size: 10px;
  }

  /* O círculo elevado do botão central */
  .bottom-nav__center-btn {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 54px;
    height: 54px;
    border-radius: 50%;

    background: var(--accent);
    box-shadow:
      0 4px 20px rgba(229, 9, 20, 0.55),
      0 2px 8px rgba(0, 0, 0, 0.5);

    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    position: relative;
  }

  /* Anel decorativo externo */
  .bottom-nav__center-btn::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid rgba(229, 9, 20, 0.3);
    transition: border-color 0.2s ease;
  }

  .bottom-nav__center-btn svg {
    width: 24px;
    height: 24px;
    stroke: #ffffff;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
  }

  /* Hover / Active no botão central */
  .bottom-nav__item--center:active .bottom-nav__center-btn {
    transform: scale(0.9);
    box-shadow:
      0 2px 10px rgba(229, 9, 20, 0.4),
      0 1px 4px rgba(0, 0, 0, 0.5);
  }

  .bottom-nav__item--center.active .bottom-nav__center-btn {
    background: var(--accent-dark);
    box-shadow:
      0 4px 24px rgba(229, 9, 20, 0.7),
      0 2px 8px rgba(0, 0, 0, 0.5);
  }

  .bottom-nav__item--center.active .bottom-nav__center-btn::before {
    border-color: rgba(229, 9, 20, 0.6);
  }

  .bottom-nav__item--center.active .bottom-nav__label {
    color: var(--accent);
  }

  /* Dot indicador nos itens ativos (exceto central) */
  .bottom-nav__item:not(.bottom-nav__item--center).active .bottom-nav__icon::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent);
  }


}
/* ======================== FIM BOTTOM NAV */