/* English Level Test — Dark Phraseman Theme + Animations (v3: selling landing + CTA) */

:root {
  --bg: #0c0c0e;
  --card: #141416;
  --text: #e6e6e6;
  --text-secondary: #999;
  --muted: #666;
  --accent: #2a9d5c;
  --accent-hover: #238c4f;
  --accent-light: #4ade80;
  --on-accent: #07110a;
  --border: #222;
  --radius: 16px;
  --shadow: 0 8px 32px rgba(0,0,0,0.5);
  --transition: 0.2s ease;
  --ease-out-expo: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-elastic: cubic-bezier(0.34, 1.35, 0.64, 1);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ========== Animations ========== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes textGlow {
  0%, 100% { text-shadow: 0 0 0 rgba(74,222,128,0); }
  50% { text-shadow: 0 0 22px rgba(74,222,128,0.5); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes viewEnter {
  from { opacity: 0; transform: translateY(16px) scale(0.995); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes viewExit {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-10px); }
}

/* ========== View transitions (cross-fade) ========== */
.elt-view {
  animation: viewEnter 0.45s var(--ease-out-expo) both;
  width: 100%;
}
.elt-view--exit {
  position: absolute;
  inset: 0;
  pointer-events: none;
  animation: viewExit 0.38s ease forwards;
  z-index: 2;
}

/* ========== Brand header ========== */
.elt-brand {
  display: flex;
  justify-content: center;
  padding: 22px 20px 4px;
}
.elt-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  animation: fadeInUp 0.5s 0.05s both var(--ease-out-expo);
}
.elt-brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: block;
}
.elt-brand-text b {
  display: block;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.elt-brand-text small {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.2;
}

/* ========== Landing (selling page) ========== */
.elt-landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}
.elt-landing::before {
  content: '';
  position: absolute;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 720px;
  height: 480px;
  background: radial-gradient(closest-side, rgba(42,157,92,0.16), transparent);
  pointer-events: none;
}

.elt-hero {
  position: relative;
  text-align: center;
  padding: 44px 20px 30px;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

.elt-kicker {
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  margin: 0 0 14px;
  animation: fadeInUp 0.5s 0.1s both var(--ease-out-expo);
}

.elt-hero h1 {
  font-size: clamp(1.85rem, 5.5vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 0 0 14px;
  animation: fadeInUp 0.55s 0.16s both var(--ease-out-expo);
}
.elt-accent-text {
  background: linear-gradient(92deg, var(--accent-light), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.elt-lead {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin: 0 auto 6px;
  max-width: 540px;
  animation: fadeInUp 0.55s 0.22s both var(--ease-out-expo);
}
.elt-lead b { color: var(--text); }

.elt-counter {
  margin: 26px auto 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  animation: fadeInUp 0.55s 0.28s both var(--ease-out-expo);
}
.elt-counter-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-light);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.elt-counter-label {
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.elt-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 18px auto 0;
  max-width: 360px;
  cursor: pointer;
  animation: fadeInUp 0.55s 0.36s both var(--ease-out-expo);
}
.elt-consent input {
  margin-top: 2px;
  min-width: 16px;
  min-height: 16px;
  accent-color: var(--accent);
}

/* Buttons */
.elt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 12px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  min-height: 48px;
  min-width: 120px;
  text-decoration: none;
}

.elt-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.elt-btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  width: 100%;
  animation: fadeInUp 0.6s 0.3s both var(--ease-out-expo);
  transition: transform 0.18s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.elt-btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(42,157,92,0.35);
}
.elt-btn-primary:active {
  transform: translateY(0);
}

.elt-btn-hero {
  width: auto;
  min-width: 250px;
  padding: 16px 38px;
  font-size: 1.06rem;
  font-weight: 700;
  border-radius: 14px;
}

.elt-btn-secondary {
  background: var(--border);
  color: var(--text);
  transition: transform 0.15s ease, background 0.2s ease;
}
.elt-btn-secondary:hover {
  background: #333;
  transform: translateY(-1px);
}

.elt-btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  transition: transform 0.15s ease, background 0.2s ease;
}
.elt-btn-ghost:hover {
  background: rgba(255,255,255,0.05);
  transform: translateY(-1px);
}

/* Steps */
.elt-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 960px;
  margin: 26px auto 6px;
  padding: 0 20px;
  width: 100%;
}
.elt-step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  animation: fadeInUp 0.55s both var(--ease-out-expo);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.elt-step:nth-child(1) { animation-delay: 0.34s; }
.elt-step:nth-child(2) { animation-delay: 0.42s; }
.elt-step:nth-child(3) { animation-delay: 0.5s; }
.elt-step:hover {
  transform: translateY(-3px);
  border-color: rgba(74,222,128,0.35);
}
.elt-step-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 12px;
  background: rgba(42,157,92,0.12);
  color: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
}
.elt-step-icon svg {
  width: 24px;
  height: 24px;
}
.elt-step h3 {
  margin: 0 0 6px;
  font-size: 1.02rem;
  font-weight: 700;
}
.elt-step p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

/* Certificate preview */
.elt-preview {
  display: flex;
  align-items: center;
  gap: 36px;
  max-width: 920px;
  margin: 34px auto 6px;
  padding: 0 20px;
  width: 100%;
  animation: fadeInUp 0.55s 0.55s both var(--ease-out-expo);
}
.elt-preview-card {
  flex: 0 0 54%;
  perspective: 1100px;
}
.elt-preview-cert {
  transform: rotateY(-11deg) rotateX(4deg);
  transform-style: preserve-3d;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0,0,0,0.55), 0 0 0 1px rgba(232,213,163,0.12);
  transition: transform 0.55s var(--ease-out-expo);
}
.elt-preview-cert:hover {
  transform: rotateY(-4deg) rotateX(2deg) scale(1.02);
}
.elt-preview-cert svg {
  display: block;
  width: 100%;
  height: auto;
}
.elt-preview-text h2 {
  font-size: 1.45rem;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.elt-preview-text p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 320px;
}

/* Trust chips */
.elt-trust {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  list-style: none;
  padding: 0 20px;
  margin: 30px auto 0;
  animation: fadeInUp 0.55s 0.62s both var(--ease-out-expo);
}
.elt-trust li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 8px 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.elt-trust svg {
  width: 15px;
  height: 15px;
  color: var(--accent-light);
  flex: 0 0 auto;
}

/* Final CTA */
.elt-final-cta {
  text-align: center;
  padding: 46px 20px 54px;
  animation: fadeInUp 0.55s 0.7s both var(--ease-out-expo);
}
.elt-final-cta h2 {
  font-size: 1.5rem;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}

/* Footer */
.elt-footer {
  display: flex;
  gap: 22px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 24px 20px 28px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.elt-footer a {
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: none;
  transition: color 0.2s ease;
}
.elt-footer a:hover {
  color: var(--text);
}

/* ========== Test ========== */
.elt-test {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px;
  width: 100%;
}

.elt-progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 20px;
}

.elt-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 2px;
  transition: width 0.7s var(--ease-elastic);
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
}

.elt-question-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.elt-scenario {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-light);
  font-weight: 600;
  margin-bottom: 8px;
  animation: fadeIn 0.3s ease;
}

.elt-instruction {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.5;
  animation: fadeInUp 0.35s 0.05s both ease;
}

.elt-stimulus {
  margin-bottom: 24px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.55;
  white-space: pre-line;
  animation: fadeInUp 0.35s 0.08s both ease;
}

.elt-instruction + .elt-options {
  margin-top: 12px;
}

.elt-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.elt-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
  text-align: left;
  font-size: 1rem;
  min-height: 56px;
  color: var(--text);
  animation: fadeInUp 0.3s ease both;
}
.elt-option:nth-child(1) { animation-delay: 0.06s; }
.elt-option:nth-child(2) { animation-delay: 0.12s; }
.elt-option:nth-child(3) { animation-delay: 0.18s; }
.elt-option:nth-child(4) { animation-delay: 0.24s; }

.elt-option:hover {
  border-color: var(--accent);
  background: rgba(42, 157, 92, 0.08);
  transform: translateX(4px);
}

.elt-option:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.elt-option--picked {
  border-color: var(--accent);
  background: rgba(42, 157, 92, 0.15);
  transform: scale(0.98);
}

.elt-option-letter {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border);
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: background 0.2s ease, color 0.2s ease;
}

.elt-option:hover .elt-option-letter {
  background: var(--accent);
  color: var(--on-accent);
}

.elt-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeIn 0.3s 0.25s both ease;
}

/* ========== Result ========== */
.elt-result {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.elt-result-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 28px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  border: 1px solid var(--border);
  animation: scaleIn 0.6s var(--ease-out-expo);
}

.elt-level-badge {
  display: inline-block;
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--accent-light);
  margin-bottom: 4px;
  line-height: 1;
  animation: countUp 0.5s 0.2s both var(--ease-out-expo), textGlow 2s 0.8s ease-in-out infinite;
}

.elt-result-card h2 {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin: 0 0 24px;
  animation: fadeInUp 0.5s 0.3s both ease;
}

.elt-result-details {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 0 0 28px;
  flex-wrap: wrap;
}

.elt-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeInUp 0.4s ease both;
}
.elt-stat:nth-child(1) { animation-delay: 0.35s; }
.elt-stat:nth-child(2) { animation-delay: 0.4s; }
.elt-stat:nth-child(3) { animation-delay: 0.45s; }

.elt-stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.elt-stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.elt-name-section {
  margin: 24px 0 0;
  text-align: left;
  animation: fadeInUp 0.4s 0.5s both ease;
}

.elt-name-section input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  margin-bottom: 12px;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.elt-name-section input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(42,157,92,0.15);
}
.elt-name-section input::placeholder {
  color: var(--muted);
}

.elt-share {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
  animation: fadeInUp 0.4s 0.55s both ease;
}

/* ========== CTA screen (install Phraseman) ========== */
.elt-cta {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}
.elt-cta::before {
  content: '';
  position: absolute;
  top: -160px;
  left: 50%;
  transform: translateX(-50%);
  width: 640px;
  height: 420px;
  background: radial-gradient(closest-side, rgba(42,157,92,0.18), transparent);
  pointer-events: none;
}
.elt-cta-main {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 36px 20px 44px;
  max-width: 620px;
  margin: 0 auto;
  width: 100%;
}
.elt-cta-level {
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1;
  color: var(--accent-light);
  margin-bottom: 14px;
  animation: countUp 0.5s 0.15s both var(--ease-out-expo), textGlow 2s 0.8s ease-in-out infinite;
}
.elt-cta-main h1 {
  font-size: clamp(1.5rem, 4.5vw, 2.1rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 12px;
  animation: fadeInUp 0.55s 0.22s both var(--ease-out-expo);
}
.elt-cta-text {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0 auto 26px;
  max-width: 480px;
  animation: fadeInUp 0.55s 0.3s both var(--ease-out-expo);
}
.elt-cta-main .elt-btn-hero {
  animation-delay: 0.38s;
}

.elt-store-badges {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 22px;
  animation: fadeInUp 0.55s 0.46s both var(--ease-out-expo);
}
.elt-store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 11px 22px 11px 16px;
  border-radius: 14px;
  text-decoration: none;
  background: #000;
  color: #fff;
  border: 1px solid var(--border);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.elt-store-badge:hover {
  transform: translateY(-2px);
  border-color: rgba(74,222,128,0.55);
  box-shadow: 0 14px 44px rgba(0,0,0,0.5);
}
.elt-store-badge:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.elt-store-badge svg {
  width: 30px;
  height: 30px;
  fill: #fff;
  flex: 0 0 auto;
}
.elt-store-badge span {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-align: left;
}
.elt-store-badge small {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.62);
  letter-spacing: 0.02em;
}
.elt-store-badge b {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.elt-cta-secondary {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 26px;
  animation: fadeInUp 0.55s 0.54s both var(--ease-out-expo);
}
.elt-cta-secondary .elt-btn {
  min-width: 0;
  min-height: 40px;
  padding: 8px 14px;
  font-size: 0.85rem;
}

/* ========== Result pitch (what Phraseman gives) ========== */
.elt-pitch {
  margin-top: 24px;
  padding: 18px;
  background: rgba(42,157,92,0.07);
  border: 1px solid rgba(74,222,128,0.25);
  border-radius: 14px;
  text-align: left;
  animation: fadeInUp 0.4s 0.58s both ease;
}
.elt-pitch-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.elt-pitch-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex: 0 0 auto;
}
.elt-pitch-title b {
  display: block;
  font-size: 1rem;
  line-height: 1.15;
}
.elt-pitch-title small {
  display: block;
  font-size: 0.72rem;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.elt-pitch-text {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--text);
}
.elt-pitch-list {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}
.elt-pitch-list li {
  position: relative;
  padding-left: 22px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.elt-pitch-list li::before {
  content: '✓';
  position: absolute;
  left: 2px;
  color: var(--accent-light);
  font-weight: 700;
}
.elt-store-badges--compact {
  margin-top: 0;
  animation: none;
}
.elt-store-badges--compact .elt-store-badge {
  min-height: 52px;
  padding: 8px 14px 8px 12px;
  flex: 1 1 150px;
}
.elt-store-badges--compact .elt-store-badge svg {
  width: 24px;
  height: 24px;
}
.elt-store-badges--compact .elt-store-badge b {
  font-size: 15px;
}

/* ========== Certificate modal CTA ========== */
.elt-cert-cta {
  margin-top: 18px;
  padding: 14px 18px;
  background: rgba(42,157,92,0.08);
  border: 1px solid rgba(74,222,128,0.3);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.elt-cert-cta-text {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text);
  flex: 1 1 200px;
}
.elt-cert-cta-btn {
  width: auto;
  min-width: 230px;
  animation: none;
  flex: 0 1 auto;
}
@media (max-width: 560px) {
  .elt-cert-cta-btn {
    width: 100%;
  }
}

/* ========== Certificate Modal ========== */
.elt-cert-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.elt-cert-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
}

.elt-cert-container {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  max-width: 1040px;
  width: 100%;
  padding: 32px 28px 28px;
  border: 1px solid var(--border);
}

.elt-cert-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
  transition: color 0.2s ease;
  z-index: 10;
  padding: 0;
  border: 0;
  background: transparent;
}
.elt-cert-close:hover {
  color: var(--text);
}

.elt-cert-themes {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.elt-cert-theme-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s ease;
}
.elt-cert-theme-btn:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.elt-cert-theme-btn.active {
  border-color: var(--theme-color);
  color: var(--text);
  box-shadow: 0 0 0 2px var(--theme-color);
}

.elt-cert-theme-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
}

.elt-cert-wrap svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.elt-cert-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

.elt-cert-save-preview {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(74,222,128,0.3);
  border-radius: 14px;
  background: rgba(42,157,92,0.08);
  text-align: center;
}
.elt-cert-save-preview p {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 0.9rem;
}
.elt-cert-save-preview img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  user-select: none;
  -webkit-user-drag: auto;
}

/* Loading / Error */
.elt-loading, .elt-error {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  font-size: 1.1rem;
  text-align: center;
  padding: 24px;
  color: var(--text-secondary);
}
.elt-error {
  color: #ff6b6b;
}

/* Print */
@media print {
  .elt-cert-actions, .elt-cert-close, .elt-cert-backdrop, .elt-cert-themes, .elt-cert-cta {
    display: none !important;
  }
  .elt-cert-container {
    box-shadow: none;
    max-height: none;
    overflow: visible;
    background: #fff;
    color: #000;
  }
}

/* Responsive */
@media (min-width: 768px) {
  .elt-result-card {
    padding: 48px 36px;
  }
  .elt-test {
    padding: 40px 24px;
  }
  .elt-level-badge {
    font-size: 4rem;
  }
}

@media (min-width: 1024px) {
  .elt-instruction {
    font-size: 1.25rem;
  }
}

@media (max-width: 820px) {
  .elt-preview {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
  .elt-preview-card {
    flex: none;
    width: 100%;
    max-width: 460px;
  }
  .elt-preview-cert {
    transform: rotateY(-6deg) rotateX(3deg);
  }
  .elt-preview-text p {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .elt-steps {
    grid-template-columns: 1fr;
    max-width: 440px;
  }
  .elt-step {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    column-gap: 14px;
    row-gap: 4px;
    text-align: left;
    padding: 16px;
  }
  .elt-step-icon {
    margin: 0;
    grid-column: 1;
    grid-row: 1 / 3;
  }
  .elt-step h3 {
    grid-column: 2;
    margin: 0;
    font-size: 1rem;
  }
  .elt-step p {
    grid-column: 2;
    font-size: 1rem;
    line-height: 1.5;
  }
}

@media (max-width: 360px) {
  .elt-result-card {
    padding: 28px 18px;
  }
  .elt-btn {
    padding: 12px 16px;
    font-size: 0.9rem;
  }
  .elt-btn-hero {
    min-width: 0;
    width: 100%;
  }
  .elt-store-badge {
    width: 100%;
    justify-content: center;
  }
}
