/* ------------------------------
   Base
------------------------------ */

* {
  box-sizing: border-box;
}

:root {
  --background: #0b1020;
  --surface: #131a2a;
  --surface-light: #1a2336;

  --text: #f8fafc;
  --text-muted: #94a3b8;

  --accent: #7c3aed;
  --accent-hover: #6d28d9;

  --border: rgba(255, 255, 255, 0.08);

  --radius: 18px;
}

body {
  margin: 0;
  min-height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 24px;

  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  color: var(--text);

  background:
    radial-gradient(
      circle at top,
      #1e1b4b 0%,
      var(--background) 45%
    );
}


/* ------------------------------
   Main card
------------------------------ */

.container {
  width: 100%;
  max-width: 520px;

  padding: 42px;

  text-align: center;

  background: rgba(19, 26, 42, 0.92);

  border: 1px solid var(--border);
  border-radius: var(--radius);

  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.35);

  backdrop-filter: blur(12px);
}


/* ------------------------------
   Heading
------------------------------ */

h1 {
  margin: 0;

  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.subtitle {
  margin: 10px 0 30px;

  color: var(--text-muted);

  font-size: 0.95rem;
  line-height: 1.5;
}


/* ------------------------------
   Input
------------------------------ */

input {
  width: 100%;

  padding: 15px 16px;

  font-size: 1rem;

  color: var(--text);

  background: var(--surface-light);

  border: 1px solid var(--border);
  border-radius: 10px;

  outline: none;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

input::placeholder {
  color: #64748b;
}

input:hover {
  background: #202a40;
}

input:focus {
  border-color: var(--accent);

  box-shadow:
    0 0 0 3px rgba(124, 58, 237, 0.18);
}


/* ------------------------------
   QR code area
------------------------------ */

#qrcode {
  min-height: 296px;

  margin: 30px 0;

  display: flex;
  justify-content: center;
  align-items: center;
}

#qrcode:empty::before {
  content: "Your QR code will appear here";

  color: #64748b;

  font-size: 0.9rem;
}

#qrcode canvas,
#qrcode img {
  display: block;

  padding: 18px;

  background: white;

  border-radius: 14px;

  box-shadow:
    0 15px 40px rgba(0, 0, 0, 0.3);
}


/* ------------------------------
   Download button
------------------------------ */

button {
  width: 100%;

  padding: 15px 20px;

  border: none;
  border-radius: 10px;

  font-size: 1rem;
  font-weight: 600;

  background: var(--accent);
  color: white;

  cursor: pointer;

  transition:
    background 0.2s ease,
    transform 0.1s ease,
    box-shadow 0.2s ease;
}

button:hover:not(:disabled) {
  background: var(--accent-hover);

  box-shadow:
    0 8px 25px rgba(124, 58, 237, 0.3);
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

button:disabled {
  background: #334155;
  color: #64748b;

  cursor: not-allowed;
}


/* ------------------------------
   Privacy note
------------------------------ */

.note {
  margin: 24px 0 0;

  color: var(--text-muted);

  font-size: 0.8rem;
  line-height: 1.5;
}


/* ------------------------------
   Mobile
------------------------------ */

@media (max-width: 600px) {

  body {
    padding: 16px;
  }

  .container {
    padding: 30px 20px;
  }

  h1 {
    font-size: 1.7rem;
  }

  #qrcode {
    min-height: 270px;
  }
}

.brand {
  margin-bottom: 10px;

  color: #a78bfa;

  font-size: 0.72rem;
  font-weight: 700;

  letter-spacing: 0.18em;
}