* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg,#667eea 0%,#764ba2 100%);
  color: #111827;
}

.container {
  width: 360px;
  padding: 36px;
  border-radius: 20px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  text-align: center;
}

h1 {
  font-size: 1.5rem;
  color: #ffffff;
  margin-bottom: 18px;
}

input#text {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: none;
  outline: none;
  font-size: 0.98rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  margin-bottom: 12px;
}

button#generate {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg,#43e97b,#38f9d7);
  color: #003;
  transition: transform .12s ease, box-shadow .12s ease;
}
button#generate:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.2); }
button#generate:active { transform: translateY(-1px); }

.qr-wrap {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#qrcode {
  width: 200px;
  height: 200px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}

#qrcode img, #qrcode canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

#qrcode.placeholder {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.placeholder-text {
  color: rgba(255,255,255,0.7);
  font-size: 0.92rem;
}

.controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 12px;
}

#download {
  padding: 9px 12px;
  border-radius: 10px;
  border: none;
  background: rgba(255,255,255,0.95);
  cursor: pointer;
  font-weight: 700;
  display: none;
}

.hint {
  margin-top: 10px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.85);
}

#qrcode.has-qr { transform: scale(1.02); box-shadow: 0 12px 32px rgba(0,0,0,0.2); }

footer {
  margin-top: 20px;
  font-size: 0.75rem;
  color: rgb(255, 255, 255);
}
