/* ===== GLOBAL RESET & VARIABLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #F4F6F8;
  --card-bg: #ffffff;
  --text-main: #0A192F;
  --text-muted: #545454;
  --header-dark: #0A192F;
  --green: #00BFA6;
  --green-hover: #008f7a;
  --hero-gradient: linear-gradient(135deg, #0A192F 0%, #00BFA6 60%, #38EF7D 100%);
  --ad-bg: rgba(0, 0, 0, 0.03);
  --border: rgba(0, 0, 0, 0.1);
}

body.dark-mode {
  --bg: #050d1a;
  --card-bg: #112240;
  --text-main: #ffffff;
  --text-muted: #bdc1c6;
  --ad-bg: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.1);
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
  transition: background 0.3s ease;
}

/* ===== HEADER & NAVIGATION ===== */
header {
  background: var(--header-dark);
  padding: 15px 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
}

header .logo {
  max-height: 45px;
}

/* Desktop Nav */
.header-nav {
  display: flex;
  gap: 10px;
  align-items: center;
}

.header-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 8px 15px;
  transition: 0.3s;
}

.header-nav a:hover,
.header-nav a.active {
  color: var(--green);
}

/* Hamburger Icon (Hidden on Desktop) */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.bar {
  width: 25px;
  height: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 2px;
}

.dark-mode-toggle {
  background: var(--green);
  color: white;
  border: none;
  padding: 8px 18px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  margin-left: 10px;
}

/* ===== AD SLOTS ===== */
.sponsor-slot {
  width: 100%;
  background: var(--ad-bg);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border);
  margin: 10px 0;
}

.sponsor-slot span {
  font-size: 0.65rem;
  color: #888;
  letter-spacing: 2px;
  font-weight: 700;
}

.top-ad {
  min-height: 90px;
}

.feed-ad {
  min-height: 250px;
}

.content-ad {
  min-height: 280px;
}

/* ===== HERO SECTION ===== */
.seo-hero {
  background: var(--hero-gradient);
  color: white;
  text-align: center;
  padding: 70px 20px;
}

.seo-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.seo-hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== MAIN CONTAINER ===== */
.seo-container {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 35px;
}

/* ===== TOOL CARD ===== */
.tool-card {
  background: var(--card-bg);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.tool-card h2 {
  margin-bottom: 15px;
  font-size: 1.8rem;
}

.tool-textarea {
  width: 100%;
  height: 200px;
  padding: 20px;
  border-radius: 12px;
  border: 2px solid var(--border);
  font-family: 'Courier New', monospace;
  margin-bottom: 25px;
  background: #fafafa;
  color: #333;
  resize: vertical;
}

body.dark-mode .tool-textarea {
  background: #0d192e;
  color: #fff;
  border-color: #233554;
}

.tool-btn-main {
  background: var(--green);
  color: white;
  border: none;
  padding: 18px 45px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  cursor: pointer;
  width: 100%;
  transition: 0.3s;
  text-transform: uppercase;
}

.tool-btn-main:hover {
  background: var(--green-hover);
  transform: translateY(-2px);
}

/* ===== RESULTS & SERP ===== */
.results-container {
  margin-top: 40px;
  text-align: left;
  border-top: 2px solid var(--green);
  padding-top: 30px;
}

.serp-section {
  background: #fff;
  border: 1px solid #ddd;
  padding: 25px;
  border-radius: 12px;
  margin: 25px 0;
}

body.dark-mode .serp-section {
  background: #0a192f;
  border-color: #233554;
}

.serp-title {
  color: #1a0dab;
  font-size: 20px;
  font-family: arial, sans-serif;
  margin-bottom: 3px;
}

.serp-url {
  color: #006621;
  font-size: 14px;
  margin-bottom: 5px;
}

.serp-description {
  color: #545454;
  font-size: 14px;
  line-height: 1.5;
}

body.dark-mode .serp-title {
  color: #8ab4f8;
}

body.dark-mode .serp-description {
  color: #bdc1c6;
}

.data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 25px 0;
}

.data-item {
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.data-item strong {
  display: block;
  font-size: 0.8rem;
  color: var(--green);
  text-transform: uppercase;
}

/* ===== TRUST GRID ===== */
.info-card {
  background: var(--card-bg);
  padding: 40px;
  border-radius: 20px;
}

.info-card h2 {
  margin-bottom: 25px;
  color: var(--green);
  font-weight: 800;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.trust-card {
  background: rgba(0, 0, 0, 0.02);
  padding: 25px;
  border-radius: 15px;
  border: 1px solid var(--border);
}

body.dark-mode .trust-card {
  background: rgba(255, 255, 255, 0.03);
}

.trust-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--green);
}

.trust-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ===== FAQ ===== */
.faq-container {
  display: flex;
  flex-direction: column;
  gap: 25px;
  margin-top: 20px;
}

.faq-item strong {
  color: var(--green);
  font-size: 1.1rem;
  display: block;
  margin-bottom: 8px;
}

.faq-item p {
  color: var(--text-muted);
}

/* ===== TAG CLOUD ===== */
.tag-cloud {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.tag-cloud a {
  text-decoration: none;
  background: #333;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  transition: 0.3s;
}

.tag-cloud a:hover {
  background: var(--green);
  transform: translateY(-3px);
}

/* ===== FOOTER ===== */
footer {
  background: var(--header-dark);
  color: white;
  text-align: center;
  padding: 60px 20px;
  margin-top: 80px;
}

.footer-note {
  font-size: 0.85rem;
  opacity: 0.6;
  margin: 15px auto;
  max-width: 500px;
}

footer a,
footer a:visited {
  color: var(--green) !important;
  text-decoration: none;
  margin: 0 10px;
  transition: 0.3s;
}

footer a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ===== RESPONSIVE / MOBILE MENU ===== */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  /* Show hamburger icon */

  .header-nav {
    display: none;
    /* Hide nav links by default */
    flex-direction: column;
    position: absolute;
    top: 100%;
    /* Sits right below header */
    left: 0;
    width: 100%;
    background: var(--header-dark);
    padding: 20px;
    border-top: 1px solid var(--border);
    gap: 15px;
    text-align: center;
    z-index: 999;
  }

  /* Shown when JS toggles 'active' class */
  .header-nav.active {
    display: flex;
  }

  .dark-mode-toggle {
    margin: 10px 0 0 0;
    align-self: center;
  }

  /* Hamburger Animation to 'X' */
  .menu-toggle.is-active .bar:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.is-active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .menu-toggle.is-active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .seo-hero h1 {
    font-size: 2rem;
  }

  .data-grid {
    grid-template-columns: 1fr;
  }

  .tool-card {
    padding: 25px;
  }
}

/* 1. Missing Social Image Styling */
.social-preview-box {
  margin-bottom: 25px;
  padding: 20px;
  background: rgba(0, 191, 166, 0.05);
  border-radius: 12px;
  border: 1px solid var(--border);
  text-align: center;
}

.social-preview-box img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
  margin-top: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 2. Secondary Button Styling (CSV Download) */
.tool-btn-secondary {
  background: transparent;
  color: var(--green);
  border: 2px solid var(--green);
  padding: 12px 30px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 20px;
  width: 100%;
  transition: 0.3s;
}

.tool-btn-secondary:hover {
  background: var(--green);
  color: white;
}

/* 3. Recommendation List Styling */
.rec-list {
  list-style: none;
  padding: 0;
}

.rec-list li {
  padding: 10px;
  background: rgba(0, 0, 0, 0.02);
  margin-bottom: 8px;
  border-left: 4px solid var(--green);
  border-radius: 4px;
  font-size: 0.95rem;
}

body.dark-mode .rec-list li {
  background: rgba(255, 255, 255, 0.05);
}

/* ===== RELATED TOOLS / TAG CLOUD STYLING ===== */
.info-card.related-tools {
  text-align: center;
}

.tag-cloud {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  /* Centers the links */
  margin-top: 20px;
}

.tag-cloud a {
  text-decoration: none;
  background: #333;
  /* Dark background like your other tools */
  color: white;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  transition: 0.3s ease;
  border: 1px solid transparent;
}

.tag-cloud a:hover {
  background: var(--green);
  /* Turns green on hover */
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 191, 166, 0.3);

  /* Utility: Prevent Auth Flicker */
#nav-login, #nav-profile {
    display: none;
}

/* Animation for the Main Action Button */
@keyframes pulse-blue {
    0% { transform: scale(1); box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3); }
    50% { transform: scale(1.05); box-shadow: 0 4px 25px rgba(0, 123, 255, 0.5); }
    100% { transform: scale(1); box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3); }
}

.hero-content a {
    animation: pulse-blue 2s infinite ease-in-out;
}

/* Ensure images don't overflow on small phones */
img {
    max-width: 100%;
    height: auto;
}

}
