:root {
  --bg: #0b0e13;
  --card: #121723;
  --text: #e8edf5;
  --muted: #a6b0c3;
  --accent1: #6ee7f9;
  --accent2: #8b5cf6;
  --border: #ffffff1a;
  --radius: 1rem;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2 { font-weight: 700; margin: 0; }

a { color: var(--accent1); text-decoration: none; }
a:hover { text-decoration: underline; }

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(1rem + 10px) 2rem 1rem;
  background:
    linear-gradient(90deg, var(--accent1), var(--accent2)) top/100% 10px no-repeat,
    var(--card);
  border-bottom: 1px solid var(--border);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  opacity: 0.95;
}

.brand-name {
  font-size: 1.5rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

.container {
  position: relative;
  flex: 1;
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem 1rem;
  text-align: center;
}

/* A4: subtle spotlight behind the card area */
.container::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 260px;
  transform: translateX(-50%);
  width: min(900px, 140vw);
  height: 520px;
  background:
    radial-gradient(closest-side, rgba(139,92,246,0.18), rgba(110,231,249,0.10), rgba(0,0,0,0) 70%);
  filter: blur(18px);
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
}

.container > * {
  position: relative;
  z-index: 1;
}

.subtitle { color: var(--muted); margin-bottom: 2rem; }

.card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin: 1.5rem auto;
  text-align: left;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

.card h2 { margin-bottom: 1rem; }

/* A1: form card title */
.card-title {
  text-align: center;
  font-size: 1.65rem;
  margin-bottom: 1.25rem;
}

/* A2: microcopy under expiry */
.field-hint {
  margin: -0.5rem 0 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: left;
}

label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

input[type="url"],
input[type="number"],
input[type="text"],
input[type="datetime-local"],
select {
  width: 100%;
  padding: 0.6rem;
  margin-top: 0.3rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

/* Make select look consistent */
select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% + 2px),
    calc(100% - 12px) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.25rem;
}

.custom-expiry {
  margin-top: 0.25rem;
}

/* Custom duration grid */
.custom-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.custom-field-label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.custom-duration-hint {
  margin: 0.65rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: left;
}

.hidden { display: none; }

.button-group {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.gap { gap: 0.75rem; }

/* A3: full-width CTA for the FORM card only */
section.card:not(#resultCard) .button-group {
  justify-content: stretch;
}
section.card:not(#resultCard) .button-group .btn {
  width: 100%;
}

.btn {
  cursor: pointer;
  padding: 0.85rem 1.5rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-primary {
  color: var(--bg);
  background-image: linear-gradient(90deg, var(--accent1), var(--accent2));
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.btn-ghost {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.hint { font-size: 0.85rem; color: var(--muted); margin-top: 0.5rem; text-align: center; }

.countdown {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 1rem;
  text-align: center;
  margin: 0.5rem 0;
  letter-spacing: 0.03em;
}

/* (1) Benefits section */
.benefits {
  margin: 1.25rem auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
  text-align: left;
}

.benefit {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 0.95);
  padding: 0.9rem 1rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
}

.benefit-title {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.benefit-text {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.3;
}

.benefits-note {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 2rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
  text-decoration: none;
}

@media (max-width: 700px) {
  .benefits {
    grid-template-columns: 1fr;
  }

  /* Mobile: show benefits as a clean bullet list (no boxes) */
  .benefit {
    border: 0;
    background: transparent;
    border-radius: 0;
    padding: 0 0 0 1.15rem;
    position: relative;
  }

  .benefit::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.38rem; /* moved up to align with the title line */
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
  }
}

@media (max-width: 520px) {
  .container { padding: 1.5rem 1rem; }
  .card { padding: 1.4rem; }
  .button-group { flex-wrap: wrap; }

  .navbar {
    padding: calc(0.9rem + 10px) 1rem 0.9rem;
  }

  .nav-links {
    gap: 0.9rem;
  }

  .footer {
    flex-direction: column;
    padding: 1rem;
    text-align: center;
  }
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.9rem 1.25rem;
  }

  .card-title {
    font-size: 1.45rem;
  }

  .container::before {
    top: 240px;
    height: 520px;
    opacity: 0.85;
  }

  .custom-grid {
    grid-template-columns: 1fr;
  }
}

/* =========
   Compact, readable QR + link (FREE UI)
   ========= */

#resultCard { text-align: center; }
#resultCard h2 { text-align: left; }

/* Canvas is generated at a compact pixel size in JS.
   CSS keeps it tidy and centered without upscaling. */
#qrcode {
  display: block;
  margin: 0.75rem auto 0.75rem;
  max-width: 100%;
  height: auto;
  border-radius: calc(var(--radius) * 0.75);
}

/* Short display link (JS already shortens text). Keep it neat. */
#generatedLink {
  display: block;
  max-width: 100%;
  margin-top: 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 0.75);
  background: rgba(255,255,255,0.02);
  color: var(--accent1);
  text-decoration: none;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 520px) {
  /* On small screens, allow wrapping for readability */
  #generatedLink {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    text-overflow: clip;
    overflow: visible;
  }
}

/* =========
   Static pages (Terms / Privacy / FAQ / Feedback)
   ========= */

.page {
  flex: 1;
  max-width: 780px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.page-hero {
  text-align: left;
  margin: 0.25rem 0 1rem;
}

.page-title {
  font-size: 2rem;
  line-height: 1.15;
  margin: 0 0 0.35rem 0;
}

.page-subtitle {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.page-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.25rem 0;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

.prose {
  color: var(--text);
  line-height: 1.65;
  font-size: 0.98rem;
}

.prose p { margin: 0.75rem 0; color: var(--text); }
.prose ul { margin: 0.75rem 0 0.75rem 1.25rem; color: var(--text); }
.prose li { margin: 0.4rem 0; }
.prose strong { color: var(--text); }
.prose .muted { color: var(--muted); }

.kv {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0.75rem 1rem;
  margin-top: 0.75rem;
}

.kv .k {
  color: var(--muted);
  font-weight: 600;
}

.kv .v {
  color: var(--text);
  word-break: break-word;
}

.faq {
  margin-top: 0.5rem;
}

.faq details {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 0.85);
  padding: 0.85rem 1rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  margin: 0.75rem 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
}

.faq details p {
  margin: 0.65rem 0 0.25rem;
  color: var(--muted);
}

.feedback-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

@media (max-width: 520px) {
  .page-title { font-size: 1.6rem; }
  .kv { grid-template-columns: 1fr; }
}

/* Modal (left as-is even if unused right now) */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}
.modal.open { display: flex; }
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(2px);
}
.modal-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.25);
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
  width: min(920px, 92vw);
  max-height: 88vh;
  overflow: auto;
  padding: 1.25rem;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.modal-close {
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 2.25rem;
  height: 2.25rem;
  line-height: 2.05rem;
  text-align: center;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.plan {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
}
.plan h3 { margin: 0 0 .5rem 0; }
.plan ul {
  list-style: none;
  padding: 0;
  margin: .25rem 0 .75rem;
}
.plan ul li { margin: .25rem 0; color: var(--muted); }
.plan .price {
  font-size: 1.25rem;
  font-weight: 700;
  margin: .25rem 0 .75rem 0;
}
