/* ============================================
   SeoSee — Global Styles
   ============================================ */

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a28;
  --bg-card-hover: #222235;
  --bg-input: #16162a;
  --border: #2a2a40;
  --border-focus: #6366f1;
  --text-primary: #f0f0f5;
  --text-secondary: #9090a8;
  --text-muted: #8b8ba8;  /* was #606078 — fixed contrast ratio 4.5:1 */
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.3);
  --green: #10b981;
  --green-bg: rgba(16, 185, 129, 0.1);
  --red: #ef4444;
  --red-bg: rgba(239, 68, 68, 0.1);
  --yellow: #f59e0b;
  --yellow-bg: rgba(245, 158, 11, 0.1);
  --blue: #3b82f6;
  --blue-bg: rgba(59, 130, 246, 0.1);
  --gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --radius: 12px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.6);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===== LIGHT MODE ===== */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input: #f1f5f9;
  --border: #e2e8f0;
  --border-focus: #6366f1;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #64748b;  /* was #94a3b8 — fixed contrast for light mode */
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --green: #10b981;
  --green-bg: rgba(16, 185, 129, 0.15);
  --red: #ef4444;
  --red-bg: rgba(239, 68, 68, 0.15);
  --yellow: #f59e0b;
  --yellow-bg: rgba(245, 158, 11, 0.15);
  --blue: #3b82f6;
  --blue-bg: rgba(59, 130, 246, 0.15);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  padding-top: 57px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  body { padding-top: 76px; }
}

/* ============ HEADER ============ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 4px 0;
  background:
    radial-gradient(800px 60px at 50% 0%, rgba(99,102,241,0.06), transparent 80%),
    rgba(8, 10, 18, 0.7);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border-bottom: 1px solid rgba(99, 102, 241, 0.12);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 8px 32px rgba(0,0,0,0.15);
}
.header::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(99,102,241,0.4) 50%,
    transparent 100%);
  pointer-events: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
}

.logo-icon { font-size: 1.6rem; }

.logo-image {
  width: 100px;
  height: 67px;
  object-fit: contain;
}

.logo-pro {
  background: linear-gradient(135deg, #00d4ff 0%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav { display: flex; align-items: center; gap: 24px; }

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(99, 102, 241, 0.08);
}

.auth-buttons, .user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-email {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
}

.btn-ghost:hover { color: var(--text-primary); }

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-full { width: 100%; }

.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-accent { background: var(--accent); color: #fff; border: none; border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s; }
.btn-accent:hover { opacity: 0.9; transform: translateY(-1px); }

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: left;
  padding: 20px 0 20px;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 48px;
}
.hero-left { flex: 1; }
.hero-text-left { text-align: left; }

/* Hero Glow Center — subtle Vercel/Stripe style */
.hero-glow-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, rgba(99, 102, 241, 0.08) 40%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  animation: meshDrift1 15s ease-in-out infinite;
}

/* Hero Preview Card */
.hero-preview { flex: 0 0 340px; display: none; }
@media (min-width: 900px) { .hero-preview { display: block; } }

.hero-preview-card {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: floatCard 6s ease-in-out infinite;
  transition: transform 0.3s, box-shadow 0.3s;
}
.hero-preview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 40px 100px rgba(99,102,241,0.25), 0 0 0 1px rgba(99,102,241,0.2);
}
@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.preview-header {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 16px; background: rgba(0,0,0,0.2);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.preview-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.15); }
.preview-dot:nth-child(1) { background: #ef4444aa; }
.preview-dot:nth-child(2) { background: #f59e0baa; }
.preview-dot:nth-child(3) { background: #10b981aa; }
.preview-url { margin-left: 8px; font-size: 0.75rem; color: var(--text-muted); }

.preview-body {
  padding: 28px 24px;
  text-align: center;
  background: rgba(10,10,15,0.6);
}
.preview-score-ring {
  position: relative;
  width: 100px; height: 100px;
  margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
}
.preview-score-num {
  position: absolute;
  font-size: 2rem;
  font-weight: 800;
  color: #10b981;
}
.preview-score-label { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 4px; }
.preview-stars { font-size: 0.85rem; color: #f59e0b; margin-bottom: 16px; }
.preview-stats {
  display: flex; flex-direction: column; gap: 6px;
  text-align: left; margin-bottom: 16px;
}
.preview-stat-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.8rem; color: var(--text-secondary);
  padding: 4px 8px; background: rgba(255,255,255,0.03); border-radius: 6px;
}
.preview-stat-icon { font-weight: 700; }
.preview-meter {
  padding: 10px; background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(139,92,246,0.1));
  border-radius: 8px; border: 1px solid rgba(99,102,241,0.15);
}
.preview-meter-label { font-size: 0.78rem; color: var(--text-secondary); }
.preview-meter-label strong { color: #10b981; }

.preview-score-anim {
  animation: scoreFill 1.5s ease-out forwards;
}
@keyframes scoreFill { from { stroke-dashoffset: 264; } to { stroke-dashoffset: 42; } }

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

@keyframes meshDrift1 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  33% { transform: translate(-40%, -55%) scale(1.1); }
  66% { transform: translate(-60%, -45%) scale(0.95); }
}
@keyframes meshDrift2 {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-55%) scale(1.15); }
}

.hero-glow {
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  filter: blur(100px);
  animation: pulse 4s ease-in-out infinite, meshDrift2 12s ease-in-out infinite;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.8; transform: translateX(-50%) scale(1.1); }
}

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

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: linear-gradient(110deg, var(--bg-card) 30%, rgba(99, 102, 241, 0.25) 50%, var(--bg-card) 70%);
  background-size: 200% 100%;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both,
             badgeShimmer 3s linear 1s infinite;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.03em;
  animation: fadeInUpTitle 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 48px;
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); filter: blur(6px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes fadeInUpTitle {
  from { opacity: 0; transform: translateY(32px); filter: blur(8px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes urlPulse {
  0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.5), 0 0 0 0 rgba(99, 102, 241, 0.2); }
  50% { box-shadow: 0 0 0 8px rgba(99, 102, 241, 0), 0 0 24px rgba(99, 102, 241, 0.4); }
  100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0), 0 0 0 rgba(99, 102, 241, 0); }
}

/* URL Input */
.url-input-wrapper {
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.55s both,
             urlPulse 2.4s ease-out 1.6s 3;
}

.url-input-container {
  display: flex;
  align-items: center;
  background: #171A28;
  border: 1px solid #2D3150;
  border-radius: var(--radius-lg);
  padding: 6px;
  max-width: 700px;
  margin: 0 auto;
  transition: all 0.3s;
}

.url-input-container:focus-within {
  background: #171A28;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow), 0 0 24px rgba(99, 102, 241, 0.2);
}

.url-icon { padding: 0 12px; font-size: 1.2rem; }

.url-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 1rem;
  font-family: var(--font);
  padding: 14px 8px;
  min-width: 0;
}

.url-input::placeholder { color: var(--text-muted); }

.btn-analyze {
  padding: 14px 32px;
  background: var(--accent);
  color: white;
  border-radius: 14px;
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-analyze:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 24px var(--accent-glow), 0 0 48px rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
}
.btn-analyze:active {
  transform: translateY(0);
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.spinner-inline {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--accent);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

.hero-trust {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.7s both;
}

/* Social Proof */
.hero-social-proof {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.85s both;
}
.hero-social-proof strong { color: var(--text); }
.proof-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: proofPulse 2s ease-in-out infinite;
}
.proof-divider { color: var(--text-muted); opacity: 0.5; }
@keyframes proofPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ============ FEATURES ============ */
.features {
  padding: 60px 0;
  background: var(--bg-secondary);
}

/* Scroll indicator — subtle chevron between hero and features */
.scroll-indicator-wrap {
  display: none;
  text-align: center;
  padding: 12px 0 4px;
  background: var(--bg-secondary);
}
.scroll-indicator {
  display: inline-flex;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  animation: scrollBounce 2s ease-in-out infinite;
}
.scroll-indicator:hover { color: var(--accent); border-color: var(--accent); }
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}
@media (max-width: 768px) {
  .scroll-indicator-wrap { display: block; }
}

.section-title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 64px;
  letter-spacing: -0.02em;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.15);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ============ PRICING ============ */
.pricing {
  padding: 60px 0;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  max-width: 800px;
  margin: 0 auto;
}

.price-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.price-card:hover { transform: translateY(-4px); }

.price-card-featured {
  border-color: var(--accent);
  box-shadow: 0 0 40px var(--accent-glow);
  position: relative;
}

.price-card-featured::before {
  content: 'MOST POPULAR';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 16px;
  background: var(--gradient);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
  letter-spacing: 0.05em;
}

.price-card-agency {
  border-color: var(--purple, #8b5cf6);
  background: linear-gradient(135deg, rgba(139,92,246,0.08), rgba(99,102,241,0.05));
  position: relative;
}

.price-card-agency::before {
  content: 'Agency';
  position: absolute;
  top: -1px;
  right: 20px;
  background: var(--purple, #8b5cf6);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 0 0 8px 8px;
}

.btn-agency {
  background: var(--purple, #8b5cf6);
  color: white;
}

.btn-agency:hover {
  background: #7c3aed;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.pricing-grid-3 {
  max-width: 1100px;
}

.price-feature-locked {
  color: var(--text-muted) !important;
  opacity: 0.5;
  text-decoration: line-through;
}

.price-badge {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.price-amount {
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 4px;
}

.price-period {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.price-desc {
  color: var(--text-muted);
  margin-bottom: 32px;
}

.price-features {
  list-style: none;
  text-align: left;
  margin-bottom: 32px;
}

.price-features li {
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(42, 42, 64, 0.5);
}

.price-features li:last-child { border: none; }

/* ============ FOOTER ============ */
.footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.5);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 24px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col h2.footer-heading {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.footer-col a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--accent); }

.footer-brand {
  font-size: 1.2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.footer-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.footer-copy { color: var(--text-muted); font-size: 0.8rem; }

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    text-align: left;
  }
  .footer-col:first-child {
    grid-column: 1 / -1;
    margin-bottom: 8px;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px 8px;
  }
  .footer-col:first-child {
    grid-column: 1 / -1;
  }
  .footer-col h2.footer-heading { font-size: 0.78rem; margin-bottom: 2px; }
  .footer-col a { font-size: 0.78rem; }
}

/* ============ MODALS ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 420px;
  max-width: 95vw;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}

.modal-wide { width: 520px; }

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s;
}

.modal-close:hover { color: var(--text-primary); background: var(--bg-secondary); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.auth-form h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.auth-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.form-group { margin-bottom: 16px; }

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-error {
  color: var(--red);
  font-size: 0.85rem;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: var(--red-bg);
  border-radius: 8px;
}

.auth-divider {
  text-align: center;
  margin: 16px 0 12px;
  position: relative;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.auth-divider::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}
.auth-divider::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}
.auth-divider span {
  background: var(--bg-modal, var(--bg-primary));
  padding: 0 10px;
  position: relative;
  z-index: 1;
}

.auth-switch {
  text-align: center;
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.auth-switch a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.auth-switch a:hover { color: var(--accent-hover); }

/* ============ RESULTS PANEL ============ */
.results-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s;
  padding: 20px;
}

.results-panel {
  position: relative;
  width: 900px;
  max-width: 100%;
  max-height: calc(90vh - 70px);
  margin-top: 70px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow-y: auto;
  padding: 40px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.results-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  margin-bottom: -36px;
  z-index: 100;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: all 0.2s;
  float: right;
}

.results-close:hover { border-color: var(--accent); color: var(--accent); }

.results-content { width: 100%; }

/* Score Ring */
.score-section {
  text-align: center;
  margin-bottom: 32px;
}

.score-ring {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 16px;
}

.score-ring svg { transform: rotate(-90deg); }

.score-ring-bg { stroke: var(--border); }

.score-ring-fill {
  transition: stroke-dashoffset 1s ease;
  stroke-linecap: round;
}

.score-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.5rem;
  font-weight: 900;
}

.score-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.score-grade {
  display: inline-block;
  font-size: 1.8rem;
  font-weight: 900;
  padding: 4px 16px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  letter-spacing: 1px;
}

/* Section Titles in Results */
.result-section {
  margin-bottom: 32px;
}

.result-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* Glass Card Effect */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.glass-card:hover {
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.3);
}

/* FAQ Generator */
.faq-remove {
  background: none;
  border: none;
  color: var(--red);
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.2s;
}
.faq-remove:hover { background: rgba(239,68,68,0.1); }

/* Content Insights */
.content-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.content-meta-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.content-meta-icon { font-size: 1.5rem; margin-bottom: 6px; }
.content-meta-val { font-size: 1.3rem; font-weight: 800; }
.content-meta-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.content-meta-sub { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }

/* Mobile Friendly */
.mobile-friendly-card {
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border);
}
.mobile-friendly-card.good { background: rgba(16,185,129,0.05); border-color: rgba(16,185,129,0.2); }
.mobile-friendly-card.bad { background: rgba(245,158,11,0.05); border-color: rgba(245,158,11,0.2); }
.mobile-friendly-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.mobile-friendly-status { font-size: 1.2rem; font-weight: 800; }
.mobile-checks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.mobile-check-item {
  font-size: 0.82rem;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.mobile-check-item.ok { background: rgba(16,185,129,0.08); color: var(--green); border-color: rgba(16,185,129,0.2); }
.mobile-check-item.bad { background: rgba(239,68,68,0.08); color: var(--red); border-color: rgba(239,68,68,0.2); }
.mobile-issues {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.mobile-issues div { margin-bottom: 4px; }

/* Meta Length Indicators */
.meta-bar-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.meta-bar-item:last-child { border-bottom: none; }
.meta-bar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.meta-bar-label { font-size: 0.9rem; font-weight: 600; }
.meta-bar-status {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}
.meta-bar-status.perfect { background: rgba(16,185,129,0.15); color: var(--green); }
.meta-bar-status.missing { background: rgba(239,68,68,0.15); color: var(--red); }
.meta-bar-status.short, .meta-bar-status.long { background: rgba(245,158,11,0.15); color: var(--yellow); }
.meta-bar-track {
  position: relative;
  height: 8px;
  background: var(--bg-card);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}
.meta-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease;
}
.meta-bar-range {
  position: absolute;
  top: 0;
  height: 100%;
  border-left: 2px dashed rgba(16,185,129,0.4);
  border-right: 2px dashed rgba(16,185,129,0.4);
  background: rgba(16,185,129,0.05);
}
.meta-bar-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
}
.meta-bar-count { color: var(--text-secondary); font-weight: 600; }
.meta-bar-tip { color: var(--text-muted); font-style: italic; }

/* Link Ratio */
.link-ratio-card {
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.link-ratio-card.good { background: rgba(16,185,129,0.05); border-color: rgba(16,185,129,0.2); }
.link-ratio-card.ok { background: rgba(245,158,11,0.05); border-color: rgba(245,158,11,0.2); }
.link-ratio-card.bad { background: rgba(239,68,68,0.05); border-color: rgba(239,68,68,0.2); }
.link-ratio-bar {
  display: flex;
  height: 28px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
}
.link-ratio-internal {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.6s ease;
}
.link-ratio-external {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.6s ease;
}
.link-ratio-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.link-ratio-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}
.link-ratio-dot.internal { background: #10b981; }
.link-ratio-dot.external { background: #6366f1; }
.link-ratio-total { color: var(--text-muted); margin-left: auto; }
.link-ratio-verdict { font-size: 0.85rem; font-weight: 600; }

/* Server Checks */
.server-check-item {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
}
.server-check-item.ok { background: rgba(16,185,129,0.05); border-color: rgba(16,185,129,0.2); }
.server-check-item.bad { background: rgba(239,68,68,0.05); border-color: rgba(239,68,68,0.2); }
.server-check-item.warn { background: rgba(245,158,11,0.05); border-color: rgba(245,158,11,0.2); }
.server-check-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}
.server-check-status {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: capitalize;
}
.server-check-issues {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.server-check-issues div { margin-bottom: 4px; }
.server-check-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.server-check-code {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  font-size: 0.75rem;
  font-family: monospace;
  max-height: 200px;
  overflow-y: auto;
  margin-top: 8px;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text-secondary);
}

/* Fix Checklist */
.checklist-toggle {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  min-width: 22px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  margin-right: 4px;
}
.checklist-toggle:hover { border-color: var(--accent); }
.checklist-toggle:checked {
  background: var(--green);
  border-color: var(--green);
}
.checklist-toggle:checked::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}
.issue-item.checklist-done {
  opacity: 0.55;
}
.issue-item.checklist-done .issue-text {
  text-decoration: line-through;
  text-decoration-color: var(--green);
}
.checklist-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.checklist-progress-bar {
  display: inline-block;
  width: 80px;
  height: 6px;
  background: var(--bg-card);
  border-radius: 3px;
  overflow: hidden;
}
.checklist-progress-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #10b981, #34d399);
  border-radius: 3px;
  transition: width 0.3s ease;
}
.checklist-progress-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Quick Wins */
.quick-wins-card {
  background: linear-gradient(135deg, rgba(16,185,129,0.08), rgba(99,102,241,0.05));
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 24px;
}
.quick-wins-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.quick-wins-icon { font-size: 1.5rem; }
.quick-wins-title { font-size: 1.1rem; font-weight: 800; color: var(--text-primary); }
.quick-wins-subtitle {
  font-size: 0.8rem;
  color: var(--green);
  font-weight: 600;
  margin-left: auto;
}
.quick-wins-list { display: flex; flex-direction: column; gap: 8px; }
.quick-win-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 0.2s;
}
.quick-win-item:hover {
  border-color: rgba(16,185,129,0.3);
  transform: translateX(4px);
}
.quick-win-icon { font-size: 1.2rem; }
.quick-win-action { flex: 1; font-size: 0.88rem; font-weight: 600; }
.quick-win-gain {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--green);
  background: rgba(16,185,129,0.1);
  padding: 2px 8px;
  border-radius: 6px;
}
.quick-win-time {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.quick-wins-footer {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 12px;
}

/* SEO Roadmap */
.roadmap-card {
  background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(139,92,246,0.05));
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 32px;
  backdrop-filter: blur(12px);
}
.roadmap-header {
  text-align: center;
  margin-bottom: 24px;
}
.roadmap-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}
.roadmap-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
}
.roadmap-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.roadmap-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 4px;
  transition: all 0.2s;
}
.roadmap-step:hover {
  border-color: rgba(99,102,241,0.3);
  transform: translateX(4px);
}
.roadmap-step-num {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.roadmap-step-body { flex: 1; }
.roadmap-step-action {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.roadmap-step-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.78rem;
}
.roadmap-time { color: var(--text-muted); }
.roadmap-gain { color: var(--green); font-weight: 600; }
.roadmap-diff { color: var(--text-muted); font-size: 0.75rem; }
.roadmap-connector {
  width: 2px;
  height: 16px;
  background: linear-gradient(180deg, rgba(99,102,241,0.3), transparent);
  margin-left: 19px;
  margin-bottom: 4px;
}
.roadmap-footer {
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(99,102,241,0.15);
}
.roadmap-score-prediction {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 8px;
}
.roadmap-score-before {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-muted);
}
.roadmap-arrow {
  font-size: 1.5rem;
  color: var(--accent);
}
.roadmap-score-after {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--green);
}
.roadmap-footer-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Congrats Banner */
.congrats-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}
.congrats-icon { font-size: 1.5rem; }
.congrats-text { font-size: 0.9rem; color: var(--text); }
.congrats-text strong { color: var(--green); }

/* Estimated Growth */
.estimated-growth {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(34, 197, 94, 0.06);
  border: 1px solid rgba(34, 197, 94, 0.15);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}
.growth-icon { font-size: 2rem; }

/* Issue Actions */
.issue-actions {
  display: flex;
  gap: 12px;
  margin-top: 6px;
  font-size: 0.75rem;
}
.issue-priority { color: var(--accent); }
.issue-time { color: var(--text-muted); }

/* Actionable Issue Cards */
.issue-expandable { flex-direction: column; align-items: stretch; }
.issue-main { display: flex; align-items: center; gap: 8px; }
.issue-details { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.issue-meta-row { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.issue-badge {
  padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600;
  background: rgba(239,68,68,0.1); color: #ef4444;
}
.issue-badge-warning { background: rgba(245,158,11,0.1); color: #f59e0b; }
.issue-badge-info { background: rgba(99,102,241,0.1); color: #6366f1; }
.issue-gain { color: var(--green); font-size: 0.8rem; font-weight: 600; }
.issue-difficulty {
  font-size: 0.78rem;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
}
.issue-difficulty-1 { background: rgba(16,185,129,0.15); color: var(--green); }
.issue-difficulty-2 { background: rgba(245,158,11,0.15); color: var(--yellow); }
.issue-difficulty-3 { background: rgba(239,68,68,0.15); color: var(--red); }
.issue-why { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 12px; line-height: 1.5; }
.issue-fix { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px; }
.issue-fix-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.issue-code {
  background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px; font-size: 0.8rem; overflow-x: auto; white-space: pre-wrap; word-break: break-all;
  font-family: 'Fira Code', 'Consolas', monospace; line-height: 1.5; color: var(--text);
  margin: 0;
}

/* Issue Cards */
.issue-list { display: flex; flex-direction: column; gap: 8px; }

.issue-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  font-size: 0.9rem;
  border-left: 3px solid var(--border);
}

.issue-item.critical { border-left-color: var(--red); background: var(--red-bg); }
.issue-item.warning { border-left-color: var(--yellow); background: var(--yellow-bg); }
.issue-item.info { border-left-color: var(--blue); background: var(--blue-bg); }
.issue-item.positive { border-left-color: var(--green); background: var(--green-bg); }

.issue-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.issue-text { color: var(--text-secondary); line-height: 1.5; }
.issue-text strong { color: var(--text-primary); }

/* Metric Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
}

.metric-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Tags */
.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  margin: 2px;
}

.tag-good { background: var(--green-bg); color: var(--green); }
.tag-bad { background: var(--red-bg); color: var(--red); }
.tag-warn { background: var(--yellow-bg); color: var(--yellow); }
.tag-info { background: var(--blue-bg); color: var(--blue); }

/* Snippet Preview */
.snippet-preview {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.snippet-title {
  color: var(--blue);
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 4px;
  text-decoration: underline;
  text-decoration-color: rgba(59, 130, 246, 0.3);
}

.snippet-url {
  color: var(--green);
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.snippet-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Schema Table */
.schema-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.schema-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.schema-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(42, 42, 64, 0.3);
  color: var(--text-secondary);
}

/* Payment */
.payment-header {
  text-align: center;
  margin-bottom: 24px;
}

.payment-header h2 { font-size: 1.4rem; margin-bottom: 4px; }

.pay-address {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-family: monospace;
  font-size: 0.9rem;
  word-break: break-all;
  text-align: center;
  color: var(--accent);
  cursor: pointer;
  transition: border-color 0.2s;
  margin: 12px 0;
}

.pay-address:hover { border-color: var(--accent); }

.payment-instruction { text-align: center; margin-bottom: 20px; }
.payment-copy-row { display: flex; gap: 10px; margin: 12px 0; }

.payment-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.payment-status-bar {
  text-align: center;
  padding: 12px;
  background: var(--bg-card);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Analysis progress */
.progress-section {
  text-align: center;
  padding: 60px 40px;
}

.progress-section h3 {
  font-size: 1.3rem;
  margin-bottom: 24px;
}

.progress-steps {
  max-width: 400px;
  margin: 0 auto;
  text-align: left;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.progress-step.active { color: var(--accent); }
.progress-step.done { color: var(--green); }

.progress-step-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  border: 2px solid var(--border);
}

.progress-step.active .progress-step-icon {
  border-color: var(--accent);
  animation: spin 1s linear infinite;
}

.progress-step.done .progress-step-icon {
  border-color: var(--green);
  background: var(--green-bg);
  color: var(--green);
}

/* Upgrade Banner */
.upgrade-banner {
  background: var(--gradient);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  margin-top: 24px;
}

.upgrade-banner h3 { color: white; font-size: 1.2rem; margin-bottom: 8px; }
.upgrade-banner p { color: rgba(255,255,255,0.8); font-size: 0.9rem; margin-bottom: 16px; }
.upgrade-banner .btn { background: white; color: #6366f1; }
.upgrade-banner .btn:hover { box-shadow: 0 4px 16px rgba(255,255,255,0.3); }

/* ===== TEASER (Premium paywall) ===== */
/* ===== PREMIUM TEASER CARDS ===== */
.teaser-card {
  position: relative;
  margin: 12px 0;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(99,102,241,0.06), rgba(139,92,246,0.03));
  border: 1px solid rgba(99,102,241,0.15);
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.teaser-card::after {
  content: '🔒';
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 0.9rem;
  opacity: 0.4;
  z-index: 3;
  filter: grayscale(0.3);
}
.teaser-card-blur {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    rgba(99,102,241,0.03) 0px,
    rgba(99,102,241,0.03) 8px,
    transparent 8px,
    transparent 16px
  );
  filter: blur(3px);
  pointer-events: none;
}
.teaser-card-overlay {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 16px;
  width: 100%;
  max-width: 500px;
}
.teaser-card-icon {
  font-size: 1.8rem;
  margin-bottom: 6px;
  filter: drop-shadow(0 0 8px rgba(99,102,241,0.3));
}
.teaser-card-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.teaser-card-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 4px;
  max-width: 420px;
}
.teaser-card-text strong { color: var(--accent); font-weight: 700; }
.teaser-card-hint {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-style: italic;
}
.teaser-card-btn {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 4px 14px rgba(99,102,241,0.3);
  white-space: nowrap;
}
.teaser-card-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99,102,241,0.4);
}

@media (max-width: 600px) {
  .teaser-card-overlay { padding: 14px 10px; }
  .teaser-card-icon { font-size: 1.5rem; }
  .teaser-card-title { font-size: 0.9rem; }
  .teaser-card-text { font-size: 0.78rem; }
  .teaser-card-hint { font-size: 0.72rem; }
  .teaser-card-btn { padding: 7px 16px; font-size: 0.76rem; }
}

.teaser-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(99,102,241,0.1);
  color: var(--accent-hover);
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: 8px;
  cursor: pointer;
  border: 1px dashed rgba(99,102,241,0.3);
}
.teaser-inline:hover { background: rgba(99,102,241,0.2); }

/* ===== FREE-TIER LIMITED AUDITS ===== */
/* Summary row (badge + lock hint) used for accessibility, best-practices, etc. on free tier */
.audit-summary-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
}
.audit-summary-row .audit-summary-text {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
}
.audit-summary-row .audit-summary-text small {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
}
.audit-summary-row .audit-summary-upgrade {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-hover);
  background: rgba(99,102,241,0.12);
  border: 1px dashed rgba(99,102,241,0.35);
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease;
}
.audit-summary-row .audit-summary-upgrade:hover {
  background: rgba(99,102,241,0.22);
}

/* Locked individual audit item (faded w/ lock overlay) */
.audit-item.audit-locked {
  opacity: 0.55;
  filter: grayscale(0.4);
  position: relative;
  pointer-events: none;
}
.audit-item.audit-locked::after {
  content: '🔒';
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  font-size: 1.1rem;
  opacity: 0.85;
  pointer-events: none;
}

/* Inline lock row for "click to unlock remaining N items" */
.audit-locked-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 16px;
  margin-top: 8px;
  background: linear-gradient(135deg, rgba(99,102,241,0.08) 0%, rgba(168,85,247,0.08) 100%);
  border: 1px dashed rgba(99,102,241,0.35);
  border-radius: var(--radius-md);
  color: var(--accent-hover);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}
.audit-locked-cta:hover {
  background: linear-gradient(135deg, rgba(99,102,241,0.18) 0%, rgba(168,85,247,0.18) 100%);
  transform: translateY(-1px);
}

/* Resource weight summary (free tier) — single large stat */
.resource-weight-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
}
.resource-weight-summary .resource-weight-icon {
  font-size: 1.6rem;
  line-height: 1;
}
.resource-weight-summary .resource-weight-text {
  flex: 1;
}
.resource-weight-summary .resource-weight-text strong {
  display: block;
  font-size: 1.05rem;
  color: var(--text-primary);
  font-weight: 700;
}
.resource-weight-summary .resource-weight-text small {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.resource-weight-summary .resource-weight-upgrade {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-hover);
  background: rgba(99,102,241,0.12);
  border: 1px dashed rgba(99,102,241,0.35);
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.resource-weight-summary .resource-weight-upgrade:hover {
  background: rgba(99,102,241,0.22);
}

/* ===== CURRENCY SELECTOR ===== */
.currency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin: 20px 0;
  max-height: 400px;
  overflow-y: auto;
}

.widget-fallback {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.widget-fallback a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.widget-fallback a:hover { text-decoration: underline; }

.np-widget-container { min-height: 200px; padding: 8px 0; }
.currency-card {
  padding: 14px 10px;
  text-align: center;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
}
.currency-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.currency-card.selected {
  border-color: var(--accent);
  background: rgba(99,102,241,0.1);
  box-shadow: 0 0 0 2px var(--accent);
}

/* "Browse all 300+" card — distinct gradient style */
.more-coins-card {
  background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(139,92,246,0.05));
  border: 2px dashed rgba(99,102,241,0.35);
  position: relative;
}
.more-coins-card:hover {
  border-color: var(--accent);
  border-style: solid;
  box-shadow: 0 4px 20px rgba(99,102,241,0.25);
  transform: translateY(-2px);
}
.more-coins-card .currency-name {
  font-weight: 700;
  color: var(--accent);
}
.more-coins-card .currency-code {
  color: var(--accent);
  font-weight: 600;
}
.currency-symbol {
  font-size: 1.8rem;
  margin-bottom: 4px;
}
.currency-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}
.currency-network {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin: 2px 0;
}
.currency-code {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
}
#continue-payment-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 12px;
  width: 38px;
  height: 38px;
  font-size: 1.0rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  flex-shrink: 0;
  backdrop-filter: blur(8px);
}
.theme-toggle:hover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.15);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.15);
}

/* ===== SKELETON LOADING ===== */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 8px;
}
.skeleton-text { height: 12px; margin-bottom: 8px; border-radius: 4px; }
.skeleton-title { height: 20px; width: 60%; margin-bottom: 12px; border-radius: 4px; }
.skeleton-card { height: 120px; margin-bottom: 16px; }
.skeleton-circle { width: 80px; height: 80px; border-radius: 50%; }

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

/* ===== GLASS MORPHISM ===== */
.glass {
  background: rgba(26, 26, 40, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
[data-theme="light"] .glass {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* ===== SUPPORT BUBBLE ===== */
.support-bubble {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  text-decoration: none;
  z-index: 90;
  box-shadow: 0 4px 20px var(--accent-glow);
  transition: transform 0.3s, box-shadow 0.3s;
  animation: bubble-pulse 2s infinite;
}

.support-bubble:hover {
  transform: scale(1.15);
  box-shadow: 0 6px 30px var(--accent-glow);
}

@keyframes bubble-pulse {
  0%, 100% { box-shadow: 0 4px 20px var(--accent-glow); }
  50% { box-shadow: 0 4px 30px var(--accent-glow), 0 0 0 8px rgba(99, 102, 241, 0.1); }
}

@media (max-width: 768px) {
  .support-bubble { width: 48px; height: 48px; font-size: 1.3rem; bottom: 16px; right: 16px; }
}

/* Tab buttons */
.tab-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.tab-btn {
  padding: 8px 16px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  transition: all 0.2s;
}

.tab-btn.active {
  color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
  border-bottom: 2px solid var(--accent);
}

.tab-btn:hover:not(.active) { color: var(--text-primary); background: var(--bg-card); }

/* Heading tree */
.heading-tree {
  font-size: 0.85rem;
}

.heading-item {
  padding: 4px 8px;
  color: var(--text-secondary);
  border-left: 2px solid var(--border);
  margin-left: 4px;
  margin-bottom: 4px;
}

.heading-item.h1 { margin-left: 0; font-weight: 700; font-size: 0.95rem; border-left-color: var(--accent); }
.heading-item.h2 { margin-left: 16px; border-left-color: var(--green); }
.heading-item.h3 { margin-left: 32px; border-left-color: var(--yellow); font-size: 0.8rem; }
.heading-item.h4, .heading-item.h5, .heading-item.h6 { margin-left: 48px; font-size: 0.75rem; color: var(--text-muted); }

/* Schema code block */
.schema-code {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 300px;
  overflow-y: auto;
  margin: 8px 0;
}

/* PageSpeed gauge */
.pagespeed-gauges {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.pagespeed-gauge {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.gauge-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.gauge-score {
  font-size: 2rem;
  font-weight: 900;
}

.gauge-score.good { color: var(--green); }
.gauge-score.average { color: var(--yellow); }
.gauge-score.poor { color: var(--red); }

.gauge-sublabel {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* CWV */
.cwv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.cwv-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.cwv-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
}

.cwv-value {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 4px;
  color: var(--text-primary);
}

/* ===== PageSpeed Audit Sections ===== */

/* Collapsible section (used for audit groups) */
.collapsible-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.collapsible-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 700;
  list-style: none; /* hide default marker */
  user-select: none;
  transition: background 0.2s ease;
}

.collapsible-header::-webkit-details-marker { display: none; }
.collapsible-header:hover { background: var(--bg-card-hover); }

.collapsible-title {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.collapsible-chevron {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: transform 0.2s ease;
}

.collapsible-section[open] .collapsible-chevron {
  transform: rotate(180deg);
}

.collapsible-body {
  padding: 0 20px 20px;
}

/* Audit chips (pass/warn/fail counts) */
.audit-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.audit-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.audit-chip-pass { background: var(--green-bg); color: var(--green); }
.audit-chip-warn { background: var(--yellow-bg); color: var(--yellow); }
.audit-chip-fail { background: var(--red-bg); color: var(--red); }
.audit-chip-info { background: var(--blue-bg); color: var(--blue); }

/* Passed/failed count summary under gauges */
.audit-count-summary {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* Audit list (container of audit items) */
.audit-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Individual audit item card */
.audit-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.audit-item.audit-pass  { border-left-color: var(--green); }
.audit-item.audit-warn  { border-left-color: var(--yellow); }
.audit-item.audit-fail  { border-left-color: var(--red); }
.audit-item.audit-info { border-left-color: var(--blue); }

.audit-item-header {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

/* Badge (pass/warn/fail) */
.audit-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.audit-badge-text { font-size: 0.68rem; }
.audit-badge.audit-pass  { background: var(--green-bg); color: var(--green); }
.audit-badge.audit-warn  { background: var(--yellow-bg); color: var(--yellow); }
.audit-badge.audit-fail  { background: var(--red-bg); color: var(--red); }
.audit-badge.audit-info  { background: var(--blue-bg); color: var(--blue); }

/* Audit body (title, displayValue, savings) */
.audit-item-body {
  flex: 1;
  min-width: 0;
}

.audit-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.audit-display-value {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.audit-savings {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--yellow);
  margin-top: 3px;
}

.audit-savings.audit-savings-bytes {
  color: var(--blue);
}

/* Collapsible details within an audit item */
.audit-details {
  margin-top: 10px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.audit-summary {
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  user-select: none;
  list-style: none;
}

.audit-summary::-webkit-details-marker { display: none; }
.audit-summary::before { content: '▸ '; transition: transform 0.2s; display: inline-block; }
.audit-details[open] .audit-summary::before { content: '▾ '; }

.audit-description {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 8px;
  padding: 2px 0;
}

/* Sub-items list (individual resources/URLs) */
.audit-subitems {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.audit-subitem {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  background: var(--bg-primary);
  border-radius: 6px;
  font-size: 0.75rem;
}

.audit-subitem-url {
  flex: 1;
  min-width: 100px;
  color: var(--text-secondary);
  word-break: break-all;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audit-subitem-size,
.audit-subitem-transfer,
.audit-subitem-wasted {
  color: var(--text-muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.audit-subitem-transfer { color: var(--blue); }
.audit-subitem-wasted   { color: var(--yellow); }

.audit-subitem-more {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  padding: 4px;
  font-style: italic;
}

/* ===== Resource Summary Cards ===== */
.resource-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.resource-summary-total strong {
  color: var(--accent);
  font-size: 1rem;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.resource-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.resource-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.08);
}

.resource-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.resource-meta {
  flex: 1;
  min-width: 0;
}

.resource-type {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.resource-count {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.resource-size {
  text-align: right;
  flex-shrink: 0;
}

.resource-size-transfer {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
}

.resource-size-uncompressed {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 1px;
}

/* ============ RESPONSIVE ============ */
/* ============ MOBILE MENU ============ */
.mobile-menu-btn {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-size: 1.2rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 76px;
  left: 0;
  right: 0;
  max-height: calc(100vh - 76px);
  overflow-y: auto;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  z-index: 99;
  flex-direction: column;
  gap: 2px;
  box-shadow: var(--shadow-lg);
  animation: slideDown 0.2s ease;
}

.mobile-menu .lang-dropdown-wrap {
  margin-top: 6px;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a, .mobile-menu button {
  text-align: left;
  width: 100%;
  justify-content: flex-start;
}

.mobile-menu .nav-link {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.mobile-menu .nav-link:hover,
.mobile-menu .nav-link:active {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent);
}
.mobile-menu .btn {
  width: 100%;
  margin-top: 3px;
}
.mobile-menu .btn + .btn {
  margin-top: 6px;
}
.mobile-menu .btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 16px;
  border-radius: 10px;
  transition: all 0.15s;
}
.mobile-menu .btn-outline:hover,
.mobile-menu .btn-outline:active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(99, 102, 241, 0.05);
}
.mobile-menu .user-email {
  padding: 10px 14px 4px !important;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.mobile-menu .mobile-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

@media (max-width: 480px) {
  .modal { padding: 24px 20px; border-radius: 16px; }
  .modal-wide { width: 100%; }
  .hero-title { font-size: 1.6rem !important; }
  .container { padding: 0 14px; }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .nav { display: none !important; }
  .mobile-menu-btn { display: flex; }
  .hero-content { flex-direction: column; gap: 0; }
  .hero-left { text-align: center; width: 100%; }
  .hero-badge { margin-bottom: 12px; }
  .hero-title { font-size: 2rem; margin-bottom: 12px; }
  .hero-subtitle { margin-bottom: 16px; }
  .hero-trust { flex-direction: column; gap: 8px; }
  .url-input-container { flex-direction: column; gap: 8px; }
  .url-icon { display: none; }
  .btn-analyze { width: 100%; }
  .hero { padding: 22px 0 0; min-height: auto; }
  .features { padding: 28px 0; }
  .section-title { font-size: 1.6rem; margin-bottom: 28px; }
  .features-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; gap: 16px; }
  .price-card { padding: 24px 20px; }
  .results-panel { width: 100%; max-height: calc(95vh - 90px); padding: 16px; border-radius: 12px; margin-top: 90px; }
  .metrics-grid { grid-template-columns: 1fr; }
  .pagespeed-gauges { grid-template-columns: 1fr; }
  .cwv-grid { grid-template-columns: 1fr; }
  .resource-grid { grid-template-columns: 1fr; }
  .collapsible-header { flex-wrap: wrap; gap: 8px; font-size: 1rem; padding: 12px 14px; }
  .audit-chips { gap: 4px; }
  .audit-chip { font-size: 0.68rem; padding: 2px 7px; }
  .audit-subitem { font-size: 0.7rem; }
}

/* ============ RTL SUPPORT ============ */
[dir="rtl"] body { text-align: right; }
[dir="rtl"] .header-inner { flex-direction: row-reverse; }
[dir="rtl"] .nav { flex-direction: row-reverse; }
[dir="rtl"] .hero-content { direction: rtl; }
[dir="rtl"] .pricing-grid { direction: rtl; }
[dir="rtl"] .features-grid { direction: rtl; }
[dir="rtl"] .footer-grid { direction: rtl; }
[dir="rtl"] .footer-col { text-align: right; }
[dir="rtl"] .modal { direction: rtl; }
[dir="rtl"] .auth-form { text-align: right; }
[dir="rtl"] .form-group input { text-align: right; }
[dir="rtl"] .dashboard-tabs { direction: rtl; }
[dir="rtl"] .metric-card { text-align: right; }
[dir="rtl"] .score-ring-container { direction: ltr; }
[dir="rtl"] .issue-card { direction: rtl; }
[dir="rtl"] .issue-card .issue-header { flex-direction: row-reverse; }
[dir="rtl"] .quick-win { direction: rtl; }
[dir="rtl"] .blog-post { direction: rtl; }
[dir="rtl"] .info-content { direction: rtl; }
[dir="rtl"] .info-hero { text-align: right; }
[dir="rtl"] .article-body { direction: rtl; }
[dir="rtl"] .article-body pre { direction: ltr; text-align: left; }
[dir="rtl"] .article-body code { direction: ltr; }
[dir="rtl"] .article-nav { flex-direction: row-reverse; }
[dir="rtl"] .article-meta { direction: rtl; }
[dir="rtl"] .article-cta { direction: rtl; }
[dir="rtl"] blockquote { border-left: none; border-right: 3px solid var(--accent); padding-left: 0; padding-right: 1rem; border-radius: 8px 0 0 8px; }
[dir="rtl"] .toast { direction: rtl; }

/* Language dropdown — reusable, compact, expandable */
.lang-dropdown { position: relative; display: inline-block; }
.lang-dropdown-toggle { display: flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-secondary); color: var(--text-muted); font-size: 0.72rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.lang-dropdown-toggle:hover { border-color: var(--accent); color: var(--text-primary); }
.lang-dropdown-toggle svg { opacity: 0.6; transition: transform 0.2s; }
.lang-dropdown.open .lang-dropdown-toggle svg { transform: rotate(180deg); }
.lang-dropdown-menu { display: none; position: absolute; top: 100%; margin-top: 4px; right: 0; min-width: 130px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 4px; box-shadow: 0 8px 24px rgba(0,0,0,0.4); z-index: 600; }
.lang-dropdown.open .lang-dropdown-menu { display: block; }
.lang-option { display: block; width: 100%; padding: 8px 12px; border: none; background: none; color: var(--text-secondary); font-size: 0.8rem; font-weight: 500; text-align: left; border-radius: 6px; cursor: pointer; transition: all 0.15s; }
.lang-option:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.lang-option.active { background: var(--accent); color: white; }

/* Mobile: lang-dropdown as inline element at bottom of menu */
.mobile-menu .lang-dropdown { position: relative; bottom: auto; right: auto; left: auto; width: fit-content; }
.mobile-menu .lang-dropdown-menu { position: absolute; bottom: 100%; top: auto; margin-top: 0; margin-bottom: 4px; left: 0; right: auto; }
[dir="rtl"] .mobile-menu .lang-dropdown-menu { left: auto; right: 0; }

@media (max-width: 768px) { .nav .lang-switcher { display: none; } }
