* { box-sizing: border-box; }

:root {
  --bg: #0b1220;
  --panel: #111a2d;
  --panel-2: #17243d;
  --line: rgba(255,255,255,0.08);
  --text: #edf2ff;
  --muted: #b7c2d8;
  --brand: #7c9cff;
  --brand-2: #2563eb;
  --danger: #fca5a5;
  --success: #86efac;
  --shadow: 0 20px 60px rgba(0,0,0,0.35);
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(124,156,255,.22), transparent 30%),
    radial-gradient(circle at top right, rgba(37,99,235,.18), transparent 25%),
    linear-gradient(180deg, #09101b 0%, #0b1220 100%);
  color: var(--text);
}

img { max-width: 100%; display: block; }

a { color: inherit; }

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

.topbar {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  backdrop-filter: blur(10px);
  background: rgba(9, 16, 27, 0.78);
  z-index: 20;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.nav-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.hero {
  padding: 56px 0 24px;
}

.eyebrow {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(124,156,255,.25);
  background: rgba(124,156,255,.12);
  color: #d8e2ff;
  margin-bottom: 14px;
  font-size: 14px;
}

h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.hero p {
  max-width: 820px;
  margin: 16px 0 0;
  line-height: 1.7;
  color: var(--muted);
  font-size: 1.06rem;
}

.card {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}


.search-panel {
  padding: 20px 22px;
  margin: 0 0 24px;
}

.search-panel__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.search-panel h2 {
  margin: 0;
  font-size: 1.1rem;
}

.search-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.search-input {
  width: 100%;
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(96,165,250,.22);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.search-input:focus {
  border-color: rgba(96,165,250,.55);
  box-shadow: 0 0 0 4px rgba(14,165,233,.12);
  background: rgba(255,255,255,.07);
}

.search-info {
  color: #bfdbfe;
  font-weight: 600;
  white-space: nowrap;
}

.scripts-grid {
  display: grid;
  gap: 24px;
  padding-bottom: 48px;
}

.script-card {
  padding: 24px;
}

.script-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.script-card__label {
  margin: 0 0 8px;
  color: #b8c9ff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .78rem;
}

.script-card__title {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
}

.script-card__description {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.button,
.copy-btn,
.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: 0;
  text-decoration: none;
  border-radius: 14px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
  transition: transform .18s ease, opacity .18s ease, background .18s ease;
}

.button:hover,
.copy-btn:hover,
.action-btn:hover { transform: translateY(-1px); }

.button--primary {
  color: white;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
}

.button--ghost,
.copy-btn {
  background: rgba(255,255,255,.08);
  color: var(--text);
}

.button--danger {
  background: rgba(252, 165, 165, .15);
  color: #ffe1e1;
}

.copy-btn--success {
  background: rgba(134,239,172,.18);
  color: #d9ffe6;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.code-block {
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.08);
  margin-top: 16px;
}

.code-block pre {
  margin: 0;
  overflow-x: auto;
}

.code-block code {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: .95rem;
  line-height: 1.6;
}

.command-box {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(124,156,255,.08);
  border: 1px solid rgba(124,156,255,.16);
}

.command-box p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.6;
}

.command {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  background: #09101b;
  border: 1px solid rgba(255,255,255,.08);
  color: #dbeafe;
  overflow-x: auto;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: .92rem;
}

.gallery { margin-top: 20px; }
.gallery__title { margin: 0 0 12px; font-weight: 700; }
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.gallery__item {
  border: 0;
  padding: 0;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--line);
}
.gallery__item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform .25s ease;
}
.gallery__item:hover img { transform: scale(1.03); }

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(4,8,16,.88);
  padding: 24px;
  z-index: 1000;
}
.lightbox.is-open { display: grid; }
.lightbox img {
  max-width: min(1200px, 100%);
  max-height: 88vh;
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.lightbox__close {
  position: absolute;
  top: 18px;
  right: 18px;
  border: 0;
  border-radius: 14px;
  width: 52px;
  height: 52px;
  font-size: 34px;
  line-height: 1;
  background: rgba(255,255,255,.12);
  color: white;
  cursor: pointer;
}

.panel {
  padding: 24px;
  margin-bottom: 24px;
}

.panel h2, .panel h3 { margin-top: 0; }

.form-grid {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

input[type="text"],
input[type="password"],
textarea,
input[type="file"] {
  width: 100%;
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  color: var(--text);
  font: inherit;
}

textarea {
  min-height: 220px;
  resize: vertical;
  font-family: "Cascadia Code", Consolas, monospace;
}

.form-help,
.muted {
  color: var(--muted);
  line-height: 1.6;
  font-size: .96rem;
}

.notice {
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
  font-weight: 600;
}

.notice--success {
  background: rgba(134,239,172,.14);
  border: 1px solid rgba(134,239,172,.24);
  color: #ddffe8;
}

.notice--error {
  background: rgba(252,165,165,.14);
  border: 1px solid rgba(252,165,165,.24);
  color: #ffe3e3;
}

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  vertical-align: top;
}

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(520px, 100%);
  padding: 24px;
}

.footer {
  padding: 28px 0 48px;
  color: var(--muted);
}

@media (max-width: 860px) {
  .script-card__header,
  .topbar__inner,
  .search-panel__top {
    display: grid;
    grid-template-columns: 1fr;
  }

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

  .button-row, .nav-actions {
    flex-wrap: wrap;
  }
}
