/* ══════════════════════════════════════════════════════════════
   AudioHub — Mobile App-Style Redesign
   Only applies at max-width: 768px
   Desktop is 100% untouched
   ══════════════════════════════════════════════════════════════ */

/* ─── DESIGN TOKENS (always available) ─── */
:root {
  --m-bg: #090B12;
  --m-bg2: #0D1117;
  --m-card: #121826;
  --m-card-hover: #1A2236;
  --m-accent: #F5A623;
  --m-accent-dim: rgba(245,166,35,0.12);
  --m-accent-glow: rgba(245,166,35,0.25);
  --m-text: #F1F5F9;
  --m-text2: #94A3B8;
  --m-text3: #64748B;
  --m-border: rgba(255,255,255,0.06);
  --m-border2: rgba(255,255,255,0.10);
  --m-shadow: 0 4px 20px rgba(0,0,0,0.3);
  --m-shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
  --m-radius: 20px;
  --m-radius-sm: 14px;
  --m-radius-xs: 10px;
  --m-header-h: 60px;
  --m-bottom-h: 64px;
  --m-safe: env(safe-area-inset-bottom, 0px);
}

/* ═══ HIDE MOBILE ELEMENTS ON DESKTOP (always) ═══ */
/* These elements should NEVER render on desktop. */
/* They are only shown inside @media (max-width: 768px). */
.m-header,
.m-bottomnav,
.m-drawer {
  display: none !important;
}
.m-drawer-overlay {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

@media (max-width: 768px) {

/* ═══════════════════════════════════════════════════════════════
   HIDE DESKTOP ELEMENTS — Override mobile-shared.css
   ═══════════════════════════════════════════════════════════════ */

/* Hide desktop header completely */
body > header.header,
body > .header,
body > header.site-header,
body > .site-header,
header.site-header,
.site-header,
.header__inner,
.header__acts,
.hamburger,
.nav-ov,
.nav,
.nav__close,
.nav__mbtns,
.nav__dropdown,
.nav__submenu,
nav.site-nav {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* Hide old bottom nav */
.bnav {
  display: none !important;
}

/* Hide old drawer */
.nav-drawer,
.nav-overlay {
  display: none !important;
}

/* Hide old footer */
.footer,
.site-footer {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════════
   BASE RESET (mobile only)
   ═══════════════════════════════════════════════════════════════ */
body {
  background: var(--m-bg) !important;
  color: var(--m-text);
  font-family: 'Nunito', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.listing-page,
body.info-page,
body.detail-page,
body.account-page {
  background: var(--m-bg) !important;
}

* {
  -webkit-tap-highlight-color: transparent;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE HEADER — Sticky, blur, 60px
   ═══════════════════════════════════════════════════════════════ */
.m-header {
  display: flex !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 500 !important;
  height: var(--m-header-h) !important;
  background: rgba(9,11,18,0.88) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border-bottom: 1px solid var(--m-border) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 16px !important;
  margin: 0 !important;
}

.m-header__left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.m-header__hamburger {
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  color: var(--m-text);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}
.m-header__hamburger:active {
  background: rgba(255,255,255,0.06);
}

.m-header__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Baloo 2', cursive;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--m-text);
}
.m-header__logo i {
  color: var(--m-accent);
  font-size: 1.1em;
  filter: drop-shadow(0 0 8px var(--m-accent-glow));
}
.m-header__logo em {
  color: var(--m-accent);
  font-style: normal;
}

.m-header__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.m-header__notif {
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  color: var(--m-text2);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}
.m-header__notif:active {
  background: rgba(255,255,255,0.06);
}
.m-header__notif .m-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: #EF4444;
  border-radius: 50%;
  border: 2px solid var(--m-bg);
}

/* ═══════════════════════════════════════════════════════════════
   DRAWER MENU — Slide from left
   ═══════════════════════════════════════════════════════════════ */
.m-drawer-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 600 !important;
  background: rgba(0,0,0,0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.m-drawer-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.m-drawer {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  bottom: 0 !important;
  z-index: 610 !important;
  width: 300px;
  max-width: 85vw;
  background: var(--m-bg2);
  border-right: 1px solid var(--m-border);
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex !important;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 !important;
  animation: none !important;
}
.m-drawer.is-open {
  transform: translateX(0);
}

.m-drawer__header {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--m-border);
}
.m-drawer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Baloo 2', cursive;
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.m-drawer__brand i {
  color: var(--m-accent);
  font-size: 1.2em;
}
.m-drawer__brand em {
  color: var(--m-accent);
  font-style: normal;
}
.m-drawer__tagline {
  font-size: 0.78rem;
  color: var(--m-text3);
  font-weight: 600;
}

.m-drawer__section {
  padding: 12px 12px 4px;
}
.m-drawer__label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--m-text3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 8px 8px;
}

.m-drawer__link {
  display: flex !important;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  color: var(--m-text2);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--m-radius-sm);
  transition: all 0.2s;
  text-decoration: none;
  width: 100%;
}
.m-drawer__link i {
  width: 22px;
  text-align: center;
  font-size: 16px;
  opacity: 0.7;
}
.m-drawer__link:active {
  background: rgba(255,255,255,0.04);
}
.m-drawer__link.active {
  background: var(--m-accent-dim);
  color: var(--m-accent);
}
.m-drawer__link.active i {
  opacity: 1;
}

.m-drawer__divider {
  height: 1px;
  background: var(--m-border);
  margin: 8px 20px;
}

.m-drawer__logout {
  padding: 0 12px 20px;
  margin-top: auto;
}
.m-drawer__logout-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  color: #EF4444;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--m-radius-sm);
  border: none;
  background: none;
  width: 100%;
  cursor: pointer;
}
.m-drawer__logout-btn i {
  width: 22px;
  text-align: center;
  font-size: 16px;
}

/* ═══════════════════════════════════════════════════════════════
   BOTTOM NAVIGATION — 5 items, fixed, safe area
   ═══════════════════════════════════════════════════════════════ */
.m-bottomnav {
  display: flex !important;
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 500 !important;
  height: var(--m-bottom-h) !important;
  padding-bottom: var(--m-safe);
  background: rgba(9,11,18,0.94) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border-top: 1px solid var(--m-border) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-around !important;
}

.m-bottomnav__item {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 4px;
  color: var(--m-text3);
  text-decoration: none;
  font-size: 10px;
  font-weight: 700;
  border-radius: 12px;
  transition: color 0.2s;
  flex: 1;
  min-width: 0;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.m-bottomnav__item span {
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1;
}
.m-bottomnav__item i {
  font-size: 22px;
  line-height: 1;
  transition: transform 0.2s;
}
.m-bottomnav__item.active {
  color: var(--m-accent);
}
.m-bottomnav__item.active i {
  transform: scale(1.08);
}
.m-bottomnav__item.active::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--m-accent);
  border-radius: 0 0 4px 4px;
}

/* ═══════════════════════════════════════════════════════════════
   PAGE WRAPPER
   ═══════════════════════════════════════════════════════════════ */
.m-page {
  padding-top: var(--m-header-h);
  padding-bottom: calc(var(--m-bottom-h) + var(--m-safe) + 8px);
  min-height: 100vh;
}

/* ═══════════════════════════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════ */
.m-heading { font-size: 2rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
.m-title { font-size: 1.25rem; font-weight: 800; line-height: 1.2; }
.m-subtitle { font-size: 1rem; font-weight: 700; line-height: 1.3; }
.m-body { font-size: 0.875rem; font-weight: 400; line-height: 1.5; }
.m-caption { font-size: 0.75rem; font-weight: 600; line-height: 1.4; color: var(--m-text3); }
.m-accent-text { color: var(--m-accent); }

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */
@keyframes mFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes mSlideUp {
  from { opacity: 0; transform: translateY(100%); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes mScaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.m-animate-fade { animation: mFadeIn 0.25s ease both; }
.m-animate-slide { animation: mSlideUp 0.3s ease both; }
.m-animate-scale { animation: mScaleIn 0.2s ease both; }

/* ═══════════════════════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

} /* end @media (max-width: 768px) */
