:root {
  --blue: #0057FF;
  --dark: #0A0A0A;
  --gray: #F5F7FA;
  --text: #1A1A2E;
  --muted: #6B7280;
  --critical: #FF3B3B;
  --warning: #FFAA00;
  --info: #00B4D8;
  --ok: #22C55E;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
}

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

body {
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.6;
}

a { color: var(--blue); }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* HEADER */
.header {
  border-bottom: 1px solid #E5E7EB;
  padding: 16px 0;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 100;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-text { font-weight: 800; font-size: 18px; letter-spacing: 2px; color: var(--dark); }
.logo-tag { font-size: 11px; color: var(--blue); font-weight: 600; background: #EEF3FF; padding: 2px 8px; border-radius: 20px; }

/* HERO */
.hero {
  padding: 64px 0 80px;
  background: linear-gradient(135deg, #F0F4FF 0%, #fff 60%);
}
.hero .container { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.badge { display: inline-block; background: var(--blue); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 14px; border-radius: 20px; margin-bottom: 20px; letter-spacing: 0.5px; }
.hero-title { font-size: clamp(32px, 5vw, 48px); font-weight: 800; line-height: 1.15; margin-bottom: 18px; color: var(--dark); }
.hero-title .highlight { color: var(--blue); }
.hero-subtitle { font-size: 16px; color: var(--muted); margin-bottom: 32px; line-height: 1.7; }

/* FORM */
.form-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid #E5E7EB;
}
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.optional { font-weight: 400; color: var(--muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.input-prefix-wrap { display: flex; align-items: center; border: 1.5px solid #D1D5DB; border-radius: 8px; overflow: hidden; transition: border-color 0.2s; }
.input-prefix-wrap:focus-within { border-color: var(--blue); }
.input-prefix { background: var(--gray); padding: 10px 12px; font-size: 14px; color: var(--muted); border-right: 1px solid #D1D5DB; white-space: nowrap; }
input[type="text"], input[type="email"] {
  border: 1.5px solid #D1D5DB;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  width: 100%;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.input-prefix-wrap input { border: none; border-radius: 0; flex: 1; }
input:focus { border-color: var(--blue); }
.form-disclaimer { font-size: 11px; color: var(--muted); margin-bottom: 16px; }
.btn-primary {
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 13px 28px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none;
  font-family: inherit;
}
.btn-primary:hover { background: #0044CC; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { background: #9CA3AF; cursor: not-allowed; }
.form-error { color: var(--critical); font-size: 13px; margin-top: 10px; padding: 8px 12px; background: #FFF0F0; border-radius: 6px; }
.hidden { display: none !important; }

/* TRUST BADGES */
.trust-badges { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 24px; }
.badge-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; }
.badge-icon { font-size: 16px; }

/* PREVIEW CARD */
.hero-preview { display: flex; justify-content: center; }
.preview-card {
  background: var(--dark);
  border-radius: var(--radius);
  width: 100%;
  max-width: 340px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,0.24);
}
.preview-header { background: #1A1A2E; padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
.preview-dots { display: flex; gap: 6px; }
.preview-dots span { width: 10px; height: 10px; border-radius: 50%; background: #555; }
.preview-dots span:nth-child(1) { background: #FF5F57; }
.preview-dots span:nth-child(2) { background: #FFBD2E; }
.preview-dots span:nth-child(3) { background: #28CA41; }
.preview-title { font-size: 12px; color: #9CA3AF; }
.preview-body { padding: 20px 16px; }
.preview-score { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.score-number { font-size: 48px; font-weight: 800; line-height: 1; }
.score-label { font-size: 12px; font-weight: 700; color: var(--critical); letter-spacing: 1px; background: rgba(255,59,59,0.15); padding: 3px 8px; border-radius: 4px; }
.preview-items { display: flex; flex-direction: column; gap: 8px; }
.preview-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #D1D5DB; }
.pi-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--critical); flex-shrink: 0; }
.pi-dot.warning { background: var(--warning); }
.pi-dot.info { background: var(--info); }

/* MODULES SECTION */
.modules-section { padding: 72px 0; background: var(--gray); }
.section-title { font-size: 28px; font-weight: 800; text-align: center; margin-bottom: 40px; color: var(--dark); }
.modules-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.module-card { background: #fff; border-radius: var(--radius); padding: 24px; border: 1px solid #E5E7EB; transition: box-shadow 0.2s; }
.module-card:hover { box-shadow: var(--shadow); }
.module-icon { font-size: 28px; margin-bottom: 12px; }
.module-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; color: var(--dark); }
.module-card p { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* FOOTER */
.footer { border-top: 1px solid #E5E7EB; padding: 24px 0; text-align: center; font-size: 13px; color: var(--muted); }

/* ── LOADING ── */
.loading-section { padding: 80px 0; min-height: 60vh; display: flex; align-items: center; }
.loading-container { width: 100%; max-width: 600px; margin: 0 auto; text-align: center; }
.analyzing-domain { font-size: 20px; font-weight: 700; color: var(--dark); margin-bottom: 28px; }
.progress-wrap { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.progress-bar-outer { flex: 1; height: 10px; background: #E5E7EB; border-radius: 99px; overflow: hidden; }
.progress-bar-inner { height: 100%; background: linear-gradient(90deg, var(--blue), #00B4D8); border-radius: 99px; transition: width 0.4s ease; }
.progress-pct { font-size: 14px; font-weight: 700; color: var(--blue); min-width: 36px; text-align: right; }
.progress-msg { font-size: 14px; color: var(--muted); margin-bottom: 28px; min-height: 20px; }
.module-steps { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.step { font-size: 12px; background: var(--gray); border: 1px solid #E5E7EB; border-radius: 20px; padding: 4px 12px; color: var(--muted); transition: all 0.3s; }
.step.active { background: #EEF3FF; border-color: var(--blue); color: var(--blue); font-weight: 600; }
.step.done { background: #F0FFF4; border-color: var(--ok); color: var(--ok); }

/* ── RESULTS ── */
.results-section { padding: 40px 0 80px; }
.results-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 32px; gap: 20px; flex-wrap: wrap; }
.result-domain { font-size: 24px; font-weight: 800; color: var(--dark); }
.result-date { font-size: 13px; color: var(--muted); margin-top: 4px; }
.score-wrap { text-align: center; }
.score-number-big { font-size: 64px; font-weight: 900; line-height: 1; }
.score-label-big { font-size: 14px; font-weight: 700; letter-spacing: 1px; margin-top: 4px; }
.score-sub { font-size: 12px; color: var(--muted); }

/* Breakdown */
.breakdown-section { display: flex; gap: 12px; margin-bottom: 36px; flex-wrap: wrap; }
.breakdown-item { flex: 1; min-width: 100px; background: var(--gray); border-radius: 8px; padding: 12px; text-align: center; }
.breakdown-label { font-size: 11px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.breakdown-val { font-size: 20px; font-weight: 800; color: var(--dark); }

/* Issues list */
.section-heading { font-size: 18px; font-weight: 700; color: var(--dark); margin-bottom: 16px; }
.issues-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 36px; }
.issue-item { display: flex; align-items: flex-start; gap: 12px; background: #fff; border: 1px solid #E5E7EB; border-radius: 8px; padding: 12px 16px; }
.issue-badge { font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 4px; white-space: nowrap; letter-spacing: 0.5px; }
.issue-badge.critical { background: rgba(255,59,59,0.12); color: var(--critical); }
.issue-badge.warning { background: rgba(255,170,0,0.12); color: #CC8800; }
.issue-badge.info { background: rgba(0,180,216,0.12); color: #0090AD; }
.issue-text { flex: 1; }
.issue-msg { font-size: 14px; font-weight: 600; color: var(--dark); }
.issue-detail { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Tabs */
.tabs-wrap { margin-bottom: 32px; }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid #E5E7EB; margin-bottom: 24px; overflow-x: auto; }
.tab { background: none; border: none; padding: 10px 16px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s; white-space: nowrap; font-family: inherit; }
.tab.active { color: var(--blue); border-bottom-color: var(--blue); }
.tab-content { animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* Info table */
.info-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.info-table th { background: var(--dark); color: #fff; padding: 10px 14px; text-align: left; font-size: 12px; font-weight: 600; letter-spacing: 0.5px; }
.info-table td { padding: 10px 14px; border-bottom: 1px solid #F0F0F0; vertical-align: top; }
.info-table tr:nth-child(even) td { background: var(--gray); }
.info-table .label-col { font-weight: 600; color: var(--muted); font-size: 13px; width: 40%; }
.val-ok { color: var(--ok); font-weight: 600; }
.val-err { color: var(--critical); font-weight: 600; }
.val-warn { color: var(--warning); font-weight: 600; }

/* Action bar */
.action-bar { display: flex; gap: 14px; margin-bottom: 32px; flex-wrap: wrap; }
.action-bar .btn-primary { width: auto; }
.btn-secondary { background: #fff; color: var(--blue); border: 2px solid var(--blue); border-radius: 8px; padding: 11px 24px; font-size: 15px; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; transition: all 0.2s; }
.btn-secondary:hover { background: #EEF3FF; }

/* CTA card */
.cta-card { background: linear-gradient(135deg, var(--dark) 0%, #1A1A2E 100%); border-radius: var(--radius); padding: 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-card h3 { font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 6px; }
.cta-card p { font-size: 14px; color: #9CA3AF; line-height: 1.6; }
.btn-cta { background: var(--blue); color: #fff; text-decoration: none; padding: 12px 28px; border-radius: 8px; font-weight: 700; font-size: 15px; white-space: nowrap; transition: background 0.2s; }
.btn-cta:hover { background: #0044CC; }

/* ERROR */
.error-section { padding: 80px 0; }
.error-card { text-align: center; max-width: 480px; margin: 0 auto; }
.error-icon { font-size: 48px; margin-bottom: 16px; }
.error-card h2 { font-size: 22px; font-weight: 700; margin-bottom: 10px; color: var(--dark); }
.error-card p { color: var(--muted); margin-bottom: 24px; }

@media (max-width: 768px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-preview { display: none; }
  .modules-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .results-header { flex-direction: column; }
  .breakdown-section { gap: 8px; }
  .breakdown-item { min-width: calc(50% - 8px); }
}

@media (max-width: 480px) {
  .modules-grid { grid-template-columns: 1fr; }
  .action-bar { flex-direction: column; }
  .action-bar .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
}
