/* ============================================================
   QR Maker — style.css
   Site: qrcode.magnetiqlab.com
   ============================================================ */

/* ---------- Variables ---------------------------------------- */
:root {
  --primary: #4F46E5;
  --primary-light: #6366F1;
  --primary-dark: #3730A3;
  --accent: #06B6D4;
  --success: #10B981;
  --warning: #F59E0B;
  --bg: #F8FAFC;
  --bg-alt: #F1F5F9;
  --card: #FFFFFF;
  --text: #0F172A;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --border: #E2E8F0;
  --border-focus: #4F46E5;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: .2s ease;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ---------- Reset -------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: 15px; }

/* ---------- Container ---------------------------------------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ------------------------------------------- */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 20px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.logo svg { width: 32px; height: 32px; }
.logo-dot { color: var(--primary); }
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}
.site-nav a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  text-decoration: none;
}
.site-nav a:hover { color: var(--primary); background: #EEF2FF; }
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.lang-switcher {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.lang-btn {
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
  text-decoration: none;
}
.lang-btn.active, .lang-btn:hover { background: var(--primary); color: #fff; }

/* ---------- Ad containers ------------------------------------ */
.ad-wrap {
  text-align: center;
  padding: 8px 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.ad-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-light);
  margin-bottom: 4px;
}
.ad-sidebar-wrap {
  margin-top: 20px;
}

/* ---------- Hero -------------------------------------------- */
.hero {
  padding: 56px 0 40px;
  text-align: center;
  background: linear-gradient(135deg, #EEF2FF 0%, #E0F2FE 100%);
  border-bottom: 1px solid var(--border);
}
.hero h1 {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: -.02em;
}
.hero h1 span { color: var(--primary); }
.hero-sub {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 28px;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
}
.badge svg { width: 15px; height: 15px; color: var(--success); flex-shrink: 0; }

/* ---------- Generator Section ------------------------------- */
.generator-section { padding: 40px 0 60px; }
.generator-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  overflow: hidden;
}

/* Type tabs */
.type-tabs-bar {
  display: flex;
  gap: 0;
  overflow-x: auto;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.type-tabs-bar::-webkit-scrollbar { display: none; }
.type-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 18px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: all var(--transition);
  flex-shrink: 0;
}
.type-tab:hover { color: var(--primary); background: rgba(79,70,229,.05); }
.type-tab.active { color: var(--primary); border-bottom-color: var(--primary); background: rgba(79,70,229,.06); }
.type-tab .tab-icon { font-size: 20px; line-height: 1; }

/* Grid layout */
.generator-body {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 0;
  min-height: 520px;
}
.generator-left {
  padding: 28px;
  border-right: 1px solid var(--border);
}
.generator-right {
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* Form */
.form-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.form-grid { display: flex; flex-direction: column; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.form-group .hint {
  font-size: 12px;
  color: var(--text-muted);
}
.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  resize: vertical;
}
.form-input:focus {
  border-color: var(--border-focus);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}
.form-input::placeholder { color: var(--text-light); }
select.form-input { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748B' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; appearance: none; }

/* Customization panel */
.custom-panel {
  margin-top: 24px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.custom-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  background: var(--bg-alt);
  transition: background var(--transition);
}
.custom-panel summary:hover { background: #EEF2FF; }
.custom-panel summary::after {
  content: '▼';
  font-size: 11px;
  color: var(--text-muted);
  transition: transform var(--transition);
}
.custom-panel[open] summary::after { transform: rotate(180deg); }
.custom-panel-body {
  padding: 18px;
  display: grid;
  gap: 18px;
}
.custom-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.custom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.color-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.color-row label { font-size: 13px; font-weight: 500; color: var(--text); flex: 1; }
.color-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  background: var(--bg);
  cursor: pointer;
  transition: border-color var(--transition);
}
.color-input-wrap:hover { border-color: var(--primary); }
.color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,.1);
  flex-shrink: 0;
}
.color-hex {
  font-size: 13px;
  font-family: 'Courier New', monospace;
  color: var(--text);
  width: 68px;
  border: none;
  background: transparent;
  outline: none;
  cursor: text;
}
input[type="color"] {
  opacity: 0;
  position: absolute;
  width: 0;
  height: 0;
}
.gradient-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.gradient-options { display: none; }
.gradient-options.visible { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Style selector (dots/corners) */
.style-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.style-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 6px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
}
.style-option:hover { border-color: var(--primary-light); color: var(--primary); }
.style-option.active { border-color: var(--primary); background: #EEF2FF; color: var(--primary); }
.style-option svg { width: 32px; height: 32px; }

/* Slider */
.slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.slider-row label { font-weight: 500; flex: 1; }
.slider-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  min-width: 38px;
  text-align: right;
}
input[type="range"] {
  width: 100%;
  height: 4px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* Password toggle wrapper */
.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.password-wrap .form-input { padding-right: 40px; }
.btn-toggle-pass {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color var(--transition);
}
.btn-toggle-pass:hover { color: var(--primary); }

/* Logo upload */
.logo-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}
.logo-upload-area:hover { border-color: var(--primary); background: #EEF2FF; }
.logo-upload-area input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.logo-upload-area p { font-size: 13px; color: var(--text-muted); margin-top: 6px; }
.logo-preview-thumb {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin: 0 auto 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: none;
}

/* QR Preview */
.preview-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
}
.preview-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: 12px;
  align-self: flex-start;
}
.preview-canvas-wrap {
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
#qrPreview { display: flex; align-items: center; justify-content: center; }
#qrPreview canvas { border-radius: 4px; }
.preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-light);
  font-size: 14px;
}
.preview-placeholder svg { width: 48px; height: 48px; opacity: .3; }

/* Download buttons */
.download-section { width: 100%; }
.download-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.download-btns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.btn-dl {
  padding: 9px 4px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
  transition: all var(--transition);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  text-transform: uppercase;
  background: var(--bg-alt);
}
.btn-dl:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79,70,229,.3);
}
.btn-generate {
  width: 100%;
  margin-top: 20px;
  padding: 14px 28px;
  background: var(--primary);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius);
  transition: all var(--transition);
  box-shadow: 0 4px 14px rgba(79,70,229,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-generate:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79,70,229,.4);
}
.btn-generate:active { transform: translateY(0); }

/* ---------- Features section -------------------------------- */
.features-section {
  padding: 72px 0;
  background: var(--card);
  border-top: 1px solid var(--border);
}
.section-header { text-align: center; margin-bottom: 48px; }
.section-tag {
  display: inline-block;
  background: #EEF2FF;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text);
  margin-bottom: 12px;
}
.section-sub {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.feature-card {
  padding: 28px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}
.feature-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.feature-icon {
  width: 48px;
  height: 48px;
  background: #EEF2FF;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
}
.feature-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* ---------- How-to section ---------------------------------- */
.howto-section {
  padding: 72px 0;
  background: linear-gradient(135deg, #F8FAFC 0%, #EEF2FF 100%);
  border-top: 1px solid var(--border);
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  position: relative;
}
.step-card { text-align: center; }
.step-num {
  width: 56px;
  height: 56px;
  background: var(--primary);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 4px 14px rgba(79,70,229,.35);
}
.step-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.step-card p { font-size: 14px; color: var(--text-muted); }

/* ---------- Types section ----------------------------------- */
.types-section {
  padding: 72px 0;
  background: var(--card);
  border-top: 1px solid var(--border);
}
.types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.type-info-card {
  padding: 22px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}
.type-info-card:hover { border-color: var(--primary-light); }
.type-info-card .type-emoji { font-size: 28px; margin-bottom: 10px; }
.type-info-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.type-info-card p { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* ---------- FAQ section ------------------------------------- */
.faq-section {
  padding: 72px 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}
.faq-list { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}
.faq-item:hover { border-color: var(--primary-light); }
.faq-question {
  width: 100%;
  text-align: left;
  padding: 18px 22px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: color var(--transition);
}
.faq-question:hover { color: var(--primary); }
.faq-question svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform var(--transition);
  color: var(--text-muted);
}
.faq-item.open .faq-question { color: var(--primary); }
.faq-item.open .faq-question svg { transform: rotate(45deg); color: var(--primary); }
.faq-answer {
  display: none;
  padding: 0 22px 18px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}
.faq-item.open .faq-answer { display: block; }

/* ---------- Footer ------------------------------------------ */
.site-footer {
  background: var(--text);
  color: #94A3B8;
  padding: 48px 0 32px;
  border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .logo { color: #fff; margin-bottom: 12px; }
.footer-brand p { font-size: 14px; line-height: 1.6; max-width: 280px; }
.footer-col h4 { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col ul a { color: #94A3B8; font-size: 14px; text-decoration: none; transition: color var(--transition); }
.footer-col ul a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
}
.footer-bottom a { color: #94A3B8; text-decoration: none; }
.footer-bottom a:hover { color: #fff; }

/* ---------- Utilities --------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  transition: transform .3s ease;
  z-index: 9999;
  pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- Responsive -------------------------------------- */
@media (max-width: 900px) {
  .generator-body {
    grid-template-columns: 1fr;
  }
  .generator-left { border-right: none; border-bottom: 1px solid var(--border); }
  .generator-right { padding-top: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .hero { padding: 40px 0 28px; }
  .site-nav { display: none; }
  .download-btns { grid-template-columns: repeat(2, 1fr); }
  .custom-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .style-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-bottom { flex-direction: column; text-align: center; }
}
