:root {
  --bg: #0b0f0c;
  --bg-alt: #101713;
  --bg-raised: #172019;
  --bg-panel: #1c2620;
  --line: #2b3a31;
  --line-strong: #3a4d42;
  --text: #eff7ef;
  --text-dim: #9ab2a0;
  --emerald: #7cf29d;
  --emerald-deep: #2dcc68;
  --gold: #f4d36c;
  --orange: #ffb06b;
  --danger: #ff7b7b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --font-display: "Press Start 2P", monospace;
  --font-body: "Inter", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(124, 242, 157, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(244, 211, 108, 0.08), transparent 22%),
    linear-gradient(180deg, #0b0f0c 0%, #0d120f 45%, #0a0d0b 100%);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 78% 62% at 50% 0%, black 30%, transparent 90%);
}

.bg-glow {
  position: fixed;
  width: 560px;
  height: 560px;
  border-radius: 999px;
  filter: blur(32px);
  opacity: 0.14;
  z-index: 0;
  pointer-events: none;
}

.bg-glow-left {
  top: -220px;
  left: -180px;
  background: radial-gradient(circle, #7cf29d 0%, transparent 72%);
}

.bg-glow-right {
  top: 40px;
  right: -220px;
  background: radial-gradient(circle, #f4d36c 0%, transparent 72%);
}

.topbar,
footer,
.hero,
main {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  background: rgba(10, 15, 12, 0.55);
}

.brand-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.brand-logo {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.page-logo {
  width: min(220px, 55vw);
  height: auto;
  margin-bottom: 26px;
}

.confirmation-hero {
  min-height: calc(100vh - 60px);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.confirmation-hero .hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.confirmation-hero .page-logo {
  width: min(170px, 42vw);
  margin: 0 auto 18px;
}

.brand {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--emerald);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.brand-sub {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(17, 23, 19, 0.8);
  color: var(--text-dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #7b8d7f;
  box-shadow: 0 0 0 4px rgba(123, 141, 127, 0.12);
}

.status-pill.is-ready {
  color: #d5ffe0;
  border-color: rgba(124, 242, 157, 0.3);
}

.status-pill.is-ready::before {
  background: var(--emerald);
  box-shadow: 0 0 0 4px rgba(124, 242, 157, 0.16);
}

.hero {
  padding: 78px 24px 52px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.hero-inner {
  max-width: 920px;
  margin: 0 auto;
}

.eyebrow,
.modal-eyebrow,
.feature-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-title {
  margin: 18px 0 14px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-title span {
  color: transparent;
  background: linear-gradient(90deg, var(--emerald), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-sub {
  max-width: 720px;
  margin: 0 auto;
  color: var(--text-dim);
  font-size: 18px;
  line-height: 1.65;
}

.hero-meta,
.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.hero-meta {
  margin-top: 38px;
}

.meta-item,
.feature-card,
.catalog-shell,
.product-card,
.modal,
.cart-drawer,
.admin-form,
.admin-row,
.admin-order,
.admin-login-box {
  background: linear-gradient(180deg, rgba(28, 38, 32, 0.98), rgba(17, 24, 20, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow);
}

.meta-item {
  border-radius: 16px;
  padding: 18px 20px;
  text-align: left;
}

.meta-item strong {
  display: block;
  color: var(--gold);
  font-size: 24px;
  margin-bottom: 6px;
}

.meta-item span {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.feature-strip {
  margin-bottom: 28px;
}

.feature-card {
  border-radius: 18px;
  padding: 22px;
}

.feature-card strong {
  display: block;
  margin-top: 10px;
  font-size: 18px;
  color: var(--text);
}

.feature-card p {
  margin: 10px 0 0;
  color: var(--text-dim);
  line-height: 1.6;
}

.catalog-shell {
  border-radius: 24px;
  padding: 24px;
}

.catalog-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 18px;
}

.catalog-head h2,
.admin-section-header h2,
.admin-login-box h1,
.modal h2,
.cart-header h2 {
  margin: 8px 0 0;
  font-size: 28px;
  line-height: 1.1;
}

.benefits-content {
  margin: 20px 0 24px;
  color: var(--text-dim);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.benefits-modal {
  width: min(100%, 720px);
  max-height: min(82vh, 760px);
  overflow-y: auto;
  scrollbar-color: var(--emerald) rgba(9, 12, 10, 0.7);
}

.benefits-content p,
.benefits-content div {
  margin: 0 0 10px;
}

.benefits-content ul,
.benefits-content ol {
  padding-left: 22px;
}

.benefits-content li + li {
  margin-top: 7px;
}

.catalog-summary {
  margin: 0;
  color: var(--text-dim);
  font-size: 13px;
}

.category-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin: 4px -4px 20px;
}

.category-groups {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.category-group {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-dim);
  padding: 10px 6px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.category-group.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.category-tab {
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(15, 20, 16, 0.88);
  color: var(--text-dim);
  padding: 11px 16px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.category-tab:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(124, 242, 157, 0.5);
  color: var(--text);
}

.category-tab.active {
  background: linear-gradient(180deg, rgba(124, 242, 157, 0.22), rgba(124, 242, 157, 0.08));
  border-color: rgba(124, 242, 157, 0.65);
  color: var(--text);
}

.category-tab:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.catalog-grid,
.ranks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

.loading-msg,
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-dim);
}

.empty-state {
  padding: 32px;
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  background: rgba(16, 22, 18, 0.65);
}

.empty-state h3 {
  margin: 0 0 8px;
  font-size: 22px;
  color: var(--text);
}

.product-card,
.rank-card {
  border-radius: 20px;
  padding: 22px;
  position: relative;
  overflow: hidden;
}

.product-card::before,
.rank-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, color-mix(in srgb, var(--accent, #7cf29d) 18%, transparent), transparent 55%);
  pointer-events: none;
}

.product-card-top,
.admin-order-head,
.cart-item,
.admin-row,
.admin-order-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.product-icon {
  display: block;
  font-size: 42px;
  line-height: 1;
  margin-bottom: 14px;
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.35));
}

.featured-chip,
.badge-featured {
  display: inline-flex;
  width: max-content;
  margin-left: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #1a1608;
  background: var(--gold);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.product-card-top {
  align-items: start;
  margin-bottom: 14px;
}

.product-chip {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--text-dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.product-card h3,
.rank-name {
  margin: 0;
  font-size: 21px;
  line-height: 1.15;
}

.product-price,
.rank-price {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent, var(--emerald));
  white-space: nowrap;
}

.product-price del {
  display: block;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 500;
}

.product-description,
.rank-tagline {
  margin: 0 0 14px;
  color: var(--text-dim);
  line-height: 1.6;
}

.product-perks,
.rank-perks {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
  color: var(--text);
}

.product-perks li::before,
.rank-perks li::before {
  content: "▸";
  margin-right: 8px;
  color: var(--accent, var(--emerald));
}

.btn-buy,
.btn-primary,
.btn-secondary,
.cart-btn,
.qty-btn,
.remove-btn,
.modal-close,
.icon-btn {
  border-radius: 12px;
  transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.btn-buy,
.btn-primary {
  border: none;
  cursor: pointer;
  font-weight: 800;
}

.btn-buy {
  width: 100%;
  padding: 13px 16px;
  background: linear-gradient(180deg, var(--accent, var(--emerald)), color-mix(in srgb, var(--accent, var(--emerald)) 70%, #000));
  color: #09110b;
}

.btn-buy:hover,
.btn-primary:hover,
.cart-btn:hover,
.btn-secondary:hover,
.qty-btn:hover,
.icon-btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  width: 100%;
  padding: 14px 16px;
  background: linear-gradient(180deg, var(--emerald), var(--emerald-deep));
  color: #09110b;
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: progress;
}

.btn-secondary {
  border: 1px solid var(--line);
  background: rgba(12, 16, 13, 0.85);
  color: var(--text);
  padding: 10px 14px;
  cursor: pointer;
}

.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  background: rgba(16, 22, 18, 0.88);
  color: var(--text);
  padding: 11px 14px;
  cursor: pointer;
}

.cart-icon {
  font-size: 16px;
}

.cart-count {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--emerald);
  color: #09110b;
  font-size: 12px;
  font-weight: 900;
}

.how-it-works {
  display: none;
}

footer {
  padding: 20px 24px 48px;
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
}

footer p {
  margin: 8px 0;
}

footer a {
  color: var(--gold);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

.modal-backdrop,
.cart-backdrop,
.admin-login {
  position: fixed;
  inset: 0;
  z-index: 20;
}

.modal-backdrop,
.cart-backdrop {
  display: none;
  background: rgba(4, 6, 5, 0.78);
}

.modal-backdrop.open,
.cart-backdrop.open {
  display: flex;
}

.modal-backdrop {
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  width: min(100%, 420px);
  position: relative;
  border-radius: 22px;
  padding: 28px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: 1px solid var(--line);
  background: rgba(10, 14, 11, 0.95);
  color: var(--text-dim);
  width: 34px;
  height: 34px;
  cursor: pointer;
}

.modal-price {
  color: var(--gold);
  margin: 10px 0 18px;
  font-weight: 700;
}

.modal label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-dim);
  font-size: 13px;
}

.modal input,
.admin-form input[type="text"],
.admin-form input[type="number"],
.admin-form textarea,
.admin-form select,
.admin-login-box input[type="password"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(9, 12, 10, 0.9);
  color: var(--text);
  padding: 12px 14px;
}

.modal input:focus-visible,
.btn-buy:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.cart-btn:focus-visible,
.category-tab:focus-visible,
.qty-btn:focus-visible,
.remove-btn:focus-visible,
.icon-btn:focus-visible,
.admin-form input:focus-visible,
.admin-form textarea:focus-visible,
.admin-form select:focus-visible,
.admin-login-box input:focus-visible {
  outline: 2px solid rgba(124, 242, 157, 0.85);
  outline-offset: 2px;
}

.input-hint,
.section-note,
.admin-row-sub,
.admin-order-meta,
.cart-item-price {
  color: var(--text-dim);
}

.input-hint,
.section-note {
  margin: 10px 0 14px;
  font-size: 12px;
  line-height: 1.5;
}

.error-msg {
  margin: 0 0 12px;
  min-height: 18px;
  color: var(--danger);
  font-size: 13px;
}

.cart-backdrop {
  justify-content: flex-end;
}

.cart-drawer {
  width: min(100%, 420px);
  height: 100%;
  padding: 24px;
  border-radius: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
}

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

.cart-items {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.empty-cart {
  color: var(--text-dim);
}

.cart-item {
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.cart-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cart-item-name {
  font-weight: 700;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-btn,
.remove-btn,
.icon-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  background: rgba(9, 12, 10, 0.9);
  color: var(--text);
  cursor: pointer;
}

.qty-value {
  min-width: 18px;
  text-align: center;
  font-weight: 700;
}

.remove-btn {
  color: var(--text-dim);
}

.remove-btn:hover,
.icon-btn.danger:hover {
  color: var(--danger);
  border-color: rgba(255, 123, 123, 0.55);
}

.cart-footer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 16px;
}

.cart-total-row strong {
  color: var(--gold);
}

@media (max-width: 920px) {
  .hero-meta,
  .feature-strip {
    grid-template-columns: 1fr;
  }

  .catalog-head {
    flex-direction: column;
    align-items: start;
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: 16px;
    align-items: start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .hero {
    padding: 60px 16px 38px;
  }

  main {
    padding: 24px 16px 64px;
  }

  .catalog-shell {
    padding: 18px;
  }

  .modal,
  .cart-drawer {
    width: 100%;
  }

  .cart-drawer {
    border-left: none;
  }
}
