/* ==========================================================================
   XML Sitemap Generator — SEOWebChecker.com
   ========================================================================== */

:root {
  --font-display: 'Outfit', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Dark theme (default) */
  --bg-primary: #0a0e1a;
  --bg-secondary: #0f1526;
  --bg-elevated: #141b2e;
  --bg-elevated-2: #1a2238;
  --border-color: #232c47;
  --text-primary: #f2f4fa;
  --text-secondary: #a4adc7;
  --text-muted: #6b7392;
  --accent: #4f7cff;
  --accent-hover: #6690ff;
  --accent-soft: rgba(79, 124, 255, 0.12);
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

[data-theme='light'] {
  --bg-primary: #f7f8fc;
  --bg-secondary: #ffffff;
  --bg-elevated: #ffffff;
  --bg-elevated-2: #eef1f9;
  --border-color: #e0e4f0;
  --text-primary: #0f1526;
  --text-secondary: #4a5268;
  --text-muted: #838ba8;
  --accent: #3660e6;
  --accent-hover: #2850d6;
  --accent-soft: rgba(54, 96, 230, 0.08);
  --shadow: 0 8px 30px rgba(20, 30, 60, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.2s ease, color 0.2s ease;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.6em;
}

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

img { max-width: 100%; display: block; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap;
}

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------
   Header / Navigation
-------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 26, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}
[data-theme='light'] .site-header { background: rgba(255, 255, 255, 0.92); }

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0; padding: 0;
  flex: 1;
  justify-content: center;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-elevated-2); }

.has-dropdown { position: relative; }
.caret { font-size: 0.7em; transition: transform 0.15s ease; }
.has-dropdown.open .caret, .has-dropdown:hover .caret { transform: rotate(180deg); }

.mega-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 620px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 24px;
  opacity: 0;
  visibility: hidden;
  transform-origin: top center;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}
.has-dropdown:hover .mega-dropdown,
.has-dropdown:focus-within .mega-dropdown,
.has-dropdown.open .mega-dropdown {
  opacity: 1;
  visibility: visible;
}
.mega-dropdown a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
}
.mega-dropdown a:hover { background: var(--accent-soft); color: var(--accent); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle-btn {
  background: var(--bg-elevated-2);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.theme-toggle-btn:hover { background: var(--accent-soft); }
[data-theme='dark'] .icon-sun { display: none; }
[data-theme='light'] .icon-moon { display: none; }

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px; height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.hamburger span {
  width: 22px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-open .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .hamburger span:nth-child(2) { opacity: 0; }
.nav-open .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed;
  top: 68px; left: 0; right: 0; bottom: 0;
  background: var(--bg-primary);
  overflow-y: auto;
  z-index: 99;
  padding: 12px 20px 40px;
}
.mobile-menu.open { display: block; }
.mobile-menu ul { list-style: none; padding: 0; margin: 0; }
.mobile-menu > ul > li { border-bottom: 1px solid var(--border-color); }
.mobile-menu .nav-link { width: 100%; padding: 14px 4px; justify-content: space-between; }
.mobile-menu .mega-dropdown {
  position: static; transform: none; opacity: 1; visibility: visible;
  display: none; grid-template-columns: 1fr; box-shadow: none; border: none;
  padding: 0 0 10px 12px; background: transparent; min-width: 0;
}
.mobile-menu .has-dropdown.open .mega-dropdown { display: grid; }

/* --------------------------------------------------------------------
   Breadcrumb
-------------------------------------------------------------------- */
.breadcrumb {
  padding: 14px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.breadcrumb li::after { content: '/'; margin-left: 6px; color: var(--text-muted); }
.breadcrumb li:last-child::after { content: ''; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb li:last-child { color: var(--text-secondary); }

/* --------------------------------------------------------------------
   Hero
-------------------------------------------------------------------- */
.hero {
  padding: 56px 0 40px;
  text-align: center;
  position: relative;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  max-width: 780px;
  margin: 0 auto 16px;
}
.hero p.lead {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 620px;
  margin: 0 auto 8px;
}

/* --------------------------------------------------------------------
   Tool card / tabs
-------------------------------------------------------------------- */
.tool-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px;
  margin: 0 auto;
  max-width: 880px;
}

.option-tabs {
  display: flex;
  gap: 8px;
  background: var(--bg-elevated-2);
  border-radius: var(--radius-md);
  padding: 6px;
  margin-bottom: 24px;
}
.option-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 600;
  font-family: var(--font-display);
  cursor: pointer;
  font-size: 0.95rem;
}
.option-tab.active {
  background: var(--bg-secondary);
  color: var(--text-primary);
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.option-panel { display: none; }
.option-panel.active { display: block; }

.field-group { margin-bottom: 18px; }
.field-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--text-primary);
}
.field-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 6px; }

.text-input, .select-input, textarea.text-input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font-body);
}
.text-input:focus, .select-input:focus, textarea.text-input:focus {
  border-color: var(--accent);
}
textarea.text-input { resize: vertical; min-height: 160px; font-family: 'SFMono-Regular', Consolas, monospace; font-size: 0.85rem; }

.field-error {
  color: var(--danger);
  font-size: 0.82rem;
  min-height: 1.2em;
  margin-top: 6px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.advanced-toggle {
  background: none;
  border: 1px dashed var(--border-color);
  color: var(--text-secondary);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  width: 100%;
  text-align: left;
  margin-bottom: 16px;
}
.advanced-toggle:hover { color: var(--accent); border-color: var(--accent); }

.advanced-panel { display: none; }
.advanced-panel.open { display: block; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  font-family: var(--font-display);
  cursor: pointer;
  width: 100%;
  transition: background 0.15s ease, transform 0.1s ease;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-primary:disabled { opacity: 0.65; cursor: not-allowed; }

.live-count { font-size: 0.82rem; color: var(--text-muted); margin-top: 6px; }
.progress-note {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
}

/* --------------------------------------------------------------------
   Result section
-------------------------------------------------------------------- */
.result-section {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
}
.result-meta { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 12px; }
.result-warnings ul { color: var(--warning); font-size: 0.82rem; padding-left: 18px; margin: 8px 0 16px; }

.output-box {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  max-height: 340px;
  overflow: auto;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.78rem;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text-secondary);
}

.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.btn-secondary {
  background: var(--bg-elevated-2);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* --------------------------------------------------------------------
   Sections generic
-------------------------------------------------------------------- */
.section { padding: 64px 0; }
.section-header { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-header h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.section-header p { color: var(--text-secondary); }
.section-alt { background: var(--bg-secondary); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
}
.feature-card .icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 14px;
}
.feature-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.feature-card p { color: var(--text-secondary); font-size: 0.9rem; margin: 0; }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.step-card { text-align: center; }
.step-number {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  margin: 0 auto 14px;
}
.step-card h3 { font-size: 1rem; }
.step-card p { color: var(--text-secondary); font-size: 0.88rem; }

/* Tool reference links list */
.tool-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.tool-links-grid a {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  display: block;
}
.tool-links-grid a:hover { border-color: var(--accent); color: var(--accent); }

/* Article / SEO copy */
.article-copy { max-width: 780px; margin: 0 auto; color: var(--text-secondary); }
.article-copy h2 { color: var(--text-primary); margin-top: 1.4em; }
.article-copy p { margin: 0 0 1.1em; }

/* FAQ */
.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  background: var(--bg-secondary);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 18px 20px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.98rem;
}
.faq-question .plus { transition: transform 0.15s ease; color: var(--accent); }
.faq-item.open .faq-question .plus { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease;
  padding: 0 20px;
  color: var(--text-secondary);
  font-size: 0.92rem;
}
.faq-item.open .faq-answer { max-height: 400px; padding-bottom: 18px; }

/* CTA */
.cta-section {
  text-align: center;
  background: linear-gradient(135deg, var(--accent-soft), transparent);
  border-radius: var(--radius-lg);
  padding: 56px 30px;
  margin: 0 20px;
}
.cta-section h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.cta-section p { color: var(--text-secondary); max-width: 560px; margin: 0 auto 24px; }
.cta-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-outline {
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.92rem;
}
.btn-outline:hover { background: var(--accent-soft); }

/* --------------------------------------------------------------------
   Footer
-------------------------------------------------------------------- */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 50px 0 20px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  margin-bottom: 30px;
}
.footer-col h4 { font-size: 0.88rem; color: var(--text-primary); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: var(--text-muted); font-size: 0.86rem; }
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.footer-legal a { color: var(--text-muted); margin-left: 14px; }
.footer-legal a:hover { color: var(--accent); }
.disclaimer { font-size: 0.78rem; color: var(--text-muted); max-width: 900px; margin: 16px 0 0; }

/* --------------------------------------------------------------------
   Cookie banner
-------------------------------------------------------------------- */
.cookie-banner {
  position: fixed;
  bottom: -200px;
  left: 20px; right: 20px;
  max-width: 640px;
  margin: 0 auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: 20px;
  z-index: 200;
  transition: bottom 0.3s ease;
}
.cookie-banner.visible { bottom: 20px; }
.cookie-banner p { margin: 0 0 14px; font-size: 0.88rem; color: var(--text-secondary); }
.cookie-actions { display: flex; gap: 10px; }

/* --------------------------------------------------------------------
   Responsive
-------------------------------------------------------------------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .mega-dropdown { min-width: 0; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .tool-card { padding: 20px; border-radius: var(--radius-md); }
  .cta-section { margin: 0 12px; padding: 40px 20px; }
  body { overflow-x: hidden; }
  .field-row { grid-template-columns: 1fr; }
}
