/* Download — chatlog-like shell, dark theme, stats + all formats */
*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

a{
  text-decoration: none;
}

body{
  height: 100dvh;
  background: black;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
}

.background{
  width: 97%;
  height: 96%;
  border-radius: 8px;
  background: #050505;
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.bg-video-wrap{
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 8px;
  pointer-events: none;
  background:
    radial-gradient(1000px 600px at 80% -10%, rgba(255, 255, 255, 0.14), transparent 60%),
    radial-gradient(800px 500px at 10% 110%, rgba(255, 255, 255, 0.08), transparent 60%);
}

/* top-left title card — inverse pill (dark page) */
.card{
  font-family: Arial Black;
  font-size: 25px;
  color: black;
  text-decoration: none;
  border-radius: 4px;
  background: white;
  padding: 4px 40px 0px 10px;
  position: absolute;
  left: 24px;
  top: 24px;
  z-index: 2;
}

/* top-right nav */
.nav-card{
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.92);
  color: white;
  padding: 6px;
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  gap: 2px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  z-index: 2;
}

.nav-card a{
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  white-space: nowrap;
  padding: 9px 14px;
  border-radius: 4px;
  transition: background 0.18s ease, color 0.18s ease;
}

.nav-card a:hover{
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.nav-card a:focus-visible{
  outline: 2px solid rgba(255, 255, 255, 0.75);
  outline-offset: 1px;
}

.nav-card a[aria-current="page"]{
  background: rgba(255, 255, 255, 0.16);
  color: white;
}

.nav-card a[data-download-latest]{
  background: white;
  color: black;
}

.nav-card a[data-download-latest]:hover{
  background: rgba(255, 255, 255, 0.82);
  color: black;
}

.nav-links{
  display: contents;
}

.hamburger{
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 2px;
}

.hamburger span{
  display: block;
  width: 22px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-panel{
  display: none;
}

.menu-panel a{
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 4px;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}

.menu-panel a:hover{
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.menu-panel a[data-download-latest]{
  background: white;
  color: black;
}

.menu-panel a[data-download-latest]:hover{
  background: rgba(255, 255, 255, 0.82);
  color: black;
}

/* main column — centered, scrollable */
.dl-feed{
  position: absolute;
  left: 50%;
  translate: -50% 0;
  top: 100px;
  bottom: 24px;
  width: min(940px, calc(100% - 48px));
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.4) transparent;
}

.dl-feed::-webkit-scrollbar{
  width: 6px;
}

.dl-feed::-webkit-scrollbar-thumb{
  background: rgba(255, 255, 255, 0.4);
  border-radius: 3px;
}

/* ---------- stats strip (shared look with chatlog) ---------- */
.stats-strip{
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  padding: 12px;
  position: sticky;
  top: 0;
  z-index: 3;
  backdrop-filter: blur(6px);
}

.stat{
  flex: 1 1 120px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  min-width: 0;
}

.stat-num{
  font-family: Arial Black;
  font-size: 22px;
  line-height: 1.1;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-label{
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.stat-versions{
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 10px 2px;
}

.stat-versions[hidden]{
  display: none;
}

.ver-chip{
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  background: white;
  color: black;
  border-radius: 20px;
  padding: 3px 10px;
}

/* ---------- hero ---------- */
.dl-hero{
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 22px;
}

.dl-kicker{
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 8px;
}

.dl-version{
  display: inline-block;
  background: white;
  color: black;
  border-radius: 20px;
  padding: 2px 10px;
  margin-left: 8px;
  letter-spacing: 0.04em;
}

.dl-title{
  font-family: Arial Black;
  font-size: 26px;
  line-height: 1.15;
  margin-bottom: 8px;
}

.dl-sub{
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.8;
  margin-bottom: 16px;
}

.dl-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dl-btn{
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  border-radius: 4px;
  padding: 11px 20px;
  transition: transform 0.15s ease, background 0.15s ease;
}

.dl-btn-primary{
  background: white;
  color: black;
}

.dl-btn-primary:hover{
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.85);
}

.dl-btn-ghost{
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.dl-btn-ghost:hover{
  background: rgba(255, 255, 255, 0.18);
}

/* ---------- sections + format cards ---------- */
.dl-section-title{
  font-family: Arial Black;
  font-size: 18px;
  margin-bottom: 10px;
}

.dl-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.dl-card{
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 14px;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

a.dl-card:hover{
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
}

.dl-card.loading{
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  opacity: 0.75;
}

.dl-kind{
  align-self: flex-start;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 20px;
  padding: 3px 9px;
}

.kind-win{ background: white; color: black; }
.kind-linux{ background: rgba(255, 255, 255, 0.2); color: white; border: 1px solid rgba(255, 255, 255, 0.4); }
.kind-mac{ background: rgba(255, 255, 255, 0.2); color: white; border: 1px solid rgba(255, 255, 255, 0.4); }
.kind-upd{ background: transparent; color: rgba(255, 255, 255, 0.7); border: 1px dashed rgba(255, 255, 255, 0.4); }
.kind-other{ background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.8); }

.dl-name{
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
  color: white;
}

.dl-meta{
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
}

.dl-get{
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: white;
  margin-top: 2px;
}

.dl-inline-link{
  color: white;
  text-decoration: underline;
  font-weight: 700;
}

/* ---------- earlier releases ---------- */
.dl-past{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dl-past-row{
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 14px;
}

.dl-past-head{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
}

.tag-pill{
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  background: white;
  color: black;
  border-radius: 20px;
  padding: 3px 12px;
}

.log-date{
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  opacity: 0.6;
}

.dl-pill{
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.16);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 20px;
  padding: 3px 10px;
  white-space: nowrap;
}

.dl-chips{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dl-chip{
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  padding: 5px 9px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.dl-chip:hover{
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
}

.sr-only{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- responsive ---------- */
@media (max-width: 1120px){
  .nav-links{
    display: none;
  }

  .hamburger{
    display: flex;
  }

  .nav-card{
    font-size: 12px;
    padding: 5px;
    top: 16px;
    right: 16px;
  }

  .menu-panel{
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: absolute;
    top: 64px;
    right: 16px;
    z-index: 3;
    background: rgba(0, 0, 0, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 6px;
    padding: 6px;
    min-width: 210px;
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
  }

  .background.menu-open .menu-panel{
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .menu-panel a{
    font-size: 13px;
    padding: 10px 12px;
  }

  .background.menu-open .hamburger span:nth-child(1){
    transform: translateY(7px) rotate(45deg);
  }

  .background.menu-open .hamburger span:nth-child(2){
    opacity: 0;
  }

  .background.menu-open .hamburger span:nth-child(3){
    transform: translateY(-7px) rotate(-45deg);
  }
}

@media (max-width: 768px){
  .card{
    font-size: 20px;
    padding: 4px 30px 0px 10px;
    left: 16px;
    top: 16px;
  }

  .nav-card{
    font-size: 11px;
    padding: 4px;
    top: 16px;
    right: 16px;
  }

  .menu-panel{
    top: 64px;
    right: 16px;
  }

  .dl-feed{
    top: 92px;
    bottom: 16px;
    width: min(640px, calc(100% - 32px));
  }

  .dl-title{
    font-size: 21px;
  }
}

@media (max-width: 480px){
  .card{
    font-size: 15px;
    padding: 4px 18px 0px 8px;
    left: 12px;
    top: 12px;
  }

  .nav-card{
    font-size: 11px;
    padding: 4px;
    top: 12px;
    right: 12px;
    left: auto;
  }

  .menu-panel{
    top: 56px;
    right: 12px;
  }

  .dl-feed{
    top: 84px;
    bottom: 12px;
    width: calc(100% - 24px);
    padding-right: 4px;
    gap: 14px;
  }

  .stats-strip{
    padding: 8px;
    gap: 6px;
  }

  .stat{
    flex: 1 1 45%;
    padding: 6px 8px;
  }

  .stat-num{
    font-size: 18px;
  }

  .dl-hero{
    padding: 16px;
  }

  .dl-title{
    font-size: 18px;
  }
}
