/*
 * desktop.css — Responsive layout additions for ZaxlrrMods
 * Loaded AFTER style.css. Handles tablet and desktop widths.
 *
 * NOTE: !important beats Tailwind CDN which injects its stylesheet at runtime,
 * after <link> tags, making same-specificity rules lose.
 *
 * Breakpoints:  sm 480px | md 768px | lg 1024px | xl 1280px | 2xl 1536px
 *
 * CHANGED: nav + main content + footer are now full-width (100%) on desktop
 * instead of centered with a max-width container, per request. Padding is
 * kept so content doesn't touch the raw screen edges.
 */

/* ══════════════════════════════════════════════════
   BASE MOBILE IMPROVEMENTS (all screens)
══════════════════════════════════════════════════ */

.pack-card-title   { font-size: 0.78rem !important; }
.pack-card-body    { padding: 10px 12px 14px !important; }
.pack-meta-size    { font-size: 0.65rem !important; }
.pack-meta-tag     { font-size: 0.62rem !important; }
.ch-name           { font-size: 0.72rem !important; }
.section-heading   { font-size: 0.82rem !important; }
.stat-pill-label   { font-size: 0.62rem !important; }
.pack-stat-item    { font-size: 0.65rem !important; }

.client-card-h { min-height: 44px; }
.tag-filter-btn { min-height: 36px; min-width: 36px; }

/* ══════════════════════════════════════════════════
   DESKTOP NAV LINK BASE STYLES (shared)
══════════════════════════════════════════════════ */

.desktop-nav-links {
  display: none;
  align-items: center;
  gap: 0.125rem;
}

.desktop-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #9ca3af;
  text-decoration: none;
  transition: all 0.2s var(--ease);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font-family: 'Outfit', system-ui, Arial, sans-serif;
  white-space: nowrap;
  line-height: 1;
}
.desktop-nav-link:hover {
  color: #e5e7eb;
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.10);
}
.desktop-nav-link.active {
  color: var(--tc);
  background: var(--acc-10);
  border-color: var(--acc-30);
}
.desktop-nav-link i { font-size: 0.72rem; opacity: 0.8; }

/* ══════════════════════════════════════════════════
   HOME VIEW — base (mobile-first stacked)
══════════════════════════════════════════════════ */

.home-layout {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ══════════════════════════════════════════════════
   SMALL MOBILE (< 480px)
══════════════════════════════════════════════════ */
@media (max-width: 479px) {
  nav[data-main-nav] {
    padding: 0.35rem 0.625rem !important;
  }
  .pack-card-title { font-size: 0.72rem !important; }
  .client-card-h {
    width: 108px !important;
    height: 108px !important;
  }
  .client-card-h img {
    width: 58px !important;
    height: 58px !important;
  }
  .stats-grid-6 {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* ══════════════════════════════════════════════════
   TABLET (768px+)
══════════════════════════════════════════════════ */
@media (min-width: 768px) {
  nav[data-main-nav] {
    max-width: 700px !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  #main-content {
    max-width: 700px !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
  .page-container {
    max-width: 700px !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
  footer.page-footer {
    max-width: 700px !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
  .pack-card-title { font-size: 0.82rem !important; }
  .pack-meta-size  { font-size: 0.68rem !important; }
  .pack-grid-home  { grid-template-columns: repeat(3, 1fr) !important; }
  .pack-grid-page  { grid-template-columns: repeat(3, 1fr) !important; }
  .client-scroll {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    overflow-x: visible !important;
    padding-bottom: 0 !important;
    gap: 8px !important;
  }
  .client-card-h {
    width: auto !important;
    min-width: 0 !important;
    flex-shrink: unset !important;
    height: 130px !important;
  }
  .stats-grid-6 {
    grid-template-columns: repeat(6, 1fr) !important;
  }
  .download-hero { padding: 1.5rem !important; }
}

/* ══════════════════════════════════════════════════
   DESKTOP (1024px+) — FULL OVERHAUL
══════════════════════════════════════════════════ */
@media (min-width: 960px) {

  /* Subtle full-width background pattern so the margin space
     outside the capped container reads as designed, not empty */
  body {
    background-image:
      radial-gradient(circle at 8% 20%, var(--acc-10) 0%, transparent 35%),
      radial-gradient(circle at 92% 75%, var(--acc-10) 0%, transparent 35%) !important;
    background-attachment: fixed !important;
    background-repeat: no-repeat !important;
  }

  /* ─────────────────────────────────────────────
     NAV — full-width sticky bar: no max-width,
     no border-radius, spans edge-to-edge.
     logo left │ links centered │ right slot
  ───────────────────────────────────────────── */

  /* Make the header a true full-width bar */
  header:has(nav[data-main-nav]) {
    padding: 0 !important;
    width: 100% !important;
    background: rgba(5, 5, 10, 0.88) !important;
    backdrop-filter: blur(28px) !important;
    -webkit-backdrop-filter: blur(28px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    pointer-events: auto !important;
    display: block !important;
    box-shadow: 0 1px 40px rgba(0,0,0,0.4) !important;
    width: 100% !important;
  }

  /* Scroll-active shadow enhancement (JS adds .scrolled to header) */
  header.scrolled:has(nav[data-main-nav]) {
    box-shadow: 0 4px 60px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255,255,255,0.05) !important;
  }

  nav[data-main-nav] {
    max-width: 1400px !important;
    width: 100% !important;
    margin: 0 auto !important;
    border-radius: 0 !important;
    border: none !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    padding: 0.875rem 2.5rem !important;
    height: 64px !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
  }

  /* Logo: slightly bigger on desktop */
  nav[data-main-nav] .logo-circle {
    width: 42px !important;
    height: 42px !important;
  }

  /* Nav links: centered in the middle */
  .desktop-nav-links {
    display: flex !important;
    flex: 1 !important;
    justify-content: center !important;
    gap: 0.25rem !important;
  }

  /* Hide hamburger, show nothing (nav links replace it) */
  .mobile-only-nav-btn {
    display: none !important;
  }

  /* Add a "Discord" badge on the right side of nav via sibling trick */
  nav[data-main-nav] > div:last-child {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    min-width: 120px !important;
    justify-content: flex-end !important;
  }

  /* ─────────────────────────────────────────────
     Main content area — full width, no container
  ───────────────────────────────────────────── */

  #main-content {
    max-width: 1320px !important;
    padding-top: 80px !important;
    padding-left: 2.5rem !important;
    padding-right: 2.5rem !important;
    box-sizing: border-box !important;
  }

  .page-container {
    max-width: 1320px !important;
    padding-left: 2.5rem !important;
    padding-right: 2.5rem !important;
    padding-top: 80px !important;
  }

  footer.page-footer {
    max-width: 1320px !important;
    padding-left: 2.5rem !important;
    padding-right: 2.5rem !important;
  }

  /* ─────────────────────────────────────────────
     HOME — 2-column sidebar + main layout
  ───────────────────────────────────────────── */

  .home-layout {
    display: grid !important;
    grid-template-columns: 300px 1fr !important;
    gap: 2rem !important;
    align-items: start !important;
  }

  .home-sidebar-col {
    position: sticky !important;
    top: 76px !important;
    max-height: calc(100vh - 92px) !important;
    overflow-y: auto !important;
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
  }
  .home-sidebar-col::-webkit-scrollbar { display: none; }

  .home-main-col {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
    min-width: 0 !important;
  }
  .home-main-col > * + * { margin-top: 0; }

  /* ─────────────────────────────────────────────
     PACK GRIDS — auto-fill responsive columns
     (fills full available width, more columns
     appear automatically as screen gets wider)
  ───────────────────────────────────────────── */

  .pack-grid-home {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    gap: 1rem !important;
  }

  .pack-grid-page {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
    gap: 1rem !important;
  }

  /* Pack card typography improvements */
  .pack-card-title { font-size: 0.9rem !important; }
  .pack-meta-size  { font-size: 0.72rem !important; }
  .pack-meta-tag   { font-size: 0.65rem !important; padding: 2px 8px !important; }

  /* ─────────────────────────────────────────────
     PACK CARD — consistent image height + hover
  ───────────────────────────────────────────── */

  .pack-img-full {
    aspect-ratio: unset !important;
    height: 170px !important;
    flex-shrink: 0 !important;
  }

  .pack-img-full img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
  }

  /* Enhanced hover: scale + glow border + shadow lift */
  .pack-card-v {
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease) !important;
    cursor: pointer !important;
  }
  .pack-card-v:hover {
    transform: translateY(-6px) scale(1.02) !important;
    box-shadow:
      0 20px 60px rgba(0, 0, 0, 0.55),
      0 0 0 1px var(--acc-30),
      0 0 30px var(--acc-10) !important;
    border-color: var(--acc-30) !important;
  }
  .pack-card-v:hover .pack-img-full img {
    transform: scale(1.08) !important;
  }
  .pack-card-v:active {
    transform: translateY(-2px) scale(1.005) !important;
    transition-duration: 0.1s !important;
  }

  /* ─────────────────────────────────────────────
     CLIENT CARDS — auto-fill grid on desktop
  ───────────────────────────────────────────── */

  .client-scroll {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
    overflow-x: visible !important;
    padding-bottom: 0 !important;
    gap: 0.75rem !important;
  }

  .client-card-h {
    width: auto !important;
    height: 140px !important;
    min-width: 0 !important;
    flex-shrink: unset !important;
    border-radius: 1.125rem !important;
    transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s var(--ease) !important;
  }

  .client-card-h:hover {
    transform: translateY(-4px) scale(1.03) !important;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 1px var(--acc-15), 0 0 20px var(--acc-10) !important;
    border-color: var(--acc-20, rgba(168,85,247,0.20)) !important;
    background: rgba(255,255,255,0.07) !important;
  }

  .client-card-h img {
    width: 70px !important;
    height: 70px !important;
    border-radius: 14px !important;
  }

  /* ─────────────────────────────────────────────
     ABOUT PAGE — 2-column layout
  ───────────────────────────────────────────── */

  .about-layout {
    display: grid !important;
    grid-template-columns: 280px 1fr !important;
    gap: 2rem !important;
    align-items: start !important;
    text-align: left !important;
  }

  .about-avatar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: sticky;
    top: 80px;
  }

  .about-content-col {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }

  .about-stats-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }

  /* ─────────────────────────────────────────────
     SETTINGS PAGE — 2-col grid
  ───────────────────────────────────────────── */

  #settings-main .settings-panels {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 1.25rem !important;
    align-items: start !important;
    row-gap: 1.25rem !important;
  }
  #settings-main .settings-panels > * {
    margin-top: 0 !important;
  }

  /* ─────────────────────────────────────────────
     CONTACT PAGE — 2-col grid
  ───────────────────────────────────────────── */

  .contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
  }

  /* ─────────────────────────────────────────────
     MISC DESKTOP UPGRADES
  ───────────────────────────────────────────── */

  .download-hero { padding: 2.5rem !important; }

  .version-list-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.625rem !important;
  }

  .stats-grid-6 {
    grid-template-columns: repeat(6, 1fr) !important;
  }

  .welcome-state {
    display: flex !important;
  }

  /* Packs page search bar: wider on desktop */
  #pack-search {
    font-size: 0.9rem !important;
    padding: 0.75rem 1rem 0.75rem 2.75rem !important;
  }

  /* Tag filter pills: slightly bigger */
  .tag-filter-btn {
    font-size: 0.7rem !important;
    padding: 0.45rem 1rem !important;
  }

  /* Stat cards — enhanced hover */
  .stat-card {
    transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s var(--ease) !important;
  }
  .stat-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 20px var(--acc-10) !important;
    border-color: var(--acc-20, rgba(168,85,247,0.20)) !important;
  }

  /* Product selector cards — better hover */
  .product-selector:hover {
    transform: translateY(-3px) scale(1.01) !important;
    box-shadow: 0 12px 32px rgba(0,0,0,0.4) !important;
  }

  /* Pack page container (individual pack pages) — kept at a readable
     width on purpose; a single article stretched full-width at 1920px+
     becomes hard to read. Grids/nav above are full width as requested. */
  .pack-page-container {
    max-width: 1024px !important;
  }
}

/* ══════════════════════════════════════════════════
   LARGE DESKTOP (1280px+)
══════════════════════════════════════════════════ */
@media (min-width: 1280px) {

  nav[data-main-nav] {
    padding: 0.875rem 3rem !important;
  }

  #main-content {
    max-width: 1440px !important;
    padding-left: 3rem !important;
    padding-right: 3rem !important;
  }

  .page-container {
    max-width: 1440px !important;
    padding-left: 3rem !important;
    padding-right: 3rem !important;
  }

  footer.page-footer {
    max-width: 1440px !important;
    padding-left: 3rem !important;
    padding-right: 3rem !important;
  }

  .home-layout {
    grid-template-columns: 330px 1fr !important;
    gap: 2.5rem !important;
  }

  /* Minimum card width increases at larger screens */
  .pack-grid-home {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)) !important;
  }
  .pack-grid-page {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)) !important;
  }

  .pack-img-full {
    height: 185px !important;
  }

  .client-card-h {
    height: 148px !important;
  }

  .pack-card-title { font-size: 0.92rem !important; }
  .pack-card-body  { padding: 12px 14px 16px !important; }
}

/* ══════════════════════════════════════════════════
   EXTRA LARGE DESKTOP (1536px+)
══════════════════════════════════════════════════ */
@media (min-width: 1536px) {

  nav[data-main-nav] {
    padding: 0.875rem 4rem !important;
  }

  #main-content {
    max-width: 1600px !important;
    padding-left: 4rem !important;
    padding-right: 4rem !important;
  }

  .page-container {
    max-width: 1600px !important;
    padding-left: 4rem !important;
    padding-right: 4rem !important;
  }

  footer.page-footer {
    max-width: 1600px !important;
    padding-left: 4rem !important;
    padding-right: 4rem !important;
  }

  .home-layout {
    grid-template-columns: 360px 1fr !important;
  }

  .pack-grid-home {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
  }
  .pack-grid-page {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
  }

  .pack-img-full {
    height: 200px !important;
  }

  .client-card-h { height: 156px !important; }
}

/* ══════════════════════════════════════════════════
   FOOTER — responsive
══════════════════════════════════════════════════ */

.footer-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2.5rem 1.5rem 1.5rem;
}

.footer-logo-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.footer-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--acc-30);
}

.footer-tagline {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 500;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

.footer-link-column {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 100px;
}

.footer-link-column h4 {
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.25rem 0;
}

.footer-link-column a {
  font-size: 0.78rem;
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-link-column a:hover { color: #e5e7eb; }

.footer-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-1);
  border: 1px solid var(--border-1);
  color: #6b7280;
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.2s var(--ease);
}
.social-icon:hover {
  color: #fff;
  background: var(--glass-2);
  border-color: var(--acc-30);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--acc-10);
}

.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-1);
}
.footer-tags p {
  font-size: 0.6rem;
  color: #374151;
  margin: 0;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
}

.footer-bottom {
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  border-top: 1px solid var(--border-1);
}
.footer-bottom-text {
  font-size: 0.65rem;
  color: #374151;
  margin: 0;
}
.footer-bottom p {
  font-size: 0.6rem;
  color: #1f2937;
  margin: 0;
}

@media (min-width: 960px) {
  .footer-container {
    display: grid !important;
    grid-template-columns: auto 1fr auto !important;
    gap: 2.5rem !important;
    align-items: start !important;
    max-width: 1320px !important;
    margin: 0 auto !important;
    padding: 3rem 2.5rem 2rem !important;
  }

  .footer-links {
    gap: 3rem;
    justify-content: center;
  }

  .footer-social {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-end;
  }

  .footer-tags,
  .footer-bottom {
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 1280px) {
  .footer-container {
    max-width: 1440px !important;
    padding: 3rem 3rem 2rem !important;
  }
  .footer-tags,
  .footer-bottom {
    max-width: 1440px;
  }
}

/* ══════════════════════════════════════════════════
   CONTACT PAGE
══════════════════════════════════════════════════ */
.contact-input {
  width: 100%;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-2);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #fff;
  font-family: 'Outfit', system-ui, Arial, sans-serif;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  min-height: 44px;
}
.contact-input::placeholder { color: #4b5563; }
.contact-input:focus {
  border-color: var(--acc-50);
  box-shadow: 0 0 0 3px var(--acc-10);
}

.contact-submit-btn {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  font-family: 'Outfit', system-ui, Arial, sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  transition: all 0.2s var(--ease);
  min-height: 48px;
}

/* ══════════════════════════════════════════════════
   404 PAGE
══════════════════════════════════════════════════ */
.error-code-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tc);
  background: var(--acc-10);
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  border: 1px solid var(--acc-30);
}

.error-heading {
  font-size: clamp(4rem, 10vw, 6rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--tc);
  text-shadow: 0 0 60px var(--acc-30);
}

/* ══════════════════════════════════════════════════
   PACK PAGES — individual pages in /packs/
══════════════════════════════════════════════════ */
@media (min-width: 768px) {
  .pack-page-container {
    max-width: 700px !important;
  }
}
@media (min-width: 960px) {
  .pack-page-container {
    max-width: 1024px !important;
  }
}

/* ══════════════════════════════════════════════════
   DESKTOP SCROLLBAR
══════════════════════════════════════════════════ */
@media (min-width: 960px) {
  ::-webkit-scrollbar { width: 8px; height: 8px; }
  ::-webkit-scrollbar-track { background: rgba(255,255,255,0.02); }
  ::-webkit-scrollbar-thumb {
    background: rgba(168,85,247,0.3);
    border-radius: 10px;
  }
  ::-webkit-scrollbar-thumb:hover {
    background: rgba(168,85,247,0.5);
  }
}
