/* ============================================
   VOIDXBM QR CARD STUDIO — style.css
   ============================================ */

/* ===== Design Tokens ===== */
:root {
  --bg: #FAF9FF;
  --bg-alt: #F0EEFA;
  --text: #10172A;
  --text-muted: #5B6478;
  --primary: #6D28D9;
  --primary-light: #C4B5FD;
  --blue: #3B82F6;
  --pink: #EC4899;
  --orange: #FB923C;
  --success: #22C55E;
  --warning: #F59E0B;
  --error: #EF4444;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;

  --shadow-sm: 0 1px 3px rgba(16,23,42,.08);
  --shadow-md: 0 4px 16px rgba(16,23,42,.10);
  --shadow-lg: 0 12px 40px rgba(16,23,42,.14);
  --shadow-xl: 0 24px 64px rgba(16,23,42,.18);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', Roboto, sans-serif;

  --maxw: 1200px;

  /* Gaming themes */
  --g-blue: linear-gradient(135deg, #1E40AF, #3B82F6);
  --g-purple: linear-gradient(135deg, #5B21B6, #8B5CF6);
  --g-green: linear-gradient(135deg, #14532D, #22C55E);
  --g-darkred: linear-gradient(135deg, #7F1D1D, #DC2626);
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ===== Header / Nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,249,255,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(109,40,217,.08);
  transition: box-shadow .3s;
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }

.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1.5rem;
}

.brand { display: flex; align-items: center; gap: .65rem; color: var(--text); }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--blue));
  color: #fff;
  font-weight: 800;
  font-size: .85rem;
  border-radius: var(--r-sm);
  letter-spacing: 1px;
}
.brand-text { font-weight: 700; font-size: 1.05rem; line-height: 1.1; }
.brand-text small { display: block; font-size: .55rem; letter-spacing: 2px; color: var(--text-muted); font-weight: 600; }

.nav-links { display: flex; gap: .25rem; list-style: none; }
.nav-links a {
  display: block;
  padding: .5rem 1rem;
  color: var(--text);
  font-weight: 500;
  font-size: .9rem;
  border-radius: var(--r-sm);
  transition: background .2s, color .2s;
}
.nav-links a:hover { background: var(--bg-alt); color: var(--primary); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .7rem 1.5rem;
  font-size: .9rem;
  font-weight: 600;
  border-radius: var(--r-md);
  transition: transform .15s, box-shadow .2s, background .2s, border-color .2s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--blue));
  color: #fff;
  box-shadow: 0 4px 14px rgba(109,40,217,.30);
}
.btn-primary:hover { box-shadow: 0 6px 22px rgba(109,40,217,.42); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid rgba(16,23,42,.15);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

.btn-outline {
  background: var(--bg);
  color: var(--text);
  border: 1.5px solid rgba(16,23,42,.12);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--bg-alt); }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .35;
  animation: float 18s ease-in-out infinite;
}
.blob-1 { width: 320px; height: 320px; background: var(--primary-light); top: -60px; left: 5%; }
.blob-2 { width: 280px; height: 280px; background: #93C5FD; top: 20%; right: 8%; animation-delay: -6s; }
.blob-3 { width: 240px; height: 240px; background: #F9A8D4; bottom: -40px; left: 40%; animation-delay: -12s; }

@keyframes float {
  0%,100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(30px,-20px) scale(1.08); }
  66% { transform: translate(-20px,15px) scale(.95); }
}

.hero-content { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.hero-badge {
  display: inline-block;
  padding: .4rem 1rem;
  background: rgba(109,40,217,.08);
  color: var(--primary);
  font-size: .8rem;
  font-weight: 600;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
.grad-text {
  background: linear-gradient(135deg, var(--primary), var(--blue), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p { margin: 1.25rem auto 2rem; font-size: 1.1rem; color: var(--text-muted); max-width: 560px; }
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ===== Section Heads ===== */
.section-head { text-align: center; margin-bottom: 2.5rem; }
.section-head h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); font-weight: 700; letter-spacing: -.01em; }
.section-head p { color: var(--text-muted); margin-top: .5rem; font-size: 1rem; }

/* ===== All Tools ===== */
.all-tools { padding: 3rem 1.5rem; max-width: var(--maxw); margin: 0 auto; }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.tool-card {
  background: #fff;
  border: 1px solid rgba(16,23,42,.06);
  border-radius: var(--r-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s, border-color .2s;
  cursor: pointer;
  text-align: left;
}
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(109,40,217,.2); }
.tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  border-radius: var(--r-md);
  margin-bottom: 1.25rem;
}
.tool-icon-purple { background: rgba(109,40,217,.10); color: var(--primary); }
.tool-icon-blue { background: rgba(59,130,246,.10); color: var(--blue); }
.tool-icon-pink { background: rgba(236,72,153,.10); color: var(--pink); }

.tool-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: .5rem; }
.tool-card p { color: var(--text-muted); font-size: .9rem; margin-bottom: 1rem; }
.tool-link { color: var(--primary); font-weight: 600; font-size: .85rem; }

/* ===== Studio ===== */
.studio { padding: 2rem 1.5rem 4rem; max-width: var(--maxw); margin: 0 auto; }
.studio-container { background: #fff; border-radius: var(--r-xl); padding: 1.5rem; box-shadow: var(--shadow-lg); border: 1px solid rgba(16,23,42,.05); }

/* Tabs */
.tabs {
  display: flex;
  gap: .25rem;
  background: var(--bg-alt);
  border-radius: var(--r-md);
  padding: .25rem;
  margin-bottom: 1.5rem;
}
.tab {
  flex: 1;
  padding: .65rem 1rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--r-sm);
  transition: background .2s, color .2s, box-shadow .2s;
}
.tab.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }
.tab:hover:not(.active) { color: var(--text); }

/* Studio Layout */
.studio-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

/* Editor Panel */
.editor-panel { display: flex; flex-direction: column; gap: 1.25rem; }
.tab-panel { display: flex; flex-direction: column; gap: 1.25rem; }
.tab-panel[hidden] { display: none; }

/* Form */
.form-group { display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.form-group label { font-size: .82rem; font-weight: 600; color: var(--text); }
.form-group .req { color: var(--error); }
.form-hint { font-size: .75rem; color: var(--text-muted); }

input[type="text"], input[type="email"], input[type="tel"], input[type="url"],
input[type="password"], textarea, select {
  padding: .6rem .8rem;
  border: 1.5px solid rgba(16,23,42,.12);
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--text);
  font-size: .9rem;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(109,40,217,.12);
}
textarea { resize: vertical; }

input[type="color"] {
  width: 100%;
  height: 42px;
  padding: 4px;
  border: 1.5px solid rgba(16,23,42,.12);
  border-radius: var(--r-sm);
  background: var(--bg);
  cursor: pointer;
}

.form-row { display: flex; gap: 1rem; }
.form-check { flex-direction: row; align-items: center; gap: .5rem; }
.form-check label { display: flex; align-items: center; gap: .4rem; font-weight: 500; }
.form-check input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); }

/* Segmented buttons */
.segmented { display: flex; gap: .25rem; background: var(--bg-alt); border-radius: var(--r-sm); padding: .25rem; }
.seg-btn {
  flex: 1;
  padding: .5rem .75rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 6px;
  transition: background .2s, color .2s;
}
.seg-btn.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }

/* Customization */
.customization {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem;
  background: var(--bg-alt);
  border-radius: var(--r-lg);
  margin-top: .5rem;
}
.custom-title { font-size: 1rem; font-weight: 700; }

/* Template grid */
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .75rem; }
.template-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  padding: .65rem;
  border: 2px solid transparent;
  border-radius: var(--r-md);
  background: #fff;
  transition: border-color .2s, transform .15s;
}
.template-card:hover { transform: translateY(-2px); }
.template-card.active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(109,40,217,.12); }
.tpl-preview { width: 100%; height: 50px; border-radius: var(--r-sm); }
.tpl-plum { background: linear-gradient(135deg, #6D28D9, #C4B5FD); }
.tpl-navy { background: linear-gradient(135deg, #10172A, #3B82F6); }
.tpl-pink { background: linear-gradient(135deg, #EC4899, #8B5CF6); }
.tpl-mint { background: linear-gradient(135deg, #A7F3D0, #FFF); }
.tpl-charcoal { background: linear-gradient(135deg, #1E1E1E, #3A3A3A); }
.tpl-midnight { background: linear-gradient(135deg, #07111F, #0E7490); }
.tpl-name { font-size: .7rem; font-weight: 600; color: var(--text-muted); text-align: center; }

/* Theme picker (gaming) */
.theme-picker { display: flex; gap: .75rem; }
.theme-swatch {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--sw);
  border: 3px solid transparent;
  transition: transform .15s, border-color .2s;
}
.theme-swatch:hover { transform: scale(1.1); }
.theme-swatch.active { border-color: var(--text); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--primary); }

/* Toggle group */
.toggle-group { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; }
.toggle { display: flex; align-items: center; gap: .4rem; font-size: .82rem; font-weight: 500; cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--primary); }

.action-row { display: flex; gap: .75rem; margin-top: .5rem; }

/* ===== Preview Panel ===== */
.preview-panel {
  display: flex;
  flex-direction: column;
  background: var(--bg-alt);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  position: sticky;
  top: 80px;
  align-self: flex-start;
}
.preview-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.preview-header h3 { font-size: 1rem; font-weight: 700; }
.preview-status {
  font-size: .72rem;
  font-weight: 600;
  color: var(--success);
  background: rgba(34,197,94,.12);
  padding: .2rem .6rem;
  border-radius: 100px;
}
.preview-status.loading { color: var(--warning); background: rgba(245,158,11,.12); }
.preview-status.error { color: var(--error); background: rgba(239,68,68,.12); }

.preview-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
  padding: 1.5rem;
  background: #fff;
  border-radius: var(--r-md);
  overflow: hidden;
}

.card-error {
  text-align: center;
  color: var(--error);
  font-size: .9rem;
  padding: 2rem;
}

.card-wrapper { width: 100%; display: flex; justify-content: center; }

/* ===== Generated Card ===== */
.gen-card {
  --card-ink: #10172A;
  width: 360px;
  max-width: 100%;
  min-height: 600px;
  aspect-ratio: 3 / 5;
  border-radius: 26px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  font-size: .9rem;
  isolation: isolate;
  box-shadow: 0 18px 42px rgba(16,23,42,.18);
  transition: background .3s, box-shadow .3s;
}
.gen-card.has-border { border: 2px solid color-mix(in srgb, var(--card-ink) 20%, transparent); }
.gen-card.dark { color: #fff; --card-ink: #fff; }
.gen-card.light { color: var(--text); }
.gen-card.bg-solid { background: var(--card-primary); }
.gen-card.bg-gradient { background: linear-gradient(145deg, var(--card-primary) 0%, var(--card-secondary) 100%); }
.gen-card.bg-circles { background: var(--card-primary); }
.gen-card[data-template="pink-purple"] { background: linear-gradient(145deg, #ec4899 0%, #a855f7 58%, #6366f1 100%); }
.gen-card[data-template="navy-blue"] { background: linear-gradient(145deg, #0f172a 0%, #172554 52%, #2563eb 100%); }
.gen-card[data-template="midnight-cyan"] { background: linear-gradient(145deg, #07111f 0%, #102a43 55%, #0e7490 100%); }
.gen-card[data-template="charcoal"] { background: linear-gradient(145deg, #111827 0%, #27272a 100%); }
.gen-card[data-template="mint-white"] { background: linear-gradient(145deg, #b7f7dc 0%, #8be6c1 52%, #f8fffb 100%); }
.gen-card[data-template="plum-lavender"] { background: linear-gradient(145deg, #5b21b6 0%, #7c3aed 48%, #c4b5fd 100%); }

/* Decorative layers */
.card-circles, .card-shapes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; }
.card-circles::before, .card-circles::after, .card-circles .c3,
.card-shapes::before, .card-shapes::after {
  content: ''; position: absolute; display: block; border-radius: 50%;
  background: rgba(255,255,255,.17);
}
.card-circles::before { width: 290px; height: 290px; top: -130px; right: -70px; }
.card-circles::after { width: 190px; height: 190px; bottom: -80px; left: -70px; opacity: .12; }
.card-circles .c3 { width: 110px; height: 110px; top: 44%; right: 12%; opacity: .08; }
.card-shapes::before { width: 360px; height: 1px; top: 32%; left: -30px; transform: rotate(-18deg); background: rgba(255,255,255,.22); border-radius: 0; }
.card-shapes::after { width: 210px; height: 210px; bottom: -100px; right: -90px; opacity: .1; }
.gen-card[data-template="midnight-cyan"] .card-shapes::before { box-shadow: 0 18px 0 rgba(45,212,191,.16), 0 36px 0 rgba(45,212,191,.11); }
.gen-card[data-template="charcoal"] .card-shapes::before { background: rgba(255,255,255,.12); box-shadow: 0 14px 0 rgba(255,255,255,.06), 0 28px 0 rgba(255,255,255,.04); }
.gen-card[data-template="mint-white"] .card-circles::before,
.gen-card[data-template="mint-white"] .card-circles::after { background: rgba(255,255,255,.42); }
.card-content { position: relative; z-index: 1; height: 100%; }

/* Contact card layout */
.contact-card .card-content { display: flex; flex-direction: column; }
.contact-card .card-header { margin-bottom: 1.5rem; }
.contact-card .c-name { font-size: clamp(1.45rem, 5vw, 2rem); font-weight: 850; line-height: 1.08; letter-spacing: -.03em; max-width: 100%; overflow-wrap: anywhere; }
.contact-card .c-title { font-size: 1rem; opacity: .86; margin-top: .55rem; }
.contact-card .c-company { font-size: .82rem; opacity: .68; margin-top: .2rem; letter-spacing: .04em; text-transform: uppercase; }
.contact-card .c-details { display: flex; flex-direction: column; gap: .72rem; margin: 0; min-height: 0; }
.c-detail-row { display: flex; align-items: flex-start; gap: .55rem; font-size: .8rem; line-height: 1.3; }
.c-detail-row svg { width: 15px; height: 15px; flex: 0 0 15px; opacity: .72; margin-top: 1px; }
.c-detail-row span { word-break: break-word; }
.contact-card .c-qr-area { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: .65rem 1rem; margin-top: auto; padding-top: 1.4rem; }
.contact-card .c-qr-img, .gaming-card .g-qr-img, .normal-card .n-qr-img { border-radius: 16px; padding: 11px; background: #fff; box-shadow: 0 8px 22px rgba(15,23,42,.12); }
.contact-card .c-qr-img canvas, .gaming-card .g-qr-img canvas, .normal-card .n-qr-img canvas { display: block; width: 100%; height: auto; image-rendering: pixelated; border-radius: 5px; }
.contact-card .c-qr-img { width: 142px; grid-column: 2; grid-row: 1 / span 2; }
.contact-card .c-scan-text { font-size: .72rem; opacity: .74; text-align: left; line-height: 1.35; max-width: 135px; }
.contact-card .c-save-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; width: fit-content; padding: .55rem .85rem; font-size: .72rem; font-weight: 700; border-radius: 100px; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.3); color: inherit; transition: background .2s, transform .2s; }
.contact-card .c-save-btn svg { width: 14px; height: 14px; }
.contact-card.light .c-save-btn { background: rgba(16,23,42,.08); border-color: rgba(16,23,42,.14); }
.contact-card .c-save-btn:hover { background: rgba(255,255,255,.34); transform: translateY(-1px); }
.contact-card.light .c-save-btn:hover { background: rgba(16,23,42,.15); }

/* Normal QR card layout */
.normal-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.2rem; text-align: center; }
.normal-card .card-content { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.2rem; width: 100%; }
.normal-card .n-qr-img { width: min(256px, 82%); border-radius: 22px; padding: 17px; }
.normal-card .n-label { font-size: .95rem; font-weight: 700; letter-spacing: .02em; opacity: .9; }
.normal-card.light .n-label { color: #10172A; }

/* Gaming card layout */
.gaming-card { display: flex; flex-direction: column; }
.gaming-card .card-content { display: flex; flex-direction: column; gap: .8rem; }
.gaming-card .g-header { display: flex; align-items: center; justify-content: space-between; }
.gaming-card .g-game-badge { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1.8px; padding: .42rem .8rem; border-radius: 100px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22); }
.gaming-card .g-player-name { font-size: clamp(1.75rem, 6vw, 2.55rem); font-weight: 900; line-height: 1.02; letter-spacing: -.04em; overflow-wrap: anywhere; }
.gaming-card .g-uid { font-size: .82rem; opacity: .78; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; margin-top: .55rem; }
.gaming-card .g-team { font-size: .88rem; opacity: .84; }
.gaming-card .g-tagline { font-size: .88rem; font-style: italic; opacity: .8; }
.gaming-card .g-qr-area { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 1rem; margin-top: auto; padding-top: 1rem; }
.gaming-card .g-qr-img { width: 148px; }
.gaming-card .g-info-block { display: flex; align-items: flex-start; padding-bottom: .25rem; }
.gaming-card .g-disclaimer { font-size: .72rem; opacity: .75; line-height: 1.35; max-width: 110px; }

@media (max-width: 600px) {
  .gen-card { min-height: 560px; padding: 1.5rem; }
  .normal-card .n-qr-img { width: min(220px, 82%); }
  .contact-card .c-qr-img { width: 128px; }
  .gaming-card .g-qr-img { width: 132px; }
}


/* ===== Download Actions ===== */
.download-actions { display: flex; gap: .65rem; margin-top: 1.25rem; flex-wrap: wrap; }
.download-actions .btn { flex: 1; min-width: 120px; font-size: .82rem; padding: .6rem 1rem; }

/* ===== Info Sections ===== */
.info-section { padding: 3rem 1.5rem; max-width: 800px; margin: 0 auto; }
.info-content { display: flex; flex-direction: column; gap: 1rem; }
.info-content p { color: var(--text-muted); line-height: 1.7; }
.info-content h3 { font-size: 1.1rem; font-weight: 700; margin-top: .5rem; }
.info-content strong { color: var(--text); }
.feature-list { list-style: none; display: flex; flex-direction: column; gap: .5rem; padding-left: 0; }
.feature-list li { position: relative; padding-left: 1.75rem; color: var(--text-muted); line-height: 1.6; }
.feature-list li::before {
  content: '';
  position: absolute;
  left: 0; top: .55rem;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--blue));
}

/* ===== Footer ===== */
.site-footer { background: var(--text); color: rgba(255,255,255,.7); padding: 2.5rem 1.5rem; margin-top: 2rem; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1.25rem; text-align: center; }
.footer-brand { display: flex; align-items: center; gap: .65rem; font-weight: 700; color: #fff; }
.footer-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; justify-content: center; }
.footer-nav a { color: rgba(255,255,255,.7); font-size: .85rem; font-weight: 500; }
.footer-nav a:hover { color: #fff; }
.footer-copy { font-size: .78rem; opacity: .6; }

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: var(--text);
  color: #fff;
  padding: .75rem 1.5rem;
  border-radius: var(--r-md);
  font-size: .85rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), opacity .3s;
  opacity: 0;
  pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.error { background: var(--error); }
.toast.success { background: var(--success); }

/* ===== Loading state ===== */
.spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 3px solid var(--bg-alt);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .studio-layout { grid-template-columns: 1fr; }
  .preview-panel { position: static; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: #fff;
    padding: 1rem;
    box-shadow: var(--shadow-md);
    border-top: 1px solid rgba(16,23,42,.06);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: transform .2s, opacity .2s;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-toggle { display: flex; }
}

@media (max-width: 600px) {
  .hero { padding: 3.5rem 1rem 3rem; }
  .all-tools, .studio { padding: 2rem 1rem; }
  .studio-container { padding: 1rem; }
  .form-row { flex-direction: column; gap: 1.25rem; }
  .download-actions { flex-direction: column; }
  .download-actions .btn { width: 100%; }
  .action-row { flex-direction: column; }
  .action-row .btn { width: 100%; }
  .template-grid { grid-template-columns: repeat(2, 1fr); }
  .nav { padding: .75rem 1rem; }
  .brand-text { font-size: .95rem; }
}

@media (max-width: 380px) {
  .gen-card { width: 100%; padding: 1.25rem; }
  .contact-card .c-name { font-size: 1.25rem; }
}
