:root {
  --bg: #000000;
  --brand: #ffd400;
  --text: #ffffff;
  --muted: #b8b8b8;
  --surface: #111111;
  --surface-2: #181818;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 212, 0, 0.06), transparent 220px),
    var(--bg);
  color: var(--text);
}

a {
  color: inherit;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(16px);
}

.portal-topbar {
  min-height: 78px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.main-nav a {
  min-height: 38px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
}

.main-nav a:hover {
  background: var(--surface);
  color: var(--text);
}

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

.brand img {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 212, 0, 0.45);
  border-radius: 8px;
  object-fit: cover;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
  line-height: 1.1;
}

.brand small {
  color: var(--muted);
  margin-top: 3px;
}

.admin-link,
.ghost-button,
.primary-button,
.secondary-button,
.small-button,
.offer-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
}

.admin-link,
.ghost-button,
.secondary-button,
.small-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}

.admin-link {
  padding: 0 14px;
}

.primary-button,
.offer-button {
  border: 1px solid rgba(255, 212, 0, 0.75);
  background: var(--brand);
  color: #050505;
  font-weight: 900;
}

.primary-button,
.ghost-button,
.secondary-button {
  padding: 0 18px;
}

.small-button {
  min-height: 36px;
  padding: 0 12px;
}

.danger-button {
  border-color: rgba(255, 85, 85, 0.45);
  color: #ffb1b1;
}

.shell,
.admin-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 44px;
}

.portal-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 52px;
}

.portal-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 18px;
}

.hero-copy {
  display: grid;
  align-content: center;
  min-height: 330px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(255, 212, 0, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 212, 0, 0.11), transparent 44%),
    var(--surface);
  box-shadow: var(--shadow);
}

.hero-copy h1 {
  max-width: 780px;
  font-size: clamp(42px, 6vw, 78px);
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  width: min(720px, 100%);
  margin-top: 24px;
}

.hero-panel {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  min-height: 330px;
  padding: 24px;
  border: 1px solid rgba(255, 212, 0, 0.34);
  border-radius: 8px;
  background: #070707;
  box-shadow: var(--shadow);
  text-align: center;
}

.hero-panel img {
  width: 122px;
  height: 122px;
  object-fit: cover;
}

.hero-panel strong {
  color: var(--brand);
  font-size: 58px;
  line-height: 1;
}

.hero-panel span {
  font-size: 18px;
  font-weight: 900;
}

.hero-panel small {
  color: var(--muted);
}

.portal-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.stat-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.stat-card strong {
  display: block;
  color: var(--brand);
  font-size: 28px;
  line-height: 1;
}

.stat-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.section-block {
  margin-top: 34px;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1;
}

.section-note {
  color: var(--muted);
  font-size: 14px;
}

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

.feed-head,
.admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 0.96;
  letter-spacing: 0;
}

.lead {
  max-width: 680px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.live-card {
  display: grid;
  gap: 2px;
  min-width: 156px;
  padding: 18px;
  border: 1px solid rgba(255, 212, 0, 0.35);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.live-card strong {
  color: var(--brand);
  font-size: 38px;
  line-height: 1;
}

.live-card span {
  color: var(--muted);
}

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

.filter-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.filter-button.is-active {
  border-color: rgba(255, 212, 0, 0.8);
  background: var(--brand);
  color: #050505;
  font-weight: 900;
}

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

.category-grid,
.store-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.category-card,
.store-card {
  display: grid;
  gap: 8px;
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.category-card {
  cursor: pointer;
}

.category-card:hover,
.store-card.is-active {
  border-color: rgba(255, 212, 0, 0.55);
  background: linear-gradient(135deg, rgba(255, 212, 0, 0.12), var(--surface));
}

.category-card strong,
.store-card strong {
  font-size: 18px;
}

.category-card span,
.store-card span {
  color: var(--muted);
}

.social-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 34px;
  padding: 22px;
  border: 1px solid rgba(255, 212, 0, 0.45);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 212, 0, 0.14), transparent 55%),
    var(--surface);
  box-shadow: var(--shadow);
}

.social-band h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1;
}

.social-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.offer-card,
.admin-card,
.token-panel,
.scan-result,
.status-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.offer-card {
  overflow: hidden;
}

.offer-image-wrap {
  position: relative;
  display: grid;
  min-height: 230px;
  background: #070707;
  place-items: center;
}

.offer-image {
  width: 100%;
  height: 230px;
  object-fit: contain;
  padding: 16px;
}

.discount-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--brand);
  color: #050505;
  font-weight: 900;
}

.offer-body {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.offer-actions {
  display: grid;
  grid-template-columns: 0.65fr 1fr;
  gap: 8px;
}

.offer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-pill,
.store-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.category-pill {
  border-color: rgba(255, 212, 0, 0.5);
  color: var(--brand);
}

.offer-card h2 {
  min-height: 56px;
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.price-now {
  color: var(--brand);
  font-size: 25px;
}

.price-before {
  color: var(--muted);
  text-decoration: line-through;
}

.offer-button {
  width: 100%;
}

.detail-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #070707;
  color: var(--text);
  text-decoration: none;
}

.card-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.card-metrics span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.offer-detail {
  min-height: 60vh;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: stretch;
}

.detail-media,
.detail-copy {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.detail-media {
  position: relative;
  display: grid;
  min-height: 520px;
  padding: 22px;
  place-items: center;
}

.detail-media img {
  width: 100%;
  height: 100%;
  max-height: 560px;
  object-fit: contain;
}

.detail-copy {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: clamp(24px, 4vw, 42px);
}

.detail-copy h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.detail-price .price-now {
  font-size: clamp(40px, 6vw, 70px);
}

.detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-facts span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.detail-cta {
  min-height: 54px;
  font-size: 18px;
}

.affiliate-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 34px;
  border: 1px dashed rgba(255, 212, 0, 0.35);
  border-radius: 8px;
  background: rgba(255, 212, 0, 0.04);
  color: var(--muted);
  text-align: center;
}

.footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 38px;
  color: var(--muted);
  font-size: 14px;
}

.admin-body {
  background:
    linear-gradient(180deg, rgba(255, 212, 0, 0.05), transparent 260px),
    #050505;
}

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

.token-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 16px;
}

.scan-result {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  padding: 16px;
}

.scan-result strong {
  color: var(--brand);
}

.scan-result p {
  margin: 0;
  color: var(--muted);
}

.scan-result ul {
  margin: 4px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.token-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.is-hidden {
  display: none !important;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.status-card {
  padding: 14px;
}

.status-card strong {
  display: block;
  color: var(--brand);
  font-size: 28px;
  line-height: 1;
}

.status-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.admin-grid {
  display: grid;
  gap: 14px;
}

.admin-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  overflow: hidden;
}

.admin-card-media {
  display: grid;
  min-height: 220px;
  background: #070707;
  place-items: center;
}

.admin-offer-image {
  width: 100%;
  height: 100%;
  max-height: 260px;
  object-fit: contain;
  padding: 14px;
}

.admin-card-main {
  display: grid;
  gap: 12px;
  padding: 16px;
}

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

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #070707;
  color: var(--text);
  padding: 10px 12px;
  outline: none;
}

textarea {
  min-height: 74px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(255, 212, 0, 0.75);
  box-shadow: 0 0 0 3px rgba(255, 212, 0, 0.12);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

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

@media (max-width: 920px) {
  .main-nav {
    display: none;
  }

  .portal-hero,
  .feed-head,
  .admin-hero {
    grid-template-columns: 1fr;
  }

  .portal-stats,
  .featured-grid,
  .offer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-grid,
  .store-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .social-band {
    align-items: flex-start;
    flex-direction: column;
  }

  .social-actions {
    justify-content: flex-start;
  }

  .status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-card {
    grid-template-columns: 1fr;
  }

  .field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .topbar {
    padding: 12px 16px;
  }

  .brand img {
    width: 44px;
    height: 44px;
  }

  .brand strong {
    font-size: 16px;
  }

  .shell,
  .admin-shell,
  .portal-shell,
  .footer {
    width: min(100% - 24px, 1180px);
  }

  .portal-stats,
  .featured-grid,
  .offer-grid,
  .category-grid,
  .store-grid,
  .status-grid,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .portal-hero {
    gap: 12px;
  }

  .hero-copy,
  .hero-panel {
    min-height: auto;
  }

  .search-box,
  .offer-actions {
    grid-template-columns: 1fr;
  }

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

  .detail-media {
    min-height: 320px;
  }

  h1 {
    font-size: 36px;
  }

  .token-row {
    grid-template-columns: 1fr;
  }
}
