@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --gq-teal: #57a7b0;
  --gq-teal-dark: #2b656c;
  --gq-pink: #f63b93;
  --gq-green: #22c55e;
  --gq-glass: rgba(255, 255, 255, 0.72);
  --gq-glass-border: rgba(255, 255, 255, 0.45);
  --gq-text: #0f172a;
  --gq-muted: #64748b;
  --gq-radius: 1.25rem;
  --gq-font: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }

body.gq-page {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--gq-font);
  color: var(--gq-text);
  background: var(--gq-teal);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 3.25rem 1rem 1.25rem;
  position: relative;
  overflow-x: hidden;
}

.gq-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 15% 0%, rgba(255,255,255,0.35), transparent 50%),
    radial-gradient(ellipse 60% 45% at 90% 90%, rgba(43,101,108,0.5), transparent 55%),
    linear-gradient(160deg, #6ebec7 0%, var(--gq-teal) 40%, var(--gq-teal-dark) 100%);
}

.gq-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.5rem 0 1.5rem;
}

.gq-card {
  background: var(--gq-glass);
  backdrop-filter: blur(24px) saturate(1.25);
  -webkit-backdrop-filter: blur(24px) saturate(1.25);
  border: 1px solid var(--gq-glass-border);
  border-radius: var(--gq-radius);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255,255,255,0.6);
  padding: 1.75rem 1.5rem 1.5rem;
  text-align: center;
  position: relative;
  margin-top: 3em;
  padding-top: 0.5em;
}

.gq-logo-float {
  width: 88px;
  height: auto;
  position: absolute;
  top: -4em;
  left: 50%;
  transform: translateX(-50%);
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.15));
}

.gq-title {
  margin: 0.5rem 0 0.25rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.gq-sub {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--gq-muted);
}

.gq-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
  background: rgba(255,255,255,0.45);
  border-radius: 12px;
  padding: 0.25rem;
}

.gq-tab {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.45rem 0.2rem;
  border-radius: 10px;
  color: var(--gq-muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.gq-tab .gq-tab-icon {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.15rem;
}

.gq-tab.active {
  background: #fff;
  color: var(--gq-teal-dark);
  box-shadow: 0 2px 8px rgba(15,23,42,0.08);
}

.gq-panel { text-align: left; }
.gq-panel.gq-hide { display: none !important; }

.gq-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gq-muted);
  margin-bottom: 0.35rem;
}

.gq-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  font-size: 1rem;
  font-family: inherit;
  background: rgba(255,255,255,0.85);
  margin-bottom: 0.65rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.gq-input:focus {
  outline: none;
  border-color: var(--gq-teal);
  box-shadow: 0 0 0 3px rgba(87, 167, 176, 0.25);
}

.gq-style-section {
  margin: 1rem 0 0.5rem;
  text-align: left;
}
.gq-style-label {
  margin-bottom: 0.5rem;
}

.gq-style-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.45rem;
}

@media (max-width: 360px) {
  .gq-style-presets { grid-template-columns: repeat(2, 1fr); }
}

.gq-preset {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.55rem 0.25rem;
  min-height: 4.25rem;
  border: 2px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: border-color 0.15s, transform 0.12s, box-shadow 0.15s;
}
.gq-preset:active { transform: scale(0.96); }
.gq-preset.active {
  border-color: var(--gq-teal-dark);
  box-shadow: 0 0 0 3px rgba(87, 167, 176, 0.35);
}
.gq-preset-swatch {
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.gq-preset-name {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--gq-text);
  line-height: 1.15;
  text-align: center;
}

.gq-size-chips {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.gq-chip {
  flex: 1;
  min-height: 2.75rem;
  border: 2px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--gq-teal-dark);
  cursor: pointer;
  touch-action: manipulation;
}
.gq-chip.active {
  border-color: var(--gq-teal-dark);
  background: rgba(87, 167, 176, 0.22);
}

.gq-adv-colors {
  margin-bottom: 0.65rem;
}
.gq-adv-colors summary {
  font-size: 0.85rem;
  color: var(--gq-muted);
  cursor: pointer;
  margin-bottom: 0.5rem;
}

.gq-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 0.5rem;
}

@media (max-width: 400px) {
  .gq-grid-2 { grid-template-columns: 1fr; }
}

.gq-section-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gq-teal-dark);
  margin: 0.75rem 0 0.5rem;
}

.gq-btn {
  width: 100%;
  padding: 0.85rem 1rem;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  margin-top: 0.25rem;
}
.gq-btn:active { transform: scale(0.98); }
.gq-btn-primary {
  background: linear-gradient(135deg, #4ade80, var(--gq-green));
  color: #fff;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.35);
}
.gq-btn-secondary {
  background: linear-gradient(135deg, var(--gq-teal), var(--gq-teal-dark));
  color: #fff;
  box-shadow: 0 8px 24px rgba(43, 101, 108, 0.3);
}

.gq-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  font-size: 0.95rem;
  font-family: inherit;
  background: rgba(255,255,255,0.85);
  margin-bottom: 0.65rem;
  color: var(--gq-text);
}

.gq-textarea {
  min-height: 100px;
  resize: vertical;
}

.gq-hint {
  font-size: 0.78rem;
  color: var(--gq-muted);
  margin: -0.35rem 0 0.65rem;
  line-height: 1.35;
}

.gq-link-fields.gq-hide { display: none !important; }

.gq-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--gq-muted);
  margin-bottom: 0.65rem;
}
.gq-check input { width: auto; margin: 0; }

.gq-footer {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin-top: auto;
  flex-shrink: 0;
  z-index: 1;
  background: rgba(43, 101, 108, 0.92);
  backdrop-filter: blur(12px);
  color: #fff;
  text-align: center;
  padding: 0.85rem 1rem;
  font-size: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.65rem 1rem;
  border-radius: var(--gq-radius) var(--gq-radius) 0 0;
}
.gq-footer a { color: #fff; text-decoration: none; opacity: 0.9; }
.gq-footer a:hover { opacity: 1; }
.gq-footer img { max-height: 1.75rem; filter: brightness(0) invert(1); opacity: 0.85; }

.gq-hide { display: none !important; }

.gq-preview {
  text-align: left;
  background: rgba(87, 167, 176, 0.14);
  border: 1px solid rgba(87, 167, 176, 0.25);
  border-radius: 12px;
  padding: 0.65rem 0.85rem;
  margin-bottom: 1rem;
}
.gq-preview-type {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gq-teal-dark);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.25rem;
}
.gq-preview-text {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.4;
  word-break: break-word;
  color: var(--gq-text);
}

.gq-qr-preview {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px dashed rgba(87, 167, 176, 0.45);
}
.gq-qr-preview-label {
  margin: 0 0 0.15rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gq-teal-dark);
}
.gq-qr-preview-placeholder {
  margin: 0;
  font-size: 0.82rem;
  color: var(--gq-muted);
  padding: 1.5rem 0.5rem;
}
#qr-live-canvas {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
}
.gq-topbar {
  position: fixed;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.gq-topbar-link {
  font-size: 0.75rem;
  color: #fff;
  text-decoration: none;
  background: rgba(43, 101, 108, 0.75);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  backdrop-filter: blur(8px);
}
.gq-topbar-select {
  font-size: 0.72rem;
  border-radius: 999px;
  border: none;
  padding: 0.35rem 0.5rem;
  background: rgba(255,255,255,0.9);
}
.gq-topbar-btn {
  border: none;
  border-radius: 999px;
  width: 2rem;
  height: 2rem;
  cursor: pointer;
  background: rgba(255,255,255,0.9);
  font-size: 1rem;
}
.gq-adv {
  margin-top: 1rem;
  text-align: left;
  font-size: 0.85rem;
}
.gq-adv summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--gq-teal-dark);
  padding: 0.35rem 0;
}
.gq-adv-body { padding-top: 0.5rem; }
.gq-color {
  padding: 0.25rem;
  height: 2.75rem;
  margin-bottom: 0.65rem;
}
.gq-history { margin-top: 1.25rem; text-align: left; }
.gq-history-title {
  font-size: 0.8rem;
  color: var(--gq-muted);
  margin: 0 0 0.5rem;
  font-weight: 600;
}
.gq-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 140px;
  overflow-y: auto;
}
.gq-history-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  margin-bottom: 0.35rem;
  border: 1px solid rgba(15,23,42,0.06);
  border-radius: 10px;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  text-align: left;
  color: var(--gq-text);
}
.gq-history-item small { color: var(--gq-muted); flex-shrink: 0; }
.gq-history-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gq-install {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  z-index: 3;
}
.gq-btn-sm {
  width: auto;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}
.gq-result-hint {
  font-size: 0.8rem;
  color: var(--gq-muted);
  margin: 0 0 0.5rem;
  text-align: center;
}
.gq-link-btn {
  background: none;
  border: none;
  color: var(--gq-teal-dark);
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.85rem;
}
.gq-help-page { padding-top: 3.25rem; }
.gq-help-shell {
  max-width: 520px;
  flex: 1 0 auto;
  justify-content: flex-start;
}
.gq-help-card { text-align: left; margin-top: 1rem; }
.gq-back {
  display: inline-block;
  margin-bottom: 0.75rem;
  color: var(--gq-teal-dark);
  font-size: 0.9rem;
}
.gq-help-block {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(15,23,42,0.08);
}
.gq-help-block h2 { font-size: 1rem; margin: 0 0 0.5rem; }
.gq-help-block p { margin: 0; font-size: 0.9rem; line-height: 1.5; color: var(--gq-muted); }
.gq-help-block code {
  font-size: 0.82em;
  background: rgba(15,23,42,0.06);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}
.gq-help-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  color: var(--gq-muted);
  line-height: 1.5;
}
html[data-theme="dark"] {
  --gq-glass: rgba(30, 41, 59, 0.82);
  --gq-glass-border: rgba(255, 255, 255, 0.1);
  --gq-text: #f1f5f9;
  --gq-muted: #94a3b8;
  --gq-teal: #3d7a82;
  --gq-teal-dark: #a8d4da;
}
html[data-theme="dark"] body.gq-page { background: #1e3a40; }
html[data-theme="dark"] .gq-bg {
  background:
    radial-gradient(ellipse 70% 50% at 15% 0%, rgba(255,255,255,0.08), transparent 50%),
    radial-gradient(ellipse 60% 45% at 90% 90%, rgba(0,0,0,0.35), transparent 55%),
    linear-gradient(160deg, #2d5a62 0%, #1e3a40 50%, #0f1f23 100%);
}
html[data-theme="dark"] .gq-input,
html[data-theme="dark"] .gq-select {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(255,255,255,0.1);
  color: var(--gq-text);
}
html[data-theme="dark"] .gq-tab.active {
  background: rgba(51, 65, 85, 0.95);
  color: #e2e8f0;
}
html[data-theme="dark"] .gq-tabs { background: rgba(15, 23, 42, 0.45); }
html[data-theme="dark"] .gq-history-item {
  background: rgba(15, 23, 42, 0.45);
  border-color: rgba(255,255,255,0.08);
}
html[data-theme="dark"] .gq-preview {
  background: rgba(15, 23, 42, 0.45);
  border-color: rgba(255,255,255,0.1);
}
html[data-theme="dark"] .gq-qr-preview {
  background: rgba(15, 23, 42, 0.5);
  border-color: rgba(255,255,255,0.12);
}
html[data-theme="dark"] .gq-preset,
html[data-theme="dark"] .gq-chip {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--gq-text);
}
html[data-theme="dark"] .gq-preset.active,
html[data-theme="dark"] .gq-chip.active {
  border-color: var(--gq-teal);
  box-shadow: 0 0 0 3px rgba(87, 167, 176, 0.25);
}
html[data-theme="dark"] .gq-help-block code { background: rgba(255,255,255,0.08); }
html[data-theme="dark"] .gq-topbar-btn {
  background: rgba(30, 41, 59, 0.9);
  color: var(--gq-text);
}
html[data-theme="dark"] .gq-footer {
  background: rgba(15, 23, 42, 0.88);
}

body{
  padding-bottom:0!important;
}