:root {
  --bg: #06080d;
  --panel: #0d1118;
  --panel-strong: #111723;
  --line: rgba(255, 255, 255, 0.09);
  --text: #eef2f7;
  --muted: #98a2b3;
  --accent: #f0e2c2;
  --accent-2: #d4c19b;
  --accent-3: #e7d8b6;
  --danger: #ff6b7a;
  --shadow: none;
  --radius: 24px;
  --radius-soft: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Lexend", "Noto Sans SC", sans-serif;
  color: var(--text);
  background: #07090e;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  display: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.page-shell {
  width: calc(100% - 160px);
  max-width: none;
  margin: 0 auto;
  padding: 28px 0 36px;
}

@media (max-width: 1200px) {
  .page-shell {
    width: calc(100% - 80px);
  }
}

.site-header,
.site-footer,
.header-actions,
.nav-links,
.hero-actions,
.panel-header,
.preview-meta,
.gift-preview-top {
  display: flex;
  align-items: center;
}

.site-header,
.site-footer,
.panel-header {
  justify-content: space-between;
}

.site-header {
  gap: 16px;
  margin-bottom: 80px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #111317;
  font-size: 1.18rem;
  font-weight: 700;
  background: var(--accent);
  box-shadow: none;
}

.brand strong,
.section-heading h1,
.hero-copy h1,
.gift-preview strong {
  display: block;
}

.brand span,
.hero-text,
.nav-links a,
.role-card p,
.section-heading p,
.detail-item span,
.wallet-meta {
  color: var(--muted);
}

.header-actions,
.nav-links {
  gap: 12px;
}

.nav-links a {
  padding: 9px 14px;
  border-radius: 999px;
  transition: 0.25s ease;
  letter-spacing: 0;
  font-size: 0.95rem;
  font-weight: 400;
  border: 1px solid transparent;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--text);
  background: transparent;
  border-color: rgba(255, 255, 255, 0.14);
}

.card {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  backdrop-filter: none;
}

.glow-card::after,
.preview-panel::after,
.records-panel::after {
  display: none;
}

.hero-layout,
.two-column {
  display: grid;
  gap: 20px;
}

.hero-layout,
.content-layout {
  width: min(100%, 1080px);
  margin: 0 auto;
}

.hero-layout {
  grid-template-columns: 1.15fr 0.85fr;
  align-items: stretch;
}

.content-layout {
  display: grid;
  gap: 28px;
}

.hero-copy,
.hero-panel,
.form-panel,
.preview-panel,
.empty-records-panel,
.records-panel,
.redeem-form-card,
#redeem-result {
  padding: 32px;
}

.empty-records-panel h2 {
  margin: 0 0 10px;
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 16px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(240, 226, 194, 0.08);
  color: var(--accent-2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.69rem;
  font-weight: 500;
}

.hero-copy h1,
.section-heading h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2.7rem, 5vw, 4.8rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
  font-weight: 500;
}

.hero-text,
.section-heading p {
  max-width: 62ch;
  font-size: 0.98rem;
  line-height: 1.78;
  letter-spacing: -0.01em;
}

.hero-actions {
  gap: 14px;
  margin: 32px 0 36px;
}

.btn {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, background 0.2s ease;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  transform: none;
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-primary,
.btn-secondary,
.wallet-button,
.wallet-connected {
  padding: 13px 18px;
}

.btn-primary {
  color: #111317;
  font-weight: 600;
  background: var(--accent);
  box-shadow: none;
}

.btn-secondary {
  color: var(--text);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.role-grid,
.stat-grid,
.detail-grid {
  display: grid;
  gap: 12px;
}

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

.role-card,
.detail-item {
  padding: 18px;
  border-radius: var(--radius-soft);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.role-tag {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-3);
  font-weight: 600;
  letter-spacing: 0.01em;
  font-size: 0.93rem;
}

.hero-visual {
  position: relative;
  min-height: 320px;
  margin-bottom: 24px;
  border-radius: 26px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.chain-orb {
  display: none;
}

.orb-one {
  width: 180px;
  height: 180px;
  left: -24px;
  top: 24px;
  background: radial-gradient(circle, rgba(240, 226, 194, 0.34), transparent 70%);
}

.orb-two {
  width: 220px;
  height: 220px;
  right: -36px;
  bottom: -28px;
  background: radial-gradient(circle, rgba(161, 173, 197, 0.28), transparent 70%);
}

.flow-card {
  position: absolute;
  inset: auto 24px 24px 24px;
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 20px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.flow-card span,
.stat-grid span,
.detail-item strong {
  display: block;
}

.stat-grid strong {
  font-size: 1.65rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.section-heading h1 {
  max-width: none;
}

.two-column {
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.7fr);
  align-items: start;
}

.form-panel,
.redeem-form-card {
  display: grid;
  gap: 16px;
}

label span {
  display: block;
  margin-bottom: 9px;
  font-weight: 500;
  font-size: 0.93rem;
  color: #d8dee8;
}

input,
select {
  width: 100%;
  padding: 15px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  background: transparent;
  outline: none;
  font-size: 0.96rem;
}

input:focus,
select:focus {
  border-color: rgba(240, 226, 194, 0.45);
  box-shadow: none;
}

.gift-preview-stack {
  position: relative;
  min-height: 320px;
  margin-top: -14px;
  padding-top: 36px;
  padding-inline: 28px;
}

.gift-preview {
  position: relative;
  z-index: 3;
  padding: 24px;
  border-radius: 22px;
  min-height: 280px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.32s ease, box-shadow 0.32s ease;
  transform-origin: center bottom;
}

.preview-card {
  opacity: 1;
  background: var(--panel);
  border-color: rgba(255, 255, 255, 0.12);
}

.ghost-layer {
  position: absolute;
  inset: 36px 28px 0;
  min-height: 280px;
  pointer-events: none;
  opacity: 0;
  transform: translateX(0) translateY(10px) rotate(0deg) scale(0.98);
  background: var(--panel);
  box-shadow: none;
  transition: opacity 0.38s ease, transform 0.38s ease, box-shadow 0.38s ease;
  transform-origin: center bottom;
}

.ghost-layer-left-inner,
.ghost-layer-right-inner {
  z-index: 2;
}

.ghost-layer-left-outer,
.ghost-layer-right-outer {
  z-index: 1;
}

.gift-preview-stack[data-stack="2"] .ghost-layer-left-inner,
.gift-preview-stack[data-stack="3"] .ghost-layer-left-inner,
.gift-preview-stack[data-stack="4"] .ghost-layer-left-inner,
.gift-preview-stack[data-stack="5"] .ghost-layer-left-inner {
  opacity: 0.68;
  transform: translateX(-34px) translateY(8px) rotate(-2deg) scale(0.985);
}

.gift-preview-stack[data-stack="3"] .ghost-layer-right-inner,
.gift-preview-stack[data-stack="4"] .ghost-layer-right-inner,
.gift-preview-stack[data-stack="5"] .ghost-layer-right-inner {
  opacity: 0.5;
  transform: translateX(34px) translateY(8px) rotate(2deg) scale(0.985);
}

.gift-preview-stack[data-stack="4"] .ghost-layer-left-outer,
.gift-preview-stack[data-stack="5"] .ghost-layer-left-outer {
  opacity: 0.4;
  transform: translateX(-62px) translateY(14px) rotate(-3deg) scale(0.97);
}

.gift-preview-stack[data-stack="5"] .ghost-layer-right-outer {
  opacity: 0.32;
  transform: translateX(62px) translateY(14px) rotate(3deg) scale(0.97);
}

.gift-preview-stack[data-stack="2"] .gift-preview,
.gift-preview-stack[data-stack="3"] .gift-preview,
.gift-preview-stack[data-stack="4"] .gift-preview,
.gift-preview-stack[data-stack="5"] .gift-preview {
  box-shadow: none;
}

.gift-preview strong {
  margin: 26px 0 10px;
  font-size: 2.7rem;
  letter-spacing: -0.05em;
  font-weight: 500;
}

.preview-meta {
  justify-content: space-between;
  gap: 10px;
  margin-top: 22px;
  font-size: 0.88rem;
}

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

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

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.pagination-info {
  color: var(--muted);
  font-size: 0.88rem;
}

.pagination-btn {
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  background: transparent;
  cursor: pointer;
  font-size: 0.88rem;
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.records-table th,
.records-table td {
  padding: 14px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.94rem;
}

.records-table th {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-pill {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
}

.status-unused {
  color: #88f5dd;
  background: rgba(65, 224, 199, 0.12);
}

.status-claimed {
  color: #a9bcff;
  background: rgba(122, 162, 255, 0.12);
}

.status-expired {
  color: #ffc0c8;
  background: rgba(255, 107, 122, 0.12);
}

.table-copy {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  background: transparent;
  cursor: pointer;
  font-size: 0.84rem;
}

.redeem-stack {
  display: grid;
  gap: 18px;
}

.detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 22px;
}

.detail-item strong {
  margin-bottom: 6px;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.wallet-button,
.wallet-connected {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  background: transparent;
  font-size: 0.92rem;
}

.wallet-button {
  cursor: pointer;
}

.wallet-menu {
  position: relative;
}

.wallet-menu::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  width: 100%;
  height: 14px;
}

.wallet-connected {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.wallet-caret {
  display: inline-block;
  transition: transform 0.22s ease;
}

.wallet-menu:hover .wallet-caret,
.wallet-menu.is-open .wallet-caret {
  transform: rotate(180deg);
}

.wallet-avatar {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #041019;
  font-weight: 700;
  background: var(--accent-3);
}

.wallet-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 280px;
  padding: 16px;
  border-radius: 18px;
  background: #0d121b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
  z-index: 30;
}

.wallet-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.wallet-address {
  padding: 12px;
  border-radius: 14px;
  margin-bottom: 14px;
  background: transparent;
  word-break: break-all;
  font-size: 0.88rem;
  line-height: 1.55;
}

.wallet-actions {
  display: grid;
  gap: 10px;
}

.wallet-modal-backdrop,
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(1, 6, 12, 0.56);
  backdrop-filter: none;
  z-index: 40;
}

.wallet-modal,
.success-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(92vw, 420px);
  padding: 26px;
  border-radius: 20px;
  transform: translate(-50%, -50%);
  background: #0d121b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
  z-index: 41;
}

.wallet-provider-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 20px;
}

.wallet-provider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  cursor: pointer;
}

.wallet-provider-name,
.wallet-provider-indicator {
  color: rgba(245, 247, 251, 0.94);
}

.wallet-provider-name {
  font-weight: 500;
  font-size: 0.93rem;
}

.wallet-provider-indicator {
  font-size: 1rem;
}

.wallet-provider.active {
  border-color: rgba(240, 226, 194, 0.32);
  background: transparent;
}

.language-switcher {
  position: relative;
}

.lang-menu {
  position: relative;
}

.lang-trigger {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  background: transparent;
  cursor: pointer;
}

.lang-globe {
  width: 22px;
  height: 22px;
  display: block;
}

.lang-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 150px;
  padding: 8px;
  border-radius: 16px;
  background: #0d121b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
  z-index: 35;
}

.lang-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 11px;
  border: 0;
  border-radius: 12px;
  color: rgba(245, 247, 251, 0.94);
  background: transparent;
  cursor: pointer;
  font-size: 0.9rem;
}

.lang-option:hover,
.lang-option.active {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  padding: 13px 15px;
  border-radius: 14px;
  background: #0d121b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
  z-index: 60;
}

.success-modal h3,
.wallet-modal h3 {
  margin-top: 0;
}

.modal-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.success-hash {
  padding: 14px;
  border-radius: 14px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  word-break: break-all;
}

.site-footer {
  width: min(100%, 1080px);
  margin: 84px auto 0;
  padding: 30px 32px 26px;
  border-radius: 24px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: none;
}

.footer-top,
.footer-links,
.footer-link-list,
.footer-bottom,
.footer-brand {
  display: flex;
}

.footer-top,
.footer-bottom {
  justify-content: space-between;
  align-items: flex-start;
}

.footer-top {
  gap: 32px;
}

.footer-brand {
  align-items: flex-start;
  gap: 14px;
  max-width: 340px;
}

.footer-brand p,
.footer-brand-copy span,
.footer-link-list a {
  color: var(--muted);
}

.footer-brand-copy p {
  margin: 0 0 12px;
  font-size: 0.94rem;
  line-height: 1.75;
}

.footer-brand-copy span {
  display: block;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
}

.footer-mark {
  flex: 0 0 auto;
}

.footer-links {
  gap: 56px;
}

.footer-group {
  min-width: 160px;
}

.footer-title {
  display: block;
  margin-bottom: 12px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 0.92rem;
}

.footer-link-list {
  flex-direction: column;
  gap: 11px;
}

.footer-link-list a:hover {
  color: var(--text);
}

.footer-link-list a {
  font-size: 0.9rem;
}

.hero-copy,
.hero-panel,
.form-panel,
.preview-panel,
.empty-records-panel,
.records-panel,
.redeem-form-card,
#redeem-result,
.site-footer {
  isolation: isolate;
}

.hidden {
  display: none !important;
}

@media (max-width: 920px) {
  .hero-layout,
  .two-column {
    grid-template-columns: 1fr;
  }

  .hero-copy h1,
  .section-heading h1 {
    max-width: none;
    font-size: clamp(2.3rem, 9vw, 4rem);
  }
}

@media (max-width: 680px) {
  .page-shell {
    width: calc(100% - 20px);
    padding-top: 18px;
  }

  .site-header,
  .header-actions,
  .site-footer,
  .hero-actions,
  .panel-header,
  .preview-meta {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links,
  .hero-actions,
  .role-grid,
  .stat-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .footer-top,
  .footer-links,
  .footer-brand {
    flex-direction: column;
  }

  .footer-links {
    gap: 22px;
  }

  .gift-preview strong {
    font-size: 2.4rem;
  }
}
