* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: radial-gradient(120% 90% at 12% 0%, #221d4a 0%, #14122c 55%, #100f24 100%);
  color: #e9e7f7;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: #a99cff; text-decoration: none; }
::placeholder { color: #736ea0; }

.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

.page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px clamp(16px, 4vw, 48px) 56px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* header */
.header {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 28px);
  flex-wrap: wrap;
}
.logo {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  box-shadow: 0 10px 24px -10px #6b52ff;
}
.meters {
  display: flex;
  gap: clamp(12px, 2vw, 26px);
  flex-wrap: wrap;
}
.meter {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 104px;
}
.meter-top {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.meter-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  font-weight: 500;
  color: #f2f0ff;
}
.meter-label {
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #8c86b8;
}
.meter-track {
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,.09);
  overflow: hidden;
}
.meter-fill {
  height: 100%;
  border-radius: 2px;
  transition: width .5s ease;
}
.search-box {
  flex: 1 1 260px;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 0 12px;
  height: 42px;
}
.search-slash {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #736ea0;
}
.search-box input {
  flex: 1;
  background: none;
  border: 0;
  outline: none;
  color: #e9e7f7;
  font-size: 14px;
  font-family: inherit;
}

/* service groups */
.group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.group-title {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #8c86b8;
}
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}
.tile {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  transition: background .15s ease, border-color .15s ease;
}
.tile:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(169,156,255,.4);
}
.tile-icon-wrap {
  position: relative;
  width: 38px;
  height: 38px;
  flex: none;
}
.tile-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  object-fit: contain;
  background: rgba(255,255,255,.06);
  padding: 4px;
}
.tile-icon-fallback {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  background: linear-gradient(150deg, #8b78ff, #5a43d6);
}
.tile-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.tile-name {
  font-size: 14px;
  color: #e9e7f7;
}
.tile-desc {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #8c86b8;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* downloads panel */
.downloads-panel {
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.02));
  overflow: hidden;
}
.downloads-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.downloads-head-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.downloads-head-left h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ad7b0;
  animation: pulseDot 1.8s ease-in-out infinite;
}
@keyframes pulseDot { 0%,100% { opacity: 1 } 50% { opacity: .25 } }
.pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #8c86b8;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  padding: 3px 9px;
}
.quicklink {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.1);
  font-size: 12px;
}
.downloads-head-right {
  display: flex;
  align-items: center;
  gap: 22px;
}
.speed-item {
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.speed-arrow { font-size: 13px; }
.speed-arrow.down { color: #4ad7b0; }
.speed-arrow.up { color: #a99cff; }
.speed-value {
  font-size: 19px;
  font-weight: 500;
}
.speed-unit {
  font-size: 11px;
  color: #8c86b8;
}
.dl-totals {
  padding: 0 22px 18px;
  font-size: 12px;
  color: #8c86b8;
}

.dl-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 22px;
}
.dl-empty {
  padding: 0 22px 22px;
  opacity: .6;
  font-size: .85rem;
}
.dl-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 150px;
}
.dl-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
  background-color: rgba(255,255,255,.035);
  background-size: cover;
  background-position: center;
}
.dl-badge-kind {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 5px;
  backdrop-filter: blur(6px);
}
.dl-badge-pct {
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 6px;
  border-radius: 5px;
  color: #f2f0ff;
  background: rgba(20,18,44,.72);
}
.dl-bar-track {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 5px;
  background: rgba(20,18,44,.6);
}
.dl-bar-fill {
  height: 100%;
  background-size: 40px 100%;
  animation: dlStripe 1.2s linear infinite;
  transition: width .4s ease;
}
@keyframes dlStripe { to { background-position: 40px 0; } }
.dl-title {
  font-size: 13px;
  line-height: 1.35;
  color: #e9e7f7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dl-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: #8c86b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.footer {
  display: flex;
  justify-content: flex-end;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #6f6a99;
  padding-top: 8px;
}
