/* ViralThumbnail design system: Apple-style. System fonts, frosted glass, continuous corners,
   pill buttons, soft ambient shadows, light and dark themes. Shared by the landing, auth and app pages.
   Theme: dark unless the visitor picks light (theme.js sets <html data-theme>). */

:root {
  --bg: #f5f5f7;
  --bg-elev: #ffffff;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --fill: rgba(0, 0, 0, 0.05);
  --fill-2: rgba(0, 0, 0, 0.08);
  --line: rgba(0, 0, 0, 0.1);
  --line-soft: rgba(0, 0, 0, 0.06);
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --blue-soft: rgba(0, 113, 227, 0.1);
  --purple: #af52de;
  --green: #1d8f3e;
  --green-soft: rgba(52, 199, 89, 0.14);
  --orange: #c45c00;
  --orange-soft: rgba(255, 149, 0, 0.14);
  --red: #d70015;
  --nav-bg: rgba(255, 255, 255, 0.7);
  --nav-line: rgba(0, 0, 0, 0.1);
  --tint-blue: #eaf2fe;
  --tint-peach: #fff3e8;
  --tint-lavender: #f1edfd;
  --tint-mint: #edf6ef;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.14);
  --ease: cubic-bezier(0.25, 1, 0.5, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #000000;
  --bg-elev: #161617;
  --surface: rgba(28, 28, 30, 0.72);
  --surface-solid: #1c1c1e;
  --fill: rgba(255, 255, 255, 0.08);
  --fill-2: rgba(255, 255, 255, 0.13);
  --line: rgba(255, 255, 255, 0.14);
  --line-soft: rgba(255, 255, 255, 0.08);
  --text: rgba(255, 255, 255, 0.92);
  --text-2: #a1a1a6;
  --text-3: #86868b;
  --blue: #0a84ff;
  --blue-hover: #409cff;
  --blue-soft: rgba(10, 132, 255, 0.18);
  --purple: #bf5af2;
  --green: #30d158;
  --green-soft: rgba(48, 209, 88, 0.16);
  --orange: #ff9f0a;
  --orange-soft: rgba(255, 159, 10, 0.16);
  --red: #ff453a;
  --nav-bg: rgba(22, 22, 23, 0.8);
  --nav-line: rgba(255, 255, 255, 0.1);
  --tint-blue: #0c1a2c;
  --tint-peach: #2a1c0f;
  --tint-lavender: #1b1530;
  --tint-mint: #0f2116;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --bg-elev: #161617;
    --surface: rgba(28, 28, 30, 0.72);
    --surface-solid: #1c1c1e;
    --fill: rgba(255, 255, 255, 0.08);
    --fill-2: rgba(255, 255, 255, 0.13);
    --line: rgba(255, 255, 255, 0.14);
    --line-soft: rgba(255, 255, 255, 0.08);
    --text: rgba(255, 255, 255, 0.92);
    --text-2: #a1a1a6;
    --text-3: #86868b;
    --blue: #0a84ff;
    --blue-hover: #409cff;
    --blue-soft: rgba(10, 132, 255, 0.18);
    --purple: #bf5af2;
    --green: #30d158;
    --green-soft: rgba(48, 209, 88, 0.16);
    --orange: #ff9f0a;
    --orange-soft: rgba(255, 159, 10, 0.16);
    --red: #ff453a;
    --nav-bg: rgba(22, 22, 23, 0.8);
    --nav-line: rgba(255, 255, 255, 0.1);
    --tint-blue: #0c1a2c;
    --tint-peach: #2a1c0f;
    --tint-lavender: #1b1530;
    --tint-mint: #0f2116;
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.5 var(--font); -webkit-font-smoothing: antialiased;
  transition: background-color .3s var(--ease), color .3s var(--ease); }
a { color: var(--blue); }
img { max-width: 100%; }
h1, h2, h3 { letter-spacing: -0.02em; }
::selection { background: var(--blue-soft); }

.mono { font-family: var(--mono); }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.hidden { display: none !important; }
.error { color: var(--red); }
.ok { color: var(--green); }

/* ---- motion */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.animate-entry { opacity: 0; animation: rise .9s var(--ease) forwards; }
.d0 { animation-delay: 0ms; } .d1 { animation-delay: 80ms; } .d2 { animation-delay: 160ms; }
.d3 { animation-delay: 240ms; } .d4 { animation-delay: 320ms; } .d5 { animation-delay: 400ms; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .animate-entry { animation: none; opacity: 1; }
  *, *::before, *::after { transition: none !important; }
}

/* ---- navigation: sticky frosted bar */
.nav { position: sticky; top: 0; z-index: 50; height: 56px; background: var(--nav-bg); border-bottom: 1px solid var(--nav-line);
  backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); }
.nav-in { max-width: 1200px; height: 100%; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 16px; letter-spacing: -0.01em; white-space: nowrap; }
.logo { width: 30px; height: 30px; border-radius: 9px; background: #1d1d1f; color: #fff; display: grid; place-items: center; flex: none; box-shadow: var(--shadow-sm); }
:root[data-theme="dark"] .logo { background: #fff; color: #000; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo { background: #fff; color: #000; } }
.logo svg { width: 17px; height: 17px; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 13px; }
.nav-links a { color: var(--text-2); text-decoration: none; transition: color .3s var(--ease); }
.nav-links a:hover { color: var(--text); }
.nav-end { display: flex; align-items: center; gap: 10px; }

/* ---- buttons: pills */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; white-space: nowrap; text-decoration: none;
  font: 600 14px/1 var(--font); letter-spacing: -0.01em; padding: 11px 20px; border: 0; border-radius: 9999px;
  background: var(--blue); color: #fff; box-shadow: 0 6px 18px rgba(0, 113, 227, 0.25);
  transition: transform .3s var(--ease), background-color .3s var(--ease), box-shadow .3s var(--ease), opacity .3s var(--ease); }
.btn:hover { background: var(--blue-hover); transform: scale(1.02); box-shadow: 0 10px 24px rgba(0, 113, 227, 0.32); }
.btn:active { transform: scale(0.98); }
.btn.secondary { background: var(--fill); color: var(--text); box-shadow: none; }
.btn.secondary:hover { background: var(--fill-2); }
.btn.dark { background: var(--text); color: var(--bg); box-shadow: var(--shadow-sm); }
.btn.sm { padding: 8px 14px; font-size: 13px; }
.btn.lg { padding: 15px 26px; font-size: 16px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn svg { width: 16px; height: 16px; flex: none; }
.icon-btn { width: 36px; height: 36px; border-radius: 9999px; border: 0; background: transparent; color: var(--text); cursor: pointer;
  display: grid; place-items: center; transition: background-color .3s var(--ease), transform .3s var(--ease); }
.icon-btn:hover { background: var(--fill); }
.icon-btn svg { width: 18px; height: 18px; }
:focus-visible { outline: 3px solid var(--blue-soft); outline-offset: 2px; }
.btn:focus-visible, .icon-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 45%, transparent); }

/* ---- surfaces */
.card { position: relative; min-width: 0; padding: 24px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line-soft);
  backdrop-filter: blur(12px) saturate(150%); -webkit-backdrop-filter: blur(12px) saturate(150%); box-shadow: var(--shadow); }
.tag { font: 600 12px/1.2 var(--font); color: var(--text-2); letter-spacing: 0; }
.eyebrow { display: block; font: 600 14px/1.3 var(--font); color: var(--blue); letter-spacing: -0.01em; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 9999px; background: var(--surface); border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-sm); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font: 600 12px/1 var(--font); color: var(--text); }

/* ---- forms */
.field { display: grid; gap: 7px; margin-bottom: 16px; min-width: 0; }
.field label, .label { font: 500 13px/1.2 var(--font); color: var(--text-2); }
input[type=text], input[type=email], input[type=password], textarea, select {
  width: 100%; min-width: 0; background: var(--bg-elev); color: var(--text); border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 14px; font: 400 15px/1.35 var(--font); transition: border-color .3s var(--ease), box-shadow .3s var(--ease); }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); outline: none; }
textarea { min-height: 80px; resize: vertical; }
select { appearance: none; padding-right: 36px; 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 d='M1 1.5l5 5 5-5' fill='none' stroke='%2386868b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
input[type=checkbox] { accent-color: var(--blue); width: 16px; height: 16px; }

/* ---- status */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 9999px; background: var(--fill); color: var(--text-2);
  font: 600 12px/1 var(--font); white-space: nowrap; }
.badge.pass { background: var(--green-soft); color: var(--green); }
.badge.warn { background: var(--orange-soft); color: var(--orange); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 9999px; background: var(--green); flex: none; }
.dot.warn { background: var(--orange); }
.dot.idle { background: var(--text-3); }
.dot.pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.spin { display: inline-block; width: 14px; height: 14px; border-radius: 9999px; border: 2px solid currentColor; border-right-color: transparent; flex: none;
  animation: spin .8s linear infinite; vertical-align: -2px; opacity: .8; }
@keyframes spin { to { transform: rotate(360deg); } }
