/* =========================================================
   ZEE THUMB — Neumorphic White Card Stylesheet (Optimized)
   ========================================================= */

/* ─── CSS CUSTOM PROPERTIES ──────────────────────────── */
:root {
  --red:        #FF1F1F;
  --red-light:  #FF5C5C;
  --red-ultra:  #FFE5E5;
  --white:      #FFFFFF;
  --off-white:  #FAFAFA;
  --bg-primary: #d4d9e2;
  --card-bg:    #e8e8e8;
  --shadow-dark: #c2c2c2;
  --shadow-light: #ffffff;
  --text-primary:   #2c2e31;
  --text-secondary: #54545E;
  --text-muted:     #9A9AA5;
  --radius-sm:  10px;
  --radius-md:  16px;
  --radius-lg:  24px;
  --radius-xl:  32px;
  --font-display: 'Outfit', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --ease-spring:  cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out:     cubic-bezier(0.22, 1, 0.36, 1);
  --transition:   0.22s var(--ease-out);
  --neumorphic-shadow: 28px 28px 55px var(--shadow-dark), -28px -28px 55px var(--shadow-light);
  --neumorphic-shadow-sm: 12px 12px 30px var(--shadow-dark), -8px -8px 24px var(--shadow-light);
  --neumorphic-shadow-inset: inset 20px 20px 60px var(--shadow-dark), inset -20px -20px 60px var(--shadow-light);
}

/* ─── RESET & BASE ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, button { outline: none; }
details summary { list-style: none; }
details summary::-webkit-details-marker { display: none; }

/* ─── AMBIENT BACKGROUND ────────────────────────────── */
.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--bg-primary);
}

/* OPTIMIZED: will-change + translateZ for GPU compositing */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  will-change: transform;
  transform: translateZ(0);
  animation: orbFloat 12s ease-in-out infinite alternate;
}

.orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255,100,100,0.08), transparent 70%);
  top: -180px; right: -100px;
  animation-duration: 14s;
}
.orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(130,130,255,0.06), transparent 70%);
  bottom: -120px; left: -80px;
  animation-duration: 18s; animation-delay: -6s;
}
.orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255,180,100,0.05), transparent 70%);
  top: 40%; left: 30%;
  animation-duration: 20s; animation-delay: -3s;
}
.orb-4 {
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(100,200,255,0.04), transparent 70%);
  top: 20%; right: 25%;
  animation-duration: 16s; animation-delay: -9s;
}

.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,0,0,0.01) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.01) 1px, transparent 1px);
  background-size: 48px 48px;
}

@keyframes orbFloat {
  0%   { transform: translateZ(0) translate(0, 0) scale(1); }
  50%  { transform: translateZ(0) translate(40px, -30px) scale(1.06); }
  100% { transform: translateZ(0) translate(-20px, 20px) scale(0.97); }
}

/* ─── NEUMORPHIC CARD BASE ──────────────────────────── */
/* OPTIMIZED: contain:layout isolates layout reflows inside cards */
.glass-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--neumorphic-shadow-sm);
  position: relative;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.glass-card:hover {
  box-shadow: 16px 16px 36px var(--shadow-dark), -12px -12px 28px var(--shadow-light);
  transform: translateY(-2px);
}

/* ─── HEADER ─────────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 24px;
  height: 64px;
  background: linear-gradient(105deg, #e0e4ed 0%, #cfd4df 100%);
  box-shadow: 0 6px 14px rgba(0,0,0,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.7);
}

.header-inner {
  max-width: 1100px; margin: 0 auto;
  height: 100%; display: flex;
  align-items: center; justify-content: space-between;
}

.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 700; font-size: 17px;
  letter-spacing: -0.3px;
  color: var(--text-primary);
}

.logo-icon {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 9px;
  background: rgba(255,51,51,0.1);
  padding: 4px;
  transition: var(--transition);
}
.logo-icon:hover { transform: scale(1.06); }

.header-nav { display: flex; gap: 6px; }
.nav-link {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
}
.nav-link:hover {
  color: var(--red);
  background: rgba(255,255,255,0.5);
}

/* ─── MAIN LAYOUT ───────────────────────────────────── */
.main-content {
  position: relative; z-index: 1;
  padding-top: 64px;
}

/* ─── HERO ──────────────────────────────────────────── */
.hero {
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  padding: 80px 24px 60px;
  max-width: 800px; margin: 0 auto;
  animation: heroReveal 0.8s var(--ease-out) both;
}

@keyframes heroReveal {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 62px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -2px;
  color: var(--text-primary);
  margin-bottom: 20px;
  animation: heroReveal 0.8s 0.15s var(--ease-out) both;
}

.heading-accent {
  background: linear-gradient(135deg, var(--red) 0%, #FF7070 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: clamp(15px, 2vw, 17px);
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 40px;
  max-width: 520px;
  animation: heroReveal 0.8s 0.2s var(--ease-out) both;
}

/* ─── INPUT CARD ────────────────────────────────────── */
.input-card {
  width: 100%; max-width: 680px;
  padding: 16px;
  display: flex; gap: 12px;
  align-items: center;
  border-radius: var(--radius-xl);
  animation: heroReveal 0.8s 0.25s var(--ease-out) both;
  transition: box-shadow 0.3s var(--ease-out);
  background: var(--card-bg);
  box-shadow: var(--neumorphic-shadow-sm);
}
.input-card:focus-within {
  box-shadow: 16px 16px 36px var(--shadow-dark), -12px -12px 28px var(--shadow-light);
}

.input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute; left: 14px;
  color: var(--text-muted);
  display: flex; pointer-events: none;
  z-index: 2;
}

.url-input {
  width: 100%;
  background: var(--card-bg);
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 40px 14px 42px;
  font-family: var(--font-body);
  font-size: 16px; /* Prevents iOS zoom */
  font-weight: 400;
  color: var(--text-primary);
  box-shadow: inset 8px 8px 16px var(--shadow-dark), inset -8px -8px 16px var(--shadow-light);
  transition: var(--transition);
}
.url-input::placeholder { color: var(--text-muted); }
.url-input:focus {
  box-shadow: inset 12px 12px 24px var(--shadow-dark), inset -12px -12px 24px var(--shadow-light);
  background: var(--card-bg);
}

.clear-btn {
  position: absolute; right: 10px;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  background: transparent;
  opacity: 0; pointer-events: none;
  transition: var(--transition);
  z-index: 5;
}
.clear-btn.visible { opacity: 1; pointer-events: auto; }
.clear-btn:hover { background: rgba(0,0,0,0.07); color: var(--text-primary); }

/* OPTIMIZED: removed backdrop-filter (expensive on mobile) */
.paste-btn-circle {
  position: absolute;
  right: -20px; top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--card-bg);
  border: none;
  box-shadow: 8px 8px 18px var(--shadow-dark), -6px -6px 14px var(--shadow-light);
  font-family: var(--font-display);
  font-size: 13px; font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s var(--ease-spring);
  z-index: 20;
}
.paste-btn-circle svg {
  width: 18px; height: 18px;
  stroke: var(--red); stroke-width: 2;
  transition: transform 0.2s ease;
}
.paste-btn-circle:hover {
  transform: translateY(-50%) scale(1.05);
  box-shadow: 10px 10px 20px var(--shadow-dark), -8px -8px 18px var(--shadow-light);
}
.paste-btn-circle:hover svg { transform: scale(1.05); stroke: #ff4444; }
.paste-btn-circle.hidden-paste {
  opacity: 0; pointer-events: none;
  transform: translateY(-50%) scale(0.8);
}

.analyze-btn {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  padding: 13px 22px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--red) 0%, #FF5C5C 100%);
  color: white;
  font-family: var(--font-display);
  font-size: 14px; font-weight: 600;
  letter-spacing: 0.1px;
  white-space: nowrap;
  overflow: hidden;
  transition: transform 0.18s var(--ease-spring), box-shadow 0.22s var(--ease-out), opacity 0.2s;
  box-shadow: 8px 8px 20px rgba(255,51,51,0.35), -4px -4px 12px rgba(255,255,255,0.5);
  flex-shrink: 0;
}
.analyze-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.18), transparent);
  opacity: 0; transition: opacity 0.2s;
}
.analyze-btn:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 12px 12px 28px rgba(255,51,51,0.45), -6px -6px 16px rgba(255,255,255,0.6);
}
.analyze-btn:hover::before { opacity: 1; }
.analyze-btn:active:not(:disabled) { transform: translateY(0) scale(0.99); }
.analyze-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

.btn-text, .btn-icon { transition: opacity 0.15s; }
.btn-loader {
  position: absolute;
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,0.35);
  border-top-color: white;
  border-radius: 50%;
  opacity: 0;
  animation: spin 0.75s linear infinite;
  transition: opacity 0.15s;
}
.analyze-btn.loading .btn-text,
.analyze-btn.loading .btn-icon { opacity: 0; }
.analyze-btn.loading .btn-loader { opacity: 1; }

@keyframes spin { to { transform: rotate(360deg); } }

.input-hint {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 14px;
  animation: heroReveal 0.8s 0.3s var(--ease-out) both;
}

/* ─── RESULTS SECTION ─────────────────────────────── */
.results-section {
  max-width: 900px; margin: 0 auto;
  padding: 0 24px 60px;
}

.skeleton-wrap { display: flex; flex-direction: column; gap: 24px; }

.sk {
  background: linear-gradient(90deg, rgba(0,0,0,0.06) 25%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.06) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.skeleton-preview { display: flex; gap: 24px; padding: 20px; }
.sk-img { width: 280px; height: 158px; flex-shrink: 0; border-radius: var(--radius-md); }
.sk-info { flex: 1; padding-top: 10px; display: flex; flex-direction: column; gap: 12px; }
.sk-line { height: 16px; }
.w60 { width: 60%; }
.w40 { width: 40%; }

.skeleton-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }

/* FIXED: animation shorthand correctly includes delay (was being overridden) */
.sk-card { height: 200px; border-radius: var(--radius-lg); animation: shimmer 1.4s calc(var(--d, 0) * 80ms) infinite; }

@keyframes cardIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.preview-card {
  display: flex; gap: 28px; padding: 20px; margin-bottom: 32px;
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  box-shadow: var(--neumorphic-shadow-sm);
}
.preview-img-wrap {
  flex-shrink: 0; width: 280px; aspect-ratio: 16/9;
  position: relative; border-radius: var(--radius-md);
  overflow: hidden; background: rgba(0,0,0,0.04);
  box-shadow: inset 4px 4px 12px var(--shadow-dark), inset -4px -4px 12px var(--shadow-light);
}
.preview-img-wrap img { width: 100%; height: 100%; object-fit: cover; }

/* OPTIMIZED: removed backdrop-filter, slightly darker bg for same visual */
.preview-badge {
  position: absolute; top: 10px; right: 10px;
  padding: 6px 12px; border-radius: 8px;
  background: rgba(0,0,0,0.78);
  color: white;
  font-family: var(--font-display); font-size: 10px; font-weight: 700; letter-spacing: 1px;
}

.preview-meta {
  flex: 1; display: flex; flex-direction: column;
  justify-content: space-between; padding: 4px 0;
}
.meta-row { display: flex; flex-direction: column; gap: 18px; }
.meta-item { display: flex; flex-direction: column; gap: 4px; }
.meta-label { font-size: 11px; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-muted); }
.meta-value { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--text-primary); }

.download-all-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--radius-md);
  background: var(--card-bg); border: none;
  font-family: var(--font-display); font-size: 13.5px; font-weight: 600;
  color: var(--text-primary);
  transition: var(--transition); align-self: flex-start;
  box-shadow: 6px 6px 16px var(--shadow-dark), -4px -4px 12px var(--shadow-light);
}
.download-all-btn:hover {
  background: var(--text-primary); color: white;
  transform: translateY(-1px);
  box-shadow: 8px 8px 20px var(--shadow-dark), -6px -6px 16px var(--shadow-light);
}

.quality-heading {
  font-family: var(--font-display); font-size: 19px; font-weight: 700;
  letter-spacing: -0.5px; color: var(--text-primary); margin-bottom: 16px;
}

.quality-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 14px; }

/* OPTIMIZED: contain:layout reduces reflow scope on hover */
.quality-card {
  border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column;
  contain: layout;
  transition: transform 0.22s var(--ease-spring), box-shadow 0.22s var(--ease-out);
  animation: cardIn 0.4s var(--ease-out) both;
  animation-delay: var(--card-delay, 0ms);
  background: var(--card-bg);
  box-shadow: var(--neumorphic-shadow-sm);
}
.quality-card:hover {
  transform: translateY(-4px);
  box-shadow: 16px 16px 36px var(--shadow-dark), -12px -12px 28px var(--shadow-light);
}
.quality-card.unavailable { opacity: 0.5; pointer-events: none; }

.qc-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; background: rgba(0,0,0,0.07); }
.qc-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s var(--ease-out); }
.quality-card:hover .qc-thumb img { transform: scale(1.06); }

/* OPTIMIZED: removed backdrop-filter, use solid semi-transparent bg */
.qc-tag {
  position: absolute; top: 7px; right: 7px;
  padding: 3px 8px; border-radius: 5px;
  background: rgba(0,0,0,0.72);
  color: white; font-size: 9px; font-weight: 700; letter-spacing: 0.8px;
}

.qc-body { padding: 12px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.qc-name { font-family: var(--font-display); font-size: 13px; font-weight: 700; color: var(--text-primary); }
.qc-res { font-size: 11.5px; color: var(--text-muted); font-weight: 400; }
.qc-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.qc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 6px 10px; border-radius: 8px;
  font-size: 11px; font-weight: 600; font-family: var(--font-display);
  transition: var(--transition); flex: 1; min-width: 0; border: none;
}
.qc-btn-dl { background: linear-gradient(135deg, var(--red), #FF5C5C); color: white; box-shadow: 4px 4px 12px rgba(255,51,51,0.25); }
.qc-btn-copy { background: var(--card-bg); color: var(--text-secondary); box-shadow: 3px 3px 8px var(--shadow-dark), -2px -2px 6px var(--shadow-light); }
.qc-btn-open { background: var(--card-bg); color: var(--text-muted); width: 100%; box-shadow: 3px 3px 8px var(--shadow-dark), -2px -2px 6px var(--shadow-light); }

.reset-btn {
  display: flex; align-items: center; gap: 8px;
  margin: 28px auto 0; padding: 10px 20px;
  border-radius: 20px; border: none;
  font-family: var(--font-display); font-size: 13.5px; font-weight: 600;
  color: var(--text-secondary);
  background: var(--card-bg);
  box-shadow: var(--neumorphic-shadow-sm);
  transition: var(--transition);
}
.reset-btn:hover {
  color: var(--text-primary); transform: translateY(-1px);
  box-shadow: 8px 8px 20px var(--shadow-dark), -6px -6px 16px var(--shadow-light);
}

/* ─── INFO & FAQ ────────────────────────────────────── */
.info-section, .faq-section { max-width: 860px; margin: 0 auto; padding: 0 24px 80px; }

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.5vw, 30px); font-weight: 800;
  letter-spacing: -0.8px; color: var(--text-primary);
  margin-bottom: 28px; text-align: center;
}

.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }

.step-card {
  padding: 28px 24px; display: flex; flex-direction: column; gap: 10px;
  contain: layout;
  transition: transform 0.22s var(--ease-spring), box-shadow 0.22s var(--ease-out);
  background: var(--card-bg);
  box-shadow: var(--neumorphic-shadow-sm);
  border-radius: var(--radius-lg);
}
.step-card:hover {
  transform: translateY(-4px);
  box-shadow: 16px 16px 36px var(--shadow-dark), -12px -12px 28px var(--shadow-light);
}
.step-num { font-family: var(--font-display); font-size: 34px; font-weight: 800; color: rgba(255,51,51,0.15); line-height: 1; letter-spacing: -1px; }
.step-title { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--text-primary); }
.step-desc { font-size: 13.5px; color: var(--text-secondary); line-height: 1.6; }

.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  padding: 0; overflow: hidden;
  background: var(--card-bg);
  box-shadow: var(--neumorphic-shadow-sm);
  border-radius: var(--radius-lg);
  transition: box-shadow 0.2s ease;
}
.faq-item[open] { box-shadow: 16px 16px 36px var(--shadow-dark), -12px -12px 28px var(--shadow-light); }
.faq-q {
  padding: 18px 22px;
  font-family: var(--font-display); font-size: 15px; font-weight: 600;
  color: var(--text-primary); cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  transition: background 0.15s;
}
.faq-q:hover { background: rgba(0,0,0,0.025); }
.faq-q::after { content: '+'; font-size: 20px; font-weight: 300; color: var(--text-muted); transition: transform 0.25s var(--ease-out); flex-shrink: 0; }
details[open] .faq-q::after { transform: rotate(45deg); }
.faq-a { padding: 0 22px 18px; font-size: 14px; color: var(--text-secondary); line-height: 1.7; border-top: 1px solid rgba(0,0,0,0.06); margin: 0 22px; }

/* ─── FOOTER ────────────────────────────────────────── */
.site-footer {
  position: relative; z-index: 1;
  background: var(--card-bg);
  border-top: 1px solid rgba(255,255,255,0.5);
  padding: 32px 24px; text-align: center;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.footer-logo { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--text-secondary); margin-bottom: 4px; }
.footer-copy { font-size: 12px; color: rgba(0,0,0,0.28); }

/* ─── TOAST ─────────────────────────────────────────── */
.toast-container { position: fixed; top: 82px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 12px; pointer-events: none; }
.toast {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 14px 18px 14px 16px; border-radius: var(--radius-md);
  background: var(--card-bg); border: 1px solid rgba(255,255,255,0.5);
  color: var(--text-primary); font-family: var(--font-body);
  font-size: 13.5px; font-weight: 500;
  box-shadow: var(--neumorphic-shadow-sm);
  min-width: 260px; max-width: 360px;
  pointer-events: auto;
  animation: toastIn 0.45s var(--ease-spring) both;
}
.toast::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, var(--red), #FF7070); border-radius: 3px 0 0 3px; }
.toast.success::before { background: linear-gradient(180deg, #22c55e, #4ade80); }
.toast.error::before   { background: linear-gradient(180deg, #ef4444, #f87171); }
.toast.info::before    { background: linear-gradient(180deg, #3b82f6, #60a5fa); }
.toast.success .toast-icon { color: #16a34a; }
.toast.error   .toast-icon { color: #dc2626; }
.toast.info    .toast-icon { color: #2563eb; }
.toast.removing { animation: toastOut 0.3s var(--ease-out) both; }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px) scale(0.92); filter: blur(6px); } to { opacity: 1; transform: translateX(0) scale(1); filter: blur(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0) scale(1); } to { opacity: 0; transform: translateX(24px) scale(0.9); } }
.toast-icon { display: flex; flex-shrink: 0; }
.toast-msg { flex: 1; line-height: 1.4; }

/* ─── UTILITIES ─────────────────────────────────────── */
[hidden] { display: none !important; }
.desktop-br { display: none; }
@media (min-width: 700px) { .desktop-br { display: block; } }

/* ─── RESPONSIVE ────────────────────────────────────── */
@media (max-width: 700px) {
  .header-nav { display: none; }
  .hero { padding: 60px 20px 40px; }
  .input-card { flex-direction: column; border-radius: var(--radius-lg); padding: 14px; }
  .input-wrap { width: 100%; }
  .analyze-btn { width: 100%; justify-content: center; }
  .preview-card { flex-direction: column; }
  .preview-img-wrap { width: 100%; }
  .skeleton-preview { flex-direction: column; }
  .sk-img { width: 100%; height: 180px; }
  .steps-grid { grid-template-columns: 1fr; }
  .paste-btn-circle { right: -12px; width: 40px; height: 40px; }
  /* OPTIMIZED: disable expensive blur+animation on mobile GPUs */
  .orb { animation: none !important; filter: blur(40px); opacity: 0.1; }
}

@media (max-width: 480px) {
  .quality-grid { grid-template-columns: repeat(2, 1fr); }
  .toast-container { top: 76px; right: 12px; left: 12px; }
  .toast { min-width: 0; max-width: 100%; }
}

/* ─── REDUCED MOTION (accessibility + performance) ───── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .orb { animation: none; }
  .hero, .hero-heading, .hero-sub, .input-card, .input-hint { animation: none; opacity: 1; }
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; transition: none; }
  .quality-card { animation: none; opacity: 1; }
}

/* ─── SCROLLBAR ─────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 4px; }

/* ─── FOCUS & iOS ZOOM PREVENTION ───────────────────── */
:focus-visible { outline: 2.5px solid var(--red); outline-offset: 3px; border-radius: 4px; }
input, button, select, textarea { font-size: 16px; }
.url-input { font-size: 16px; }

/* ─── SCROLL REVEAL ─────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}
.reveal-stagger.visible > *:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0.05s; }
.reveal-stagger.visible > *:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.15s; }
.reveal-stagger.visible > *:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.25s; }
.reveal-stagger.visible > *:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.35s; }
