/* =========================================================
   PlayMarket – Responsive (Ultra Enhanced)
   ========================================================= */

/* Small phones */
@media (max-width: 360px) {
  .app-card,
  .app-icon,
  .sk-icon,
  .sk-card {
    width: 96px;
  }
  .app-icon,
  .sk-icon {
    height: 96px;
    border-radius: 20px;
  }
  .hero {
    height: 170px;
  }
  .hero h2 {
    font-size: 20px;
  }
}

/* Tablet */
@media (min-width: 600px) {
  .topbar {
    padding: 12px 28px;
    padding-top: calc(12px + var(--safe-t));
  }

  .pills {
    padding: 10px 28px 14px;
  }

  .sec-h {
    padding: 0 28px 14px;
  }

  .row {
    padding: 0 28px 8px;
    gap: 18px;
  }

  .list {
    padding: 0 28px;
  }

  .hero {
    margin: 18px 28px 28px;
    height: 220px;
    border-radius: 24px;
  }

  .hero h2 {
    font-size: 28px;
  }

  .about {
    padding: 8px 28px 32px;
  }

  .cta-row {
    padding: 18px 28px;
  }

  .shots {
    padding: 12px 28px 20px;
  }

  .stats-row {
    padding: 22px 28px;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 22px;
    padding: 8px 28px 32px;
  }

  .app-card {
    width: 130px;
  }

  .app-icon {
    width: 130px;
    height: 130px;
    border-radius: 28px;
  }

  .cat-grid {
    grid-template-columns: repeat(3, 1fr);
    padding: 8px 28px 32px;
    gap: 14px;
  }

  .page-header {
    padding: 24px 28px 14px;
  }

  .profile-card,
  .menu-list {
    margin-left: 28px;
    margin-right: 28px;
  }

  .detail-hero {
    height: 280px;
  }

  .d-icon {
    width: 100px;
    height: 100px;
    border-radius: 22px;
  }

  .d-title h1 {
    font-size: 26px;
  }
}

/* Desktop */
@media (min-width: 900px) {
  :root {
    --nav-h: 0px;
    --header-h: 64px;
  }

  body {
    background: #e4e7eb;
  }

  #app {
    min-height: 100vh;
    box-shadow: var(--shadow-xl);
    background: var(--bg);
    border-radius: 0;
  }

  .bottom-nav {
    display: none !important;
  }

  .brand {
    display: flex;
  }

  .desktop-nav {
    display: flex !important;
    align-items: center;
    gap: 2px;
    margin-left: 12px;
  }

  .search-trigger {
    max-width: 480px;
    margin-left: auto;
  }

  .topbar {
    padding: 12px 32px;
  }

  .pills {
    padding: 12px 32px 14px;
    top: var(--header-h);
  }

  .main {
    padding-bottom: 40px;
  }

  .sec-h {
    padding: 0 32px 16px;
  }

  .sec-h h2,
  .sec-h h3 {
    font-size: 20px;
  }

  .row {
    padding: 0 32px 10px;
    gap: 20px;
  }

  .list {
    padding: 0 32px;
    max-width: 720px;
  }

  .hero {
    margin: 20px 32px 32px;
    height: 260px;
    border-radius: 26px;
  }

  .hero h2 {
    font-size: 32px;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 24px;
    padding: 8px 32px 40px;
  }

  .app-card {
    width: 140px;
  }

  .app-icon {
    width: 140px;
    height: 140px;
    border-radius: 30px;
  }

  .app-name {
    font-size: 14px;
  }

  .cat-grid {
    grid-template-columns: repeat(4, 1fr);
    padding: 8px 32px 40px;
    gap: 16px;
  }

  .about {
    padding: 8px 32px 40px;
    max-width: 720px;
  }

  .cta-row {
    padding: 20px 32px;
  }

  .shots {
    padding: 14px 32px 24px;
  }

  .shots img {
    width: 160px;
    height: 284px;
  }

  .stats-row {
    padding: 24px 32px;
    max-width: 560px;
  }

  .page-header {
    padding: 28px 32px 16px;
  }

  .profile-card,
  .menu-list {
    margin-left: 32px;
    margin-right: 32px;
    max-width: 560px;
  }

  .overlay {
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }

  .detail-hero {
    height: 320px;
  }

  .toast {
    bottom: 32px;
  }
}

/* Large desktop */
@media (min-width: 1280px) {
  #app {
    border-radius: 0;
  }

  .hero {
    height: 300px;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
