:root {
  color-scheme: dark;
  --bg: #10131a;
  --panel: #171b25;
  --panel-strong: #1f2533;
  --text: #f5f7fb;
  --muted: #9ca8ba;
  --line: #2a3142;
  --accent: #7cc8ff;
  --accent-strong: #45aaf2;
  --radius: 22px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(69, 170, 242, 0.22), transparent 34rem),
    var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.landing-menu {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 2rem clamp(1rem, 5vw, 4rem);
}

.landing-card {
  display: grid;
  justify-items: center;
  gap: 1.25rem;
  width: min(100%, 48rem);
  padding: clamp(1.25rem, 4vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 10px);
  background: rgba(23, 27, 37, 0.86);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.28);
  text-align: center;
  backdrop-filter: blur(16px);
}

.landing-logo {
  width: min(18rem, 62vw);
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 28px;
  background: #f4f2ee;
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.38);
}

.landing-lead {
  max-width: 42rem;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  line-height: 1.7;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  width: 100%;
}

.landing-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(100%, 16rem);
}

.landing-button.secondary {
  background: rgba(124, 200, 255, 0.1);
  color: var(--accent);
}

.lock-button {
  gap: 0.45rem;
}

.password-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  align-items: center;
  justify-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  padding: 1rem;
  background: rgba(5, 8, 13, 0.72);
  backdrop-filter: blur(10px);
  overflow-y: auto;
}

.password-card {
  position: relative;
  display: grid;
  gap: 1rem;
  width: min(100%, 28rem);
  margin: auto;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(23, 27, 37, 0.98);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.38);
}

.password-card h2 {
  margin: 0;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
}

.password-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: rgba(124, 200, 255, 0.1);
  color: var(--accent);
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 900;
}

.password-error {
  margin: 0;
  color: #ff7d7d;
  font-weight: 800;
}

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 3rem clamp(1rem, 5vw, 4rem) 2rem;
}

.hero-copy {
  max-width: 68rem;
}

.hero-card {
  display: grid;
  justify-items: center;
  gap: 1rem;
  min-width: min(17rem, 100%);
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
}

.team-logo {
  width: min(14rem, 42vw);
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 24px;
  background: #f4f2ee;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.hero-note {
  margin: 0;
  color: var(--accent);
  font-weight: 900;
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.8rem;
  font-size: clamp(2.2rem, 7vw, 5rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.lead {
  max-width: 46rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.layout {
  display: grid;
  grid-template-columns: minmax(16rem, 22rem) 1fr;
  gap: 1.25rem;
  padding: 0 clamp(1rem, 5vw, 4rem) 4rem;
}

.generator-shell {
  padding: 0 clamp(1rem, 5vw, 4rem) 1.25rem;
}

.sidebar {
  position: sticky;
  top: 1rem;
  align-self: start;
}

.panel,
.toolbar,
.card {
  border: 1px solid var(--line);
  background: rgba(23, 27, 37, 0.86);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px);
}

.panel {
  padding: 1rem;
  border-radius: var(--radius);
}

.panel-header,
.toolbar,
.card-title,
.stats {
  display: flex;
  align-items: center;
}

.panel-header {
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-header h2 {
  margin: 0;
  font-size: 1rem;
}

.filters {
  display: grid;
  gap: 0.85rem;
}

.generator {
  display: grid;
  gap: 1.15rem;
}

.generator h2 {
  margin-bottom: 0.45rem;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
}

.hint {
  max-width: 58rem;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.source-status {
  margin: 0.7rem 0 0;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 800;
}

.generator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.85rem;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 100%;
  padding-top: 1.55rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.checkline input {
  width: auto;
}

.checkline.compact {
  padding-top: 0;
}

.band-panel {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(31, 37, 51, 0.55);
}

.band-rows {
  display: grid;
  gap: 0.7rem;
}

.band-row {
  display: grid;
  grid-template-columns: minmax(5rem, 0.7fr) 1fr 1fr;
  align-items: end;
  gap: 0.7rem;
}

.band-row strong {
  padding-bottom: 0.8rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.filter,
.search {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-strong);
  color: var(--text);
  outline: none;
}

select {
  padding: 0.75rem 0.8rem;
}

input,
textarea {
  padding: 0.9rem 1rem;
}

select:focus,
input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 200, 255, 0.16);
}

.generator-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.button,
.ghost,
.telegram-button,
.ghost-link,
.card-action {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
}

.button {
  padding: 0.85rem 1.15rem;
  background: var(--accent);
  color: #071018;
}

.ghost {
  padding: 0.5rem 0.75rem;
  background: rgba(124, 200, 255, 0.1);
  color: var(--accent);
}

.back-link {
  display: inline-flex;
  margin-bottom: 1rem;
}

.telegram-button {
  padding: 0.85rem 1.15rem;
  background: #2aabee;
  color: #ffffff;
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.35rem;
  padding: 0.5rem 0.75rem;
  background: rgba(124, 200, 255, 0.1);
  color: var(--accent);
  text-decoration: none;
}

.config-output {
  min-height: 20rem;
  resize: vertical;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
  line-height: 1.55;
  white-space: pre;
}

.content {
  min-width: 0;
}

.toolbar {
  position: sticky;
  top: 1rem;
  z-index: 2;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 0.9rem;
  border-radius: var(--radius);
}

.search {
  flex: 1;
}

.stats {
  gap: 0.35rem;
  white-space: nowrap;
  color: var(--muted);
}

.stats strong {
  color: var(--text);
  font-size: 1.35rem;
}

.status {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
  gap: 1rem;
}

.card {
  overflow: hidden;
  border-radius: var(--radius);
}

.card-media {
  display: grid;
  min-height: 13rem;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(124, 200, 255, 0.16), transparent),
    #0b0e14;
  color: var(--muted);
  font-weight: 800;
}

.card-media img {
  width: 100%;
  height: 15rem;
  object-fit: contain;
  padding: 1rem;
}

.card-body {
  padding: 1rem;
}

.card-title {
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.brand {
  margin: 0;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.card h3 {
  margin: 0.1rem 0 0;
  font-size: 1.35rem;
}

.badges,
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.badge,
.links a {
  border-radius: 999px;
  padding: 0.38rem 0.62rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.badge {
  background: rgba(124, 200, 255, 0.12);
  color: var(--accent);
}

.details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem 0.75rem;
  margin: 1rem 0;
  font-size: 0.9rem;
}

dt {
  color: var(--muted);
  font-weight: 800;
}

dd {
  margin: 0;
  color: #dce5f2;
}

.links a {
  background: var(--panel-strong);
  color: var(--text);
  text-decoration: none;
}

.card-action {
  padding: 0.38rem 0.62rem;
  background: var(--accent);
  color: #071018;
  font-size: 0.78rem;
}

.links a:hover {
  color: var(--accent);
}

@media (max-width: 860px) {
  .hero,
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-card {
    justify-items: stretch;
  }

  .team-logo {
    justify-self: center;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .band-row {
    grid-template-columns: 1fr;
  }

  .band-row strong {
    padding-bottom: 0;
  }

  .sidebar,
  .toolbar {
    position: static;
  }
}

@media (max-width: 640px) {
  body {
    overflow-x: hidden;
  }

  .landing-menu {
    align-items: start;
    min-height: 100svh;
    padding: 1rem;
  }

  .landing-card {
    width: 100%;
    padding: 1rem;
    border-radius: 24px;
  }

  .landing-logo {
    width: min(15rem, 78vw);
    border-radius: 22px;
  }

  .landing-actions,
  .generator-actions,
  .links {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .landing-button,
  .button,
  .ghost,
  .telegram-button,
  .ghost-link,
  .card-action,
  .links a {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .hero {
    padding: 1.25rem 1rem 1rem;
  }

  .hero-card {
    min-width: 0;
  }

  .team-logo {
    width: min(12rem, 70vw);
  }

  h1 {
    font-size: clamp(2rem, 15vw, 3.2rem);
    letter-spacing: -0.04em;
  }

  .lead,
  .landing-lead,
  .hint {
    font-size: 0.96rem;
    line-height: 1.55;
  }

  .generator-shell,
  .layout {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .panel,
  .toolbar,
  .card {
    border-radius: 18px;
  }

  .generator-grid,
  .details {
    grid-template-columns: 1fr;
  }

  .checkline {
    align-items: flex-start;
    padding-top: 0.25rem;
  }

  .config-output {
    min-height: 16rem;
    font-size: 0.78rem;
    white-space: pre-wrap;
    word-break: break-word;
  }

  .toolbar {
    gap: 0.75rem;
  }

  .stats {
    justify-content: center;
  }

  .card-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }

  .card-media {
    min-height: 10rem;
  }

  .card-media img {
    height: 12rem;
  }
}
