/* ===== PLUSRP Mobile ===== */
@media (max-width: 900px) {
  :root {
    --sidebar-width: 0px;
    --header-height: 56px;
  }

  /* Hide desktop side dots */
  .sidebar {
    display: none !important;
  }

  .header {
    left: 0 !important;
    width: 100% !important;
  }

  .header-inner {
    padding: 0 12px 0 16px !important;
    justify-content: space-between !important;
    gap: 10px;
  }

  /* Hide desktop top nav — use drawer */
  .top-nav {
    display: none !important;
  }

  .header-actions {
    position: static !important;
    margin-left: auto;
    gap: 8px !important;
  }

  .btn-login,
  .account-box .account-trigger {
    font-size: 0.7rem !important;
    padding: 8px 12px !important;
  }

  .account-credits-value {
    font-size: 0.85rem !important;
  }

  /* Hamburger */
  .mobile-menu-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    z-index: 1002;
  }
  .mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
  }
  .mobile-menu-btn .bars {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 18px;
  }
  .mobile-menu-btn .bars span {
    display: block;
    height: 2px;
    width: 100%;
    background: #fff;
    border-radius: 1px;
    transition: transform 0.25s, opacity 0.25s;
  }
  body.mobile-nav-open .mobile-menu-btn .bars span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  body.mobile-nav-open .mobile-menu-btn .bars span:nth-child(2) {
    opacity: 0;
  }
  body.mobile-nav-open .mobile-menu-btn .bars span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Drawer */
  .mobile-nav-drawer {
    display: block !important;
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 88vw);
    height: 100%;
    background: #0a0a0a;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 72px 20px 32px;
    overflow-y: auto;
  }
  body.mobile-nav-open .mobile-nav-drawer {
    transform: translateX(0);
  }
  .mobile-nav-backdrop {
    display: block !important;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
  }
  body.mobile-nav-open .mobile-nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  .mobile-nav-drawer a {
    display: block;
    padding: 16px 14px;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    border-radius: 12px;
    border: 1px solid transparent;
    margin-bottom: 6px;
    text-decoration: none;
  }
  .mobile-nav-drawer a:hover,
  .mobile-nav-drawer a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
  }

  /* Content full width */
  main,
  .page-main,
  .careers-page,
  .wiki-page,
  .rules-page,
  .panel-shell,
  .footer {
    margin-left: 0 !important;
  }

  /* Hero / images */
  .hero,
  .fullpage,
  .showcase {
    min-height: 100svh;
  }
  .hero-bg,
  .showcase-bg,
  .banner-img,
  .wiki-hero img,
  .careers-banner img {
    object-fit: cover !important;
    width: 100% !important;
    height: 100% !important;
  }
  .hero-image {
    object-fit: cover;
    object-position: center;
    width: 100%;
    height: 100%;
  }
  .hero-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    left: 16px !important;
    right: 16px !important;
    bottom: 24px !important;
  }
  .trailer-info {
    max-width: 100%;
  }
  .play-btn {
    width: 64px !important;
    height: 64px !important;
  }

  /* Cards */
  .cards,
  .credit-packages,
  .shop-grid,
  .vehicle-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .card,
  .credit-card,
  .vehicle-card,
  .position-card {
    border-radius: 14px;
    overflow: hidden;
  }
  .card-image,
  .vehicle-card img {
    min-height: 200px;
    background-size: cover !important;
    background-position: center !important;
  }

  /* Showcase text boxes */
  .showcase-content.left,
  .showcase-content.right {
    margin: 0 16px !important;
    max-width: none !important;
    padding: 20px !important;
  }

  /* Panel */
  .panel-layout,
  .panel-shell,
  .panel-body {
    flex-direction: column !important;
  }
  .panel-side,
  .panel-sidebar {
    width: 100% !important;
    max-width: none !important;
    position: relative !important;
    height: auto !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px !important;
  }
  .panel-content {
    padding: 16px !important;
    width: 100% !important;
  }
  .welcome-meta {
    flex-wrap: wrap !important;
    gap: 12px !important;
  }
  .wm-divider {
    display: none !important;
  }
  .welcome-top {
    flex-wrap: wrap;
  }

  /* Wiki / careers / rules */
  .wiki-layout,
  .careers-layout,
  .rules-layout,
  .content-with-menu {
    flex-direction: column !important;
  }
  .wiki-menu,
  .careers-filter,
  .rules-menu,
  .side-menu {
    width: 100% !important;
    position: relative !important;
    margin-bottom: 16px;
  }
  .form-grid {
    grid-template-columns: 1fr !important;
  }

  /* Footer */
  .footer-main {
    grid-template-columns: 1fr !important;
    padding: 32px 20px !important;
    gap: 28px !important;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    padding: 16px 20px !important;
    text-align: center;
  }
  .back-to-top {
    right: 16px !important;
    bottom: 80px !important;
  }

  /* Update overlay full width on mobile */
  .update-panel {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 16px 16px 0 0 !important;
  }
  .update-overlay {
    align-items: flex-end !important;
  }

  /* Login modal */
  .login-panel {
    width: calc(100% - 32px) !important;
    max-width: 400px !important;
    margin: 16px !important;
  }

  /* Shop filters scroll */
  .shop-filter-row {
    overflow-x: auto;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .shop-filter-chip {
    flex-shrink: 0;
  }
}

/* Desktop: hide mobile controls */
.mobile-menu-btn,
.mobile-nav-drawer,
.mobile-nav-backdrop {
  display: none;
}

@media (max-width: 900px) {
  body.mobile-nav-open {
    overflow: hidden;
  }
}

@media (max-width: 480px) {
  .section-title {
    font-size: 1.5rem !important;
  }
  .welcome-char-name {
    font-size: 1.4rem !important;
  }
  .nav-link {
    font-size: 0.85rem;
  }
}
