:root {
  color-scheme: dark;
  --bg: #08100f;
  --panel: rgba(13, 28, 27, 0.9);
  --line: rgba(190, 234, 220, 0.2);
  --text: #effaf5;
  --muted: #a9bbb6;
  --mint: #62f0be;
  --gold: #f4c863;
  --coral: #ff7f6e;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at 18% 12%, rgba(98, 240, 190, 0.18), transparent 30%),
    linear-gradient(135deg, #07100f 0%, #12201d 48%, #201814 100%);
  color: var(--text);
}

a {
  color: inherit;
}

.shell {
  min-height: 100vh;
}

.hero {
  min-height: 100vh;
  padding: 28px clamp(18px, 4vw, 64px) 40px;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f2f7ef;
  color: #07100f;
}

.app-link,
.primary-action,
.secondary-action,
.provider-button,
.logout-button,
.stripe-button,
.crypto-button {
  min-height: 44px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 800;
}

.app-link,
.secondary-action {
  border: 1px solid var(--line);
  padding: 0 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.app-link[hidden],
.secondary-action[hidden] {
  display: none !important;
}

.hero-grid {
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
}

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

h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: 0;
}

.lede {
  max-width: 630px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.45;
}

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

.primary-action {
  padding: 0 20px;
  background: var(--mint);
  color: #06110f;
}

.account-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
  padding: 24px;
}

.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 18px;
}

#apple-login-dialog { width: min(440px, calc(100vw - 32px)); box-sizing: border-box; border: 1px solid var(--line); border-radius: 14px; padding: 24px; background: #10211d; color: var(--text); }
#apple-login-dialog::backdrop { background: rgb(0 0 0 / 70%); }
#apple-login-dialog h2 { margin-top: 0; font-size: 26px; }
#apple-login-dialog p { line-height: 1.5; }
#apple-login-dialog button { cursor: pointer; }
#email-login-dialog { width: min(440px, calc(100vw - 32px)); box-sizing: border-box; border: 1px solid #36574c; border-radius: 14px; padding: 24px; background: #10211d; color: #effbf5; }
#email-login-dialog::backdrop { background: rgb(0 0 0 / 70%); }
#email-login-dialog h2 { font-size: 26px; }
#email-login-dialog label { display: block; margin: 16px 0 8px; }
#email-login-dialog input { box-sizing: border-box; width: 100%; padding: 12px; font: inherit; font-size: 16px; color: #effbf5; background: #1b3029; border: 1px solid #668879; border-radius: 6px; }
#email-login-dialog button { cursor: pointer; }
#email-login-close, #email-login-restart { padding: 8px; background: transparent; border: 1px solid #668879; border-radius: 6px; color: inherit; }
#email-login-close { float: right; }
#email-login-message { line-height: 1.5; }
#email-login-restart { margin-top: 12px; }
#email-login-dialog button:disabled { opacity: .6; cursor: wait; }

.card-heading p,
.label,
.security-note {
  color: var(--muted);
  margin: 0;
  font-size: 13px;
}

.card-heading strong {
  text-align: right;
}

.provider-list {
  display: grid;
  gap: 10px;
}

.provider-button {
  width: 100%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 28px minmax(0, 190px);
  justify-content: center;
  text-align: left;
  padding: 7px 12px;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.provider-unavailable > span:not(.provider-icon) { color: #96a39f; }
.provider-icon.email { background: #fff; color: #10211d; }

.provider-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 900;
}

.google {
  background: #fff;
  color: #1a73e8;
}

.apple {
  background: #fff;
  color: #000;
}

.microsoft {
  background: #f25022;
  color: #fff;
}

.x {
  background: #000;
  color: #fff;
}

.account-data {
  display: grid;
  gap: 14px;
}

.account-data code {
  display: block;
  max-width: 100%;
  margin-top: 6px;
  padding: 10px;
  border-radius: 8px;
  overflow-wrap: anywhere;
  color: var(--gold);
  background: rgba(0, 0, 0, 0.24);
}

.data-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.logout-button {
  border: 0;
  cursor: pointer;
  color: #120908;
  background: var(--coral);
}

.upgrade-panel {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.upgrade-copy {
  display: grid;
  gap: 6px;
}

.upgrade-copy strong {
  line-height: 1.25;
}

.upgrade-copy p,
.payment-status {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.stripe-button {
  width: 100%;
  border: 0;
  cursor: pointer;
  color: #06110f;
  background: var(--gold);
}

.crypto-checkout {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(98, 240, 190, 0.05);
}

.crypto-checkout label {
  color: var(--mint);
  font-size: 13px;
  font-weight: 800;
}

.crypto-checkout select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--text);
  background: #0b1715;
}

.crypto-button {
  width: 100%;
  border: 0;
  cursor: pointer;
  color: #06110f;
  background: var(--mint);
}

.crypto-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.crypto-checkout small {
  color: var(--muted);
  line-height: 1.4;
}

.purchase-history {
  display: grid;
  gap: 8px;
}

.purchase-entry {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
}

.purchase-entry-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.purchase-entry small {
  color: var(--muted);
}

.refund-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: transparent;
  cursor: pointer;
}

.stripe-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

#paypal-button-container {
  min-height: 44px;
}

.security-note {
  margin-top: 18px;
  line-height: 1.45;
}

@media (max-width: 820px) {
  .hero {
    min-height: auto;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    padding-top: 72px;
  }

  h1 {
    font-size: clamp(38px, 13vw, 58px);
  }
}
