:root {
  --ink: #182033;
  --muted: #627086;
  --mint: #28b982;
  --sun: #ffbc45;
  --coral: #f06d5e;
  --panel: rgba(255, 255, 255, 0.9);
  --line: rgba(24, 32, 51, 0.12);
  --shadow: 0 22px 70px rgba(25, 43, 77, 0.2);
}

* {
  box-sizing: border-box;
}

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

body {
  color: var(--ink);
  background: #dff5ff;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
}

.app-shell {
  position: relative;
  width: 100%;
  height: 100svh;
  overflow: hidden;
}

.hero-art,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-art {
  object-fit: cover;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(8, 21, 45, 0.76) 0%, rgba(8, 21, 45, 0.54) 45%, rgba(8, 21, 45, 0.16) 100%),
    linear-gradient(0deg, rgba(8, 21, 45, 0.28), rgba(8, 21, 45, 0));
}

.screen-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(340px, 520px) minmax(260px, 460px);
  gap: clamp(20px, 5vw, 64px);
  align-items: center;
  width: min(1120px, calc(100% - 40px));
  height: 100%;
  margin: 0 auto;
  padding: 22px 0;
}

.calculator-card {
  display: grid;
  gap: 16px;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Nunito, Inter, sans-serif;
  font-weight: 900;
  font-size: 1.1rem;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  color: #182033;
  background: var(--sun);
  box-shadow: 0 8px 24px rgba(255, 188, 69, 0.35);
}

.card-heading {
  display: grid;
  gap: 8px;
}

.eyebrow {
  margin: 0;
  color: var(--coral);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: Nunito, Inter, sans-serif;
  font-weight: 900;
  line-height: 0.98;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
}

h2 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 4rem);
  text-shadow: 0 16px 34px rgba(0, 0, 0, 0.26);
}

.card-heading p,
.summary-text,
.installment-note,
.side-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.installment-note {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 188, 69, 0.18);
  color: #6b4a08;
  font-size: 0.92rem;
  font-weight: 800;
}

.installment-note.is-hidden {
  display: none;
}

.side-copy {
  color: #fff;
}

.side-copy p {
  max-width: 420px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
}

.side-copy strong {
  color: #ffe17d;
}

.field {
  display: grid;
  gap: 8px;
}

.field > span {
  color: var(--ink);
  font-weight: 900;
}

input[type="number"] {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 1.22rem;
  font-weight: 900;
  outline: none;
}

input[type="number"]:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 4px rgba(40, 185, 130, 0.15);
}

.payment-options,
.server-options {
  display: grid;
  gap: 10px;
}

.payment-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.payment-options label,
.server-options label {
  position: relative;
}

.payment-options input,
.server-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.payment-options span,
.server-options span {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.payment-options input:checked + span,
.server-options input:checked + span {
  border-color: var(--mint);
  color: var(--ink);
  background: rgba(40, 185, 130, 0.13);
  box-shadow: inset 0 0 0 1px var(--mint);
}

.result-box {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 8px;
  background: #f7fbff;
}

.result-box div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.result-box span {
  color: var(--muted);
  font-weight: 700;
}

.result-box strong {
  font-family: Nunito, Inter, sans-serif;
  font-size: 1.2rem;
  font-weight: 900;
}

.result-total {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.result-total strong {
  color: #158b64;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 20px;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.button.primary {
  color: #1d2434;
  background: linear-gradient(135deg, var(--sun), #ffe17d);
  box-shadow: 0 16px 34px rgba(255, 188, 69, 0.32);
}

.buy-button {
  width: 100%;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  padding: 14px 18px;
  border-radius: 8px;
  color: #fff;
  background: #172033;
  box-shadow: var(--shadow);
  transform: translateY(90px);
  opacity: 0;
  transition: transform 220ms ease, opacity 220ms ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 860px) {
  .app-shell {
    height: 100dvh;
  }

  .screen-content {
    grid-template-columns: 1fr;
    place-items: center;
    width: min(430px, calc(100% - 24px));
    padding: 12px 0;
  }

  .calculator-card {
    width: 100%;
    gap: 11px;
    padding: 16px;
  }

  .side-copy {
    display: none;
  }

  .side-copy p,
  .card-heading p,
  .summary-text,
  .installment-note {
    font-size: 0.9rem;
    line-height: 1.35;
  }

  h1 {
    font-size: 2.05rem;
  }

  input[type="number"],
  .button {
    min-height: 46px;
  }

  .payment-options span,
  .server-options span {
    min-height: 42px;
  }

  .result-box {
    padding: 12px;
  }

  .brand {
    font-size: 1rem;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 0.82rem;
  }
}

@media (max-width: 380px) {
  .screen-content {
    width: min(360px, calc(100% - 18px));
    padding: 8px 0;
  }

  .calculator-card {
    gap: 9px;
    padding: 12px;
  }

  .card-heading {
    gap: 5px;
  }

  h1 {
    font-size: 1.78rem;
  }

  .field {
    gap: 6px;
  }

  .payment-options,
  .server-options {
    gap: 6px;
  }

  .payment-options span,
  .server-options span {
    min-height: 38px;
    font-size: 0.86rem;
  }

  input[type="number"],
  .button {
    min-height: 42px;
  }

  .result-box {
    gap: 6px;
    padding: 10px;
  }

  .result-box strong {
    font-size: 1.08rem;
  }

  .result-total strong {
    font-size: 1.55rem;
  }
}

@media (max-width: 860px) and (max-height: 720px) {
  .calculator-card {
    gap: 8px;
    padding: 12px;
  }

  .card-heading p {
    display: none;
  }

  h1 {
    font-size: 1.78rem;
  }

  .field {
    gap: 5px;
  }

  input[type="number"],
  .button {
    min-height: 40px;
  }

  .payment-options span,
  .server-options span {
    min-height: 38px;
  }

  .result-box {
    gap: 5px;
    padding: 10px;
  }

  .summary-text,
  .installment-note {
    font-size: 0.84rem;
  }
}

@media (max-height: 720px) and (min-width: 861px) {
  .calculator-card {
    gap: 12px;
    padding: 20px;
  }

  h1 {
    font-size: 2.4rem;
  }

  input[type="number"],
  .button {
    min-height: 48px;
  }

  .payment-options span {
    min-height: 44px;
  }
}
