/* ═══════════════════════════════════════════════
   KUNAL — Next-Gen Plus Checkout Orchestrator v2
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #0b0f0d;
  --card-bg: #0f1412;
  --card-border: rgba(45, 212, 160, 0.08);
  --card-border-hover: rgba(45, 212, 160, 0.15);
  --input-bg: #111916;
  --input-border: rgba(255, 255, 255, 0.06);
  --input-border-focus: rgba(45, 212, 160, 0.35);
  --accent: #2dd4a0;
  --accent-dim: rgba(45, 212, 160, 0.15);
  --accent-glow: rgba(45, 212, 160, 0.25);
  --text: #e4e8e6;
  --text-secondary: #7a8a82;
  --text-muted: #4a5a52;
  --gold: #e8b84a;
  --red: #e05555;
  --font: 'Inter', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── Background Glows ───────────────────────── */
.bg-glow {
  position: fixed; border-radius: 50%; pointer-events: none;
  filter: blur(120px); opacity: .35;
}
.bg-glow-1 {
  width: 500px; height: 500px;
  top: -100px; right: -100px;
  background: radial-gradient(circle, rgba(100, 60, 180, .4), transparent 70%);
}
.bg-glow-2 {
  width: 400px; height: 400px;
  bottom: -50px; left: -80px;
  background: radial-gradient(circle, rgba(45, 212, 160, .15), transparent 70%);
}

/* ─── Container ──────────────────────────────── */
.container {
  position: relative; z-index: 1;
  max-width: 680px; margin: 0 auto; padding: 36px 20px 32px;
}

/* ─── Main Card ──────────────────────────────── */
.main-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 36px 32px 32px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.02) inset,
    0 24px 64px rgba(0, 0, 0, .5),
    0 0 120px rgba(45, 212, 160, .03);
  overflow: hidden;
  text-align: center;
}

/* ─── System Badge ───────────────────────────── */
.system-badge {
  display: inline-flex; align-items: center; gap: 7px;
  margin: 0 auto 16px; padding: 6px 18px;
  border-radius: 100px;
  background: rgba(45, 212, 160, .08);
  border: 1px solid rgba(45, 212, 160, .18);
  font-size: .68rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent);
}
.system-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--accent-glow); }
  50% { opacity: .5; box-shadow: 0 0 3px var(--accent-glow); }
}

/* ─── Brand ──────────────────────────────────── */
.brand {
  font-size: 3rem; font-weight: 900; letter-spacing: .08em;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1;
}
.brand-sub {
  font-size: .82rem; font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: .04em;
  margin-bottom: 20px;
}

/* ─── Free Trial Banner ──────────────────────── */
.free-trial-banner {
  position: relative;
  margin-bottom: 24px;
  padding: 20px 22px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(45, 212, 160, .08), rgba(100, 60, 180, .06));
  border: 1px solid rgba(45, 212, 160, .2);
  overflow: hidden;
  animation: bannerGlow 3s ease-in-out infinite;
}
@keyframes bannerGlow {
  0%, 100% { border-color: rgba(45, 212, 160, .2); box-shadow: 0 0 20px rgba(45, 212, 160, .05); }
  50% { border-color: rgba(45, 212, 160, .35); box-shadow: 0 0 30px rgba(45, 212, 160, .1); }
}
.trial-glow {
  position: absolute; top: -30px; right: -30px;
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 212, 160, .15), transparent 70%);
  pointer-events: none;
}
.trial-content { position: relative; z-index: 1; }
.trial-badge {
  display: inline-block;
  padding: 4px 14px; border-radius: 100px;
  background: rgba(45, 212, 160, .12);
  border: 1px solid rgba(45, 212, 160, .25);
  font-size: .7rem; font-weight: 700;
  letter-spacing: .1em; color: var(--accent);
  margin-bottom: 10px;
}
.trial-text {
  font-size: 1.1rem; font-weight: 600; color: var(--text);
  margin-bottom: 4px;
}
.trial-text strong { color: var(--accent); }
.trial-sub {
  font-size: .76rem; color: var(--text-secondary);
}

/* ─── Step Indicators ────────────────────────── */
.steps-bar {
  display: flex; justify-content: center; gap: 16px;
  margin-bottom: 28px;
}
.step-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.step-line {
  width: 50px; height: 3px; border-radius: 2px;
  background: rgba(255, 255, 255, .08);
  transition: background var(--transition), box-shadow var(--transition);
}
.step-line.active {
  background: var(--accent);
  box-shadow: 0 0 10px rgba(45, 212, 160, .3);
}
.step-label {
  font-size: .6rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted);
}

/* ─── Field Labels ───────────────────────────── */
.field-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.field-label {
  font-size: .68rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-secondary);
}
.field-tag {
  font-size: .66rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition);
}
.field-tag.tag-ok { color: var(--accent); }
.field-tag.tag-warn { color: var(--gold); }
.field-tag.tag-error { color: var(--red); }

/* ─── Input Section ──────────────────────────── */
.input-section {
  text-align: left;
  margin-bottom: 20px;
}
.textarea-wrap { position: relative; }
textarea {
  width: 100%; height: 120px; padding: 14px 16px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--mono); font-size: .78rem; line-height: 1.6;
  resize: vertical; outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
textarea:focus {
  border-color: var(--input-border-focus);
  box-shadow: 0 0 0 3px rgba(45, 212, 160, .08);
}
textarea::placeholder { color: var(--text-muted); font-size: .74rem; }

/* ─── Controls Row ───────────────────────────── */
.controls-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  text-align: left;
  margin-bottom: 16px;
}
.control-group { display: flex; flex-direction: column; gap: 8px; }
.control-group .field-label { font-size: .63rem; }

/* Mode Toggle */
.mode-toggle {
  display: flex; gap: 6px;
}
.mode-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 12px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font); font-size: .74rem; font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  transition: all var(--transition);
}
.mode-btn:hover { border-color: rgba(255,255,255,.12); color: var(--text-secondary); }
.mode-btn.active {
  background: rgba(45, 212, 160, .08);
  border-color: rgba(45, 212, 160, .25);
  color: var(--accent);
}

/* Select */
.select-wrap { position: relative; }
.select-wrap select {
  width: 100%; padding: 11px 36px 11px 14px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font); font-size: .78rem; font-weight: 600;
  letter-spacing: .02em;
  outline: none; appearance: none; cursor: pointer;
  transition: border-color var(--transition);
}
.select-wrap select:focus { border-color: var(--input-border-focus); }
.select-arrow {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none;
}

/* ─── Proxy Section ──────────────────────────── */
.proxy-section {
  text-align: left;
  margin-bottom: 20px;
}
.proxy-input {
  width: 100%; padding: 11px 14px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--mono); font-size: .76rem;
  outline: none;
  transition: border-color var(--transition);
  margin-bottom: 8px;
}
.proxy-input:focus { border-color: var(--input-border-focus); }
.proxy-input::placeholder { color: var(--text-muted); }

.btn-check-ip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-family: var(--font); font-size: .72rem; font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-check-ip:hover { border-color: rgba(255,255,255,.15); color: var(--text); }
.btn-check-ip:disabled { opacity: .5; cursor: not-allowed; }
.btn-spinner {
  display: inline-block; width: 12px; height: 12px;
  border: 2px solid rgba(255,255,255,.15); border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}

.ip-result {
  margin-top: 8px; padding: 10px 14px;
  border-radius: 8px; font-size: .78rem;
}
.ip-result.ip-ok {
  background: rgba(45, 212, 160, .06);
  border: 1px solid rgba(45, 212, 160, .15);
  color: var(--accent);
}
.ip-result.ip-error {
  background: rgba(224, 85, 85, .06);
  border: 1px solid rgba(224, 85, 85, .15);
  color: var(--red);
}

/* ─── Ignite Button ──────────────────────────── */
.btn-ignite {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 24px; border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #2dd4a0, #22b88a);
  color: #091a14;
  font-family: var(--font); font-size: .92rem; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 24px rgba(45, 212, 160, .25), 0 0 60px rgba(45, 212, 160, .08);
}
.btn-ignite:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 36px rgba(45, 212, 160, .35), 0 0 80px rgba(45, 212, 160, .12);
  background: linear-gradient(135deg, #3de0af, #2dd4a0);
}
.btn-ignite:active { transform: translateY(0); }
.btn-ignite:disabled {
  opacity: .5; cursor: not-allowed; transform: none;
  box-shadow: 0 4px 24px rgba(45, 212, 160, .1);
}

/* ─── Results ────────────────────────────────── */
.results-section { text-align: left; }
.result-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--card-border-hover), transparent);
  margin: 24px 0;
}

/* Promo */
.promo-tag {
  padding: 14px 18px; border-radius: var(--radius-sm);
  font-size: .82rem; line-height: 1.5; margin-bottom: 16px;
  display: flex; align-items: flex-start; gap: 4px;
}
.promo-icon { font-size: 1.1rem; line-height: 1; }
.promo-tag.promo-ok {
  background: rgba(45, 212, 160, .06);
  border: 1px solid rgba(45, 212, 160, .18);
  color: var(--accent);
}
.promo-tag.promo-no {
  background: rgba(255, 180, 50, .06);
  border: 1px solid rgba(255, 180, 50, .15);
  color: #e8b84a;
}

/* Trial Result Card */
.trial-result-card {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px; border-radius: var(--radius-sm);
  margin-bottom: 18px;
}
.trial-result-card.trial-eligible {
  background: linear-gradient(135deg, rgba(45, 212, 160, .08), rgba(45, 212, 160, .03));
  border: 1px solid rgba(45, 212, 160, .2);
}
.trial-result-card.trial-not-eligible {
  background: rgba(255, 255, 255, .02);
  border: 1px solid var(--input-border);
}
.trial-result-icon {
  font-size: 2rem; flex-shrink: 0;
  width: 50px; height: 50px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.03);
  border-radius: 12px;
}
.trial-result-info { flex: 1; }
.trial-result-title {
  font-size: .92rem; font-weight: 700; color: var(--text);
  margin-bottom: 4px;
}
.trial-eligible .trial-result-title { color: var(--accent); }
.trial-result-desc {
  font-size: .78rem; color: var(--text-secondary); line-height: 1.5;
}

/* Account */
.account-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-bottom: 8px;
}
.account-card {
  padding: 13px 15px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
}
.account-card .label {
  font-size: .6rem; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .1em; margin-bottom: 5px;
}
.account-card .value { font-size: .84rem; font-weight: 600; word-break: break-all; color: var(--text); }
.account-card .value.plan { color: var(--accent); }
.account-summary { font-size: .72rem; color: var(--text-muted); margin-top: 4px; margin-bottom: 14px; }

/* Checkout Links */
.checkout-link-item {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  background: rgba(45, 212, 160, .04);
  border: 1px solid rgba(45, 212, 160, .12);
  border-radius: var(--radius-sm); margin-bottom: 10px;
  transition: border-color var(--transition);
}
.checkout-link-item:hover { border-color: rgba(45, 212, 160, .25); }
.checkout-link-item .link-icon {
  flex-shrink: 0; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(45, 212, 160, .1); border-radius: 10px; color: var(--accent);
}
.checkout-link-item .link-content { flex: 1; min-width: 0; }
.checkout-link-item .link-url {
  font-family: var(--mono); font-size: .7rem;
  color: var(--accent); word-break: break-all; line-height: 1.4;
}
.btn-copy, .btn-open {
  flex-shrink: 0; padding: 8px 14px;
  border: 1px solid rgba(45, 212, 160, .2); border-radius: 8px;
  background: rgba(45, 212, 160, .06); color: var(--accent);
  font-family: var(--font); font-size: .72rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
  cursor: pointer; transition: all var(--transition);
}
.btn-copy:hover, .btn-open:hover {
  background: var(--accent); color: #091a14;
  border-color: var(--accent);
}
.btn-copy.copied {
  background: var(--accent); color: #091a14;
  border-color: var(--accent);
}
.no-links {
  padding: 24px; text-align: center;
  color: var(--text-secondary); font-size: .82rem;
  background: rgba(255, 180, 50, .04);
  border: 1px solid rgba(255, 180, 50, .1);
  border-radius: var(--radius-sm); line-height: 1.7;
}
.no-links .no-links-icon { font-size: 1.5rem; margin-bottom: 8px; }
.no-links ul {
  text-align: left; display: inline-block; margin-top: 8px;
  list-style: none;
}
.no-links ul li {
  font-size: .76rem; color: var(--text-muted);
  padding: 2px 0;
}
.no-links ul li::before {
  content: '→ '; color: var(--gold);
}

/* ─── Debug ──────────────────────────────────── */
.debug-section { margin-top: 18px; }
.debug-section summary {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 8px;
  font-size: .68rem; font-weight: 600; color: var(--text-muted);
  letter-spacing: .1em; text-transform: uppercase;
  cursor: pointer; list-style: none;
  transition: all var(--transition);
}
.debug-section summary::-webkit-details-marker { display: none; }
.debug-section summary:hover { color: var(--text-secondary); background: rgba(255,255,255,.02); }
.debug-section pre {
  margin-top: 8px; padding: 14px;
  background: rgba(0, 0, 0, .3);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  font-family: var(--mono); font-size: .68rem;
  color: var(--text-muted);
  overflow-x: auto; max-height: 300px; overflow-y: auto;
  white-space: pre-wrap; word-break: break-all;
}

/* ─── Loading ────────────────────────────────── */
.loading-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: rgba(11, 15, 13, .92); backdrop-filter: blur(12px);
  border-radius: var(--radius); z-index: 10;
}
.spinner {
  width: 36px; height: 36px;
  border: 2.5px solid rgba(45, 212, 160, .12);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay p { font-size: .82rem; color: var(--text-secondary); letter-spacing: .02em; }

/* ─── Instructions ───────────────────────────── */
.instructions {
  text-align: left; margin-top: 20px; padding: 18px 22px;
  font-size: .74rem; color: var(--text-muted); line-height: 1.8;
  background: rgba(255,255,255,.015);
  border: 1px solid rgba(255,255,255,.04);
  border-radius: var(--radius-sm);
}
.instructions strong {
  display: block; margin-bottom: 6px;
  color: var(--text-secondary); letter-spacing: .06em;
  font-size: .72rem;
}
.instructions code {
  padding: 2px 6px; border-radius: 4px;
  background: rgba(45, 212, 160, .08);
  color: var(--accent);
  font-family: var(--mono); font-size: .72rem;
}
.instructions a {
  color: var(--accent); text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
}
.instructions a:hover { color: #3de0af; }
.inst-note {
  display: block; margin-top: 8px;
  font-size: .7rem; color: var(--text-muted);
  font-style: italic;
}

/* ─── Toast Notification ─────────────────────── */
.toast-msg {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; border-radius: 12px;
  font-size: .82rem; font-weight: 500;
  z-index: 9999;
  animation: toastIn .3s ease;
  max-width: 90vw;
}
.toast-msg button {
  background: none; border: none; color: inherit;
  font-size: .9rem; cursor: pointer; opacity: .7;
  padding: 0 0 0 8px;
}
.toast-msg button:hover { opacity: 1; }
.toast-info {
  background: rgba(45, 212, 160, .12);
  border: 1px solid rgba(45, 212, 160, .25);
  color: var(--accent);
}
.toast-error {
  background: rgba(224, 85, 85, .12);
  border: 1px solid rgba(224, 85, 85, .25);
  color: #f08080;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ─── Animations ─────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.results-section > div { animation: fadeIn .4s ease; }

/* ─── Responsive ─────────────────────────────── */
@media (max-width: 640px) {
  .container { padding: 16px 12px; }
  .main-card { padding: 24px 18px 22px; }
  .brand { font-size: 2.2rem; }
  .brand-sub { font-size: .76rem; }
  .free-trial-banner { padding: 16px; }
  .trial-text { font-size: .95rem; }
  .controls-row { grid-template-columns: 1fr; }
  .account-grid { grid-template-columns: 1fr; }
  .checkout-link-item { flex-wrap: wrap; }
  .checkout-link-item .link-icon { display: none; }
  .mode-btn { font-size: .7rem; padding: 10px 8px; }
  .steps-bar { gap: 10px; }
  .step-line { width: 40px; }
}
