/* /qr-tool/styles.css */
:root {
  --bg: #0f172a;
  --panel: #111827;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #22c55e;
  --accent-hover: #16a34a;
  --danger: #ef4444;
  --border: #334155;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background: radial-gradient(circle at top, #1e293b 0%, #0f172a 45%), var(--bg);
  color: var(--text);
  display: grid;
  place-items: center;
  padding: 24px;
}

.app {
  width: 100%;
  max-width: 980px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  background: rgba(17, 24, 39, 0.92);
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.panel {
  padding: 28px;
}

.left {
  background: linear-gradient(180deg, rgba(31, 41, 55, 0.55), rgba(17, 24, 39, 0.25));
  border-right: 1px solid rgba(51, 65, 85, 0.8);
}

h1 {
  margin: 0 0 10px;
  font-size: 2rem;
  line-height: 1.1;
}

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

form {
  display: grid;
  gap: 16px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.95rem;
  font-weight: 700;
}

textarea,
select,
button {
  font: inherit;
}

textarea {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  padding: 14px 16px;
  color: var(--text);
  background: #0b1220;
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

select {
  width: 100%;
  padding: 12px 14px;
  color: var(--text);
  background: #0b1220;
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: none;
  cursor: pointer;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}

button {
  border: 0;
  border-radius: 14px;
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease, background 0.2s ease;
}

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

.generate-btn {
  background: var(--accent);
  color: #052e16;
  font-weight: 600;
  width: 100%;
}

.generate-btn:hover:not(:disabled) {
  background: var(--accent-hover);
}

.download-btn {
  background: #e5e7eb;
  color: #111827;
  font-weight: 700;
}

.download-btn:disabled {
  pointer-events: none;
  opacity: 0.45;
}

.message {
  min-height: 22px;
  font-size: 0.95rem;
  color: var(--danger);
}

.right {
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.4), rgba(2, 6, 23, 0.25));
}

.preview-card {
  width: 100%;
  max-width: 380px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 22px;
  padding: 22px;
  text-align: center;
}

.preview-title {
  margin: 0 0 14px;
  font-size: 1rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.qr-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  background: white;
  border-radius: 18px;
  overflow: hidden;
  padding: 14px;
}

.qr-preview {
  display: none;
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1 / 1;
}

.qr-preview svg {
  display: block;
  width: 100%;
  height: 100%;
}

.placeholder {
  color: #475569;
  font-weight: 700;
  padding: 20px;
  line-height: 1.5;
}

.meta {
  margin-top: 14px;
  font-size: 0.9rem;
  color: var(--muted);
  word-break: break-word;
}

.site-footer {
  width: 100%;
  max-width: 980px;
  margin: 16px auto 0;
  padding: 0 24px 24px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.6;
  text-align: center;
}

.site-footer p {
  margin: 6px 0;
}

.site-footer code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95em;
}

.site-footer a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-footer a:hover {
  opacity: 0.9;
}

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

  .left {
    border-right: 0;
    border-bottom: 1px solid rgba(51, 65, 85, 0.8);
  }

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

  h1 {
    font-size: 1.7rem;
  }
}