/* ============================================================
   SEOWOLF SEO AUDIT — MAIN STYLESHEET
   ============================================================ */

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

:root {
  --bg:        #000000;
  --surface:   #1a1a1a;
  --surface2:  #2d2d2d;
  --border:    #404040;
  --accent:    #ff7600;
  --accent2:   #ffaa00;
  --text:      #ffffff;
  --text-muted:#cccccc;
  --text-dim:  #888888;
  --green:     #22c55e;
  --red:       #ef4444;
  --yellow:    #eab308;
  --radius:    10px;
  --header-h:  62px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: Courier, monospace;
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6, span {
  font-family: Courier, monospace !important;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent2); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(13,15,20,0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}

.header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex; align-items: center; gap: 32px;
}

.logo {
  display: flex; align-items: center; gap: 9px;
  color: var(--text) !important;
  font-family: Courier, monospace;
  font-weight: 800; font-size: 20px;
  flex-shrink: 0;
}
.logo-wolf { font-size: 22px; }
.logo-text { letter-spacing: -0.02em; }

/* Nav */
#nav-links { flex: 1; }

.nav-list {
  display: flex; align-items: center; gap: 4px;
  list-style: none;
}

.nav-list > li > a {
  display: block;
  padding: 8px 14px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  transition: color 0.18s, background 0.18s;
  white-space: nowrap;
}
.nav-list > li > a:hover,
.nav-list > li.has-dropdown:hover > a {
  color: var(--text);
  background: var(--surface2);
}

/* Dropdown */
.has-dropdown { position: relative; }

.dropdown-menu {
  display: none;
  position: absolute; top: calc(100% + 4px); left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 240px;
  padding: 8px 0;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  list-style: none;
  z-index: 300;
}

.dropdown-menu li a {
  display: block;
  padding: 8px 18px;
  font-size: 13.5px;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}
.dropdown-menu li a:hover {
  background: var(--surface2);
  color: var(--text);
}

.dropdown-section-label {
  padding: 6px 18px 3px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

/* Mobile menu toggle */
#menu-toggle {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 6px; margin-left: auto;
}
#menu-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--text-muted); border-radius: 2px;
  transition: background 0.2s;
}
#menu-toggle:hover span { background: var(--text); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: #000000;
  border-bottom: 1px solid var(--border);
  padding: 56px 24px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 700px 300px at 50% 0%, rgba(255,118,0,0.08) 0%, transparent 70%);
}

.hero-inner { position: relative; max-width: 680px; margin: 0 auto; }

.hero-badge {
  display: inline-block;
  padding: 5px 14px;
  background: rgba(255,118,0,0.12);
  border: 1px solid rgba(255,118,0,0.25);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero h1 {
  font-weight: 800;
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #fff 0%, #c8d0e0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 520px;
  margin: 0 auto;
}

/* ============================================================
   MAIN + CARDS
   ============================================================ */
.main-wrap {
  flex: 1;
  max-width: 1000px; width: 100%;
  margin: 0 auto;
  padding: 36px 24px 60px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 32px;
}

.audit-card { margin-bottom: 32px; }

/* Form */
.form-row {
  display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap;
}

.form-group { display: flex; flex-direction: column; gap: 7px; flex: 1; min-width: 200px; }
.form-btn-group { flex: 0; min-width: auto; }

label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: Courier, monospace;
  font-size: 14.5px;
  padding: 11px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  width: 100%;
}
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(249,115,22,0.12);
}
.form-input::placeholder { color: var(--text-dim); }

.btn-analyze {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: Courier, monospace;
  font-weight: 700;
  font-size: 15px;
  padding: 11px 26px;
  cursor: pointer;
  transition: background 0.18s, transform 0.1s;
  white-space: nowrap;
}
.btn-analyze:hover { background: var(--accent2); transform: translateY(-1px); }
.btn-analyze:active { transform: translateY(0); }

.btn-secondary {
  display: inline-block;
  margin-top: 24px;
  padding: 10px 22px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.18s, color 0.18s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* Legend */
#legend {
  display: flex; gap: 20px; flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}
#legend span { display: flex; align-items: center; gap: 6px; }
img.searchicon { width: 16px; height: 16px; }

/* Loading */
.loading-inner {
  text-align: center;
  padding: 40px 0;
  color: var(--text-muted);
}
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   RESULTS (styles injected by ajax.php + style.css)
   ============================================================ */
#results {
  margin-top: 8px;
}
#results h2 {
  font-size: 20px; font-weight: 700;
  margin-bottom: 14px;
}
#results h4 {
  font-size: 16px; font-weight: 700;
  margin: 28px 0 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
#results table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  font-size: 13.5px;
}
#results table td, #results table th {
  padding: 10px 14px;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
#results table tr:last-child td,
#results table tr:last-child th { border-bottom: none; }
#results table tr.even { background: rgba(255,255,255,0.02); }
#results table td.subject {
  font-weight: 600; font-size: 13px; color: var(--text); width: 30%;
}
#results table thead tr { background: var(--surface2); }
#results table thead th { color: var(--text); font-weight: 600; }
#results td.pass   { color: var(--green); }
#results td.info   { color: #60a5fa; }
#results td.warning { color: var(--yellow); }
#results a { color: var(--accent); font-weight: normal; }
.message { font-size: 13px; color: var(--text-muted); margin-top: 8px; line-height: 1.6; }
img.icon { float: left; width: 18px; height: 18px; margin-right: 8px; margin-top: 2px; border: none; }
#results table#overview td { font-size: 13px; }

/* ============================================================
   HOW-IT-WORKS STRIP
   ============================================================ */
.how-strip {
  margin-top: 48px;
  text-align: center;
}
.how-strip h2 {
  font-size: 24px; font-weight: 800;
  margin-bottom: 28px;
  letter-spacing: -0.02em;
}
.how-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.how-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 20px;
  text-align: left;
}
.how-num {
  font-size: 28px; font-weight: 800;
  color: var(--accent);
  opacity: 0.5;
  line-height: 1;
  margin-bottom: 10px;
}
.how-item h3 {
  font-size: 15px; font-weight: 700;
  margin-bottom: 6px;
}
.how-item p { font-size: 13px; color: var(--text-muted); }
.how-item code {
  background: var(--surface2);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12px;
  color: var(--accent);
}

/* ============================================================
   INNER PAGE LAYOUT
   ============================================================ */
.page-wrap {
  flex: 1;
  max-width: 900px; width: 100%;
  margin: 0 auto;
  padding: 48px 24px 72px;
}

.page-hero {
  text-align: center;
  padding: 52px 24px 44px;
  background: linear-gradient(135deg, #0d0f14, #111624);
  border-bottom: 1px solid var(--border);
}
.page-hero h1 {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 0%, #c8d0e0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}
.page-hero p {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 520px;
  margin: 0 auto;
}

.prose h2 {
  font-size: 22px; font-weight: 700;
  color: var(--text);
  margin: 40px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.02em;
}
.prose h3 {
  font-size: 16px; font-weight: 700;
  color: var(--accent);
  margin: 28px 0 10px;
}
.prose p { color: var(--text-muted); margin-bottom: 16px; line-height: 1.75; }
.prose ul, .prose ol {
  color: var(--text-muted);
  padding-left: 22px;
  margin-bottom: 16px;
}
.prose li { margin-bottom: 7px; line-height: 1.65; }
.prose strong { color: var(--text); font-weight: 600; }
.prose code {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 13px;
  color: var(--accent2);
}
.prose a { color: var(--accent); }
.prose a:hover { color: var(--accent2); }

.info-box {
  background: rgba(255,118,0,0.07);
  border: 1px solid rgba(255,118,0,0.2);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 13.5px;
  color: var(--text-muted);
}
.info-box strong { color: var(--accent); }

.step-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 24px;
  margin: 14px 0;
  position: relative;
}
.step-num {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 30px; height: 30px;
  background: var(--accent);
  border-radius: 50%;
  font-family: Courier, monospace;
  font-weight: 800;
  font-size: 13px;
  color: #fff;
  margin-bottom: 10px;
}
.step-block h3 { margin-top: 0 !important; color: var(--text) !important; }

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.faq-item:last-child { border-bottom: none; }
.faq-q {
  font-family: Courier, monospace;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 8px;
}
.faq-a { color: var(--text-muted); font-size: 14px; line-height: 1.7; }

.cheat-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 28px;
  font-size: 13.5px;
}
.cheat-table th {
  background: var(--surface2);
  color: var(--text);
  font-weight: 600;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.cheat-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: top;
}
.cheat-table tr:last-child td { border-bottom: none; }
.cheat-table tr:nth-child(even) td { background: rgba(255,255,255,0.015); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 48px 24px 36px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 36px;
}

.footer-brand .logo-wolf { font-size: 26px; }
.footer-brand .logo-text {
  font-family: Courier, monospace;
  font-weight: 800; font-size: 20px;
  letter-spacing: -0.02em;
}
.footer-brand p {
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 10px;
  max-width: 200px;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 9px; }
.footer-col ul li a {
  color: var(--text-dim);
  font-size: 13px;
  transition: color 0.15s;
}
.footer-col ul li a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-dim);
}
.footer-bottom a { color: var(--text-dim); }
.footer-bottom a:hover { color: var(--accent); }

/* ============================================================
   TOC (How-To sidebar)
   ============================================================ */
.page-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  max-width: 1100px; margin: 0 auto;
  padding: 48px 24px 72px;
}
.toc {
  position: sticky; top: calc(var(--header-h) + 20px);
  align-self: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
}
.toc h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.toc ul { list-style: none; }
.toc ul li { margin-bottom: 6px; }
.toc ul li a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.15s;
}
.toc ul li a:hover { color: var(--accent); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .how-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .page-layout { grid-template-columns: 1fr; }
  .toc { position: static; }
}

@media (max-width: 640px) {
  #menu-toggle { display: flex; }
  #nav-links {
    display: none;
    position: fixed; top: var(--header-h); left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 0 20px;
    z-index: 190;
    overflow-y: auto;
    max-height: calc(100vh - var(--header-h));
  }
  #nav-links.open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; padding: 0 16px; gap: 2px; }
  .nav-list > li > a { padding: 12px 10px; }
  .dropdown-menu {
    display: none;
    position: static;
    border: none; border-radius: 0;
    box-shadow: none;
    background: var(--bg);
    padding: 4px 0 4px 16px;
  }
  .has-dropdown:hover .dropdown-menu { display: none; }
  .how-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; }
  .form-btn-group { width: 100%; }
  .btn-analyze { width: 100%; }
}
