:root {
  --bg: #0b0c10;
  --panel: #11131a;
  --panel2: #0f1117;
  --text: #e8eaf0;
  --muted: #a6abbc;
  --border: rgba(255,255,255,.10);
  --shadow: 0 12px 30px rgba(0,0,0,.35);
  --radius: 16px;
  --radius2: 22px;
  --max: 1100px;

  --accent: #7aa2ff;
  --accent2: #9bffd6;

  --bg-image-url: none;
  --bg-image-opacity: 0.16;
  --bg-image-blur: 0px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: var(--bg-image-url);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: var(--bg-image-opacity);
  filter: blur(var(--bg-image-blur));
}

.container {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--panel);
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
}
.skip-link:focus { left: 12px; z-index: 999; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 14px;
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 260px; }
.brand__logo {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #0b0c10;
  font-weight: 800;
}
.brand__title { font-weight: 800; }
.brand__subtitle { font-size: 13px; color: var(--muted); margin-top: 2px; }

.topbar__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.lang { display: inline-flex; gap: 8px; align-items: center; }
.lang__label { font-size: 12px; color: var(--muted); }

main { padding: 22px 0 24px; }

.hero {
  display: grid;
  grid-template-columns: 1.5fr .9fr;
  gap: 18px;
  align-items: start;
}
@media (max-width: 920px) { .hero { grid-template-columns: 1fr; } }

h1 { margin: 0 0 10px; font-size: clamp(26px, 3vw, 38px); }
p { margin: 0; line-height: 1.55; }
.muted { color: var(--muted); }

.card {
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  padding: 16px;
}

.controls {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1.2fr .8fr .7fr .8fr;
  gap: 10px;
}
@media (max-width: 920px) { .controls { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .controls { grid-template-columns: 1fr; } }

.control { display: grid; gap: 6px; }
.control--row { display: flex; align-items: end; }
.control__label { font-size: 12px; color: var(--muted); }

.input, .select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel2);
  color: var(--text);
  padding: 11px 12px;
  outline: none;
}
.select--small { padding: 8px 10px; border-radius: 12px; }

.checkbox { display: flex; gap: 10px; align-items: center; user-select: none; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--accent); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 10px 12px;
  background: var(--panel2);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn--primary {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent2) 85%, white 15%));
  border-color: transparent;
  color: #0b0c10;
  font-weight: 700;
}
.btn--ghost { background: transparent; }

.stats { margin-top: 10px; font-size: 13px; color: var(--muted); }

.grid-section { margin-top: 18px; }
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 920px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

.tile {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius2);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  box-shadow: var(--shadow);
}
.tile__cover {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--panel2);
}
.tile__title { font-weight: 800; margin: 0; }
.tile__meta { font-size: 13px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.tile__desc { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.tile__actions { display: flex; gap: 10px; flex-wrap: wrap; }

.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel2) 85%, transparent);
  color: var(--muted);
}

.empty {
  margin-top: 14px;
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: var(--radius2);
  text-align: center;
}

.footer {
  border-top: 1px solid var(--border);
  margin-top: 26px;
  padding: 18px 0 30px;
}
.footer__row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.modal {
  width: min(1200px, calc(100% - 24px));
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 0;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
}
.modal::backdrop { background: rgba(0,0,0,.55); backdrop-filter: blur(2px); }
.modal__frame { margin: 0; padding: 14px; }
.modal__header {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.modal__title { font-weight: 900; font-size: 18px; }
.modal__meta { font-size: 13px; }

.modal__body {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 14px;
  padding-top: 14px;
}
@media (max-width: 820px) { .modal__body { grid-template-columns: 1fr; } }

.modal__cover {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--panel2);
}

.modal__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

.details { margin-top: 12px; border: 1px solid var(--border); border-radius: 16px; padding: 10px 12px; }
.details summary { cursor: pointer; font-weight: 700; }
.details__body { margin-top: 10px; line-height: 1.55; white-space: pre-wrap; }

.downloads {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  background: color-mix(in srgb, var(--panel2) 70%, transparent);
}

.downloads__title { font-weight: 800; margin-bottom: 8px; }

.downloads__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.downloads__item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  background: color-mix(in srgb, var(--panel) 85%, transparent);
}

.downloads__label { font-size: 14px; }
.downloads__btn { padding: 8px 10px; }

.list { margin: 0; padding-left: 18px; color: var(--muted); }
.howto { margin-top: 18px; }
