:root {
  --primary: #22d3ee;
  --secondary: #6a5cff;
  --bg-deep: #070b14;
  --text-main: #e8eefc;
  --text-muted: color-mix(in srgb, var(--text-main) 55%, transparent);
  --border: color-mix(in srgb, var(--text-main) 10%, transparent);
  --card: #10141c;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "DM Sans", system-ui, sans-serif;
  background: var(--bg-deep);
  color: var(--text-main);
}
h1, h3, .btn-baixar { font-family: "Space Grotesk", "DM Sans", sans-serif; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
svg { width: 20px; height: 20px; flex: none; }

.dl-page { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: 2.2rem 0 3rem; }
.dl-top { text-align: center; margin-bottom: 2.2rem; }
.dl-logo { max-height: 92px; width: auto; margin: 0 auto 1rem; }
.dl-mark {
  width: 72px; height: 72px; margin: 0 auto 1rem; border-radius: 20px;
  display: grid; place-items: center;
  background: var(--primary); color: #042026;
  font-family: "Space Grotesk", sans-serif; font-weight: 800; font-size: 2rem;
}
.dl-top h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.03em; }

.apps-carousel { position: relative; }
.apps-track {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
}
.apps-nav { display: none; }
.app-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  padding: 0;
  text-align: center;
}
.app-cover { aspect-ratio: 16/9; background: #0b0f16; }
.app-cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-fallback {
  height: 100%; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--secondary), #111827 60%);
  font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 1.4rem;
}
.app-card h3 {
  margin: .95rem 1rem .55rem;
  font-size: 1.25rem;
  letter-spacing: .01em;
}
.app-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .7rem;
  padding: 0 1rem 1.15rem;
}
.btn-baixar {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  width: auto;
  min-height: 42px;
  padding: .55rem 1.05rem;
  border-radius: 999px;
  background: var(--primary);
  color: #042026;
  font-weight: 800;
  font-size: .92rem;
  white-space: nowrap;
}
.btn-baixar svg { width: 16px; height: 16px; }
.btn-baixar:focus { outline: 3px solid #fff; outline-offset: 3px; }
.dl-code-line {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  width: auto;
  margin: 0;
  padding: .28rem .7rem .28rem .28rem;
  border: 1px solid color-mix(in srgb, var(--text-main) 12%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-main) 5%, transparent);
  color: var(--text-main);
}
.dl-code-line:hover,
.dl-code-line:focus {
  border-color: color-mix(in srgb, var(--text-main) 22%, transparent);
  background: color-mix(in srgb, var(--text-main) 9%, transparent);
}
.dl-app-icon {
  width: 28px; height: 28px; border-radius: 7px;
  object-fit: cover; flex: none;
  box-shadow: 0 1px 3px rgba(0,0,0,.35);
}
.dl-code-label {
  font-weight: 600;
  font-size: .88rem;
  color: var(--text-muted);
}
.dl-code-num {
  font-family: "Space Grotesk", "DM Sans", sans-serif;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
}
.dl-code-line.is-copied .dl-code-num { color: #86efac; }
.empty { text-align: center; color: var(--text-muted); padding: 3rem 1rem; }

@media (max-width: 699px) {
  .dl-page {
    width: min(100%, calc(100% - 1.2rem));
    min-height: 100dvh;
    padding: 1rem 0 1.1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .dl-top { margin-bottom: .9rem; }
  .dl-logo { max-height: 56px; margin-bottom: .55rem; }
  .dl-mark { width: 52px; height: 52px; font-size: 1.5rem; border-radius: 16px; }
  .dl-top h1 { font-size: 1.45rem; }
  .apps-carousel { display: block; }
  .apps-track {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .apps-track::-webkit-scrollbar { display: none; }
  .app-card {
    flex: 0 0 100%;
    scroll-snap-align: center;
    min-width: 100%;
  }
  .app-card h3 { margin: .7rem .7rem .4rem; font-size: 1.05rem; }
  .app-actions { padding: 0 .7rem 1rem; gap: .5rem; }
  .apps-nav {
    display: grid;
    place-items: center;
    position: absolute;
    top: 22%;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--text-main) 18%, transparent);
    border-radius: 50%;
    background: color-mix(in srgb, var(--bg-deep) 72%, transparent);
    color: var(--text-main);
    z-index: 2;
  }
  .apps-nav.prev { left: .45rem; }
  .apps-nav.next { right: .45rem; }
  .apps-nav svg { width: 18px; height: 18px; }
  .apps-nav.prev svg { transform: rotate(180deg); }
  .apps-nav:focus { outline: 3px solid #fff; outline-offset: 2px; }
  .apps-nav:disabled { opacity: .35; }
}
@media (min-width: 700px) {
  .apps-track { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1020px) {
  .apps-track { grid-template-columns: repeat(3, 1fr); }
}
