:root {
  --bg: #000;
  --panel: #12171c;
  --panel2: #181f26;
  --ink: #f4f7f8;
  --muted: #a9b2ba;
  --line: #2a333b;
  --orange: #ffad27;
  --cyan: #35c5d2;
  --shadow: 0 10px 22px #0008;
}
* {
  box-sizing: border-box;
}
html {
  background: #000;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(#20262b, #11161a);
  border-bottom: 1px solid #333;
  padding: 12px max(16px, calc((100% - 1216px) / 2));
  box-shadow: 0 2px 12px #0009;
}
.head {
  display: grid;
  grid-template-columns: 1.25fr 1.2fr 0.8fr;
  align-items: center;
  gap: 20px;
  max-width: 1216px;
  margin: auto;
}
.brand {
  color: #fff;
  text-decoration: none;
  font-size: 35px;
  font-weight: 900;
  letter-spacing: -2px;
  text-shadow: 2px 3px #000;
}
.brand b {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-right: 6px;
  border: 2px solid #ddd;
  border-radius: 50%;
  background: #f3981d;
  color: #151515;
  font-size: 10px;
  letter-spacing: 0;
  vertical-align: 5px;
}
.promo {
  position: relative;
  padding: 9px 14px;
  background: #fff;
  color: #292929;
  border: 2px solid var(--orange);
  border-radius: 12px;
  line-height: 1.2;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.promo:after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 30px;
  width: 17px;
  height: 17px;
  background: #fff;
  border-right: 2px solid var(--orange);
  border-bottom: 2px solid var(--orange);
  transform: rotate(45deg);
}
.promo strong {
  display: block;
  color: #e98c12;
}
.promo small {
  display: block;
  font-size: 11px;
}
.tools {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.pill {
  border: 1px solid #6e7780;
  background: #f6f6f8;
  color: #23272b;
  width: 37px;
  height: 37px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 18px;
  box-shadow: 0 2px 5px #0008;
}
.pill.active {
  background: #f49c17;
}
.language-switch {
  width: 76px;
  height: 37px;
  border: 1px solid #c47c13;
  border-radius: 19px;
  padding: 0 7px;
  color: #ffc55c;
  background: linear-gradient(#222b31, #11171b);
  box-shadow:
    inset 0 1px #fff2,
    0 2px 5px #0008;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  color-scheme: dark;
}
.language-switch option {
  color: #f4f7f8;
  background: #151c21;
}
.language-switch:focus-visible {
  outline: 2px solid #ffad27;
  outline-offset: 2px;
}
.searchrow {
  max-width: 1216px;
  margin: 10px auto 0;
  display: flex;
  align-items: center;
  gap: 18px;
}
.search {
  position: relative;
  display: flex;
  max-width: 455px;
  width: 100%;
}
.search input {
  width: 100%;
  height: 37px;
  border: 0;
  border-radius: 20px 0 0 20px;
  padding: 0 45px 0 16px;
  outline: none;
  font-size: 13px;
}
.search button {
  width: 54px;
  border: 0;
  border-radius: 0 20px 20px 0;
  background: var(--orange);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}
.clear {
  position: absolute;
  right: 61px;
  top: 7px;
  border: 0;
  background: none;
  color: #777;
  font-size: 18px;
  cursor: pointer;
}
.popular {
  margin: auto;
  color: #ffb22d;
  background: #fff;
  border: 1px solid var(--orange);
  border-radius: 20px;
  padding: 7px 18px;
  font-weight: bold;
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 1px;
}
.status {
  color: #eac46b;
  font-size: 12px;
  min-height: 14px;
}
.wrap {
  max-width: 1216px;
  margin: 14px auto;
  padding: 0 0 20px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.card {
  min-width: 0;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: linear-gradient(145deg, #171d22, #0e1317);
  padding: 12px;
  box-shadow: 0 2px 10px #0008;
  transition:
    opacity 0.16s,
    transform 0.16s;
}
.card > * {
  position: relative;
  z-index: 1;
}
.card:after {
  content: "";
  position: absolute;
  z-index: 0;
  right: -25px;
  bottom: -48px;
  width: 168px;
  height: 238px;
  opacity: 0.14;
  pointer-events: none;
  background-image:
    linear-gradient(135deg, transparent 35%, #ff4f91 36% 49%, transparent 50%),
    radial-gradient(ellipse at 54% 23%, #ffc0d7 0 16%, transparent 17%),
    radial-gradient(ellipse at 50% 54%, #ff5f9b 0 26%, transparent 27%),
    radial-gradient(ellipse at 32% 91%, #b91f61 0 18%, transparent 19%);
  filter: saturate(1.35);
  transform: rotate(-8deg);
}
.card:nth-child(3n + 2):after {
  filter: hue-rotate(75deg) saturate(1.2);
  transform: rotate(9deg);
}
.card:nth-child(3n):after {
  filter: hue-rotate(175deg) saturate(1.1);
  transform: rotate(-15deg);
}
.card.hidden {
  display: none;
}
.card h2 {
  font-size: 16px;
  letter-spacing: 1px;
  margin: 0 0 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid #2a3035;
  line-height: 1.15;
}
.icon {
  font-size: 24px;
  margin-right: 8px;
  vertical-align: -2px;
}
.desc {
  height: 36px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}
.list {
  height: 270px;
  overflow: auto;
  margin: 8px 0 11px;
  padding: 0;
  list-style: none;
  scrollbar-color: #58636d transparent;
  scrollbar-width: thin;
}
.list::-webkit-scrollbar {
  width: 5px;
}
.list::-webkit-scrollbar-thumb {
  background: #58636d;
  border-radius: 9px;
}
.site {
  height: 25px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 4px;
  border-radius: 5px;
  cursor: pointer;
  color: #e3e9ed;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  touch-action: manipulation;
}
.site:hover,
.site:focus {
  background: #28323a;
  outline: 0;
}
.site.armed {
  background: #33434e;
  box-shadow: inset 3px 0 #ffb32b;
}
.n {
  font-size: 10px;
  width: 16px;
  text-align: right;
  color: #87929b;
}
.dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: hsl(var(--h), 70%, 57%);
  box-shadow: 0 0 7px hsl(var(--h), 80%, 50%, 0.4);
  flex: none;
}
.tag {
  margin-left: auto;
  border-radius: 4px;
  padding: 1px 4px;
  font-size: 9px;
  font-weight: bold;
  background: #39a9d3;
  color: #fff;
}
.tag.new {
  background: #65bd57;
}
.tag.hot {
  background: #ef5454;
}
.see {
  width: 100%;
  height: 38px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  font-weight: bold;
  letter-spacing: 0.6px;
  cursor: pointer;
  background: linear-gradient(#44c9d6, #1aa8b9);
  box-shadow:
    inset 0 1px #fff5,
    0 2px 3px #0008;
}
.card:nth-child(4n + 2) .see {
  background: linear-gradient(#4cafde, #298fca);
}
.card:nth-child(4n + 3) .see {
  background: linear-gradient(#79d863, #4cb840);
}
.card:nth-child(4n) .see {
  background: linear-gradient(#ffbd45, #f39b1e);
}
mark {
  background: #ffe17c;
  color: #1e2529;
  border-radius: 2px;
  padding: 0 1px;
}
.footer {
  margin-top: 14px;
  padding: 28px 20px 40px;
  border-top: 1px solid #222;
  background: #050607;
  text-align: center;
  color: #7f8991;
  font-size: 11px;
}
.footer a {
  color: #c8d1d6;
  text-decoration: none;
  margin: 0 8px;
  cursor: pointer;
}
.paw {
  font-size: 22px;
  margin: 18px;
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #000b;
}
.modal.show {
  display: flex;
}
.dialog {
  width: min(560px, 100%);
  border-radius: 17px;
  background: linear-gradient(135deg, #203849, #101c25);
  box-shadow: 0 18px 40px #000b;
  padding: 34px 40px 30px;
  text-align: center;
  position: relative;
}
.x {
  position: absolute;
  right: 15px;
  top: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #39505f;
  color: #dbe6eb;
  font-size: 24px;
  cursor: pointer;
}
.spinner {
  width: 76px;
  height: 76px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 7px solid #344958;
  border-top-color: #45d582;
  border-right-color: #38b7d7;
  animation: spin 1s linear infinite;
}
.dialog h3 {
  font-size: 23px;
  margin: 6px 0 12px;
}
.dialog p {
  color: #b7c3ca;
  margin: 0 0 26px;
}
.step {
  display: flex;
  justify-content: space-between;
  color: #cbd6dc;
  text-align: left;
  font-size: 13px;
}
.pct {
  color: #48dd83;
  font-size: 22px;
  font-weight: bold;
}
.bar {
  height: 12px;
  border-radius: 8px;
  background: #091117;
  overflow: hidden;
  margin-top: 10px;
}
.bar i {
  display: block;
  height: 100%;
  width: 0;
  background: #38d37e;
  border-radius: 8px;
  transition: width 0.16s linear;
}
.retry,
.ok {
  margin-top: 23px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(#4bdd83, #13ba5d);
  color: #062414;
  font-size: 17px;
  font-weight: bold;
  padding: 13px 42px;
  min-width: 150px;
  cursor: pointer;
  box-shadow: 0 4px 9px #001b0b;
}
.error .spinner {
  animation: none;
  border-color: #ed5960;
  position: relative;
}
.error .spinner:after {
  content: "!";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 42px;
  font-weight: bold;
  color: #ed5960;
}
.error h3,
.error .pct {
  color: #fc666e;
}
.error .bar i {
  background: #e7242b;
  width: 100%;
}
.peek {
  position: fixed;
  z-index: 20;
  display: none;
  max-width: 320px;
  padding: 12px;
  background: #25333e;
  color: #edf6f9;
  border: 1px solid #587080;
  border-radius: 9px;
  box-shadow: var(--shadow);
  font-size: 12px;
  line-height: 1.35;
  pointer-events: none;
}
.peek b {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}
.tap-note {
  position: fixed;
  z-index: 28;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%) translateY(12px);
  opacity: 0;
  pointer-events: none;
  color: #fff;
  background: #22313b;
  border: 1px solid #526773;
  border-radius: 22px;
  padding: 9px 15px;
  box-shadow: var(--shadow);
  font-size: 12px;
  transition:
    opacity 0.16s,
    transform 0.16s;
}
.tap-note.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.menu {
  position: fixed;
  z-index: 25;
  display: none;
  top: 85px;
  left: 50%;
  transform: translateX(-50%);
  width: min(360px, calc(100% - 32px));
  border: 1px solid #3a4750;
  background: #151c21;
  border-radius: 12px;
  padding: 10px;
  box-shadow: var(--shadow);
}
.menu.show {
  display: block;
}
.menu button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: #ecf1f3;
  text-align: left;
  border-radius: 7px;
  padding: 12px;
  cursor: pointer;
}
.menu button:hover {
  background: #27333b;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (min-width: 700px) {
  .modal {
    backdrop-filter: blur(4px);
  }
}
@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .head {
    grid-template-columns: 1fr auto;
  }
  .promo {
    display: none;
  }
  .searchrow {
    padding: 0 6px;
  }
  .wrap {
    padding: 0 10px;
  }
}
@media (max-width: 560px) {
  body {
    font-size: 15px;
  }
  .top {
    padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
    position: relative;
  }
  .head {
    display: flex;
    justify-content: space-between;
  }
  .brand {
    font-size: 22px;
  }
  .brand b {
    width: 27px;
    height: 27px;
    margin-right: 4px;
    font-size: 7px;
    vertical-align: 3px;
  }
  .tools {
    gap: 4px;
  }
  .pill {
    width: 31px;
    height: 31px;
    font-size: 15px;
  }
  .language-switch {
    width: 54px;
    height: 31px;
    padding: 0 2px;
    font-size: 10px;
  }
  .tools .pill:nth-child(2),
  .tools .pill:nth-child(3),
  .tools .pill:nth-child(4) {
    display: none;
  }
  .searchrow {
    gap: 9px;
    margin-top: 9px;
    flex-wrap: wrap;
  }
  .search {
    max-width: none;
  }
  .popular {
    margin: 0;
    padding: 6px 12px;
  }
  .status {
    width: 100%;
    order: 3;
  }
  .grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .card {
    padding: 13px;
  }
  .card:after {
    opacity: 0.09;
  }
  .card h2 {
    font-size: 16px;
  }
  .list {
    height: 232px;
    overscroll-behavior: contain;
  }
  .site {
    height: 28px;
  }
  .dialog {
    padding: 30px 20px 24px;
    border-radius: 14px;
  }
  .dialog h3 {
    font-size: 20px;
  }
  .footer {
    padding-bottom: calc(30px + env(safe-area-inset-bottom));
  }
  .peek {
    display: none !important;
  }
}

/* Real images load independently; the card gradient remains if one fails. */
.card .card-photo {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #151c21;
}
.card:after {
  inset: 0;
  width: auto;
  height: auto;
  opacity: 0.96;
  background-image:
    linear-gradient(90deg, #10161b9c 0%, #10161b70 30%, transparent 90%),
    linear-gradient(0deg, #10161b8a 0%, transparent 58%);
  filter: none;
  transform: none;
}
.card h2 {
  margin-left: -3px;
  margin-right: -3px;
  padding: 8px 6px 10px;
  background: #081015af;
  border-radius: 6px;
  text-shadow: 0 1px 3px #000;
}
.card .desc {
  height: auto;
  min-height: 36px;
  padding: 5px 6px;
  background: #0810159e;
  border-radius: 6px;
  text-shadow: 0 1px 3px #000;
}
.card .list {
  padding: 4px;
  background: linear-gradient(90deg, #071015c9, #07101568);
  border: 1px solid #7f929980;
  border-radius: 7px;
}
.card .site {
  padding-left: 4px;
  text-shadow: 0 1px 2px #000;
}
.card .see {
  position: relative;
  z-index: 2;
}
.card:nth-child(7n + 1) .card-photo {
  object-position: center 44%;
}
.card:nth-child(7n + 2) .card-photo {
  object-position: center 40%;
}
.card:nth-child(7n + 3) .card-photo {
  object-position: center 42%;
}
.card:nth-child(7n + 4) .card-photo {
  object-position: center 40%;
}
.card:nth-child(7n + 5) .card-photo {
  object-position: center 40%;
}
.card:nth-child(7n + 6) .card-photo {
  object-position: center 42%;
}
.card:nth-child(7n) .card-photo {
  object-position: center 35%;
}
@media (max-width: 560px) {
  .card:after {
    opacity: 0.8;
  }
  .card .list {
    background: linear-gradient(90deg, #071015d9, #0710158f);
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .card,
  .tap-note,
  .bar i {
    transition: none;
  }
  .spinner {
    animation: none;
  }
}
