/* =============================================
   THE QR GENERATOR — Global Stylesheet
   Auto Light/Dark Mode — Premium SaaS Theme
   ============================================= */

/* AUTOMATIC THEME VARIABLES (LIGHT & DARK) */

/* DEFAULT: Premium Light Mode (Crisp White & Red) */
:root {
  /* BRAND RED */
  --red: #e8000d;
  --red-light: #ff1a26;
  --red-dim: rgba(232, 0, 13, 0.08);
  --red-border: rgba(232, 0, 13, 0.2);
  
  /* BACKGROUNDS & SURFACES */
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface2: #f1f5f9;
  --nav-bg: rgba(255, 255, 255, 0.85);
  
  /* TEXT & ICONS */
  --white: #ffffff; /* Button Text */
  --off-white: #0f172a; /* Main Text (Dark for Light Mode) */
  --muted: #475569; /* Secondary Text */
  --muted2: #94a3b8; /* Tertiary Text */
  
  /* BORDERS & INTERACTIVE */
  --border: #e2e8f0;
  --border2: #cbd5e1;
  --hover-bg: rgba(0, 0, 0, 0.04);
  --input-bg: #ffffff;
  
  /* SHADOWS & RADIUS */
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.1);
  --transition: .3s cubic-bezier(.4, 0, .2, 1);
}

/* MAGIC: OLED-Friendly Dark Mode based on Device Setting */
@media (prefers-color-scheme: dark) {
  :root {
    /* BRAND RED (Kept vibrant for dark mode) */
    --red: #e8000d;
    --red-light: #ff1a26;
    --red-dim: rgba(232, 0, 13, 0.15);
    --red-border: rgba(232, 0, 13, 0.3);
    
    /* BACKGROUNDS & SURFACES */
    --bg: #0a0a0a;
    --surface: #111111;
    --surface2: #161616;
    --nav-bg: rgba(10, 10, 10, 0.85);
    
    /* TEXT & ICONS */
    --white: #ffffff;
    --off-white: #f0f0f0;
    --muted: rgba(240, 240, 240, 0.6);
    --muted2: rgba(240, 240, 240, 0.3);
    
    /* BORDERS & INTERACTIVE */
    --border: rgba(255, 255, 255, 0.08);
    --border2: rgba(255, 255, 255, 0.15);
    --hover-bg: rgba(255, 255, 255, 0.06);
    --input-bg: rgba(255, 255, 255, 0.03);
    
    /* SHADOWS */
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.7);
  }
}

/* RESET & BASE */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--off-white);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Ambient Glow for extra sexiness */
body::after {
  content: ''; position: fixed; inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--red-dim) 0%, transparent 40%);
  pointer-events: none; z-index: -1; opacity: 0.6;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
ul { list-style: none; }

/* TYPOGRAPHY */
.display { font-family: 'Syne', 'Inter', sans-serif; font-weight: 800; letter-spacing: -2px; line-height: 1.02; }
.display-xl { font-size: clamp(30px, 3.6vw, 46px); }
.display-lg { font-size: clamp(32px, 5vw, 60px); }
.display-md { font-size: clamp(24px, 4vw, 42px); }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }
p { color: var(--muted); }

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 300; height: 68px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 48px);
  background: var(--nav-bg);
  backdrop-filter: blur(24px) saturate(150%); -webkit-backdrop-filter: blur(24px) saturate(150%);
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 18px; letter-spacing: -.5px;
}
.nav-logo-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--red); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(232, 0, 13, 0.3);
}
.nav-logo-mark svg { width: 18px; height: 18px; fill: white; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-link {
  padding: 8px 16px; border-radius: 10px;
  font-size: 14px; font-weight: 600; color: var(--muted);
  transition: var(--transition);
}
.nav-link:hover { color: var(--off-white); background: var(--hover-bg); transform: translateY(-1px); }
.nav-link.active { color: var(--off-white); background: var(--hover-bg); }
.nav-cta {
  padding: 10px 22px; border-radius: 10px;
  background: var(--red); color: #fff; font-size: 14px; font-weight: 700;
  transition: var(--transition); border: none; box-shadow: 0 4px 14px rgba(232, 0, 13, 0.25);
}
.nav-cta:hover { background: var(--red-light); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(232, 0, 13, 0.4); }
.nav-cta:active { transform: translateY(0) scale(0.98); box-shadow: 0 4px 10px rgba(232, 0, 13, 0.3); }

.nav-mobile-toggle {
  display: none; background: none; border: 1px solid var(--border);
  border-radius: 10px; padding: 8px; color: var(--off-white); transition: 0.2s;
}
.nav-mobile-toggle:active { transform: scale(0.95); }

@media(max-width: 768px) {
  .nav-links { display: none; }
  .nav-mobile-toggle { display: flex; align-items: center; justify-content: center; }
  .nav-links.open {
    display: flex; flex-direction: column; position: fixed;
    top: 68px; left: 0; right: 0; bottom: 0; background: var(--bg);
    padding: 16px 20px 40px; gap: 8px; z-index: 9999;
    border-top: 1px solid var(--border); overflow-y: auto;
    animation: navSlideDown .25s ease;
  }
  @keyframes navSlideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
  .nav-links.open .nav-link { display: block; padding: 16px; width: 100%; border-radius: 12px; font-size: 16px; font-weight: 600; color: var(--off-white); background: var(--surface); border: 1px solid var(--border); }
  .nav-links.open .nav-cta { display: block; width: 100%; text-align: center; padding: 16px; margin-top: 16px; border-radius: 12px; font-size: 16px; }
}

/* BREADCRUMB */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted2); padding: 20px clamp(16px,4vw,48px); max-width: 1100px; margin: 0 auto; font-weight: 500; }
.breadcrumb a { transition: var(--transition); }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb-sep { opacity: .5; }

/* HERO */
.hero { text-align: center; padding: clamp(28px,4vw,56px) clamp(16px,4vw,48px) clamp(24px,3vw,40px); max-width: 960px; margin: 0 auto; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  color: var(--red-light); background: var(--red-dim); border: 1px solid var(--red-border);
  padding: 8px 20px; border-radius: 100px; margin-bottom: 20px; transition: var(--transition);
}
.hero-badge:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(232, 0, 13, 0.15); }
.hero-badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red-light); animation: pulse 2s ease infinite; box-shadow: 0 0 10px var(--red); }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(1.4)} }
.hero h1 { margin-bottom: 16px; color: var(--off-white); }
.hero-accent { color: var(--red); }
.hero-sub { font-size: clamp(15px,1.6vw,17px); color: var(--muted); max-width: 600px; margin: 0 auto 24px; line-height: 1.7; font-weight: 500; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }

/* BUTTONS & INTERACTIONS */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 16px 32px; border-radius: 12px; font-size: 15px; font-weight: 800; transition: var(--transition); border: none; position: relative; overflow: hidden; }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 4px 14px rgba(232, 0, 13, 0.25); }
.btn-primary:hover { background: var(--red-light); transform: translateY(-3px); box-shadow: 0 10px 28px rgba(232, 0, 13, 0.4); }
.btn-secondary { background: var(--surface); border: 1px solid var(--border); color: var(--off-white); box-shadow: var(--shadow); }
.btn-secondary:hover { border-color: var(--border2); background: var(--hover-bg); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-sm { padding: 10px 20px; font-size: 13px; border-radius: 10px; }
.btn-lg { padding: 18px 40px; font-size: 16px; }

/* Tactile Active States */
.btn:active, .btn-primary:active, .btn-secondary:active, .btn-generate:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* BUTTON LOADING SPINNER */
@keyframes spin { 100% { transform: rotate(360deg); } }
.spinner {
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
}
.btn-loading { pointer-events: none; opacity: 0.85; }
.btn-loading .spinner { display: inline-block; }
.btn-loading svg { display: none; }

/* TOOL CARD */
.tool-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg);
  transition: all var(--transition);
}
.tool-card:hover { box-shadow: 0 25px 70px rgba(0, 0, 0, 0.15); border-color: var(--border2); }
.tool-card-header { padding: 24px; background: var(--surface2); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 16px; }
.tool-card-header-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--red-dim); border: 1px solid var(--red-border); display: flex; align-items: center; justify-content: center; font-size: 22px; color: var(--red); }
.tool-card-title { font-size: 17px; font-weight: 800; color: var(--off-white); }
.tool-card-sub { font-size: 13px; color: var(--muted); margin-top: 4px; font-weight: 500; }

/* STEPBAR */
.stepbar { display: flex; align-items: center; padding: 0 24px; height: 60px; border-bottom: 1px solid var(--border); background: var(--surface2); overflow-x: auto; scrollbar-width: none; gap: 0; }
.stepbar::-webkit-scrollbar { display: none; }
.step { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.step-num { width: 28px; height: 28px; border-radius: 8px; font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--border); color: var(--muted); transition: var(--transition); }
.step-label { font-size: 14px; font-weight: 700; color: var(--muted); transition: var(--transition); white-space: nowrap; }
.step-line { flex: 1; min-width: 30px; height: 2px; background: var(--border); margin: 0 16px; position: relative; overflow: hidden; border-radius: 2px; }
.step-line::after { content: ''; position: absolute; left: -100%; top: 0; width: 100%; height: 100%; background: var(--red); transition: left .6s cubic-bezier(.4, 0, .2, 1); }
.step-line.done::after { left: 0; }
.step.done .step-num { background: var(--red-dim); border-color: var(--red-border); color: var(--red-light); }
.step.done .step-label { color: var(--off-white); }
.step.active .step-num { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 0 16px rgba(232, 0, 13, 0.4); }
.step.active .step-label { color: var(--off-white); }

/* FORM */
.tool-body { padding: 32px 24px; }
.tool-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 20px 24px; border-top: 1px solid var(--border); background: var(--surface2); }
.field { margin-bottom: 24px; }
.field-label { display: block; font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.field-input, .field-textarea, .field-select { width: 100%; padding: 16px; background: var(--input-bg); border: 1px solid var(--border); border-radius: 12px; color: var(--off-white); font-size: 15px; font-weight: 500; font-family: inherit; outline: none; transition: var(--transition); resize: vertical; box-shadow: inset 0 2px 4px rgba(0,0,0,0.02); }
.field-input::placeholder, .field-textarea::placeholder { color: var(--muted2); }
.field-input:focus, .field-textarea:focus, .field-select:focus { border-color: var(--red-border); background: var(--surface); box-shadow: 0 0 0 4px var(--red-dim); }
.field-select option { background: var(--surface); color: var(--off-white); }
.field-textarea { min-height: 110px; }
.field-hint { font-size: 13px; color: var(--muted2); margin-top: 8px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media(max-width: 480px) { .two-col { grid-template-columns: 1fr; } }
.panel { display: none; }
.panel.on { display: block; animation: fadeIn .4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* TYPE GRID */
.type-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media(max-width: 520px) { .type-grid { grid-template-columns: repeat(3, 1fr); } }
@media(max-width: 360px) { .type-grid { grid-template-columns: repeat(2, 1fr); } }
.type-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 10px 18px; border-radius: 14px; border: 1px solid var(--border); background: var(--input-bg); cursor: pointer; text-align: center; transition: var(--transition); position: relative; overflow: hidden; }
.type-card:hover { border-color: var(--border2); background: var(--hover-bg); transform: translateY(-3px); box-shadow: var(--shadow); }
.type-card.on { border-color: var(--red); background: var(--red-dim); box-shadow: inset 0 0 0 1px var(--red); }
.type-icon { font-size: 26px; line-height: 1; }
.type-name { font-size: 12px; font-weight: 800; color: var(--off-white); }
.type-desc { font-size: 10px; color: var(--muted); font-weight: 600; }

/* STYLE OPTIONS */
.style-row { display: flex; gap: 12px; flex-wrap: wrap; }
.style-opt { flex: 1; min-width: 90px; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--input-bg); cursor: pointer; transition: var(--transition); }
.style-opt:hover { border-color: var(--red-border); transform: translateY(-3px); background: var(--hover-bg); }
.style-opt.on { border-color: var(--red); background: var(--red-dim); box-shadow: 0 8px 20px rgba(232, 0, 13, 0.15); }
.style-opt-icon { font-size: 28px; }
.style-opt-name { font-size: 13px; font-weight: 800; color: var(--off-white); }

/* COLOR PICKER */
.color-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.color-swatch { width: 36px; height: 36px; border-radius: 10px; cursor: pointer; border: 2px solid transparent; transition: var(--transition); flex-shrink: 0; }
.color-swatch:hover { transform: scale(1.15); }
.color-swatch.on { border-color: var(--off-white); transform: scale(1.2); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.color-custom { width: 36px; height: 36px; border-radius: 10px; border: 1.5px dashed var(--border); display: flex; align-items: center; justify-content: center; font-size: 16px; cursor: pointer; position: relative; overflow: hidden; background: var(--input-bg); transition: var(--transition); }
.color-custom:hover { border-color: var(--border2); transform: scale(1.05); }
.color-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }

/* SIZE BUTTONS */
.size-row { display: flex; gap: 10px; }
.size-btn { flex: 1; padding: 12px 8px; border-radius: 10px; border: 1px solid var(--border); background: var(--input-bg); color: var(--muted); font-size: 12px; font-weight: 800; cursor: pointer; transition: var(--transition); font-family: inherit; text-align: center; }
.size-btn:hover { border-color: var(--red-border); color: var(--off-white); background: var(--hover-bg); transform: translateY(-2px); }
.size-btn.on { border-color: var(--red); color: var(--red-light); background: var(--red-dim); box-shadow: inset 0 0 0 1px var(--red); }
.divider { height: 1px; background: var(--border); margin: 28px 0; }

/* QR RESULT & PLACEHOLDER STATE */
.qr-result { display: none; }
.qr-result.show { display: block; animation: resultIn .6s cubic-bezier(.34,1.4,.64,1) both; }
@keyframes resultIn { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }

.qr-stage { background: var(--surface2); padding: 56px 24px 48px; display: flex; flex-direction: column; align-items: center; position: relative; overflow: hidden; min-height: 400px; justify-content: center; }
.qr-stage::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--red), transparent); }

/* Empty Placeholder */
.qr-placeholder {
  width: 220px; height: 220px;
  background: var(--input-bg);
  border: 2px dashed var(--border2);
  border-radius: 16px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--muted2);
  text-align: center;
  padding: 20px;
  transition: var(--transition);
}
.qr-placeholder svg { width: 48px; height: 48px; margin-bottom: 16px; opacity: 0.4; }
.qr-placeholder p { font-size: 14px; font-weight: 600; margin: 0; }

/* Generating Shimmer Effect */
.is-generating .qr-placeholder { opacity: 0.5; }
.is-generating .qr-stage::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 1.5s infinite;
  z-index: 10; pointer-events: none;
}
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

.qr-type-badge { font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--red-light); background: var(--red-dim); border: 1px solid var(--red-border); padding: 6px 18px; border-radius: 100px; margin-bottom: 32px; position: relative; z-index: 1; }
.qr-frame { position: relative; z-index: 1; margin-bottom: 32px; padding: 6px; }
.qr-frame::before, .qr-frame::after { content: ''; position: absolute; width: 28px; height: 28px; border-color: var(--red); border-style: solid; z-index: 2; transition: var(--transition); }
.qr-frame::before { top: -2px; left: -2px; border-width: 3px 0 0 3px; border-radius: 6px 0 0 0; }
.qr-frame::after { bottom: -2px; right: -2px; border-width: 0 3px 3px 0; border-radius: 0 0 6px 0; }
.qr-frame-inner { position: relative; }
.qr-frame-inner::before, .qr-frame-inner::after { content: ''; position: absolute; width: 28px; height: 28px; border-color: var(--red); border-style: solid; z-index: 2; }
.qr-frame-inner::before { top: -2px; right: -2px; border-width: 3px 3px 0 0; border-radius: 0 6px 0 0; }
.qr-frame-inner::after { bottom: -2px; left: -2px; border-width: 0 0 3px 3px; border-radius: 0 0 0 6px; }

/* QR Box must remain highly contrasting (White background) for scannability */
.qr-box { background: #ffffff; border-radius: 16px; padding: 20px; box-shadow: 0 10px 40px rgba(232, 0, 13, 0.15), 0 20px 60px rgba(0,0,0,0.1); }
#qrc { display: block; }

.qr-dl-row { display: flex; gap: 12px; width: 100%; max-width: 320px; margin-bottom: 16px; position: relative; z-index: 1; }
.dl-btn { flex: 1; padding: 14px 10px; border-radius: 12px; font-size: 14px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 8px; border: none; transition: var(--transition); cursor: pointer; }
.dl-btn:active { transform: translateY(0) scale(0.96); }
.dl-png { background: var(--red); color: #fff; box-shadow: 0 4px 12px rgba(232, 0, 13, 0.2); }
.dl-png:hover { background: var(--red-light); box-shadow: 0 8px 24px rgba(232, 0, 13, 0.4); transform: translateY(-3px); }
.dl-svg { background: var(--surface); border: 1px solid var(--border); color: var(--off-white); }
.dl-svg:hover { border-color: var(--border2); background: var(--hover-bg); transform: translateY(-3px); }
.re-edit-btn { font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; background: none; border: none; text-decoration: underline; text-underline-offset: 4px; transition: var(--transition); position: relative; z-index: 1; }
.re-edit-btn:hover { color: var(--red); }

/* NAV BUTTON VARIANTS */
.btn-nav-back { padding: 12px 22px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; transition: var(--transition); }
.btn-nav-back:hover { border-color: var(--border2); color: var(--off-white); background: var(--hover-bg); transform: translateY(-1px); }
.btn-nav-next { display: flex; align-items: center; gap: 8px; padding: 12px 26px; border-radius: 10px; border: none; background: var(--red); color: #fff; font-size: 14px; font-weight: 800; cursor: pointer; font-family: inherit; transition: var(--transition); box-shadow: 0 4px 12px rgba(232, 0, 13, 0.2); }
.btn-nav-next:hover { background: var(--red-light); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(232, 0, 13, 0.35); }
.btn-generate { display: flex; align-items: center; justify-content: center; min-width: 200px; gap: 10px; padding: 16px 36px; border-radius: 12px; border: none; background: var(--red); color: #fff; font-size: 16px; font-weight: 800; cursor: pointer; font-family: inherit; transition: var(--transition); box-shadow: 0 4px 14px rgba(232, 0, 13, 0.25); }
.btn-generate:hover { background: var(--red-light); box-shadow: 0 10px 28px rgba(232, 0, 13, 0.4); transform: translateY(-3px); }

/* TOOLS GRID (homepage) */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.tool-grid-card { display: flex; align-items: center; gap: 16px; padding: 20px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; transition: var(--transition); position: relative; overflow: hidden; box-shadow: var(--shadow); }
.tool-grid-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: .4s cubic-bezier(.4, 0, .2, 1); }
.tool-grid-card:hover { border-color: var(--red-border); background: var(--surface2); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.tool-grid-card:hover::before { transform: scaleX(1); }
.tool-grid-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--red-dim); border: 1px solid var(--red-border); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; color: var(--red); }
.tool-grid-name { font-size: 15px; font-weight: 800; color: var(--off-white); }
.tool-grid-sub { font-size: 13px; color: var(--muted); margin-top: 4px; font-weight: 500; }

/* FEATURES SECTION */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media(max-width: 768px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media(max-width: 480px) { .features-grid { grid-template-columns: 1fr; } }
.feature-card { padding: 32px 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); transition: var(--transition); box-shadow: var(--shadow); }
.feature-card:hover { border-color: var(--red-border); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-icon { font-size: 32px; margin-bottom: 16px; display: block; }
.feature-title { font-size: 16px; font-weight: 800; margin-bottom: 10px; color: var(--off-white); }
.feature-desc { font-size: 14px; color: var(--muted); line-height: 1.7; }

/* HOW IT WORKS */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media(max-width: 600px) { .steps-grid { grid-template-columns: 1fr; } }
.step-card { padding: 36px 28px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); transition: var(--transition); }
.step-card:hover { transform: translateY(-4px); border-color: var(--border2); box-shadow: var(--shadow-lg); }
.step-number { font-size: 64px; font-weight: 900; line-height: 1; color: var(--red-dim); margin-bottom: 20px; -webkit-text-stroke: 1px var(--red-border); }
.step-title { font-size: 17px; font-weight: 800; color: var(--off-white); margin-bottom: 10px; }
.step-desc { font-size: 14px; color: var(--muted); line-height: 1.7; }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: var(--transition); background: var(--surface); box-shadow: var(--shadow); }
.faq-item:hover { border-color: var(--border2); }
.faq-item.open { border-color: var(--red-border); box-shadow: var(--shadow-lg); }
.faq-question { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; background: none; border: none; color: var(--off-white); font-size: 16px; font-weight: 700; text-align: left; cursor: pointer; font-family: inherit; transition: var(--transition); }
.faq-question:hover { background: var(--hover-bg); }
.faq-icon { width: 26px; height: 26px; border-radius: 8px; background: var(--surface2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; transition: var(--transition); color: var(--muted); }
.faq-item.open .faq-icon { background: var(--red-dim); border-color: var(--red-border); color: var(--red-light); transform: rotate(45deg); }
.faq-answer { display: none; padding: 0 24px 20px; font-size: 15px; color: var(--muted); line-height: 1.8; }
.faq-item.open .faq-answer { display: block; animation: fadeIn .3s ease; }

/* RELATED TOOLS */
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.related-card { display: flex; align-items: center; gap: 14px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; transition: var(--transition); box-shadow: var(--shadow); }
.related-card:hover { border-color: var(--red-border); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.related-card-icon { font-size: 22px; }
.related-card-name { font-size: 14px; font-weight: 800; color: var(--off-white); }

/* CTA SECTION */
.cta-section { text-align: center; padding: clamp(60px,8vw,100px) clamp(16px,4vw,48px); border-top: 1px solid var(--border); background: var(--surface2); }
.cta-section h2 { font-size: clamp(32px, 4vw, 52px); font-weight: 800; margin-bottom: 20px; letter-spacing: -1.5px; color: var(--off-white); }
.cta-section p { font-size: 18px; color: var(--muted); margin-bottom: 36px; max-width: 600px; margin-left: auto; margin-right: auto; }

/* SECTION WRAPPER */
.section { max-width: 1100px; margin: 0 auto; padding: clamp(56px,6vw,90px) clamp(16px,4vw,48px); }
.section-label { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--red-light); background: var(--red-dim); border: 1px solid var(--red-border); padding: 6px 18px; border-radius: 100px; margin-bottom: 24px; }
.section-title { font-size: clamp(28px, 4vw, 48px); font-weight: 800; letter-spacing: -1.5px; color: var(--off-white); margin-bottom: 16px; }
.section-sub { font-size: 17px; color: var(--muted); line-height: 1.7; max-width: 640px; font-weight: 500; }
.section-hdr { margin-bottom: 48px; }

/* BLOG GRID */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media(max-width: 900px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media(max-width: 560px) { .blog-grid { grid-template-columns: 1fr; } }
.blog-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; text-decoration: none; transition: var(--transition); display: flex; flex-direction: column; box-shadow: var(--shadow); }
.blog-card:hover { border-color: var(--red-border); transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.blog-card-img { height: 200px; background: linear-gradient(135deg, rgba(232,0,13,.15), rgba(232,0,13,.05)); display: flex; align-items: center; justify-content: center; font-size: 64px; border-bottom: 1px solid var(--border); }
.blog-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.blog-card-cat { font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--red-light); margin-bottom: 12px; }
.blog-card-title { font-size: 18px; font-weight: 800; color: var(--off-white); margin-bottom: 12px; line-height: 1.35; }
.blog-card-excerpt { font-size: 14px; color: var(--muted); line-height: 1.7; flex: 1; }
.blog-card-meta { font-size: 13px; color: var(--muted2); margin-top: 18px; font-weight: 600; }

/* FOOTER */
.footer { border-top: 1px solid var(--border); background: var(--surface2); }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 80px clamp(16px,4vw,48px) 48px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; }
@media(max-width: 900px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media(max-width: 560px) { .footer-inner { grid-template-columns: 1fr; gap: 40px; } }
.footer-brand-logo { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 18px; margin-bottom: 18px; color: var(--off-white); }
.footer-brand-mark { width: 34px; height: 34px; border-radius: 8px; background: var(--red); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(232, 0, 13, 0.3); }
.footer-brand-mark svg { width: 18px; height: 18px; fill: white; }
.footer-brand p { font-size: 14px; color: var(--muted); line-height: 1.8; max-width: 300px; }
.footer-col h4 { font-size: 14px; font-weight: 800; color: var(--off-white); margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1px; }
.footer-col a { display: block; font-size: 14px; color: var(--muted); margin-bottom: 12px; transition: var(--transition); font-weight: 500; }
.footer-col a:hover { color: var(--red); transform: translateX(4px); }
.footer-bottom { max-width: 1100px; margin: 0 auto; padding: 24px clamp(16px,4vw,48px); border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-copy { font-size: 14px; color: var(--muted2); font-weight: 500; }
.footer-bottom-links { display: flex; gap: 24px; }
.footer-bottom-links a { font-size: 14px; color: var(--muted2); transition: var(--transition); font-weight: 600; }
.footer-bottom-links a:hover { color: var(--off-white); }

/* ADSENSE SLOTS */
.ad-slot { background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; color: var(--muted2); font-size: 13px; text-align: center; min-height: 90px; margin: 32px 0; transition: var(--transition); }
.ad-slot { display: none !important; }
.ad-slot:hover { border-color: var(--border2); }
.ad-slot-top { min-height: 90px; }
.ad-slot-sidebar { min-height: 250px; }
.ad-slot-footer { min-height: 120px; }

/* LAYOUT WITH SIDEBAR */
.page-layout { max-width: 1100px; margin: 0 auto; padding: 0 clamp(16px,4vw,48px) 80px; display: grid; grid-template-columns: 1fr 320px; gap: 48px; }
@media(max-width: 900px) { .page-layout { grid-template-columns: 1fr; } }
.page-main {}
.page-sidebar {}

/* ANIMATIONS */
.fade-up { opacity: 0; transform: translateY(30px); transition: opacity .7s cubic-bezier(.4,0,.2,1), transform .7s cubic-bezier(.4,0,.2,1); }
.fade-up.vis { opacity: 1; transform: translateY(0); }

/* CONTENT PROSE */
.prose h2 { font-size: 26px; font-weight: 800; color: var(--off-white); margin: 40px 0 16px; letter-spacing: -.5px; }
.prose h3 { font-size: 20px; font-weight: 700; color: var(--off-white); margin: 32px 0 12px; }
.prose p { font-size: 16px; color: var(--muted); line-height: 1.8; margin-bottom: 20px; }
.prose ul, .prose ol { padding-left: 24px; margin-bottom: 20px; }
.prose li { font-size: 16px; color: var(--muted); line-height: 1.8; margin-bottom: 8px; }
.prose a { color: var(--red); text-decoration: underline; text-underline-offset: 4px; transition: var(--transition); }
.prose a:hover { color: var(--red-light); }
.prose strong { color: var(--off-white); font-weight: 800; }

/* STATS */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media(max-width: 768px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media(max-width: 400px) { .stats-grid { grid-template-columns: 1fr 1fr; gap: 16px; } }
.stat-card { padding: 32px 24px; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); transition: var(--transition); box-shadow: var(--shadow); }
.stat-card:hover { transform: translateY(-4px); border-color: var(--border2); box-shadow: var(--shadow-lg); }
.stat-num { font-size: 42px; font-weight: 900; color: var(--red); letter-spacing: -2px; line-height: 1; }
.stat-label { font-size: 14px; color: var(--muted); margin-top: 10px; font-weight: 600; }

/* SHARE ROW */
.share-row { display: flex; gap: 10px; flex-wrap: wrap; }
.share-btn { display: flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 14px; font-weight: 700; cursor: pointer; transition: var(--transition); box-shadow: var(--shadow); }
.share-btn:hover { border-color: var(--border2); color: var(--off-white); background: var(--hover-bg); transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* UTILITY */
.text-red { color: var(--red); }
.text-muted { color: var(--muted); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 clamp(16px,4vw,48px); }
.full-bleed { background: var(--surface2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* BLOG POST */
.blog-post-hero { max-width: 800px; margin: 0 auto; padding: 80px clamp(16px,4vw,48px) 48px; text-align: center; }
.blog-post-body { max-width: 800px; margin: 0 auto; padding: 0 clamp(16px,4vw,48px) 90px; }
.blog-post-cat { font-size: 13px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--red-light); margin-bottom: 16px; display: inline-block; background: var(--red-dim); padding: 6px 16px; border-radius: 100px; border: 1px solid var(--red-border); }
.blog-post-title { font-size: clamp(32px,5vw,60px); font-weight: 800; letter-spacing: -2px; color: var(--off-white); margin-bottom: 24px; line-height: 1.15; }
.blog-post-meta { font-size: 14px; color: var(--muted); display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-bottom: 0; font-weight: 600; }

/* CONTACT FORM */
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.contact-form textarea { min-height: 140px; }

/* POLICY PROSE */
.policy-content { max-width: 800px; margin: 0 auto; padding: 0 clamp(16px,4vw,48px) 90px; }
.policy-content h2 { font-size: 24px; font-weight: 800; color: var(--off-white); margin: 40px 0 16px; }
.policy-content h3 { font-size: 18px; font-weight: 800; color: var(--off-white); margin: 28px 0 12px; }
.policy-content p, .policy-content li { font-size: 15px; color: var(--muted); line-height: 1.8; margin-bottom: 16px; }
.policy-content ul { padding-left: 24px; }
.policy-content li { margin-bottom: 8px; }

/* ABOUT */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media(max-width: 768px) { .about-grid { grid-template-columns: 1fr; } }

/* PAGE HERO (non-homepage) */
.page-hero { padding: clamp(56px,8vw,110px) clamp(16px,4vw,48px) clamp(40px,5vw,70px); max-width: 840px; margin: 0 auto; text-align: center; }
.page-hero h1 { font-size: clamp(36px,5vw,64px); font-weight: 800; letter-spacing: -2.5px; margin-bottom: 20px; color: var(--off-white); }
.page-hero p { font-size: 18px; color: var(--muted); max-width: 560px; margin: 0 auto 36px; line-height: 1.7; }

/* Mobile Fix */
html, body { overflow-x: hidden; max-width: 100%; }
* { box-sizing: border-box; }
img, svg, canvas, iframe { max-width: 100%; }

.page-layout, .page-main, .page-sidebar, .tool-card, .stepbar, .type-grid, .two-col, .style-row, .size-row, .color-row { max-width: 100%; }

@media (max-width: 768px) {
  .page-layout { display: block !important; }
  .page-sidebar { width: 100% !important; margin-top: 24px; }
  .stepbar { overflow-x: auto; padding-bottom: 12px; }
  .type-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .two-col { grid-template-columns: 1fr !important; }
  .size-row, .style-row, .color-row { flex-wrap: wrap !important; }
}
