/* ============================================================
   NextActix AI SEO — Frontend Styles
   Brand: Navy #0f1c2e | Red #e0163a
   ============================================================ */

:root {
  --nx-primary:   #e0163a;
  --nx-secondary: #0f1c2e;
  --nx-white:     #ffffff;
  --nx-bg:        #f8f9fb;
  --nx-border:    #e5e7eb;
  --nx-text:      #1a1a2e;
  --nx-muted:     #6b7280;
  --nx-green:     #22c55e;
  --nx-amber:     #f59e0b;
  --nx-orange:    #f97316;
  --nx-red:       #ef4444;
  --nx-radius:    12px;
  --nx-shadow:    0 4px 24px rgba(15,28,46,0.10);
  --nx-shadow-lg: 0 12px 48px rgba(15,28,46,0.16);
}

.nxseo-wrap {
  --nxprimary: var(--nx-primary);
  --nxsecondary: var(--nx-secondary);
  font-family: 'Nunito', 'Segoe UI', sans-serif;
  color: var(--nx-text);
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

/* ============================================================
   Hero
   ============================================================ */
.nxseo-hero {
  background: linear-gradient(135deg, var(--nxsecondary) 0%, #1a2f4e 100%);
  border-radius: var(--nx-radius);
  padding: 52px 36px 44px;
  text-align: center;
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
}

.nxseo-hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: rgba(224,22,58,0.08);
}
.nxseo-hero::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(224,22,58,0.06);
}

.nxseo-hero-inner { position: relative; z-index: 2; }

.nxseo-hero-logo {
  height: 44px;
  margin-bottom: 20px;
  filter: brightness(0) invert(1);
}

.nxseo-hero-title {
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 900;
  color: #fff;
  margin: 0 0 12px;
  line-height: 1.2;
}

.nxseo-hero-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.72);
  max-width: 520px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

/* ============================================================
   URL Form
   ============================================================ */
.nxseo-url-form { max-width: 640px; margin: 0 auto; }

.nxseo-input-group {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 50px;
  padding: 6px 6px 6px 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  gap: 8px;
}

.nxseo-input-prefix { font-size: 18px; flex-shrink: 0; }

.nxseo-url-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  color: var(--nx-text);
  background: transparent;
  padding: 6px 0;
  min-width: 0;
}
.nxseo-url-input::placeholder { color: #9ca3af; }

.nxseo-analyze-btn {
  background: var(--nxprimary);
  color: #fff;
  border: none;
  border-radius: 40px;
  padding: 13px 28px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  font-family: inherit;
  flex-shrink: 0;
}
.nxseo-analyze-btn:hover { background: #c21230; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(224,22,58,0.4); }
.nxseo-analyze-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.nxseo-btn-icon { font-size: 16px; }

.nxseo-url-error {
  color: #ff6b6b;
  font-size: 13px;
  margin-top: 8px;
  padding-left: 20px;
  min-height: 18px;
}

.nxseo-feature-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}
.nxseo-pill {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
}

/* ============================================================
   Loading
   ============================================================ */
.nxseo-loading {
  text-align: center;
  padding: 60px 24px;
  background: #fff;
  border-radius: var(--nx-radius);
  border: 1px solid var(--nx-border);
  margin-top: 20px;
  box-shadow: var(--nx-shadow);
}

.nxseo-spinner {
  width: 56px; height: 56px;
  border: 4px solid var(--nx-border);
  border-top-color: var(--nxprimary);
  border-radius: 50%;
  animation: nxspin 0.8s linear infinite;
  margin: 0 auto 20px;
}
@keyframes nxspin { to { transform: rotate(360deg); } }

.nxseo-loading-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--nxsecondary);
  margin: 0 0 24px;
}

.nxseo-loading-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 320px;
  margin: 0 auto;
  text-align: left;
}
.nxseo-step {
  background: var(--nx-bg);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--nx-muted);
  transition: all 0.3s ease;
}
.nxseo-step.active {
  background: linear-gradient(135deg, var(--nxprimary), #ff4560);
  color: #fff;
  font-weight: 700;
  transform: translateX(4px);
}
.nxseo-step.done {
  color: var(--nx-green);
  background: #f0fdf4;
}

/* ============================================================
   Lead Capture Modal
   ============================================================ */
.nxseo-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,28,46,0.7);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.nxseo-modal {
  background: #fff;
  border-radius: 20px;
  padding: 0;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--nx-shadow-lg);
  overflow: hidden;
  animation: nxSlideUp 0.3s ease;
}
@keyframes nxSlideUp {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.nxseo-modal-header {
  background: linear-gradient(135deg, var(--nxsecondary) 0%, #1a2f4e 100%);
  padding: 28px 32px 24px;
  text-align: center;
}
.nxseo-modal-logo { height: 36px; margin-bottom: 16px; filter: brightness(0) invert(1); }
.nxseo-modal-header h3 {
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  margin: 0 0 8px;
}
.nxseo-modal-header p { color: rgba(255,255,255,0.72); font-size: 14px; margin: 0; }

.nxseo-modal-body { padding: 28px 32px; }

.nxseo-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.nxseo-form-group { display: flex; flex-direction: column; gap: 6px; }
.nxseo-form-group label { font-size: 13px; font-weight: 700; color: var(--nxsecondary); }

.nxseo-field {
  border: 2px solid var(--nx-border);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
  box-sizing: border-box;
}
.nxseo-field:focus { border-color: var(--nxprimary); }

.nxseo-lead-error { color: var(--nx-red); font-size: 13px; margin: 8px 0 0; min-height: 18px; }

.nxseo-modal-submit {
  width: 100%;
  background: var(--nxprimary);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 15px;
  font-size: 16px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  margin-top: 16px;
  transition: all 0.2s;
}
.nxseo-modal-submit:hover { background: #c21230; transform: translateY(-1px); }

.nxseo-modal-disclaimer {
  text-align: center;
  font-size: 12px;
  color: var(--nx-muted);
  margin-top: 12px;
}

/* ============================================================
   Report
   ============================================================ */
.nxseo-report {
  margin-top: 24px;
  animation: nxFadeIn 0.5s ease;
}
@keyframes nxFadeIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* Score Header */
.nxseo-report-header {
  background: linear-gradient(135deg, var(--nxsecondary) 0%, #1a2f4e 100%);
  border-radius: var(--nx-radius);
  padding: 32px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  margin-bottom: 20px;
}

.nxseo-score-circle {
  width: 110px; height: 110px;
  border-radius: 50%;
  border: 7px solid;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.nxseo-score-number { font-size: 38px; font-weight: 900; color: #fff; line-height: 1; }
.nxseo-score-denom  { font-size: 12px; color: rgba(255,255,255,0.6); margin-top: 2px; }

.nxseo-report-meta h2 { font-size: 22px; font-weight: 900; color: #fff; margin: 0 0 6px; }
.nxseo-report-meta .nxseo-score-label { font-size: 16px; font-weight: 700; margin: 0 0 8px; }
.nxseo-report-meta .nxseo-audited-url { font-size: 13px; color: rgba(255,255,255,0.6); word-break: break-all; }

.nxseo-pdf-btn {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  font-family: inherit;
}
.nxseo-pdf-btn:hover { background: rgba(255,255,255,0.2); }

/* Section Cards */
.nxseo-section-card {
  background: #fff;
  border-radius: var(--nx-radius);
  border: 1px solid var(--nx-border);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--nx-shadow);
}

.nxseo-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--nx-bg);
}
.nxseo-section-title-wrap { display: flex; align-items: center; gap: 10px; }
.nxseo-section-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.nxseo-section-title { font-size: 17px; font-weight: 800; color: var(--nxsecondary); margin: 0; }

.nxseo-section-score-badge {
  background: var(--nx-bg);
  border-radius: 50px;
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 800;
  color: var(--nxsecondary);
  white-space: nowrap;
}

/* Score Bar */
.nxseo-score-bar-wrap { margin-bottom: 6px; }
.nxseo-score-bar-label {
  display: flex; justify-content: space-between;
  font-size: 13px; font-weight: 600; color: var(--nx-muted);
  margin-bottom: 4px;
}
.nxseo-score-bar-track {
  background: var(--nx-bg);
  border-radius: 50px;
  height: 8px;
  overflow: hidden;
}
.nxseo-score-bar-fill {
  height: 100%;
  border-radius: 50px;
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}

/* Check List */
.nxseo-check-list { display: flex; flex-direction: column; gap: 10px; }
.nxseo-check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 10px;
  background: var(--nx-bg);
  border: 1px solid transparent;
  transition: all 0.2s;
}
.nxseo-check-item:hover { border-color: var(--nx-border); box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.nxseo-check-item.pass { border-color: #bbf7d0; background: #f0fdf4; }
.nxseo-check-item.fail { border-color: #fecdd3; background: #fff1f2; }

.nxseo-check-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.nxseo-check-body { flex: 1; min-width: 0; }
.nxseo-check-label { font-size: 13px; font-weight: 700; color: var(--nx-text); margin-bottom: 3px; }
.nxseo-check-detail { font-size: 12px; color: var(--nx-muted); line-height: 1.5; }

/* Entities */
.nxseo-entity-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.nxseo-entity-tag {
  background: var(--nx-bg);
  border: 1px solid var(--nx-border);
  border-radius: 50px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--nx-text);
  display: flex;
  align-items: center;
  gap: 5px;
}
.nxseo-entity-type {
  font-size: 10px;
  color: var(--nx-muted);
  font-weight: 400;
}

.nxseo-entity-suggestions h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--nxsecondary);
  margin: 0 0 10px;
}
.nxseo-entity-suggestions ul {
  margin: 0;
  padding-left: 16px;
}
.nxseo-entity-suggestions li {
  font-size: 13px;
  color: var(--nx-muted);
  margin-bottom: 6px;
  line-height: 1.5;
}

/* Recommendations */
.nxseo-rec-list { display: flex; flex-direction: column; gap: 10px; }
.nxseo-rec-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 10px;
  background: var(--nx-bg);
  border-left: 4px solid var(--nx-border);
}
.nxseo-rec-item.priority-high   { border-left-color: var(--nx-red);   background: #fff1f2; }
.nxseo-rec-item.priority-medium { border-left-color: var(--nx-amber);  background: #fffbeb; }
.nxseo-rec-item.priority-low    { border-left-color: var(--nx-green); background: #f0fdf4; }

.nxseo-rec-number {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--nxprimary);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nxseo-rec-body { flex: 1; }
.nxseo-rec-category {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--nx-muted);
  margin-bottom: 4px;
}
.nxseo-rec-text { font-size: 13px; font-weight: 600; color: var(--nx-text); line-height: 1.5; }

.nxseo-priority-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 20px;
  flex-shrink: 0;
}
.nxseo-priority-badge.high   { background: var(--nx-red);   color: #fff; }
.nxseo-priority-badge.medium { background: var(--nx-amber);  color: #fff; }
.nxseo-priority-badge.low    { background: var(--nx-green); color: #fff; }

/* Score Overview Grid */
.nxseo-score-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.nxseo-score-mini-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--nx-border);
  padding: 16px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.nxseo-score-mini-val {
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 4px;
}
.nxseo-score-mini-label { font-size: 11px; color: var(--nx-muted); font-weight: 600; }
.nxseo-score-mini-max   { font-size: 11px; color: #bbb; }

/* New Audit CTA */
.nxseo-new-audit-bar {
  background: var(--nx-bg);
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
}
.nxseo-new-audit-bar p { margin: 0; font-size: 14px; color: var(--nx-muted); }
.nxseo-new-audit-btn {
  background: var(--nxsecondary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: background 0.2s;
}
.nxseo-new-audit-btn:hover { background: #1a2f4e; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 680px) {
  .nxseo-hero { padding: 36px 20px 32px; }
  .nxseo-input-group { border-radius: 14px; flex-wrap: wrap; padding: 12px; }
  .nxseo-analyze-btn { width: 100%; justify-content: center; border-radius: 10px; }
  .nxseo-url-input { width: 100%; }
  .nxseo-report-header { grid-template-columns: 1fr; text-align: center; }
  .nxseo-score-circle { margin: 0 auto; }
  .nxseo-pdf-btn { width: 100%; text-align: center; }
  .nxseo-score-overview { grid-template-columns: repeat(2, 1fr); }
  .nxseo-form-row { grid-template-columns: 1fr; }
  .nxseo-new-audit-bar { flex-direction: column; text-align: center; }
}
@media (max-width: 400px) {
  .nxseo-score-overview { grid-template-columns: 1fr 1fr; }
}
