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

:root {
  --ink: #f4f0e8;
  --muted: #94a096;
  --paper: #111613;
  --card: #1d2420;
  --line: #39443b;
  --lime: #75d7ff;
  --orange: #f26c45;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: 'Space Grotesk', sans-serif;
  background: var(--paper);
  background-image: radial-gradient(#39443b 0.7px, transparent 0.7px);
  background-size: 18px 18px;
}

.shell {
  width: min(1120px, calc(100% - 40px));
  margin: auto;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 0 26px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.mark {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  color: #202522;
  background: var(--lime);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  box-shadow: 3px 3px 0 var(--ink);
}

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status::before {
  width: 7px;
  height: 7px;
  background: var(--orange);
  border-radius: 50%;
  content: '';
}

main {
  padding: 74px 0 90px;
}

.intro {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 40px;
  align-items: end;
  margin-bottom: 58px;
}

h1 {
  max-width: 700px;
  margin: 0;
  font-size: clamp(3.5rem, 8vw, 7rem);
  line-height: 0.88;
  letter-spacing: -0.075em;
  font-weight: 700;
}

.intro-copy {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.intro-copy strong {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-label {
  margin: 0;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.search {
  width: 230px;
  padding: 11px 14px;
  color: var(--ink);
  background: rgba(29, 36, 32, 0.9);
  border: 1px solid var(--line);
  border-radius: 2px;
  font: inherit;
  font-size: 13px;
  outline: none;
}

.search:focus {
  border-color: var(--ink);
  box-shadow: 3px 3px 0 var(--lime);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.script-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 25px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.35);
  animation: rise 0.5s both;
}

.script-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--ink);
  transition: transform 0.18s, box-shadow 0.18s;
}

.file-type {
  align-self: flex-start;
  margin-bottom: 24px;
  padding: 5px 8px;
  color: #202522;
  background: var(--lime);
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.script-card h2 {
  margin: 0 0 9px;
  font-size: 25px;
  letter-spacing: -0.04em;
}

.path {
  margin: 0;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 11px;
}

.description {
  margin: 16px 0 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  flex-grow: 1;
}

.card-command {
  margin: 0 0 16px;
  padding: 10px 12px;
  min-height: 48px;
  color: #202522;
  background: var(--lime);
  border-left: 3px solid var(--orange);
  font: 11px 'DM Mono', monospace;
  overflow-wrap: anywhere;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s;
}

.card-command:hover {
  background: var(--orange);
  box-shadow: 0 2px 8px rgba(242, 108, 69, 0.3);
}

.card-command .copy-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 8px;
  opacity: 0.7;
  flex-shrink: 0;
}

.card-command:hover .copy-icon {
  opacity: 1;
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--ink);
  color: var(--lime);
  padding: 12px 20px;
  border-radius: 2px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  animation: slideIn 0.3s ease-out, slideOut 0.3s ease-out 1.7s;
  z-index: 9999;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

.actions {
  display: flex;
  gap: 9px;
  margin-top: 0;
}

.badge-protected {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 2px;
  font: 500 11px 'DM Mono', monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  user-select: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 13px;
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 2px;
  font: 500 12px 'DM Mono', monospace;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
}

.button.primary {
  background: var(--ink);
  color: var(--card);
}

.button:hover {
  background: var(--orange);
  color: var(--ink);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 2px;
  font: 500 12px 'DM Mono', monospace;
  cursor: pointer;
  transition: all 0.18s;
  user-select: none;
}

.page-btn:hover:not(:disabled) {
  background: var(--orange);
  color: var(--ink);
  border-color: var(--orange);
}

.page-btn.active {
  background: var(--lime);
  color: #202522;
  border-color: var(--lime);
  font-weight: 700;
  box-shadow: 2px 2px 0 var(--ink);
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.page-ellipsis {
  color: var(--muted);
  font: 12px 'DM Mono', monospace;
  padding: 0 4px;
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.empty {
  display: none;
  padding: 30px;
  color: var(--muted);
  border: 1px dashed var(--line);
  font-family: 'DM Mono', monospace;
  font-size: 12px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 680px) {
  .shell {
    width: min(100% - 28px, 520px);
  }
  header {
    padding-top: 20px;
  }
  .status {
    display: none;
  }
  main {
    padding: 55px 0 65px;
  }
  .intro {
    display: block;
    margin-bottom: 42px;
  }
  h1 {
    font-size: clamp(3.8rem, 18vw, 6rem);
    margin-bottom: 28px;
  }
  .intro-copy {
    max-width: 340px;
  }
  .toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .search {
    width: 100%;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .pagination {
    gap: 5px;
  }
  .page-btn {
    padding: 0 10px;
    min-width: 34px;
    min-height: 34px;
    font-size: 11px;
  }
  footer {
    gap: 20px;
    flex-direction: column;
  }
}
