/* ══════════════════════════════════════
   RESPONSIVE.CSS — Адаптив для SoundWave
   Подключить ПОСЛЕ style.css в index.html:
   <link rel="stylesheet" href="responsive.css">
══════════════════════════════════════ */

/* ════════════════════════════════════════
   TABLET: до 1024px
════════════════════════════════════════ */
@media (max-width: 1024px) {
  .two-panel {
    grid-template-columns: 1fr;
  }

  .panel-left {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    min-height: 360px;
  }

  .panel-right {
    display: none; /* скрываем метрики на планшете */
  }

  .sidebar {
    width: 180px;
  }

  .now-play {
    width: 200px;
  }

  .player-right {
    width: 140px;
  }
}

/* ════════════════════════════════════════
   MOBILE LANDSCAPE + малый планшет: до 768px
════════════════════════════════════════ */
@media (max-width: 768px) {
  /* ── Navbar ── */
  .navbar {
    top: 8px;
    left: 8px;
    right: 8px;
    transform: none;
    width: auto;
    border-radius: 14px;
    height: 48px;
    padding: 0 8px;
    justify-content: space-between;
  }

  .nav-links {
    display: none; /* скрываем ссылки — навигация через sidebar/bottom bar */
  }

  .nav-right {
    border-left: none;
    padding: 0 4px;
  }

  .glass-pill {
    padding: 6px 10px;
    font-size: 10.5px;
  }

  /* ── App layout ── */
  .app {
    padding-top: 68px;
    padding-bottom: 60px; /* место под bottom nav */
    flex-direction: column;
  }

  .app.player-visible {
    padding-bottom: 136px; /* bottom nav + player */
  }

  /* ── Sidebar — скрыть, заменить bottom bar ── */
  .sidebar {
    display: none;
  }

  /* ── Content ── */
  .content {
    padding: 16px 14px;
  }

  /* ── Two panel ── */
  .two-panel {
    grid-template-columns: 1fr;
    border-radius: 12px;
    min-height: auto;
    margin-bottom: 20px;
  }

  .panel-left {
    min-height: 280px;
    padding: 18px;
  }

  .panel-right {
    display: none;
  }

  .panel-title {
    font-size: 16px;
  }

  .glow-grid {
    min-height: 260px;
  }

  /* ── Player ── */
  .player {
    bottom: 60px; /* над bottom bar */
    left: 8px;
    right: 8px;
    height: 70px;
    min-height: 70px;
    border-radius: 14px;
    padding: 0 12px;
    gap: 0;
  }

  .now-play {
    width: auto;
    flex: 1;
    min-width: 0;
    gap: 9px;
  }

  .np-thumb {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    flex-shrink: 0;
  }

  .np-title { font-size: 12px; }
  .np-artist { font-size: 10px; }

  .player-mid {
    flex: none;
    gap: 0;
    padding: 0 8px;
  }

  .timeline-wrap {
    display: none; /* скрываем таймлайн на телефоне */
  }

  .ctrls {
    gap: 0;
  }

  .cb {
    width: 30px;
    height: 30px;
  }

  /* скрываем shuffle и repeat на мобиле */
  #cb-shuffle,
  #cb-repeat {
    display: none;
  }

  .pb {
    width: 38px;
    height: 38px;
    margin: 0 4px;
  }

  .player-right {
    display: none; /* убираем громкость, экономим место */
  }

  .np-like {
    flex-shrink: 0;
  }

  /* ── Subbar ── */
  .subbar {
    padding: 8px 12px;
  }

  .search-box {
    max-width: none;
    flex: 1;
  }

  /* ── Album header ── */
  .alb-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .alb-cover {
    width: 130px;
    height: 130px;
  }

  .alb-title {
    font-size: 22px;
  }

  /* ── Artist ── */
  .art-banner {
    height: 150px;
    border-radius: 10px;
  }

  .art-name {
    font-size: 22px;
  }

  /* ── Stats ── */
  .stats-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .stat {
    padding: 10px;
  }

  .stat-n {
    font-size: 16px;
  }

  /* ── Cards ── */
  .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
  }

  /* ── Auth overlay & modal — полноэкранный на мобиле ── */
  #auth-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .auth-modal {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    border: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    overflow-y: auto;
    animation: authSlideUpFull 0.35s cubic-bezier(0.16,1,0.3,1) both;
  }

  @keyframes authSlideUpFull {
    from { transform: translateY(60px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
  }

  .auth-video-side {
    width: 100%;
    height: 180px;
    flex-shrink: 0;
  }

  .auth-form-side {
    flex: 1;
    padding: 28px 24px 40px;
    justify-content: flex-start;
    overflow-y: auto;
  }

  .auth-title {
    font-size: 26px;
  }

  .auth-sub {
    margin-bottom: 20px;
  }

  .auth-field {
    margin-bottom: 14px;
  }

  .auth-input {
    padding: 13px 16px;
    font-size: 16px; /* предотвращает zoom на iOS */
    border-radius: 12px;
  }

  .auth-btn {
    padding: 14px;
    font-size: 15px;
    border-radius: 12px;
  }

  /* ── Profile ── */
  .prof-header {
    gap: 0;
  }

  .prof-info-row {
    padding: 0 16px 18px;
    gap: 12px;
    flex-wrap: wrap;
  }

  .prof-banner {
    height: 110px;
  }

  .prof-name {
    font-size: 22px;
  }

  /* ── Banner picker ── */
  .banner-modal {
    width: calc(100vw - 24px);
    padding: 18px;
  }

  .banner-colors {
    grid-template-columns: repeat(4, 1fr);
  }

  /* ── Toast ── */
  .toast {
    bottom: 148px;
    font-size: 11.5px;
    padding: 8px 14px;
  }

  /* ── Page title ── */
  .ptitle {
    font-size: 18px;
    margin-bottom: 14px;
  }
}

/* ════════════════════════════════════════
   MOBILE: до 480px (малые телефоны)
════════════════════════════════════════ */
@media (max-width: 480px) {
  .navbar {
    top: 6px;
    left: 6px;
    right: 6px;
  }

  .nav-logo {
    font-size: 12px;
    gap: 6px;
    padding: 0 10px 0 6px;
  }

  .glass-pill {
    display: none; /* убираем пилюлю API на совсем маленьких */
  }

  .content {
    padding: 12px 10px;
  }

  .panel-left {
    padding: 14px;
    min-height: 240px;
  }

  .glow-grid {
    min-height: 220px;
  }

  .alb-cover {
    width: 110px;
    height: 110px;
  }

  .alb-title {
    font-size: 18px;
  }

  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hscroll .card {
    min-width: 130px;
  }

  .chip {
    padding: 5px 10px;
    font-size: 10.5px;
  }

  .btn {
    padding: 8px 14px;
    font-size: 11.5px;
  }

  .stats-row {
    gap: 5px;
  }

  .stat-n {
    font-size: 15px;
  }

  .stat-l {
    font-size: 9.5px;
  }
}

/* ════════════════════════════════════════
   BLUE ARTIST BADGE
════════════════════════════════════════ */
.art-badge-blue {
  background: rgba(59, 130, 246, 0.15) !important;
  border-color: rgba(59, 130, 246, 0.45) !important;
  color: #93c5fd !important;
  box-shadow:
    0 0 12px rgba(59, 130, 246, 0.25),
    inset 0 1px 0 rgba(147, 197, 253, 0.15);
  backdrop-filter: blur(10px);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-shadow: 0 0 10px rgba(147, 197, 253, 0.6);
}
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  height: 60px;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 4px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.5);
}

.bn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
  height: 100%;
  cursor: pointer;
  color: rgba(255,255,255,0.38);
  transition: color 0.2s;
  border-radius: 10px;
  padding: 6px 4px;
  -webkit-tap-highlight-color: transparent;
}

.bn-item:active {
  background: rgba(255,255,255,0.06);
}

.bn-item.active {
  color: var(--white);
}

.bn-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.bn-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-family: var(--font-display);
}

/* Показываем bottom nav только на мобиле */
@media (max-width: 768px) {
  .bottom-nav {
    display: flex;
  }
}

/* ════════════════════════════════════════
   SAFE AREA (iPhone notch/home bar)
════════════════════════════════════════ */
@supports (padding: env(safe-area-inset-bottom)) {
  .bottom-nav {
    padding-bottom: env(safe-area-inset-bottom);
    height: calc(60px + env(safe-area-inset-bottom));
  }

  @media (max-width: 768px) {
    .app {
      padding-bottom: calc(60px + env(safe-area-inset-bottom));
    }
    .app.player-visible {
      padding-bottom: calc(136px + env(safe-area-inset-bottom));
    }
    .player {
      bottom: calc(60px + env(safe-area-inset-bottom));
    }
    .toast {
      bottom: calc(148px + env(safe-area-inset-bottom));
    }
  }
}

/* ════════════════════════════════════════
   SCROLL на мобиле — убрать горизонтальный
════════════════════════════════════════ */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
  }

  .tlist {
    overflow-x: hidden;
  }

  /* Track rows чуть компактнее */
  .tr {
    padding: 7px 8px;
    gap: 8px;
  }

  .tr-art {
    width: 32px;
    height: 32px;
  }

  .tr-title {
    font-size: 12px;
  }

  .tr-artist {
    font-size: 10.5px;
  }

  .tr-dur {
    font-size: 10px;
  }

  /* Sec cards */
  .sec {
    margin-bottom: 20px;
  }

  /* Gradient editor */
  .oge-modal {
    padding: 20px 16px;
  }

  .oge-anims {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }

  .oge-anim-opt {
    padding: 8px 4px;
    font-size: 9.5px;
  }
}

/* ════════════════════════════════════════
   СРЕДНИЕ ЭКРАНЫ: 769–1024px (планшет)
════════════════════════════════════════ */
@media (min-width: 769px) and (max-width: 1024px) {
  .navbar {
    left: 16px;
    right: 16px;
    transform: none;
    width: auto;
  }

  .sidebar {
    width: 160px;
  }

  .nav-link {
    padding: 6px 9px;
    font-size: 11px;
  }

  .now-play {
    width: 220px;
  }

  .player-right {
    width: 150px;
  }

  .stats-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .alb-title {
    font-size: 24px;
  }
}