/* ===== Base ===== */
* {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #020617;
  color: #e5e7eb;
  overflow: hidden;
}

/* ===== Background ===== */
.background {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(700px at 20% 10%, #2563eb33, transparent 45%),
    radial-gradient(900px at 80% 90%, #22d3ee22, transparent 45%);
  z-index: -1;
}

/* ===== Card ===== */
.card {
  width: min(680px, 94vw);
  background: rgba(2, 6, 23, 0.85);
  border: 1px solid #1e293b;
  border-radius: 24px;
  padding: 34px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
}

/* ===== Header ===== */
header {
  text-align: center;
  margin-bottom: 22px;
}

h1 {
  margin: 0;
  font-size: 32px;
  letter-spacing: 0.3px;
}

header p {
  margin-top: 8px;
  font-size: 16px;
  opacity: 0.75;
}

/* ===== Form ===== */
.form {
  display: grid;
  gap: 14px;
}

input {
  width: 100%;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid #334155;
  background: #020617;
  color: #e5e7eb;
  font-size: 17px;
}

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

input:focus {
  outline: none;
  border-color: #2563eb;
}

/* ===== Button ===== */
button {
  padding: 16px 18px;
  border-radius: 16px;
  border: none;
  background: linear-gradient(135deg, #2563eb, #22d3ee);
  color: #020617;
  font-weight: 800;
  font-size: 17px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px #2563eb55;
}

/* ===== Output ===== */
.output {
  margin-top: 24px;
  display: grid;
  justify-items: center;
  gap: 14px;
}

.qr-box {
  position: relative;
  background: white;
  padding: 18px;
  border-radius: 18px;
  min-height: 320px;
  min-width: 320px;
  display: grid;
  place-items: center;
  overflow: hidden; /* para que la animación no “salga” */
}

/* Placeholder */
.qr-placeholder {
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f6f7fb);
  border: 1px dashed rgba(2, 6, 23, 0.2);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 18px;
  gap: 10px;
}

.qr-placeholder__icon svg {
  fill: rgba(2, 6, 23, 0.55);
}

.qr-placeholder__text strong {
  display: block;
  color: rgba(2, 6, 23, 0.85);
  font-size: 14px;
  margin-bottom: 4px;
}

.qr-placeholder__text span {
  display: block;
  color: rgba(2, 6, 23, 0.55);
  font-size: 13px;
}

/* Ocultar placeholder cuando hay QR */
.qr-box.has-qr .qr-placeholder {
  display: none;
}

.download {
  color: #93c5fd;
  text-decoration: none;
  border: 1px solid #334155;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 15px;
}

.hidden {
  display: none;
}

/* ===== Footer ===== */
footer {
  margin-top: 22px;
  text-align: center;
  font-size: 12px;
  opacity: 0.6;
}

/* ===== Desktop Enhancements ===== */
@media (min-width: 900px) {
  .card {
    width: min(820px, 92vw);
    padding: 40px;
  }

  h1 { font-size: 36px; }
  header p { font-size: 17px; }

  .qr-box {
    min-width: 360px;
    min-height: 360px;
  }
}

/* ===== Mobile ===== */
@media (max-width: 420px) {
  .qr-box {
    min-width: 260px;
    min-height: 260px;
  }
}


