/* ==========================================================================
   Menu mobile — overlay isolado (não altera .nav-list do desktop)
   Visual alinhado ao chat (site-chat-panel)
   ========================================================================== */

@media (max-width: 899px) {
  .nav-mobile {
    position: fixed;
    inset: 0;
    z-index: 1001;
    pointer-events: none;
    visibility: hidden;
  }

  .nav-mobile.is-open {
    pointer-events: auto;
    visibility: visible;
  }

  .nav-mobile__backdrop {
    position: absolute;
    inset: 0;
    border: none;
    padding: 0;
    margin: 0;
    background: rgba(4, 6, 12, 0.62);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
  }

  .nav-mobile.is-open .nav-mobile__backdrop {
    opacity: 1;
  }

  .nav-mobile__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    width: min(100vw - 2.5rem, 22.5rem);
    max-width: 100%;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    background:
      radial-gradient(120% 70% at 100% 0%, rgba(124, 92, 255, 0.14), transparent 55%),
      linear-gradient(168deg, #1a1f2e 0%, #131722 42%, #0f1219 100%);
    border-left: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow:
      -20px 0 60px rgba(0, 0, 0, 0.55),
      0 0 0 1px rgba(124, 92, 255, 0.08);
    transform: translateX(105%);
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
  }

  .nav-mobile.is-open .nav-mobile__panel {
    transform: translateX(0);
  }

  .nav-mobile__head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-shrink: 0;
    padding: 0.9rem 0.85rem 0.9rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    background: linear-gradient(180deg, rgba(26, 31, 46, 0.98) 0%, rgba(18, 21, 31, 0.95) 100%);
  }

  .nav-mobile__head::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(124, 92, 255, 0.35), transparent);
  }

  .nav-mobile__head-main {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
  }

  .nav-mobile__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.65rem;
    background: linear-gradient(145deg, rgba(139, 109, 255, 0.45), rgba(91, 61, 240, 0.25));
    border: 1px solid rgba(167, 139, 250, 0.35);
    overflow: hidden;
  }

  .nav-mobile__avatar img {
    width: 1.65rem;
    height: 1.65rem;
    object-fit: contain;
  }

  .nav-mobile__head-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
  }

  .nav-mobile__title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #f8fafc;
  }

  .nav-mobile__sub {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #94a3b8;
  }

  .nav-mobile__status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.55);
    animation: nav-mobile-pulse 2s ease-in-out infinite;
  }

  @keyframes nav-mobile-pulse {
    0%,
    100% {
      opacity: 1;
    }
    50% {
      opacity: 0.55;
    }
  }

  .nav-mobile__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: none;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
  }

  .nav-mobile__close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
  }

  .nav-mobile__body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1rem 1rem 1.25rem;
    -webkit-overflow-scrolling: touch;
  }

  .nav-mobile__label {
    margin: 0 0 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #64748b;
  }

  .nav-mobile__label:not(:first-child) {
    margin-top: 1.25rem;
  }

  .nav-mobile__links {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .nav-mobile__links a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 0.85rem;
    border-radius: 0.75rem;
    border: 1px solid transparent;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #cbd5e1;
    text-decoration: none;
    transition:
      background 0.2s ease,
      border-color 0.2s ease,
      color 0.2s ease;
  }

  .nav-mobile__links a:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
  }

  .nav-mobile__links a.is-active {
    background: rgba(124, 92, 255, 0.14);
    border-color: rgba(124, 92, 255, 0.35);
    color: #ede9fe;
    box-shadow: 0 4px 16px rgba(124, 92, 255, 0.12);
  }

  .nav-mobile__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.55rem;
    background: rgba(255, 255, 255, 0.05);
    color: #a78bfa;
  }

  .nav-mobile__links a.is-active .nav-mobile__icon {
    background: linear-gradient(145deg, rgba(139, 109, 255, 0.45), rgba(91, 61, 240, 0.28));
    color: #fff;
  }

  .nav-mobile.is-open .nav-mobile__links li {
    animation: nav-mobile-item-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  }

  .nav-mobile.is-open .nav-mobile__links li:nth-child(1) {
    animation-delay: 0.04s;
  }
  .nav-mobile.is-open .nav-mobile__links li:nth-child(2) {
    animation-delay: 0.08s;
  }
  .nav-mobile.is-open .nav-mobile__links li:nth-child(3) {
    animation-delay: 0.12s;
  }
  .nav-mobile.is-open .nav-mobile__links li:nth-child(4) {
    animation-delay: 0.16s;
  }

  @keyframes nav-mobile-item-in {
    from {
      opacity: 0;
      transform: translateX(10px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  .nav-mobile__actions {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
  }

  .nav-mobile__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition:
      transform 0.2s ease,
      filter 0.2s ease,
      background 0.2s ease,
      border-color 0.2s ease;
  }

  .nav-mobile__btn--line {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #e2e8f0;
  }

  .nav-mobile__btn--line:hover {
    background: rgba(124, 92, 255, 0.1);
    border-color: rgba(124, 92, 255, 0.35);
    color: #fff;
  }

  .nav-mobile__btn--chat {
    border: 1px solid rgba(167, 139, 250, 0.35);
    background: rgba(124, 92, 255, 0.12);
    color: #ede9fe;
  }

  .nav-mobile__btn--chat:hover {
    background: rgba(124, 92, 255, 0.22);
    transform: translateY(-1px);
  }

  .nav-mobile__btn--solid {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(145deg, #8b6dff, #5b3df0);
    color: #fff;
    box-shadow: 0 6px 20px rgba(124, 92, 255, 0.35);
  }

  .nav-mobile__btn--solid:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
  }

  body.nav-open {
    overflow: hidden;
  }

  body.nav-open .arena-header__bar {
    position: relative;
    z-index: 1002;
  }

  body.nav-open .hamburger {
    position: relative;
    z-index: 1003;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-mobile__panel,
  .nav-mobile__backdrop,
  .nav-mobile__links li,
  .nav-mobile__status-dot {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
