﻿:root {
  color-scheme: dark;
  --bg: #020617;
  --surface: rgba(10, 18, 33, 0.95);
  --surface-strong: rgba(15, 23, 42, 0.97);
  --text: #f8fbff;
  --muted: #9fb0c8;
  --accent: #60a5fa;
  --accent-2: #7dd3fc;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 24px 70px rgba(2, 8, 23, 0.38);
}

* {
  box-sizing: border-box;
  scrollbar-color: rgba(96, 165, 250, 0.4) transparent;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.2), transparent 30%),
    radial-gradient(circle at top right, rgba(125, 211, 252, 0.14), transparent 26%),
    linear-gradient(135deg, #020617 0%, #0f172a 50%, #111827 100%);
}

body {
  min-height: 100vh;
  padding: 28px 24px 48px;
  overflow-x: hidden;
}

.page-shell {
  max-width: 1220px;
  width: min(100%, 1220px);
  margin: 0 auto;
  padding: 0 10px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  grid-template-areas:
    "hero-copy hero-panel"
    "breadcrumb breadcrumb";
  gap: 24px;
  padding: 40px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 32px;
  background: linear-gradient(145deg, rgba(7, 15, 28, 0.97), rgba(13, 24, 43, 0.94));
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  align-items: start;
}

.hero-copy {
  grid-area: hero-copy;
  display: grid;
  gap: 18px;
}

.hero-panel {
  grid-area: hero-panel;
  display: grid;
  gap: 20px;
  align-items: start;
}

.breadcrumb {
  grid-area: breadcrumb;
  margin-top: 6px;
}

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

.brand-badge,
.brand-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-badge {
  background: rgba(96, 165, 250, 0.2);
  color: #dceefe;
  border: 1px solid rgba(96, 165, 250, 0.26);
}

.brand-pill {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

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

h1 {
  margin: 0;
  font-size: clamp(2.15rem, 4.2vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0;
  max-width: 700px;
  color: var(--muted);
  line-height: 1.75;
  font-size: 1rem;
}

.macro-count {
  margin: 0;
  color: #dce4f2;
  font-size: 0.96rem;
  line-height: 1.5;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 4px;
}

.button {
  border: none;
  border-radius: 999px;
  padding: 13px 20px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(56, 189, 248, 0.2);
}

.button.github {
  background: linear-gradient(135deg, #0d1117, #161b22);
  color: #cdd9e5;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

.button.github:hover {
  background: linear-gradient(135deg, #090b0f, #12151b);
  box-shadow: 0 18px 36px rgba(56, 189, 248, 0.16);
}

.button.github svg {
  width: 18px;
  height: 18px;
  fill: #7dd3fc;
}

.primary {
  background: linear-gradient(135deg, #60b7ff, #7ed0ff);
  color: #02111f;
  box-shadow: 0 14px 30px rgba(96, 165, 250, 0.18);
}

.secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-highlights {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 4px;
}

.stat-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-card strong {
  font-size: 0.95rem;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.hero-panel-card {
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(15, 27, 48, 0.96), rgba(8, 18, 33, 0.95));
  border: 1px solid rgba(96, 165, 250, 0.16);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.24);
  display: grid;
  gap: 18px;
}

.panel-section {
  padding: 0;
}

.panel-section:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 16px;
}

.hero-card-label {
  margin: 0 0 12px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--accent-2);
  font-weight: 700;
}

.hero-panel-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  line-height: 1.8;
}

.hero-panel-card li {
  margin-bottom: 8px;
}

.panel-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.content-stack {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.intro-panel {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  padding: 20px 0 4px;
}

.intro-panel h2 {
  margin: 6px 0 0;
  font-size: 1.3rem;
}

.intro-copy {
  margin: 0;
  color: var(--muted);
  max-width: 460px;
  line-height: 1.6;
}

.search-bar {
  margin: 6px 0 10px;
}

.search-bar input {
  width: 100%;
  min-height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 16px 20px;
  background: rgba(7, 14, 27, 0.94);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.search-bar input::placeholder {
  color: rgba(159, 181, 207, 0.72);
}

.search-bar input:focus {
  border-color: rgba(96, 165, 250, 0.8);
  box-shadow: 0 0 0 6px rgba(56, 189, 248, 0.12);
  transform: translateY(-1px);
}

section.folder {
  margin-bottom: 20px;
}

.sort-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.sort-bar button {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  cursor: pointer;
  font-size: 0.9rem;
}

.sort-bar button:hover {
  background: rgba(96, 165, 250, 0.16);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  color: var(--muted);
  font-size: 0.95rem;
  align-items: center;
}

.breadcrumb button {
  border: none;
  background: none;
  color: var(--accent-2);
  cursor: pointer;
  padding: 0;
  font: inherit;
  text-decoration: none;
}

.breadcrumb button:hover {
  text-decoration: underline;
}

.breadcrumb span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb .separator {
  margin: 0 6px;
  color: var(--muted);
}

.folder-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
}

.folder-title {
  margin: 0;
  font-size: 1.12rem;
}

.folder-meta {
  margin: 4px 0 0;
  color: var(--muted);
}

.card-grid {
  display: grid;
  gap: 12px;
}

.card {
  display: grid;
  gap: 14px;
  padding: 22px 24px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(10, 17, 32, 0.98), rgba(9, 15, 28, 0.98));
  box-shadow: 0 20px 40px rgba(2, 8, 23, 0.2);
}

.card:hover {
  border-color: rgba(96, 165, 250, 0.26);
  transform: translateY(-1px);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.card.highlight {
  border-color: rgba(125, 211, 252, 0.4);
  box-shadow: 0 24px 54px rgba(56, 189, 248, 0.16);
  background: linear-gradient(180deg, rgba(16, 29, 50, 0.98), rgba(10, 18, 33, 0.98));
}

.card-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.card-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.tag {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.16);
  color: #bfe5ff;
  font-size: 0.82rem;
  white-space: nowrap;
}

.copyable-id {
  cursor: pointer;
  color: var(--accent-2);
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.copyable-id:hover,
.copyable-id:focus-visible {
  color: #d7f3ff;
  text-decoration: underline;
  outline: none;
}

.macro-note {
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(96, 165, 250, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.16);
  color: #c7defa;
  font-size: 0.9rem;
  line-height: 1.55;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.card-actions a,
.card-actions button {
  flex: 1;
  min-width: 140px;
  text-align: center;
  border: 1px solid rgba(96, 165, 250, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-radius: 16px;
  padding: 11px 14px;
  font-weight: 700;
  text-decoration: none;
}

.card-actions button {
  background: rgba(96, 165, 250, 0.12);
  color: #dbf4ff;
}

.card-actions a:hover,
.card-actions button:hover {
  background: rgba(96, 165, 250, 0.18);
}

.loading-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 28px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.loading-ring {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid rgba(96, 165, 250, 0.22);
  border-top-color: var(--accent-2);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.site-footer {
  max-width: 1220px;
  margin: 24px auto 0;
  padding: 16px 4px 0;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(96, 165, 250, 0.24);
  color: #e2e8f0;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

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

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}

.modal.show {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.74);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  width: min(860px, 100%);
  max-height: min(92vh, 860px);
  overflow-y: auto;
  padding: 30px;
  border-radius: 28px;
  background: rgba(8, 16, 30, 0.98);
  border: 1px solid rgba(96, 165, 250, 0.2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  z-index: 1;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  font-size: 1.15rem;
  cursor: pointer;
}

.modal-copy {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 22px;
}

.modal-steps {
  display: grid;
  gap: 16px;
}

.step-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.step-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.step-card p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.6;
}

.gif-placeholder {
  display: grid;
  place-items: center;
  min-height: 140px;
  border-radius: 18px;
  border: 1px dashed rgba(96, 165, 250, 0.3);
  background: rgba(96, 165, 250, 0.06);
  color: var(--muted);
  font-size: 0.95rem;
  overflow: hidden;
}

.gif-placeholder img,
.gif-placeholder video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

@media (max-width: 980px) {
  body {
    padding: 18px 16px 34px;
  }

  .hero {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "hero-copy"
      "hero-panel"
      "breadcrumb";
    gap: 20px;
    padding: 24px;
  }

  .hero-panel {
    width: 100% !important;
  }

  .hero-panel-card,
  .card,
  .modal-card {
    width: 100%;
    max-width: 100%;
  }

  .hero-highlights {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  .intro-panel {
    flex-direction: column;
    align-items: start;
  }

  .breadcrumb {
    padding: 12px 14px;
    width: 100%;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .card-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .card-actions a,
  .card-actions button,
  .button,
  .search-bar input {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 760px) {
  body {
    padding: 16px 14px 34px;
  }

  .hero,
  .card,
  .modal-card {
    border-radius: 18px;
  }

  .hero {
    padding: 20px;
    gap: 18px;
  }

  .hero-copy {
    gap: 14px;
  }

  .hero-panel-card {
    padding: 20px;
  }

  .hero-highlights {
    gap: 12px;
  }

  .hero-card-label,
  .eyebrow {
    letter-spacing: 0.12em;
  }

  .stat-card {
    padding: 14px 16px;
  }

  .card {
    padding: 20px 18px;
  }

  .search-bar input {
    min-height: 52px;
    font-size: 16px;
    padding: 14px 18px;
    border-radius: 18px;
  }

  .intro-panel {
    gap: 10px;
  }

  .intro-copy {
    max-width: none;
  }

  .card-row {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .card-actions {
    gap: 10px;
  }

  .card-actions a,
  .card-actions button {
    padding: 12px 14px;
  }

  .modal {
    padding: 12px;
  }

  .modal-card {
    padding: 24px 18px 22px;
  }

  .step-card {
    padding: 16px;
  }

  .gif-placeholder {
    min-height: 180px;
  }
}

@media (max-width: 560px) {
  body {
    padding: 12px 12px 28px;
  }

  .hero {
    padding: 18px;
  }

  .hero-copy {
    gap: 12px;
  }

  .brand-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-badge,
  .brand-pill {
    padding: 8px 12px;
    font-size: 0.72rem;
  }

  h1 {
    font-size: clamp(1.9rem, 9vw, 2.35rem);
    line-height: 1.15;
  }

  .subtitle,
  .intro-copy,
  .modal-copy,
  .panel-copy,
  .macro-count {
    font-size: 0.95rem;
  }

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

  .button {
    width: 100%;
    justify-content: center;
    padding: 14px 16px;
  }

  .hero-highlights {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 14px 14px;
  }

  .folder-header,
  .card-row,
  .sort-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .sort-bar {
    gap: 10px;
  }

  .card {
    padding: 16px 14px;
  }

  .card-actions {
    gap: 10px;
  }

  .card-actions a,
  .card-actions button {
    width: 100%;
    padding: 12px 14px;
    min-width: 0;
  }

  .modal-card {
    max-height: 94vh;
    width: 100%;
  }

  .modal-close {
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
  }

  .gif-placeholder {
    min-height: 170px;
  }

  .site-footer {
    padding: 12px 2px 0;
    font-size: 0.9rem;
  }

  .toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 12px 12px 36px;
  }

  .hero {
    padding: 16px;
    gap: 16px;
  }

  .hero-copy {
    gap: 14px;
  }

  .brand-row {
    gap: 8px;
  }

  .brand-badge,
  .brand-pill {
    padding: 7px 10px;
    font-size: 0.72rem;
  }

  h1 {
    font-size: clamp(1.8rem, 8.6vw, 2.45rem);
  }

  .subtitle {
    font-size: 0.96rem;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
    justify-content: center;
    padding: 13px 16px;
  }

  .hero-highlights {
    gap: 10px;
  }

  .stat-card {
    padding: 12px 13px;
  }

  .hero-panel-card {
    padding: 16px;
  }

  .intro-panel h2 {
    font-size: 1.15rem;
  }

  .intro-copy {
    font-size: 0.95rem;
  }

  .search-bar input {
    min-height: 50px;
    padding: 14px 15px;
    border-radius: 16px;
  }

  .folder-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .card {
    padding: 16px 14px;
  }

  .card-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .tag {
    align-self: flex-start;
  }

  .card-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .card-actions a,
  .card-actions button {
    min-width: 0;
    width: 100%;
    padding: 11px 12px;
    border-radius: 14px;
  }

  .site-footer {
    padding: 12px 2px 0;
    font-size: 0.9rem;
  }

  .toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }
}
