body {
  background:
    radial-gradient(120% 120% at 20% 20%, rgba(211,47,47,0.08), transparent 60%),
    radial-gradient(90% 80% at 80% 0%, rgba(183,28,28,0.07), transparent 65%),
    linear-gradient(180deg, #14171d 0%, #0f1217 50%, #0b0f14 100%);
  color: var(--text-primary);
}
main.container { max-width: 1200px; padding: 0 20px 60px; }
.hero {
  background: linear-gradient(180deg, #111827 0%, #0f1419 100%);
  color: var(--text-heading);
  padding: 24px 20px;
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(0,0,0,0.45);
  margin-top: 20px;
  text-align: center;
  border: 1px solid var(--border);
}
.hero h1 { margin:0 0 8px; font-size:1.9rem; }
.hero p { margin:0 auto; opacity:0.95; max-width:900px; color: var(--text-muted); }
.hero-link { margin-top:8px; }
.hero-link a { color: var(--text-primary); font-weight:700; text-decoration:underline; }
.card {
  margin-top: 20px;
  background: var(--bg-card);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 18px 44px rgba(0,0,0,0.45);
  border: 1px solid var(--border);
}
.controls { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-bottom:12px; }
.btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(211,47,47,0.25);
}
.btn.secondary {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: none;
  color: var(--text-primary);
}
.btn:disabled { opacity:0.5; cursor:not-allowed; }

.btn-share {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
}

.btn-share::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 12px;
  border: 1px solid rgba(211,47,47,0.45);
  opacity: 0;
  pointer-events: none;
  animation: sharePulse 2.6s ease-out infinite;
}

.btn-share::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translate(-50%, -4px);
  background: rgba(22, 27, 34, 0.96);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.85rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
  z-index: 20;
}

.btn-share:hover::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.btn-share svg {
  width: 22px;
  height: 22px;
}
.drop-zone {
  border: 2px dashed rgba(211,47,47,0.35);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  background: var(--bg-section);
  color: var(--text-muted);
  margin-bottom: 12px;
}
.drop-zone.dragover {
  border-color: var(--accent);
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.browse-link { cursor:pointer; color: var(--accent); font-weight:700; }
.status { margin-top:10px; font-size:0.95rem; color: var(--text-primary); }
.file-list { margin-top:8px; font-size:0.95rem; color: var(--text-muted); }
.file-item {
  padding:6px 8px;
  border:1px solid var(--border);
  border-radius:8px;
  margin-bottom:6px;
  background: var(--bg-section);
  display:flex;
  align-items:center;
  gap:8px;
  color: var(--text-primary);
}
.progress-wrap { flex:1; background:#2a2f36; border-radius:6px; height:8px; }
.progress-bar { height:8px; width:0; background: var(--accent); border-radius:6px; }
.download-link { font-weight:700; color: var(--accent); text-decoration:none; }
.form-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:12px; margin:10px 0 14px; }
.field { display:flex; flex-direction:column; gap:6px; }
.field label { font-weight:700; color: var(--text-heading); }
.field input, .field select {
  padding:10px 10px;
  border:1px solid var(--border);
  border-radius:10px;
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.field-note { font-size:0.9rem; color: var(--text-muted); }
.pill {
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  background: var(--bg-section);
  border:1px solid var(--border);
  border-radius:999px;
  color: var(--text-primary);
  font-weight:700;
}
.content-section {
  background: var(--bg-card);
  margin-top:22px;
  padding:24px;
  border-radius:14px;
  box-shadow:0 18px 44px rgba(0,0,0,0.45);
  border:1px solid var(--border);
}
.content-section h2 { margin-top:0; margin-bottom:12px; color: var(--text-heading); }
.content-section p, .content-section li { color: var(--text-muted); line-height:1.7; }
.content-section ul { padding-left:18px; margin:0 0 12px; }
.helper-text { font-size:0.95rem; color: var(--text-muted); margin:8px 0; }

.pdf-loading {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 20, 25, 0.82);
  z-index: 9999;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.pdf-loading[hidden] { display: none; }

.pdf-loading-inner {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.95), rgba(17, 24, 39, 0.95));
  border: 1px solid rgba(211, 47, 47, 0.35);
  border-radius: 999px;
  padding: 12px 18px;
  color: var(--text-primary);
  box-shadow: 0 18px 40px rgba(0,0,0,0.55), 0 0 28px rgba(211,47,47,0.25);
}

.pdf-spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid rgba(211,47,47,0.25);
  border-top-color: var(--accent);
  box-shadow: 0 0 12px rgba(211,47,47,0.55);
  animation: pdfSpinner 0.9s linear infinite;
}

.pdf-loading-text {
  font-size: 0.98rem;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

.share-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 20, 25, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
  backdrop-filter: blur(6px);
}

.share-modal[hidden] { display: none; }

.share-dialog {
  background: linear-gradient(135deg, #161B22 0%, #111827 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 26px;
  width: min(460px, 92vw);
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
  color: var(--text-primary);
  position: relative;
}

.share-dialog h3 {
  margin: 0 0 8px 0;
  color: var(--text-heading);
  font-size: 1.25rem;
}

.share-subtext {
  color: var(--text-muted);
  margin: 0 0 18px 0;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

.share-note {
  margin-top: 18px;
  padding: 12px 14px;
  background: rgba(31, 41, 55, 0.7);
  border-radius: 12px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.share-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 1.2rem;
  cursor: pointer;
}

.share-close:hover { background: var(--bg-card); }

.share-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-primary);
  text-decoration: none;
  position: relative;
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.share-icon-btn svg { width: 20px; height: 20px; }

.share-icon-btn:hover {
  color: #fff;
  border-color: rgba(211,47,47,0.5);
  box-shadow: 0 10px 24px rgba(211,47,47,0.2);
  transform: translateY(-2px);
}

.share-copy { width: 42px; height: 42px; }

.share-icon-btn.is-copied::after {
  content: 'Copied';
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translate(-50%, -4px);
  background: rgba(22, 27, 34, 0.96);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 0.8rem;
  opacity: 1;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
  pointer-events: none;
}

.share-bmc-wrap {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.share-bmc {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #D32F2F 0%, #B71C1C 100%);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 14px 32px rgba(211,47,47,0.4);
  overflow: hidden;
}

.share-bmc::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 999px;
  border: 1px solid rgba(211,47,47,0.45);
  opacity: 0;
  animation: sharePulse 2.8s ease-out infinite;
}

@keyframes sharePulse {
  0% { transform: scale(0.95); opacity: 0; }
  15% { opacity: 0.8; }
  100% { transform: scale(1.25); opacity: 0; }
}

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

@media (max-width: 600px) {
  .btn-share::after {
    white-space: normal;
    width: 200px;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-share::before { animation: none; }
  .share-bmc::before { animation: none; }
  .pdf-spinner { animation: none; }
}
