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

:root {
  --bg: #0b0d13;
  --bg-card: #141722;
  --bg-card-alt: #191d2b;
  --bg-input: #0e1018;
  --border: #1f2437;
  --border-focus: #4f6ef7;
  --text: #e2e5f0;
  --text-dim: #8890a8;
  --text-muted: #555d75;
  --accent: #4f6ef7;
  --accent-hover: #6d88ff;
  --accent-glow: rgba(79, 110, 247, 0.12);
  --green: #22c993;
  --green-bg: rgba(34, 201, 147, 0.08);
  --yellow: #f5b942;
  --yellow-bg: rgba(245, 185, 66, 0.08);
  --red: #ef5350;
  --red-bg: rgba(239, 83, 80, 0.08);
  --orange: #f08c38;
  --orange-bg: rgba(240, 140, 56, 0.08);
  --cyan: #22d3ee;
  --purple: #a78bfa;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
  --transition: 0.2s ease;
}

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ── 3D ANIMATED BACKGROUND ── */
.bg-3d {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  perspective: 1200px;
  overflow: hidden;
}

/* Color-cycling gradient mesh */
.bg-3d::before {
  content: '';
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(ellipse 600px 600px at 20% 30%, rgba(79, 110, 247, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 500px 500px at 75% 60%, rgba(34, 201, 147, 0.10) 0%, transparent 70%),
    radial-gradient(ellipse 550px 550px at 50% 80%, rgba(167, 139, 250, 0.09) 0%, transparent 70%),
    radial-gradient(ellipse 400px 400px at 85% 20%, rgba(239, 83, 80, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 450px 450px at 10% 75%, rgba(34, 211, 238, 0.08) 0%, transparent 70%);
  animation: meshDrift 20s ease-in-out infinite;
}

/* Subtle grid overlay */
.bg-3d::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(79, 110, 247, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 110, 247, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridMove 30s linear infinite;
  opacity: 0.5;
}

/* Floating 3D orbs */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
}

.bg-orb--1 {
  width: 500px; height: 500px;
  top: -10%; left: -8%;
  background: radial-gradient(circle, rgba(79, 110, 247, 0.14), rgba(167, 139, 250, 0.06), transparent 70%);
  animation: orbFloat1 14s ease-in-out infinite, orbColorCycle1 18s ease-in-out infinite;
}

.bg-orb--2 {
  width: 450px; height: 450px;
  top: 50%; right: -10%;
  background: radial-gradient(circle, rgba(34, 201, 147, 0.12), rgba(34, 211, 238, 0.05), transparent 70%);
  animation: orbFloat2 12s ease-in-out infinite, orbColorCycle2 15s ease-in-out infinite;
}

.bg-orb--3 {
  width: 380px; height: 380px;
  bottom: -5%; left: 30%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.10), rgba(239, 83, 80, 0.04), transparent 70%);
  animation: orbFloat3 16s ease-in-out infinite, orbColorCycle3 20s ease-in-out infinite;
}

.bg-orb--4 {
  width: 300px; height: 300px;
  top: 30%; left: 50%;
  background: radial-gradient(circle, rgba(245, 185, 66, 0.07), rgba(240, 140, 56, 0.03), transparent 70%);
  animation: orbFloat4 18s ease-in-out infinite, orbColorCycle1 22s ease-in-out infinite reverse;
}

.bg-orb--5 {
  width: 260px; height: 260px;
  top: 15%; right: 25%;
  background: radial-gradient(circle, rgba(34, 201, 147, 0.08), rgba(79, 110, 247, 0.04), transparent 70%);
  animation: orbFloat5 13s ease-in-out infinite, orbColorCycle2 17s ease-in-out infinite reverse;
}

/* Floating 3D geometric shapes */
.bg-shape {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  opacity: 0.06;
  transform-style: preserve-3d;
}

.bg-shape--1 {
  width: 120px; height: 120px;
  top: 15%; left: 8%;
  border: 2px solid var(--accent);
  border-radius: 20px;
  animation: shapeSpin3D 25s linear infinite, shapeColorShift 12s ease-in-out infinite;
}

.bg-shape--2 {
  width: 80px; height: 80px;
  top: 60%; right: 12%;
  border: 2px solid var(--cyan);
  border-radius: 50%;
  animation: shapeSpin3D2 20s linear infinite, shapeColorShift 10s ease-in-out infinite reverse;
}

.bg-shape--3 {
  width: 0; height: 0;
  border-left: 50px solid transparent;
  border-right: 50px solid transparent;
  border-bottom: 86px solid var(--purple);
  top: 40%; left: 75%;
  animation: shapeSpin3D3 30s linear infinite, shapeColorShift 14s ease-in-out infinite;
}

.bg-shape--4 {
  width: 60px; height: 60px;
  bottom: 20%; left: 15%;
  border: 2px solid var(--green);
  animation: shapeSpin3D 22s linear infinite reverse, shapeColorShift 11s ease-in-out infinite;
}

.bg-shape--5 {
  width: 90px; height: 90px;
  top: 70%; left: 55%;
  border: 2px solid var(--yellow);
  border-radius: 15px;
  animation: shapeSpin3D2 28s linear infinite, shapeColorShift 16s ease-in-out infinite reverse;
}

.bg-shape--6 {
  width: 40px; height: 40px;
  top: 8%; right: 20%;
  border: 2px solid var(--red);
  border-radius: 50%;
  animation: shapeSpin3D3 18s linear infinite reverse, shapeColorShift 9s ease-in-out infinite;
}

.bg-shape--7 {
  width: 70px; height: 70px;
  bottom: 35%; right: 35%;
  border: 2px solid var(--cyan);
  border-radius: 12px;
  animation: shapeSpin3D 24s linear infinite, shapeColorShift 13s ease-in-out infinite reverse;
}

/* 3D wave lines */
.bg-wave {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 200px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.04;
}

.bg-wave--1 {
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 20px,
    var(--accent) 20px,
    var(--accent) 21px
  );
  animation: waveSlide 8s linear infinite;
  bottom: -20px;
}

.bg-wave--2 {
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 30px,
    var(--cyan) 30px,
    var(--cyan) 31px
  );
  animation: waveSlide 12s linear infinite reverse;
  bottom: -40px;
  opacity: 0.03;
}

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* ── ANIMATED GRADIENT KEYFRAMES ── */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes gradientRotate {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

@keyframes float3D {
  0%, 100% { transform: translateY(0) rotateX(0deg) rotateY(0deg); }
  25% { transform: translateY(-8px) rotateX(2deg) rotateY(2deg); }
  50% { transform: translateY(-4px) rotateX(0deg) rotateY(-2deg); }
  75% { transform: translateY(-10px) rotateX(-2deg) rotateY(1deg); }
}

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

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(79, 110, 247, 0.15), 0 0 40px rgba(79, 110, 247, 0.05); }
  50% { box-shadow: 0 0 30px rgba(79, 110, 247, 0.25), 0 0 60px rgba(79, 110, 247, 0.1); }
}

@keyframes borderGlow {
  0%, 100% { border-color: rgba(79, 110, 247, 0.2); }
  50% { border-color: rgba(79, 110, 247, 0.5); }
}

@keyframes scoreRingPulse {
  0%, 100% { filter: drop-shadow(0 0 6px currentColor); }
  50% { filter: drop-shadow(0 0 14px currentColor); }
}

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(30px) perspective(600px) rotateX(4deg); }
  to { opacity: 1; transform: translateY(0) perspective(600px) rotateX(0deg); }
}

@keyframes morphGradient {
  0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  25% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
  50% { border-radius: 50% 60% 30% 60% / 30% 60% 70% 40%; }
  75% { border-radius: 60% 40% 60% 30% / 70% 30% 50% 60%; }
  100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

/* ── 3D BACKGROUND KEYFRAMES ── */
@keyframes meshDrift {
  0% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(3%, -2%) rotate(1deg); }
  50% { transform: translate(-2%, 3%) rotate(-1deg); }
  75% { transform: translate(1%, -1%) rotate(0.5deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(60px, 60px); }
}

/* Orb floating paths */
@keyframes orbFloat1 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  25% { transform: translate3d(60px, -40px, 20px) scale(1.05); }
  50% { transform: translate3d(-30px, 50px, -10px) scale(0.95); }
  75% { transform: translate3d(40px, 20px, 15px) scale(1.02); }
}

@keyframes orbFloat2 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  25% { transform: translate3d(-50px, 30px, -15px) scale(1.08); }
  50% { transform: translate3d(40px, -60px, 25px) scale(0.92); }
  75% { transform: translate3d(-20px, -30px, -10px) scale(1.04); }
}

@keyframes orbFloat3 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  25% { transform: translate3d(30px, -50px, 10px) scale(0.96); }
  50% { transform: translate3d(-40px, 20px, -20px) scale(1.06); }
  75% { transform: translate3d(20px, 40px, 15px) scale(0.98); }
}

@keyframes orbFloat4 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33% { transform: translate3d(-70px, -30px, 20px) scale(1.1); }
  66% { transform: translate3d(50px, 40px, -15px) scale(0.9); }
}

@keyframes orbFloat5 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  20% { transform: translate3d(40px, 30px, -10px) scale(1.05); }
  40% { transform: translate3d(-30px, -50px, 15px) scale(0.95); }
  60% { transform: translate3d(60px, -20px, -20px) scale(1.08); }
  80% { transform: translate3d(-20px, 40px, 10px) scale(0.97); }
}

/* Orb color cycling */
@keyframes orbColorCycle1 {
  0%, 100% { background: radial-gradient(circle, rgba(79, 110, 247, 0.14), rgba(167, 139, 250, 0.06), transparent 70%); }
  25% { background: radial-gradient(circle, rgba(34, 201, 147, 0.14), rgba(79, 110, 247, 0.06), transparent 70%); }
  50% { background: radial-gradient(circle, rgba(167, 139, 250, 0.14), rgba(34, 211, 238, 0.06), transparent 70%); }
  75% { background: radial-gradient(circle, rgba(239, 83, 80, 0.10), rgba(167, 139, 250, 0.05), transparent 70%); }
}

@keyframes orbColorCycle2 {
  0%, 100% { background: radial-gradient(circle, rgba(34, 201, 147, 0.12), rgba(34, 211, 238, 0.05), transparent 70%); }
  25% { background: radial-gradient(circle, rgba(167, 139, 250, 0.12), rgba(79, 110, 247, 0.05), transparent 70%); }
  50% { background: radial-gradient(circle, rgba(79, 110, 247, 0.12), rgba(34, 201, 147, 0.05), transparent 70%); }
  75% { background: radial-gradient(circle, rgba(245, 185, 66, 0.08), rgba(34, 201, 147, 0.04), transparent 70%); }
}

@keyframes orbColorCycle3 {
  0%, 100% { background: radial-gradient(circle, rgba(167, 139, 250, 0.10), rgba(239, 83, 80, 0.04), transparent 70%); }
  25% { background: radial-gradient(circle, rgba(34, 211, 238, 0.10), rgba(167, 139, 250, 0.04), transparent 70%); }
  50% { background: radial-gradient(circle, rgba(34, 201, 147, 0.10), rgba(79, 110, 247, 0.04), transparent 70%); }
  75% { background: radial-gradient(circle, rgba(79, 110, 247, 0.10), rgba(34, 201, 147, 0.04), transparent 70%); }
}

/* Shape 3D spin paths */
@keyframes shapeSpin3D {
  0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg) translateZ(0); }
  25% { transform: rotateX(90deg) rotateY(45deg) rotateZ(20deg) translateZ(30px); }
  50% { transform: rotateX(180deg) rotateY(90deg) rotateZ(0deg) translateZ(0); }
  75% { transform: rotateX(270deg) rotateY(135deg) rotateZ(-20deg) translateZ(-30px); }
  100% { transform: rotateX(360deg) rotateY(180deg) rotateZ(0deg) translateZ(0); }
}

@keyframes shapeSpin3D2 {
  0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1); }
  33% { transform: rotateX(120deg) rotateY(60deg) rotateZ(30deg) scale(1.1); }
  66% { transform: rotateX(240deg) rotateY(120deg) rotateZ(-30deg) scale(0.9); }
  100% { transform: rotateX(360deg) rotateY(180deg) rotateZ(0deg) scale(1); }
}

@keyframes shapeSpin3D3 {
  0% { transform: rotateX(0deg) rotateY(0deg) translateZ(0); }
  50% { transform: rotateX(180deg) rotateY(90deg) translateZ(40px); }
  100% { transform: rotateX(360deg) rotateY(180deg) translateZ(0); }
}

@keyframes shapeColorShift {
  0%, 100% { opacity: 0.06; border-color: var(--accent); }
  25% { opacity: 0.10; border-color: var(--cyan); }
  50% { opacity: 0.06; border-color: var(--purple); }
  75% { opacity: 0.08; border-color: var(--green); }
}

@keyframes waveSlide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── HEADER ── */
.site-header {
  padding: 60px 0 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg,
      rgba(79, 110, 247, 0.06) 0%,
      rgba(11, 13, 19, 0.95) 25%,
      rgba(34, 201, 147, 0.04) 50%,
      rgba(11, 13, 19, 0.95) 75%,
      rgba(167, 139, 250, 0.05) 100%);
  background-size: 400% 400%;
  animation: headerGradient 12s ease-in-out infinite;
}

@keyframes headerGradient {
  0% { background-position: 0% 50%; }
  25% { background-position: 50% 0%; }
  50% { background-position: 100% 50%; }
  75% { background-position: 50% 100%; }
  100% { background-position: 0% 50%; }
}

.site-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(79, 110, 247, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(34, 201, 147, 0.10) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 20%, rgba(167, 139, 250, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 40% 80%, rgba(34, 211, 238, 0.06) 0%, transparent 40%);
  background-size: 200% 200%;
  animation: gradientShift 6s ease infinite;
  pointer-events: none;
}

.site-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent,
    var(--accent),
    var(--cyan),
    var(--purple),
    var(--green),
    var(--accent),
    transparent);
  background-size: 200% 100%;
  animation: shimmer 4s linear infinite;
}

.logo {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  position: relative;
  z-index: 1;
  display: inline-block;
  text-shadow: 0 0 40px rgba(79, 110, 247, 0.3);
}

.logo span {
  background: linear-gradient(135deg, #4f6ef7, #22d3ee, #a78bfa, #22c993, #4f6ef7);
  background-size: 400% 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s ease infinite;
  filter: drop-shadow(0 0 20px rgba(79, 110, 247, 0.4));
}

.tagline {
  color: var(--text-dim);
  margin-top: 8px;
  font-size: 0.95rem;
  position: relative;
  z-index: 1;
}

/* ── INPUT ── */
.input-section { margin-bottom: 28px; }

.input-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 16px;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.4s ease,
              border-color 0.4s ease;
  transform-style: preserve-3d;
  perspective: 1000px;
  animation: slideInUp 0.6s ease-out both;
  animation-delay: 0.1s;
  position: relative;
}

.input-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(135deg, var(--accent), var(--cyan), var(--purple), var(--green), var(--accent));
  background-size: 300% 300%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  animation: gradientShift 4s ease infinite;
}

.input-card:hover::before {
  opacity: 0.6;
}

.input-card:nth-child(2) { animation-delay: 0.2s; }

.input-card:hover {
  transform: translateY(-4px) rotateX(2deg) rotateY(-1deg);
  box-shadow: 0 12px 40px rgba(79, 110, 247, 0.12), 0 4px 20px rgba(0, 0, 0, 0.3);
  border-color: rgba(79, 110, 247, 0.3);
}

.input-card h2 { font-size: 1.05rem; font-weight: 600; margin-bottom: 16px; }

.competitor-card .card-header-row {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px;
}

.btn-link {
  background: none; border: none; color: var(--accent); font-size: 0.85rem;
  cursor: pointer; font-weight: 500;
}
.btn-link:hover { color: var(--accent-hover); text-decoration: underline; }

.instructions { font-size: 0.82rem; color: var(--text-dim); margin-bottom: 14px; }

.form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.form-group.full-width { grid-column: 1 / -1; }

@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

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

.req { color: var(--red); }

input[type="url"],
input[type="text"],
select {
  width: 100%; padding: 10px 14px; background: var(--bg-input);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font-size: 0.9rem; transition: border-color var(--transition);
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='7' viewBox='0 0 12 7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23555d75' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
  cursor: pointer;
}
select option {
  background: var(--bg-card); color: var(--text); padding: 8px;
}
select:focus { outline: none; border-color: var(--border-focus); }
input:focus { outline: none; border-color: var(--border-focus); }
input::placeholder { color: var(--text-muted); }

.competitor-field {
  display: flex; gap: 8px; margin-bottom: 8px;
}
.competitor-field input { flex: 1; }
.btn-remove {
  background: none; border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: 1.2rem; width: 38px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all var(--transition);
}
.btn-remove:hover { border-color: var(--red); color: var(--red); background: var(--red-bg); }

/* ── BUTTONS ── */
.action-row { display: flex; justify-content: center; gap: 12px; margin-top: 4px; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #4f6ef7, #6d88ff, #a78bfa, #4f6ef7);
  background-size: 300% 300%;
  animation: gradientShift 4s ease infinite, pulseGlow 3s ease-in-out infinite;
  color: #fff; border: none; border-radius: var(--radius-sm); padding: 13px 36px;
  font-size: 0.95rem; font-weight: 600; cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  animation: shimmer 3s ease-in-out infinite;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 30px rgba(79,110,247,0.4), 0 0 60px rgba(79,110,247,0.15);
}
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; animation: none; }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px; background: transparent;
  color: var(--text-dim); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 13px 28px; font-size: 0.95rem; font-weight: 500; cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.btn-secondary:hover { background: var(--bg-card); color: var(--text); border-color: var(--text-muted); transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0,0,0,0.2); }

.spinner { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── PROGRESS ── */
.progress-section {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 24px; margin-top: 16px;
}
.progress-header { font-size: 0.9rem; font-weight: 600; margin-bottom: 10px; }
.progress-bar {
  height: 5px; background: var(--bg-input); border-radius: 3px; overflow: hidden; margin-bottom: 8px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--cyan), var(--purple), var(--accent));
  background-size: 300% 100%;
  animation: gradientShift 2s ease infinite;
  border-radius: 3px; width: 0%; transition: width 0.5s ease;
}
.progress-status { font-size: 0.78rem; color: var(--text-dim); }

/* ── REPORT ── */
.report-section { padding-bottom: 24px; }

.report-block {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; margin-bottom: 16px;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.4s ease,
              border-color 0.4s ease;
  transform-style: preserve-3d;
  animation: slideInUp 0.6s ease-out both;
  position: relative;
  overflow: hidden;
}

.report-block::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--accent) 20%,
    var(--cyan) 40%,
    var(--purple) 60%,
    var(--green) 80%,
    transparent 100%);
  background-size: 200% 100%;
  opacity: 0;
  transition: opacity 0.4s ease;
  animation: shimmer 5s linear infinite;
}

.report-block:hover::before {
  opacity: 1;
}

.report-block:hover {
  transform: translateY(-3px) rotateX(1deg);
  box-shadow: 0 10px 35px rgba(79, 110, 247, 0.08), 0 4px 20px rgba(0, 0, 0, 0.25);
  border-color: rgba(79, 110, 247, 0.2);
}

.report-block:nth-child(1) { animation-delay: 0.05s; }
.report-block:nth-child(2) { animation-delay: 0.1s; }
.report-block:nth-child(3) { animation-delay: 0.15s; }
.report-block:nth-child(4) { animation-delay: 0.2s; }
.report-block:nth-child(5) { animation-delay: 0.25s; }
.report-block:nth-child(6) { animation-delay: 0.3s; }
.report-block:nth-child(7) { animation-delay: 0.35s; }
.report-block:nth-child(8) { animation-delay: 0.4s; }

.report-block h2 {
  font-size: 1.1rem; font-weight: 700; margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}

.report-block h3 {
  font-size: 0.92rem; font-weight: 600; margin: 16px 0 10px;
  color: var(--text-dim);
}

/* Score circle */
.score-hero {
  display: flex; align-items: center; gap: 32px; flex-wrap: wrap;
}

.score-circle-wrap .fill-ring {
  fill: none; stroke-width: 10; stroke-linecap: round;
  stroke-dasharray: 376.99; stroke-dashoffset: 376.99;
  transition: stroke-dashoffset 1.2s ease;
  animation: scoreRingPulse 3s ease-in-out infinite;
}

.score-circle-wrap {
  width: 140px; height: 140px; position: relative; flex-shrink: 0;
  animation: float3D 6s ease-in-out infinite;
}

.score-circle-wrap svg { width: 140px; height: 140px; transform: rotate(-90deg); }
.score-circle-wrap .track { fill: none; stroke: var(--bg-input); stroke-width: 10; }
.score-circle-wrap .value {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem; font-weight: 800;
}

.score-breakdown { flex: 1; min-width: 200px; }
.score-sub-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.score-sub-label { font-size: 0.82rem; color: var(--text-dim); width: 100px; flex-shrink: 0; }
.score-sub-track { flex: 1; height: 6px; background: var(--bg-input); border-radius: 3px; overflow: hidden; }
.score-sub-fill { height: 100%; border-radius: 3px; transition: width 0.8s ease; }
.score-sub-val { font-size: 0.82rem; font-weight: 600; width: 36px; text-align: right; }

.score-summary {
  font-size: 0.88rem; color: var(--text-dim); margin-top: 4px; max-width: 500px;
}

/* Status badges */
.status-badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.3px; padding: 3px 10px; border-radius: 5px;
}
.status-badge.good { background: var(--green-bg); color: var(--green); }
.status-badge.warning { background: var(--yellow-bg); color: var(--yellow); }
.status-badge.bad { background: var(--red-bg); color: var(--red); }

/* Check rows */
.check-grid { display: flex; flex-direction: column; gap: 10px; }

.check-row {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px;
  background: var(--bg-card-alt); border-radius: var(--radius-sm); border: 1px solid var(--border);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-style: preserve-3d;
}

.check-row:hover {
  border-color: #2a3050;
  transform: translateX(4px) rotateY(-1deg);
  box-shadow: -4px 4px 20px rgba(0,0,0,0.2);
}

.check-status { flex-shrink: 0; margin-top: 2px; }

.check-body { flex: 1; min-width: 0; }

.check-label {
  font-size: 0.88rem; font-weight: 500; margin-bottom: 3px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}

.check-value {
  font-size: 0.8rem; color: var(--text-dim); word-break: break-word; line-height: 1.5;
}

.check-detail {
  display: none; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border);
  font-size: 0.8rem; color: var(--text-dim); line-height: 1.6;
}

.check-row.expanded .check-detail,
.pdf-export .check-detail { display: block; }

.expand-toggle {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  padding: 4px; transition: transform 0.2s; flex-shrink: 0;
}
.check-row.expanded .expand-toggle { transform: rotate(180deg); }

/* Keyword tags */
.kw-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.kw-tag {
  background: var(--bg-input); border: 1px solid var(--border); border-radius: 5px;
  padding: 3px 10px; font-size: 0.78rem; color: var(--text-dim);
}
.kw-tag.primary { border-color: var(--accent); color: var(--accent); }

/* Comparison table */
.comparison-table-wrap { overflow-x: auto; margin-top: 12px; }

table.comparison {
  width: 100%; border-collapse: collapse; font-size: 0.85rem;
}
table.comparison th,
table.comparison td {
  padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border);
}
table.comparison th {
  background: var(--bg-card-alt); font-weight: 600; color: var(--text-dim);
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.3px;
  position: sticky; top: 0;
}
table.comparison td:first-child { font-weight: 500; color: var(--text); }
table.comparison tr:hover td { background: rgba(79, 110, 247, 0.04); }

/* Gap items */
.gap-list { display: flex; flex-direction: column; gap: 10px; }
.gap-item {
  background: var(--bg-card-alt); border-radius: var(--radius-sm); padding: 16px;
  border-left: 3px solid var(--accent);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-style: preserve-3d;
}

.gap-item:hover {
  transform: translateX(6px) rotateY(-1deg);
  box-shadow: -4px 4px 20px rgba(0,0,0,0.2);
}
.gap-item.high { border-left-color: var(--red); }
.gap-item.medium { border-left-color: var(--yellow); }
.gap-item.low { border-left-color: var(--text-muted); }
.gap-item .gap-cat {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--accent); font-weight: 600; margin-bottom: 4px;
}
.gap-item .gap-title { font-size: 0.88rem; font-weight: 600; margin-bottom: 4px; }
.gap-item .gap-detail { font-size: 0.82rem; color: var(--text-dim); line-height: 1.5; }
.gap-item .gap-fix { font-size: 0.82rem; color: var(--green); margin-top: 6px; }

/* Recommendation items */
.rec-list { display: flex; flex-direction: column; gap: 12px; }
.rec-item {
  background: var(--bg-card-alt); border-radius: var(--radius-sm); padding: 18px;
  border: 1px solid var(--border);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-style: preserve-3d;
}

.rec-item:hover {
  transform: translateY(-3px) rotateX(1deg);
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  border-color: rgba(79, 110, 247, 0.2);
}
.rec-item .rec-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.rec-item .rec-priority {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px;
  padding: 3px 8px; border-radius: 4px;
}
.rec-item .rec-priority.high { background: var(--red-bg); color: var(--red); }
.rec-item .rec-priority.medium { background: var(--yellow-bg); color: var(--yellow); }
.rec-item .rec-priority.low { background: rgba(136,144,168,0.1); color: var(--text-dim); }
.rec-item .rec-title { font-size: 0.9rem; font-weight: 600; }
.rec-item .rec-reason { font-size: 0.82rem; color: var(--text-dim); margin-bottom: 6px; }
.rec-item .rec-impact { font-size: 0.78rem; color: var(--green); }

/* Summary block */
.summary-block {
  background: linear-gradient(135deg, rgba(79,110,247,0.08), rgba(34,201,147,0.06));
  border: 1px solid var(--accent); border-radius: var(--radius);
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.summary-block::before {
  content: '';
  position: absolute;
  top: -20%; right: -20%;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(79,110,247,0.12), transparent 70%);
  animation: morphGradient 8s ease-in-out infinite;
  pointer-events: none;
}
.summary-block h2 { margin-bottom: 14px; }
.summary-list { list-style: none; }
.summary-list li {
  padding: 8px 0; border-bottom: 1px solid rgba(79,110,247,0.12);
  font-size: 0.88rem; display: flex; align-items: flex-start; gap: 8px;
}
.summary-list li:last-child { border-bottom: none; }
.summary-list .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; background: var(--accent);
  color: #fff; font-size: 0.72rem; font-weight: 700; flex-shrink: 0; margin-top: 1px;
}

/* E-E-A-T */
.eeat-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px;
}
@media (max-width: 640px) { .eeat-grid { grid-template-columns: 1fr; } }
.eeat-card {
  background: var(--bg-card-alt); border-radius: var(--radius-sm); padding: 14px;
  border: 1px solid var(--border);
}
.eeat-card h4 { font-size: 0.82rem; font-weight: 600; margin-bottom: 6px; color: var(--accent); }
.eeat-card ul { list-style: none; }
.eeat-card li { font-size: 0.8rem; color: var(--text-dim); padding: 3px 0; }
.eeat-card li::before { content: '✓ '; color: var(--green); }
.eeat-card .empty { color: var(--text-muted); font-style: italic; }

/* Keyword insights */
.kw-insight-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.kw-insight {
  padding: 10px 14px; background: var(--bg-card-alt); border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent); font-size: 0.85rem; color: var(--text-dim);
}
.kw-opps { margin-top: 12px; }
.kw-opps h3 { margin-bottom: 8px; }

/* Actions */
.report-actions {
  display: flex; gap: 12px; justify-content: center; padding: 24px 0;
}

/* Footer */
.site-footer {
  padding: 28px 0; text-align: center; color: var(--text-muted);
  font-size: 0.78rem; border-top: 1px solid var(--border); margin-top: 40px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* PDF */
#report-section * {
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

/* PDF export: disable all animations and 3D transforms for clean capture */
.pdf-export,
.pdf-export * {
  animation: none !important;
  animation-play-state: paused !important;
  transition: none !important;
  transform: none !important;
}

.pdf-export {
  overflow: visible !important;
  height: auto !important;
}

.pdf-export .report-block {
  overflow: visible !important;
  break-inside: avoid;
  background: #141722 !important;
  border: 1px solid #1f2437 !important;
}

.pdf-export .report-block::before {
  display: none !important;
}

.pdf-export .input-card::before {
  display: none !important;
}

.pdf-export .check-row {
  background: #191d2b !important;
  border: 1px solid #1f2437 !important;
  transform: none !important;
}

.pdf-export .gap-item,
.pdf-export .rec-item {
  background: #191d2b !important;
  border-color: #1f2437 !important;
  transform: none !important;
}

.pdf-export .score-circle-wrap {
  animation: none !important;
}

.pdf-export .kw-tag {
  background: #0e1018 !important;
  border-color: #1f2437 !important;
}

.pdf-export .summary-block {
  background: linear-gradient(135deg, rgba(79,110,247,0.08), rgba(34,201,147,0.06)) !important;
  border-color: #4f6ef7 !important;
}

.pdf-export .status-badge {
  print-color-adjust: exact !important;
  -webkit-print-color-adjust: exact !important;
}

.pdf-export .eeat-card {
  background: #191d2b !important;
  border-color: #1f2437 !important;
}

.pdf-export .comparison-table-wrap table.comparison th {
  background: #191d2b !important;
}

/* Error */
.error-card {
  background: var(--red-bg); border: 1px solid var(--red); border-radius: var(--radius);
  padding: 20px; text-align: center; color: var(--red); margin-top: 16px;
}

/* PDF Success Toast */
.pdf-success-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: linear-gradient(135deg, #1a3a2a, #142220);
  border: 1px solid var(--green);
  border-radius: 12px;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--green);
  font-weight: 600;
  font-size: 0.92rem;
  box-shadow: 0 8px 32px rgba(34, 201, 147, 0.2), 0 0 60px rgba(34, 201, 147, 0.08);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 10000;
  pointer-events: none;
}

.pdf-success-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.pdf-success-toast svg {
  flex-shrink: 0;
  animation: spin 0.5s ease-out;
}
