:root {
  --dl-bg: #070707;
  --dl-surface: #101010;
  --dl-surface-2: #151515;
  --dl-card: #121212;
  --dl-card-hover: #191919;
  --dl-line: #2b2b2a;
  --dl-line-soft: #20201f;
  --dl-text: #f4f1ea;
  --dl-muted: #aaa69f;
  --dl-faint: #77736c;
  --dl-mineral: #e4e0d8;
  --dl-green: #63d391;
  --dl-green-soft: rgba(99, 211, 145, .12);
  --dl-radius: 14px;
}

body.dl-public {
  background:
    radial-gradient(900px 420px at 50% -180px, rgba(255, 255, 255, .065), transparent 68%),
    var(--dl-bg);
  color: var(--dl-text);
}

.dl-wrap {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 56px;
  color: var(--dl-text);
}

.dl-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 62px;
}

.dl-top .brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--dl-text);
  font-size: 1rem;
  font-weight: 780;
  letter-spacing: -.02em;
  text-decoration: none;
}

.dl-top .brand img {
  width: 36px;
  height: 36px;
  border: 1px solid var(--dl-line);
  border-radius: 10px;
  filter: grayscale(1) contrast(1.1);
}

.dl-top .btn {
  height: 38px;
  border: 1px solid var(--dl-line);
  border-radius: 8px;
  background: transparent;
  color: var(--dl-muted);
  font-size: .76rem;
  font-weight: 720;
  text-decoration: none;
}

.dl-top .btn:hover {
  border-color: #66635d;
  background: rgba(255, 255, 255, .05);
  color: var(--dl-text);
}

.dl-hero {
  position: relative;
  overflow: hidden;
  padding: 0 0 31px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--dl-line);
}

.dl-hero::after {
  content: '';
  position: absolute;
  right: 5%;
  top: -90px;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
  box-shadow: 0 0 0 25px rgba(255, 255, 255, .018), 0 0 0 52px rgba(255, 255, 255, .012);
  pointer-events: none;
}

.dl-hero > * { position: relative; z-index: 1; }

.dl-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--dl-muted);
  font-size: .67rem;
  font-weight: 780;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.dl-kicker svg { width: 15px; height: 15px; color: var(--dl-mineral); }

.dl-hero h1 {
  max-width: 720px;
  margin-top: 15px;
  color: var(--dl-text);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 790;
  letter-spacing: -.065em;
  line-height: .98;
}

.dl-hero p {
  max-width: 610px;
  margin-top: 17px;
  color: var(--dl-muted);
  font-size: .94rem;
  line-height: 1.65;
}

.dl-hero-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  color: var(--dl-text);
  font-size: .75rem;
  font-weight: 700;
}

.dl-status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--dl-green);
  box-shadow: 0 0 0 4px var(--dl-green-soft);
}

.dl-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 16px;
}

.dl-search-wrap { position: relative; flex: 1; min-width: 0; }
.dl-search-wrap svg {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 17px;
  height: 17px;
  color: var(--dl-faint);
  pointer-events: none;
  transform: translateY(-50%);
}

.dl-search,
.dl-filter {
  height: 46px;
  border: 1px solid var(--dl-line);
  border-radius: 9px;
  background: var(--dl-surface);
  color: var(--dl-text);
  font-family: inherit;
  font-size: .8rem;
}

.dl-search {
  width: 100%;
  padding: 0 15px 0 42px;
}

.dl-search::placeholder { color: var(--dl-faint); }
.dl-search:focus,
.dl-filter:focus {
  outline: none;
  border-color: #77736c;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .06);
}

.dl-filter { min-width: 160px; padding: 0 32px 0 12px; }
.dl-count { color: var(--dl-faint); font-size: .72rem; white-space: nowrap; }

.dl-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dl-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--dl-line);
  border-radius: var(--dl-radius);
  background: linear-gradient(145deg, var(--dl-card-hover), var(--dl-card));
  box-shadow: 0 12px 28px rgba(0, 0, 0, .16);
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.dl-card:hover {
  border-color: #55524c;
  background: #181817;
  transform: translateY(-2px);
}

.dl-card[hidden], .dl-section[hidden] { display: none; }
.dl-card-head { display: flex; align-items: flex-start; gap: 13px; }

.dl-product-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: none;
  place-items: center;
  border: 1px solid #3b3a36;
  border-radius: 11px;
  background: #0b0b0b;
  color: var(--dl-mineral) !important;
}

.dl-product-icon svg { width: 23px; height: 23px; stroke-width: 1.45; }
.dl-platform-android, .dl-platform-ios, .dl-platform-windows,
.dl-platform-roblox, .dl-platform-discord, .dl-platform-linux,
.dl-platform-arquivo { border-color: #3b3a36; background: #0b0b0b; color: var(--dl-mineral); }

.dl-card-heading { min-width: 0; }
.dl-eyebrow {
  color: var(--dl-faint);
  font-size: .62rem;
  font-weight: 780;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.dl-title {
  margin-top: 4px;
  color: var(--dl-text);
  font-size: 1rem;
  font-weight: 760;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.dl-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.dl-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border: 1px solid #343431;
  border-radius: 5px;
  color: var(--dl-muted);
  font-size: .63rem;
  font-weight: 700;
}

.dl-chip-category { background: rgba(255, 255, 255, .045); color: var(--dl-mineral); }
.dl-updated { display: inline-flex; align-items: center; gap: 7px; color: var(--dl-faint); font-size: .64rem; }
.dl-updated .dl-status-dot { width: 5px; height: 5px; box-shadow: none; }

.dl-description {
  display: -webkit-box;
  max-height: 49px;
  margin-top: 17px;
  padding-top: 14px;
  overflow: hidden;
  border-top: 1px solid var(--dl-line-soft);
  color: var(--dl-muted);
  font-size: .76rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.dl-card-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.dl-btn {
  display: inline-flex;
  min-height: 37px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--dl-line);
  border-radius: 8px;
  background: transparent;
  color: var(--dl-text);
  font-family: inherit;
  font-size: .7rem;
  font-weight: 720;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

.dl-btn svg { width: 15px; height: 15px; flex: none; }
.dl-btn:hover { border-color: #77736c; background: rgba(255, 255, 255, .06); transform: translateY(-1px); }
.dl-btn-primary { flex: 1 1 140px; border-color: #d9d5cd; background: var(--dl-mineral); color: #11110f; }
.dl-btn-primary:hover { border-color: #fff; background: #fff; color: #080808; }
.dl-btn-secondary { border-color: #3b3a36; background: #1b1b1a; color: var(--dl-mineral); }
.dl-btn-tertiary { color: var(--dl-muted); }

.dl-empty {
  padding: 42px 24px;
  border: 1px dashed var(--dl-line);
  border-radius: var(--dl-radius);
  background: var(--dl-surface);
  color: var(--dl-muted);
  font-size: .84rem;
  text-align: center;
}

.dl-empty strong { display: block; margin-bottom: 5px; color: var(--dl-text); font-size: .95rem; }
.dl-share { display: flex; align-items: center; gap: 12px; margin-top: 28px; padding: 13px; border: 1px solid var(--dl-line); border-radius: 10px; background: var(--dl-surface); }
.dl-share span { flex: 1; min-width: 0; overflow: hidden; color: var(--dl-faint); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.dl-share .dl-btn { flex: none; }
.dl-foot { margin-top: 26px; color: var(--dl-faint); font-size: .7rem; text-align: center; }
.dl-toast { background: #18241d; border-color: rgba(99, 211, 145, .38); color: #b9f2cd; }

@media (max-width: 820px) {
  .dl-wrap { width: min(100% - 28px, 680px); padding-top: 22px; }
  .dl-top { margin-bottom: 45px; }
  .dl-list { grid-template-columns: 1fr; }
  .dl-tools { flex-wrap: wrap; }
  .dl-search-wrap { flex: 1 1 100%; }
  .dl-filter { flex: 1; }
  .dl-count { margin-left: auto; }
}

@media (max-width: 560px) {
  .dl-hero h1 { font-size: 2.3rem; }
  .dl-hero p { font-size: .88rem; }
  .dl-card { padding: 17px; }
  .dl-card-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .dl-btn-primary { grid-column: 1 / -1; }
  .dl-btn { width: 100%; padding-inline: 8px; }
  .dl-share { align-items: stretch; flex-direction: column; }
  .dl-share .dl-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .dl-wrap *, .dl-toast { transition: none !important; }
}

/* Microinterações discretas: feedback rápido sem prejudicar toque ou desempenho. */
@keyframes dl-card-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes dl-icon-breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
  50% { box-shadow: 0 0 0 4px rgba(255, 255, 255, .045); }
}

.dl-card {
  animation: dl-card-in .32s cubic-bezier(.22, 1, .36, 1) both;
}

.dl-card:nth-child(2) { animation-delay: 35ms; }
.dl-card:nth-child(3) { animation-delay: 70ms; }
.dl-card:nth-child(4) { animation-delay: 105ms; }
.dl-card:nth-child(5) { animation-delay: 140ms; }

.dl-product-icon {
  transition: transform .2s cubic-bezier(.22, 1, .36, 1), border-color .2s ease, box-shadow .2s ease;
}

.dl-card:hover .dl-product-icon {
  border-color: #77736c;
  transform: translateY(-1px) scale(1.035);
  animation: dl-icon-breathe 1.8s ease-in-out infinite;
}

.dl-btn:active,
.dl-top .btn:active {
  transform: scale(.97);
}

.dl-btn:focus-visible,
.dl-search:focus-visible,
.dl-filter:focus-visible,
.dl-top .btn:focus-visible {
  outline: 2px solid var(--dl-mineral);
  outline-offset: 3px;
}

@media (hover: none) {
  .dl-card:hover { transform: none; }
  .dl-card:active { border-color: #77736c; }
  .dl-card:active .dl-product-icon { transform: scale(1.025); }
  .dl-card:hover .dl-product-icon { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  .dl-card,
  .dl-product-icon,
  .dl-btn,
  .dl-top .btn {
    animation: none !important;
    transition: none !important;
  }
}

/* Certificado é um segundo download, não um tutorial. */
.dl-btn-download {
  border-color: #2f8cff;
  background: #2f8cff;
  color: #fff;
  box-shadow: 0 7px 18px rgba(47, 140, 255, .18);
}
.dl-btn-download:hover {
  border-color: #5aa6ff;
  background: #5aa6ff;
  color: #fff;
}
