:root {
  color-scheme: dark;
  --bg: #06080d;
  --panel: rgba(16, 22, 34, .82);
  --panel-strong: #101827;
  --line: rgba(142, 166, 205, .22);
  --text: #eef4ff;
  --muted: #9aa9c1;
  --soft: #6d7890;
  --blue: #86b7ff;
  --blue-strong: #4b8dff;
  --gold: #f1b84b;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 10%, rgba(75, 141, 255, .18), transparent 32rem),
    radial-gradient(circle at 78% 18%, rgba(241, 184, 75, .12), transparent 26rem),
    linear-gradient(180deg, #070a11 0%, #080b12 45%, #05070b 100%);
}

a { color: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 8, 13, .78);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--blue-strong));
  color: white;
  font-weight: 900;
  box-shadow: 0 16px 35px rgba(75, 141, 255, .22);
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: .2px; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 12px; }

nav {
  display: flex;
  gap: 14px;
  color: var(--muted);
  font-size: 14px;
}

nav a {
  text-decoration: none;
  transition: color .2s ease;
}
nav a:hover { color: var(--text); }

main {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
}

.hero {
  padding: clamp(72px, 12vw, 132px) 0 56px;
  max-width: 820px;
}

.kicker {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 20px;
  font-size: clamp(42px, 8vw, 78px);
  line-height: .95;
  letter-spacing: -3px;
}

.hero-copy {
  max-width: 620px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button, .converter button, .open-link, .amazon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}

.primary, .converter button, .amazon-button {
  border-color: transparent;
  background: linear-gradient(135deg, var(--blue), var(--blue-strong));
  color: white;
}

.ghost, .open-link {
  background: rgba(255, 255, 255, .04);
  color: var(--text);
}

.support-card, .notice {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 30px;
  margin: 24px 0 72px;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--panel);
  box-shadow: 0 26px 90px rgba(0, 0, 0, .28);
}

.support-card h2, .section-heading h2, .notice h2 {
  margin-bottom: 12px;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -1.5px;
}

.support-card p, .section-heading p, .notice p {
  color: var(--muted);
  line-height: 1.7;
}

.converter {
  display: grid;
  gap: 14px;
}

.converter label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .5px;
}

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

.converter input {
  width: 100%;
  min-height: 46px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, .24);
  color: var(--text);
  outline: none;
}

.converter input:focus {
  border-color: rgba(134, 183, 255, .72);
  box-shadow: 0 0 0 4px rgba(134, 183, 255, .12);
}

.converter-error {
  margin: 0;
  color: #ff9e9e;
  font-weight: 700;
}

.products-section {
  padding-bottom: 72px;
}

.section-heading {
  max-width: 700px;
  margin-bottom: 24px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.filter {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.filter.active {
  border-color: rgba(134, 183, 255, .66);
  color: var(--text);
  background: rgba(134, 183, 255, .13);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  display: flex;
  flex-direction: column;
  min-height: 360px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(16, 24, 39, .76);
}

.product-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  margin: -8px 0 20px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
}

.product-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 28px;
}

.badge {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.score {
  color: var(--blue);
}

.product-card h3 {
  margin-bottom: 12px;
  font-size: 24px;
  letter-spacing: -.8px;
}

.product-card p, .product-card li {
  color: var(--muted);
  line-height: 1.6;
}

.product-card ul {
  margin: 0 0 24px 18px;
  padding: 0;
}

.amazon-button {
  margin-top: auto;
}

.notice {
  grid-template-columns: 1fr;
  margin-bottom: 72px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-size: 13px;
}

.admin-shell {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 100vh;
  padding: 56px 0;
}

.admin-card {
  width: min(980px, 100%);
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--panel);
  box-shadow: 0 26px 90px rgba(0, 0, 0, .28);
}

.admin-card h1 {
  margin-bottom: 24px;
  font-size: clamp(34px, 6vw, 56px);
}

.admin-error,
.admin-notice {
  padding: 13px 16px;
  border-radius: 16px;
  font-weight: 800;
}

.admin-error {
  border: 1px solid rgba(255, 120, 120, .28);
  color: #ffb0b0;
  background: rgba(255, 84, 84, .10);
}

.admin-notice {
  border: 1px solid rgba(122, 255, 186, .24);
  color: #aef7cd;
  background: rgba(85, 220, 150, .10);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.admin-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(0, 0, 0, .24);
  color: var(--text);
  font: inherit;
  outline: none;
}

.admin-form textarea {
  resize: vertical;
}

.admin-form button {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--blue-strong));
  color: white;
  font-weight: 900;
  cursor: pointer;
}

.product-editor label:nth-child(7),
.product-editor label:nth-child(8),
.product-editor .inline-check {
  grid-column: 1 / -1;
}

.inline-check {
  display: flex !important;
  align-items: center;
  grid-template-columns: auto !important;
}

.inline-check input {
  width: auto;
}

.admin-list {
  display: grid;
  gap: 12px;
}

.admin-product {
  display: grid;
  grid-template-columns: 72px 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, .035);
}

.admin-product img {
  width: 72px;
  height: 56px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.admin-product strong,
.admin-product span {
  display: block;
}

.admin-product span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.admin-product button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.admin-product .danger {
  border-color: rgba(255, 120, 120, .28);
  color: #ffb0b0;
}

@media (max-width: 860px) {
  .site-header, footer { flex-direction: column; align-items: flex-start; }
  nav { flex-wrap: wrap; }
  .support-card { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .converter-row { flex-direction: column; }
  .converter-row > * { width: 100%; }
  .admin-form,
  .admin-product { grid-template-columns: 1fr; }
  .admin-product img { width: 100%; height: 160px; }
}
