:root {
  --bg: #0c0f16;
  --surface: rgba(20, 25, 36, 0.78);
  --surface-strong: rgba(26, 32, 46, 0.92);
  --border: rgba(180, 198, 224, 0.14);
  --border-bright: rgba(210, 225, 245, 0.28);
  --text: #e6ecf5;
  --muted: #93a1b8;
  --sky: #65c2ed;
  --indigo: #9481d8;
  --lime: #a4cc68;
  --lime-deep: #7da649;
  --danger: #eb6a6a;
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  display: none;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

.bg-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background: var(--bg);
}

.bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(190, 210, 240, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(190, 210, 240, 0.032) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 85% 65% at 50% 0%, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 78%);
  mask-image: radial-gradient(ellipse 85% 65% at 50% 0%, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 78%);
}

.container {
  width: min(1060px, 100% - 32px);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
  background: rgba(12, 15, 22, 0.72);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 10px 0;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
  color: #cbd5e4;
  font-weight: 700;
  letter-spacing: -0.02em;
  transition: color 0.18s ease;
}

.brand:hover {
  color: var(--text);
}

.brand-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  opacity: 0.84;
  filter: brightness(0.9) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.18s ease, filter 0.18s ease;
}

.brand:hover .brand-icon {
  opacity: 0.96;
  filter: brightness(0.98) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
  transform: scale(1.05);
}

.brand-name {
  font-size: 1.14rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.icon-badge-neutral {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #cfe0f5;
  background: linear-gradient(155deg, rgba(110, 148, 210, 0.16), rgba(32, 42, 60, 0.7));
  border: 1px solid rgba(190, 212, 240, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.tag-neutral {
  color: #c2d0e4;
  background: linear-gradient(rgba(180, 198, 224, 0.12), rgba(180, 198, 224, 0.12)), #121824;
  border: 1px solid rgba(180, 198, 224, 0.24);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
}

.nav a,
.nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  padding: 0 13px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: 0.16s ease;
}

.nav a:hover,
.nav button:hover,
.nav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav a.nav-cta {
  position: relative;
  overflow: hidden;
  color: #0e140a;
  background: linear-gradient(180deg, #b0d677, #84af4f);
  font-weight: 600;
  border-color: rgba(188, 224, 128, 0.45);
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), filter 0.18s ease, box-shadow 0.2s ease;
}

.nav a.nav-cta:hover,
.nav a.nav-cta.active {
  color: #0e140a;
  background: linear-gradient(180deg, #b8de80, #8ab753);
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(164, 204, 104, 0.28);
}

.nav a.nav-cta:active {
  transform: translateY(0) scale(0.98);
}

.nav a.nav-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-bright);
}

.nav a.nav-download:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(220, 234, 252, 0.36);
}

.nav-menu {
  position: relative;
}

.nav button.nav-account-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 0 11px;
}

.nav button.nav-account-btn:hover,
.nav button.nav-account-btn.active,
.nav-menu.open .nav-account-btn {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-bright);
}

.nav-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.nav-handle {
  max-width: 120px;
  line-height: 1;
  padding: 3px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-chevron {
  opacity: 0.7;
  transition: transform 0.18s ease;
}

.nav-menu.open .nav-chevron {
  transform: rotate(180deg);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(16, 21, 31, 0.96);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border-bright);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55);
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 40;
}

.nav-menu.open .nav-dropdown {
  display: flex;
  animation: modalPop 0.16s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.nav-dropdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 10px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.nav-dropdown-head .edition-tag {
  margin-top: 0;
}

.nav-dropdown-email {
  font-size: 0.8rem;
  line-height: 1.45;
  padding: 1px 0;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 148px;
}

.nav .nav-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: auto;
  width: 100%;
  text-align: left;
  line-height: 1.25;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 0.88rem;
  color: #cdd7e6;
}

.nav .nav-dropdown-item:hover,
.nav .nav-dropdown-item.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.nav-dropdown-sep {
  height: 1px;
  background: var(--border);
  margin: 4px 4px;
}

.nav .nav-dropdown-danger {
  color: #f3a6a6;
}

.nav .nav-dropdown-danger:hover {
  color: #ffd4d4;
  background: rgba(235, 106, 106, 0.14);
}

@media (max-width: 640px) {
  .container {
    width: min(1060px, 100% - 24px);
  }

  .topbar-inner {
    min-height: 58px;
    padding: 8px 0;
    gap: 8px;
  }

  .brand {
    gap: 7px;
  }

  .brand-icon {
    width: 24px;
    height: 24px;
  }

  .brand-name {
    font-size: 1rem;
  }

  .nav {
    gap: 4px;
  }

  .nav a,
  .nav button {
    height: 32px;
    font-size: 0.82rem;
    padding: 0 9px;
  }

  .nav button.nav-account-btn {
    padding: 0 9px;
    gap: 6px;
  }

  .nav .nav-dropdown-item {
    height: auto;
    padding: 8px 10px;
  }

  .nav-handle {
    display: none;
  }
}

@media (max-width: 420px) {
  .brand-name {
    font-size: 0.94rem;
  }

  .nav a,
  .nav button {
    height: 30px;
    font-size: 0.78rem;
    padding: 0 7px;
  }

  .nav button.nav-account-btn {
    padding: 0 8px;
  }

  .nav .nav-dropdown-item {
    height: auto;
    padding: 8px 10px;
  }
}

.main-shell {
  flex: 1;
  padding: 48px 0 72px;
}

/* Hero */
.hero {
  text-align: center;
  max-width: 720px;
  margin: 12px auto 48px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: #c7d5eb;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-bright);
  background: rgba(255, 255, 255, 0.04);
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2.1rem, 4.4vw, 3.2rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.hero p {
  margin: 0 auto 28px;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Edition comparison cards */
.editions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}

.card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  transition: border-color 0.22s ease, transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.24s ease;
}

.card > *,
.plan-card > * {
  position: relative;
  z-index: 1;
}

.card::before,
.plan-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.28s ease;
  background-image: var(--grain-neutral);
  background-size: 128px 128px;
  background-repeat: repeat;
  image-rendering: pixelated;
  -webkit-mask-image: radial-gradient(
    250px circle at var(--mx, -999px) var(--my, -999px),
    #000 0%,
    rgba(0, 0, 0, 0.5) 35%,
    rgba(0, 0, 0, 0.14) 68%,
    transparent 100%
  );
  mask-image: radial-gradient(
    250px circle at var(--mx, -999px) var(--my, -999px),
    #000 0%,
    rgba(0, 0, 0, 0.5) 35%,
    rgba(0, 0, 0, 0.14) 68%,
    transparent 100%
  );
}

.card:hover::before,
.plan-card:hover::before {
  opacity: 1;
}

.card-netshelt {
  border-color: rgba(101, 194, 237, 0.28);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(101, 194, 237, 0.16);
}

.card-netshelt::before {
  background-image: var(--grain-sky);
}

.card-netshelt:hover {
  transform: translateY(-3px);
  border-color: rgba(101, 194, 237, 0.48);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.45), 0 0 28px rgba(101, 194, 237, 0.08), inset 0 1px 0 rgba(101, 194, 237, 0.28);
}

.card-ultra {
  border-color: rgba(164, 204, 104, 0.35);
  background: linear-gradient(155deg, rgba(30, 36, 48, 0.88), rgba(15, 19, 27, 0.92));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.card-ultra::before,
.plan-card.selected::before {
  background-image: var(--grain-lime);
}

.editions-grid .card-ultra:hover {
  transform: translateY(-3px);
  border-color: rgba(164, 204, 104, 0.56);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.52), 0 0 32px rgba(164, 204, 104, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.edition-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.edition-logo {
  width: 68px;
  height: 68px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1), filter 0.26s ease;
}

.card:hover .edition-logo {
  transform: scale(1.045);
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.42));
}

.edition-title {
  margin: 0;
  font-size: 1.32rem;
  letter-spacing: -0.02em;
}

.edition-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1;
  padding: 5px 9px 4px;
  border-radius: 999px;
}

.tag-sky {
  color: #a8e1fa;
  background: linear-gradient(rgba(101, 194, 237, 0.16), rgba(101, 194, 237, 0.16)), #121824;
  border: 1px solid rgba(101, 194, 237, 0.3);
}

.tag-lime {
  color: #cbe89a;
  background: linear-gradient(rgba(164, 204, 104, 0.17), rgba(164, 204, 104, 0.17)), #121824;
  border: 1px solid rgba(164, 204, 104, 0.34);
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  gap: 10px;
  color: #c6d0e0;
  font-size: 0.94rem;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-sky { background: var(--sky); }
.dot-lime { background: var(--lime); }

/* Buttons & forms */
.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 12px;
  border: 1px solid var(--border-bright);
  background: linear-gradient(rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.055)), #141a26;
  color: var(--text);
  font-size: 0.93rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), background 0.18s ease, border-color 0.18s ease, box-shadow 0.22s ease, filter 0.18s ease;
}

.btn:hover:not(:disabled) {
  background: linear-gradient(rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.105)), #141a26;
  border-color: rgba(220, 234, 252, 0.38);
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: translateY(0) scale(0.985);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-lime::after,
.btn-sky::after,
.nav a.nav-cta::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 75%;
  height: 100%;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.34) 50%, transparent 80%);
  transform: skewX(-18deg);
  pointer-events: none;
}

.btn-lime:hover:not(:disabled)::after,
.btn-sky:hover:not(:disabled)::after,
.nav a.nav-cta:hover::after {
  animation: btnShine 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes btnShine {
  0%   { left: -120%; }
  100% { left: 145%; }
}

.btn-lime {
  color: #0e140a;
  border-color: rgba(188, 224, 128, 0.5);
  background: linear-gradient(180deg, #b0d677, #84af4f);
}

.btn-lime:hover:not(:disabled) {
  filter: brightness(1.06);
  background: linear-gradient(180deg, #b8de80, #8ab753);
  box-shadow: 0 8px 24px rgba(164, 204, 104, 0.28);
}

.btn-sky {
  color: #09131c;
  border-color: rgba(125, 208, 245, 0.5);
  background: linear-gradient(180deg, #7dd0f5, #568cd4);
}

.btn-sky:hover:not(:disabled) {
  filter: brightness(1.06);
  background: linear-gradient(180deg, #87d6f9, #5f95dc);
  box-shadow: 0 8px 24px rgba(101, 194, 237, 0.28);
}

.btn-danger {
  color: #ffd4d4;
  border-color: rgba(235, 106, 106, 0.35);
  background: linear-gradient(rgba(235, 106, 106, 0.14), rgba(235, 106, 106, 0.14)), #141a26;
}

.btn-danger:hover:not(:disabled) {
  background: linear-gradient(rgba(235, 106, 106, 0.24), rgba(235, 106, 106, 0.24)), #141a26;
}

.btn-full {
  width: 100%;
}

.auth-wrap,
.activate-wrap {
  max-width: 440px;
  margin: 24px auto;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.field label {
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 500;
}

.input, select {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-bright);
  background: #0b0f18;
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
}

.input:focus, select:focus {
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(164, 204, 104, 0.15);
}

.code-input {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.15rem;
  text-align: center;
}

/* Dashboard & Admin */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.dash-stack {
  display: grid;
  gap: 20px;
}

.dash-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.dash-status-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.dash-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #0d121c;
  border: 1px solid var(--border);
}

.dash-stat-label {
  font-size: 0.78rem;
  color: var(--muted);
}

.dash-stat-value {
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-redeem-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: end;
}

@media (max-width: 560px) {
  .dash-redeem-form {
    grid-template-columns: 1fr;
  }
}

.section-title {
  margin: 0 0 6px;
  font-size: 1.6rem;
  letter-spacing: -0.025em;
}

.muted {
  color: var(--muted);
}

.kv-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  gap: 12px;
}

.kv-row:last-child {
  border-bottom: none;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.key-box {
  background: rgba(8, 11, 17, 0.85);
  border: 1px solid var(--border-bright);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
  white-space: pre-wrap;
  word-break: break-all;
  margin-top: 12px;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--muted);
  font-weight: 600;
}

.alert {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.alert-error {
  background: rgba(235, 106, 106, 0.14);
  border: 1px solid rgba(235, 106, 106, 0.35);
  color: #ffc8c8;
}

.alert-ok {
  background: rgba(164, 204, 104, 0.14);
  border: 1px solid rgba(164, 204, 104, 0.35);
  color: #d6f2a8;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  font-size: 0.84rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.84rem;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--text);
}

.legal-wrap {
  max-width: 780px;
  margin: 0 auto;
}

.legal-wrap h2 {
  font-size: 1.08rem;
  margin: 22px 0 8px;
  color: var(--text);
}

.legal-wrap p,
.legal-wrap li {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.62;
}

.legal-wrap ul {
  margin: 6px 0 14px;
  padding-left: 20px;
}

.rule-id {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: #cbe89a;
  background: rgba(164, 204, 104, 0.12);
  border: 1px solid rgba(164, 204, 104, 0.28);
  border-radius: 6px;
  padding: 1px 6px;
  margin-right: 6px;
  vertical-align: 1px;
}

.tos-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 18px;
  font-size: 0.84rem;
  line-height: 1.48;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.tos-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  flex-shrink: 0;
  border-radius: 5px;
  border: 1px solid var(--border-bright);
  background: rgba(10, 13, 20, 0.78);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.tos-check input[type="checkbox"]:hover {
  border-color: rgba(180, 198, 224, 0.42);
}

.tos-check input[type="checkbox"]:focus-visible {
  outline: none;
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(164, 204, 104, 0.15);
}

.tos-check input[type="checkbox"]:checked {
  border-color: rgba(188, 224, 128, 0.55);
  background: linear-gradient(180deg, #b0d677, #84af4f);
}

.tos-check input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  inset: 0;
  background: center / 11px 11px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.3 6.3L4.8 8.8L9.7 3.4' stroke='%230e140a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.tos-check a {
  color: #c8d7eb;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tos-check a:hover {
  color: var(--lime);
}

.legal-note {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
}

.legal-note a {
  color: #c2d0e4;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--surface-strong);
  border: 1px solid var(--border-bright);
  color: var(--text);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  font-size: 0.9rem;
}

/* Store / Pricing page */
.store-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.store-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.currency-switch {
  display: inline-flex;
  padding: 4px;
  border-radius: 12px;
  background: rgba(12, 16, 24, 0.85);
  border: 1px solid var(--border-bright);
  gap: 4px;
}

.currency-switch button {
  padding: 7px 14px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.15s ease;
}

.currency-switch button.active {
  color: #0e140a;
  background: linear-gradient(180deg, #b0d677, #84af4f);
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.plan-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.plan-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-2px);
}

.plan-card.selected {
  border-color: rgba(164, 204, 104, 0.65);
  background: linear-gradient(155deg, rgba(32, 40, 50, 0.92), rgba(15, 20, 27, 0.95));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(164, 204, 104, 0.28);
}

.plan-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.plan-name {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
}

.plan-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  color: #0e140a;
  background: linear-gradient(180deg, #b0d677, #84af4f);
}

.plan-price {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 4px 0 4px;
}

.plan-sub {
  font-size: 0.86rem;
  color: var(--muted);
  margin: 4px 0 20px;
}

.checkout-card {
  margin-bottom: 22px;
}

.checkout-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.region-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.region-tab {
  padding: 8px 15px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.15s ease;
}

.region-tab:hover {
  color: var(--text);
  border-color: var(--border-bright);
}

.region-tab.active {
  color: #cbe89a;
  border-color: rgba(164, 204, 104, 0.48);
  background: rgba(164, 204, 104, 0.12);
}

.pay-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.pay-option {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #0d121c;
}

.pay-option-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pay-option-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.pay-option-desc {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
}

.order-pending-box {
  margin-bottom: 20px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid rgba(164, 204, 104, 0.42);
  background: linear-gradient(rgba(164, 204, 104, 0.1), rgba(164, 204, 104, 0.1)), #0f1520;
}

.order-pending-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.order-pending-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.steps-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.86rem;
  color: var(--muted);
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: #cbe89a;
  background: rgba(164, 204, 104, 0.14);
  border: 1px solid rgba(164, 204, 104, 0.35);
}

.redeem-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(6, 9, 14, 0.72);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.18s ease-out both;
}

.modal-card {
  width: min(420px, 100%);
  background: var(--surface-strong);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.6);
  animation: modalPop 0.24s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.modal-title {
  margin: 0 0 10px;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.modal-body {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Page & element entrance animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes modalPop {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(164, 204, 104, 0.55); }
  50%      { opacity: 0.85; transform: scale(1.08); box-shadow: 0 0 0 5px rgba(164, 204, 104, 0); }
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  animation: pulseDot 2.4s ease-in-out infinite;
}

.main-shell > * {
  animation: fadeSlideUp 0.42s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.main-shell > *:nth-child(2) { animation-delay: 0.06s; }
.main-shell > *:nth-child(3) { animation-delay: 0.12s; }
.main-shell > *:nth-child(4) { animation-delay: 0.18s; }

.editions-grid > *,
.plans-grid > *,
.dash-grid > * {
  animation: fadeSlideUp 0.44s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.editions-grid > *:nth-child(2),
.plans-grid > *:nth-child(2),
.dash-grid > *:nth-child(2) { animation-delay: 0.08s; }

.plans-grid > *:nth-child(3) { animation-delay: 0.15s; }

.toast:not(.hidden) {
  animation: toastIn 0.24s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.hidden {
  display: none !important;
}

/* iOS-style continuous squircle corners (progressive enhancement for Chrome/Edge 139+) */
@supports (corner-shape: squircle) {
  :root {
    --radius: 30px;
  }

  .card,
  .plan-card,
  .modal-card {
    corner-shape: squircle;
  }

  .card::before,
  .plan-card::before {
    corner-shape: inherit;
  }

  .pay-option,
  .order-pending-box,
  .nav-dropdown,
  .icon-badge-neutral,
  .dash-stat {
    corner-shape: squircle;
    border-radius: 20px;
  }

  .btn,
  .input,
  select,
  .key-box,
  .alert,
  .toast,
  .currency-switch {
    corner-shape: squircle;
    border-radius: 17px;
  }

  .nav a,
  .nav button,
  .region-tab {
    corner-shape: squircle;
    border-radius: 14px;
  }

  .nav .nav-dropdown-item,
  .currency-switch button {
    corner-shape: squircle;
    border-radius: 12px;
  }

  .rule-id {
    corner-shape: squircle;
    border-radius: 9px;
  }

  .tos-check input[type="checkbox"] {
    corner-shape: squircle;
    border-radius: 7px;
  }
}

/* ==========================================================================
   3D Menu Showcase (Landing)
   ========================================================================== */
.menu-frame {
  position: relative;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow:
    0 34px 90px -18px rgba(0, 0, 0, 0.85),
    0 14px 34px -10px rgba(0, 0, 0, 0.68);
  user-select: none;
  -webkit-user-drag: none;
}

.menu-frame img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  -webkit-user-drag: none;
}

.edition-footnote {
  margin: -10px 0 18px;
  font-size: 0.78rem;
  color: var(--muted);
  opacity: 0.78;
  line-height: 1.45;
}

.showcase-v1 {
  position: relative;
  padding: 2px 0 48px;
  text-align: center;
}

.showcase-bar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.showcase-badge {
  margin-top: 0;
  padding: 7px 12px 5px;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

.showcase-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(14, 19, 29, 0.85);
  backdrop-filter: blur(12px);
}

.showcase-tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.showcase-tab:hover {
  color: var(--text);
}

.showcase-tab.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.showcase-v1-stage {
  position: relative;
  max-width: 825px;
  margin: 0 auto;
  perspective: 1650px;
  padding: 8px 0 20px;
}

.showcase-v1-glow {
  position: absolute;
  inset: 8% 6% 10%;
  border-radius: 50%;
  filter: blur(76px);
  opacity: 0.34;
  pointer-events: none;
  transition: background 0.45s ease, opacity 0.3s ease;
  background: radial-gradient(circle, rgba(244, 128, 176, 0.58), rgba(146, 132, 255, 0.24) 55%, transparent 75%);
}

.showcase-v1[data-tab="combat"] .showcase-v1-glow {
  background: radial-gradient(circle, rgba(146, 132, 255, 0.65), rgba(86, 179, 255, 0.24) 55%, transparent 75%);
}

.showcase-v1[data-tab="players"] .showcase-v1-glow {
  background: radial-gradient(circle, rgba(148, 224, 118, 0.56), rgba(105, 198, 255, 0.2) 55%, transparent 75%);
}

.dot-rose {
  background: #f486b5;
  box-shadow: 0 0 10px rgba(244, 134, 181, 0.65);
}

.dot-violet {
  background: #9f94ff;
  box-shadow: 0 0 10px rgba(159, 148, 255, 0.65);
}

.showcase-v1-card {
  position: relative;
  transform: rotateX(var(--rx, 5.5deg)) rotateY(var(--ry, -3deg));
  transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.18s ease;
  cursor: zoom-in;
}

.showcase-v1-card.is-switching {
  opacity: 0.72;
  transform: rotateX(7deg) rotateY(0deg) scale(0.99);
}

.lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(6, 9, 14, 0.84);
  backdrop-filter: blur(10px);
  cursor: zoom-out;
  animation: fadeInFast 0.16s ease;
}

.lightbox-inner {
  max-width: min(825px, 94vw);
  max-height: 90vh;
  border-radius: 0;
  border: none;
  box-shadow: 0 36px 110px rgba(0, 0, 0, 0.9);
  cursor: default;
}

.lightbox-inner img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 90vh;
  object-fit: contain;
}

@keyframes fadeInFast {
  from { opacity: 0; }
  to { opacity: 1; }
}
