/* ===== ALL IN ONE SEO TOOLS - MAIN STYLESHEET ===== */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --primary: #0057FF;
  --primary-dark: #0040CC;
  --accent: #FF6B2B;
  --accent-light: #FF8C55;
  --dark: #0A0E1A;
  --dark2: #111827;
  --dark3: #1E2535;
  --card-bg: #161D2F;
  --border: rgba(255,255,255,0.08);
  --text: #E8EDF5;
  --text-muted: #8A94A8;
  --success: #22C55E;
  --warning: #F59E0B;
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --radius: 14px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --glow: 0 0 40px rgba(0,87,255,0.2);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--dark);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark2); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 0 5%;
  height: 70px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(10,14,26,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s;
}
.navbar.scrolled { background: rgba(10,14,26,0.98); }

.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; font-family: var(--font-head);
}
.logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; color: white;
  box-shadow: 0 4px 15px rgba(0,87,255,0.4);
}
.logo-text { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.logo-text span { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; }
.nav-links a {
  text-decoration: none; color: var(--text-muted); font-size: 0.9rem;
  font-weight: 500; transition: color 0.2s; position: relative;
}
.nav-links a:hover { color: var(--text); }
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--primary); transform: scaleX(0);
  transition: transform 0.2s;
}
.nav-links a:hover::after { transform: scaleX(1); }

.nav-cta {
  background: var(--primary); color: white !important;
  padding: 8px 20px; border-radius: 8px;
  font-weight: 600 !important; transition: all 0.2s !important;
}
.nav-cta:hover { background: var(--primary-dark) !important; transform: translateY(-1px); }
.nav-cta::after { display: none !important; }

.dark-toggle {
  background: var(--dark3); border: 1px solid var(--border);
  color: var(--text-muted); padding: 8px 14px; border-radius: 8px;
  cursor: pointer; font-size: 16px; transition: all 0.2s;
}
.dark-toggle:hover { color: var(--text); border-color: var(--primary); }

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; background: none; border: none; padding: 5px;
}
.hamburger span {
  width: 24px; height: 2px; background: var(--text);
  border-radius: 2px; transition: all 0.3s;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 100px 5% 60px;
  position: relative; overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(0,87,255,0.12) 0%, transparent 70%),
              radial-gradient(ellipse 40% 40% at 80% 80%, rgba(255,107,43,0.08) 0%, transparent 60%),
              var(--dark);
}
.hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 70% at center, black, transparent);
}

.hero-content { position: relative; z-index: 1; max-width: 800px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(0,87,255,0.1); border: 1px solid rgba(0,87,255,0.3);
  color: #6B9FFF; padding: 6px 16px; border-radius: 50px;
  font-size: 0.82rem; font-weight: 600; margin-bottom: 24px;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.hero-badge .dot {
  width: 6px; height: 6px; background: var(--primary);
  border-radius: 50%; animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800; line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.hero h1 .gradient-text {
  background: linear-gradient(135deg, #5B9FFF 0%, var(--accent) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.1rem; color: var(--text-muted); max-width: 560px;
  margin: 0 auto 36px; line-height: 1.8;
}

.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #3B7FFF);
  color: white; padding: 14px 32px; border-radius: 10px;
  font-weight: 600; font-size: 0.95rem; text-decoration: none;
  border: none; cursor: pointer; transition: all 0.3s;
  box-shadow: 0 8px 24px rgba(0,87,255,0.35);
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0,87,255,0.5); }

.btn-secondary {
  background: transparent; color: var(--text);
  border: 1px solid var(--border); padding: 14px 32px;
  border-radius: 10px; font-weight: 600; font-size: 0.95rem;
  text-decoration: none; cursor: pointer; transition: all 0.3s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); background: rgba(0,87,255,0.05); }

.hero-stats {
  display: flex; justify-content: center; gap: 40px;
  margin-top: 56px; flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-num {
  font-family: var(--font-head); font-size: 1.8rem; font-weight: 800;
  color: var(--text); display: block;
}
.stat-label { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }

/* ===== SEARCH BAR ===== */
.search-section {
  padding: 20px 5% 40px;
  display: flex; justify-content: center;
  position: relative; z-index: 2;
}
.search-wrap {
  width: 100%; max-width: 600px;
  position: relative;
}
.search-wrap input {
  width: 100%; padding: 16px 56px 16px 20px;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 12px; color: var(--text); font-size: 0.95rem;
  font-family: var(--font-body); outline: none; transition: all 0.3s;
}
.search-wrap input:focus { border-color: var(--primary); box-shadow: var(--glow); }
.search-wrap input::placeholder { color: var(--text-muted); }
.search-icon {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 18px; pointer-events: none;
}

/* ===== SECTION ===== */
.section { padding: 70px 5%; }
.section-header { text-align: center; margin-bottom: 50px; }
.section-tag {
  display: inline-block;
  background: rgba(0,87,255,0.1); border: 1px solid rgba(0,87,255,0.3);
  color: #6B9FFF; padding: 4px 14px; border-radius: 50px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; margin-bottom: 14px;
}
.section h2 {
  font-family: var(--font-head); font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800; color: var(--text); margin-bottom: 12px;
}
.section p.sub { color: var(--text-muted); font-size: 1rem; max-width: 500px; margin: 0 auto; }

/* ===== TOOLS GRID ===== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.tool-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.3s;
  position: relative; overflow: hidden;
  animation: fadeUp 0.5s ease both;
}
.tool-card:hover {
  border-color: rgba(0,87,255,0.4);
  transform: translateY(-4px);
  box-shadow: var(--shadow), var(--glow);
}
.tool-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0; transition: opacity 0.3s;
}
.tool-card:hover::before { opacity: 1; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.tool-card-header {
  display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px;
}
.tool-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.tool-card h3 {
  font-family: var(--font-head); font-size: 1rem; font-weight: 700;
  color: var(--text); margin-bottom: 4px;
}
.tool-card p.tool-desc { font-size: 0.83rem; color: var(--text-muted); line-height: 1.5; }

.tool-input-wrap { margin-bottom: 14px; }
.tool-input-wrap input,
.tool-input-wrap textarea {
  width: 100%; padding: 11px 14px;
  background: var(--dark3); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 0.88rem;
  font-family: var(--font-body); outline: none; transition: border 0.2s;
  resize: vertical;
}
.tool-input-wrap input:focus,
.tool-input-wrap textarea:focus { border-color: var(--primary); }
.tool-input-wrap input::placeholder,
.tool-input-wrap textarea::placeholder { color: var(--text-muted); }

.tool-btn {
  width: 100%; padding: 11px;
  background: linear-gradient(135deg, var(--primary), #3B7FFF);
  color: white; border: none; border-radius: 8px;
  font-weight: 600; font-size: 0.9rem; cursor: pointer;
  transition: all 0.2s; font-family: var(--font-body);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.tool-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,87,255,0.4); }
.tool-btn:active { transform: translateY(0); }

.tool-output {
  margin-top: 14px; padding: 14px;
  background: var(--dark3); border: 1px solid var(--border);
  border-radius: 8px; font-size: 0.85rem; color: var(--text);
  display: none; line-height: 1.7; word-break: break-word;
  max-height: 200px; overflow-y: auto;
}
.tool-output.show { display: block; }
.tool-output .success { color: var(--success); }
.tool-output .warning { color: var(--warning); }
.tool-output .error { color: #EF4444; }
.tool-output .label { color: var(--text-muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.tool-output .value { font-weight: 600; font-size: 0.95rem; }

.tool-article {
  margin-top: 16px; padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem; color: var(--text-muted); line-height: 1.65;
}
.tool-article h4 {
  font-size: 0.85rem; font-weight: 600; color: var(--text);
  margin-bottom: 6px; font-family: var(--font-head);
}

/* ===== FAQ ===== */
.faq-grid { max-width: 800px; margin: 0 auto; }

.faq-item {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 12px; overflow: hidden;
}
.faq-q {
  padding: 20px 24px; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; font-size: 0.95rem; color: var(--text);
  transition: color 0.2s; user-select: none;
}
.faq-q:hover { color: var(--primary); }
.faq-q .icon {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--dark3); display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--text-muted); transition: all 0.3s;
  flex-shrink: 0;
}
.faq-item.open .faq-q .icon { background: var(--primary); color: white; transform: rotate(45deg); }
.faq-a {
  max-height: 0; overflow: hidden; transition: max-height 0.4s ease;
  font-size: 0.9rem; color: var(--text-muted); line-height: 1.75;
}
.faq-a-inner { padding: 0 24px 20px; }
.faq-item.open .faq-a { max-height: 300px; }

/* ===== FOOTER ===== */
.footer {
  background: var(--dark2);
  border-top: 1px solid var(--border);
  padding: 60px 5% 30px;
}
.footer-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 48px;
}
.footer-col h4 {
  font-family: var(--font-head); font-size: 0.9rem; font-weight: 700;
  color: var(--text); margin-bottom: 18px; text-transform: uppercase;
  letter-spacing: 0.08em;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
  text-decoration: none; color: var(--text-muted); font-size: 0.88rem;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--primary); }

.footer-subscribe {
  display: flex; gap: 8px;
}
.footer-subscribe input {
  flex: 1; padding: 10px 14px;
  background: var(--dark3); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 0.88rem;
  font-family: var(--font-body); outline: none;
}
.footer-subscribe input:focus { border-color: var(--primary); }
.footer-subscribe button {
  padding: 10px 18px;
  background: var(--primary); color: white; border: none;
  border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 0.85rem;
  transition: background 0.2s;
}
.footer-subscribe button:hover { background: var(--primary-dark); }

.social-links { display: flex; gap: 12px; margin-top: 8px; }
.social-link {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--dark3); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; color: var(--text-muted); font-size: 16px;
  transition: all 0.2s;
}
.social-link:hover { background: var(--primary); color: white; border-color: var(--primary); }

.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  font-size: 0.83rem; color: var(--text-muted);
}
.footer-bottom a { color: var(--text-muted); text-decoration: none; }
.footer-bottom a:hover { color: var(--primary); }
.footer-legal { display: flex; gap: 16px; }

/* ===== LOADING SPINNER ===== */
.spinner {
  width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white; border-radius: 50%;
  animation: spin 0.7s linear infinite; display: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== LIGHT MODE ===== */
body.light {
  --dark: #F5F7FA;
  --dark2: #EBEEF3;
  --dark3: #DDE1EA;
  --card-bg: #FFFFFF;
  --border: rgba(0,0,0,0.08);
  --text: #0A0E1A;
  --text-muted: #5A6478;
  --shadow: 0 8px 32px rgba(0,0,0,0.1);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: fixed; top: 70px; left: 0; right: 0;
    background: var(--dark2); padding: 20px 5%; gap: 20px;
    border-bottom: 1px solid var(--border);
  }
  .hamburger { display: flex; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
  .tools-grid { grid-template-columns: 1fr; }
  .footer-subscribe { flex-direction: column; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ===== ADS PLACEHOLDER ===== */
.ad-slot {
  background: var(--card-bg); border: 1px dashed var(--border);
  border-radius: var(--radius); padding: 20px; text-align: center;
  color: var(--text-muted); font-size: 0.82rem; margin: 20px 0;
  min-height: 90px; display: flex; align-items: center; justify-content: center;
}

/* ===== CATEGORIES ===== */
.category-tabs {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 32px; justify-content: center;
}
.cat-tab {
  padding: 8px 18px; border-radius: 50px; font-size: 0.85rem; font-weight: 600;
  cursor: pointer; border: 1px solid var(--border); background: var(--card-bg);
  color: var(--text-muted); transition: all 0.2s;
}
.cat-tab.active, .cat-tab:hover {
  background: var(--primary); color: white; border-color: var(--primary);
}

/* ===== SCORE / METER ===== */
.score-bar-wrap { margin: 8px 0; }
.score-bar-label { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 4px; }
.score-bar { height: 6px; background: var(--dark3); border-radius: 3px; overflow: hidden; }
.score-bar-fill { height: 100%; border-radius: 3px; transition: width 0.8s ease; }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: var(--dark3); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 20px;
  font-size: 0.88rem; color: var(--text);
  box-shadow: var(--shadow); transform: translateY(20px); opacity: 0;
  transition: all 0.3s;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-color: var(--success); }
.toast.error { border-color: #EF4444; }
