@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;600;700&display=swap');

:root {
  --bg: radial-gradient(circle at 20% 20%, rgba(117, 82, 255, 0.3), transparent 35%),
        radial-gradient(circle at 80% 0%, rgba(255, 99, 163, 0.35), transparent 45%),
        linear-gradient(135deg, #0b0a1c 0%, #0f1238 45%, #14173f 100%);
  --card: rgba(17, 18, 42, 0.8);
  --accent: #61f5ff;
  --accent-2: #c071ff;
  --text: #e9ecff;
  --muted: #9fa7c3;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 15px 50px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 18px 60px;
}

header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

header h1 {
  margin: 0;
  letter-spacing: 0.08em;
  font-size: clamp(26px, 3vw, 34px);
  text-transform: uppercase;
  background: linear-gradient(90deg, #fff, #61f5ff, #c071ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

header p {
  margin: 0;
  color: var(--muted);
  max-width: 740px;
  line-height: 1.6;
}

.filters {
  margin: 18px 0 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.filters .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: min(320px, 100%);
}

.filters label {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.filters input,
.filters select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(8, 10, 26, 0.9);
  color: var(--text);
  font-size: 15px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.filters select {
  appearance: none;
  background-image: linear-gradient(135deg, rgba(97, 245, 255, 0.16), rgba(192, 113, 255, 0.12));
  border-color: rgba(97, 245, 255, 0.3);
}

.copy-card {
  background: linear-gradient(135deg, rgba(97, 245, 255, 0.12), rgba(192, 113, 255, 0.08));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

.copy-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.copy-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 170px;
  align-self: stretch;
  height: 100%;
}

.copy-row textarea {
  flex: 1;
  min-height: 110px;
  background: rgba(8, 10, 26, 0.9);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.5;
  resize: vertical;
  font-family: 'Space Grotesk', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.copy-row button {
  min-width: 120px;
  min-height: 60px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(180deg, #79f6ff 0%, #60d6ff 35%, #c071ff 100%);
  color: #05060f;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: 0 8px 18px rgba(96, 214, 255, 0.3);
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  line-height: 1.2;
}

.copy-row button:active { transform: translateY(1px); }

.copy-button__label { font-size: 16px; }

.copy-button__sub {
  font-size: 13px;
  font-weight: 600;
  color: #0e0f23;
  opacity: 0.9;
}

.copy-footnote {
  margin-top: 8px;
  color: var(--muted);
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 14px;
}

.copy-footnote .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(97, 245, 255, 0.8);
}

.grid {
  margin-top: 26px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.footer {
  margin: 36px 0 0;
  padding: 18px 18px 20px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(8, 10, 26, 0.9);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--muted);
}

.footer__text {
  margin: 0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  justify-content: space-between;
}

.footer__links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.footer__promos {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  justify-content: flex-end;
}

.footer__sources {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.footer__sources a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.footer__sources a:hover { text-decoration: underline; }

.footer__icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(97, 245, 255, 0.5);
  background: linear-gradient(135deg, rgba(97, 245, 255, 0.16), rgba(192, 113, 255, 0.14));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  padding: 0;
  transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.footer__icon svg {
  width: 19px;
  height: 19px;
  display: block;
}

.footer__icon svg rect,
.footer__icon svg circle {
  stroke: currentColor;
  stroke-width: 1.6;
}

.footer__icon svg path {
  fill: currentColor;
}

.footer__icon:focus-visible,
.footer__icon:hover {
  color: var(--accent);
  border-color: rgba(97, 245, 255, 0.8);
  background: linear-gradient(135deg, rgba(97, 245, 255, 0.22), rgba(192, 113, 255, 0.18));
  transform: translateY(-2px);
}

.footer__links a:focus-visible,
.footer__links a:hover {
  color: var(--accent);
}

.footer__note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.footer__note a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.footer__note a:hover {
  text-decoration: underline;
}

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

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: rgba(97, 245, 255, 0.3);
  transform: translateY(-2px);
}

.thumb {
  width: 100%;
  min-height: 220px;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(97, 245, 255, 0.08), rgba(192, 113, 255, 0.08));
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35));
}

.card h3 {
  margin: 0 0 6px;
  font-size: 18px;
  letter-spacing: 0.02em;
  text-align: center;
}

.meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.types {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.type-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  justify-content: center;
  padding: 6px 10px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  width: 100%;
  aspect-ratio: 11 / 7;
}

.type-badge:only-child {
  grid-column: 1 / -1;
  max-width: calc((100% - 8px) / 2);
  justify-self: center;
}

.type-badge img {
  width: 32px;
  height: 32px;
}

.shiny-toggle {
  width: 100%;
  border: 1px solid rgba(255, 235, 59, 0.75);
  border-radius: 8px;
  background: rgba(12, 16, 53, 0.85);
  color: #fff07a;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 8px 10px;
  cursor: pointer;
}

.shiny-toggle:hover {
  background: rgba(23, 29, 81, 0.95);
}

.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #0d0f28;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 640px) {
  .copy-row { flex-direction: column; }
  .copy-row .copy-actions {
    width: 100%;
    height: auto;
  }

  .filters {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .copy-row button {
    width: 100%;
    min-height: 48px;
    flex: initial;
  }

  .footer {
    align-items: center;
    text-align: center;
  }

  .footer__links {
    flex-direction: column;
    justify-content: center;
  }

  .footer__promos,
  .footer__social {
    justify-content: center;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .card {
    padding: 10px 8px 12px;
    gap: 8px;
    border-radius: 12px;
  }

  .thumb {
    min-height: 90px;
    border-radius: 12px;
  }

  .card h3 {
    font-size: 13px;
    margin-bottom: 4px;
  }

  .meta { gap: 6px; }

  .type-badge {
    padding: 4px 6px 7px;
    border-radius: 8px;
    font-size: 11px;
  }

  .type-badge img {
    width: 22px;
    height: 22px;
  }
}
