/* ====================================================================
   UNIVERSAL TIER C TOOL PAGE MASTER DESIGN SYSTEM
   Modern Interactive Light Theme Glassmorphism & Balanced Gaps
   ==================================================================== */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Tier C Color System */
  --bg-slate-ice: #F8FAFC;
  --glass-bg: rgba(255, 255, 255, 0.9);
  --glass-bg-hover: rgba(255, 255, 255, 0.98);
  --glass-border: rgba(226, 232, 240, 0.9);
  --glass-shadow: 0 10px 30px -10px rgba(79, 70, 229, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);

  /* Gradients */
  --grad-primary: linear-gradient(135deg, #6366F1 0%, #7C3AED 100%);
  --grad-primary-hover: linear-gradient(135deg, #4F46E5 0%, #6D28D9 100%);
  --grad-glow-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);

  --text-main: #0F172A;
  --text-muted: #475569;
  --text-light: #94A3B8;

  --accent-indigo: #6366F1;
  --accent-violet: #7C3AED;
  
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

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

body.light-glass-theme {
  font-family: var(--font-sans);
  background-color: var(--bg-slate-ice);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 1rem;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Radial Blurs */
.ambient-blur {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.blur-1 {
  width: 500px;
  height: 500px;
  top: -100px;
  left: -100px;
  background: radial-gradient(circle, #EEF2FF 0%, rgba(238, 242, 255, 0) 70%);
}

.blur-2 {
  width: 600px;
  height: 600px;
  top: 20%;
  right: -150px;
  background: radial-gradient(circle, #F3E8FF 0%, rgba(243, 232, 255, 0) 70%);
}

/* Balanced Container with Side Gaps */
.max-width-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .max-width-container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

/* Glass Card Definition */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  border-color: rgba(199, 210, 254, 0.9);
}

/* ====================================================================
   NAVBAR (Balanced Paddings)
   ==================================================================== */
.sticky-glass-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  padding: 0.75rem 0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.nav-left {
  display: flex;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--grad-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.logo-text-wrap {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.logo-subtitle {
  font-size: 0.68rem;
  font-weight: 800;
  color: #6366F1;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

/* Center Search */
.nav-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.search-trigger-btn {
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: 9999px;
  padding: 0.6rem 1.1rem 0.6rem 1.2rem;
  font-family: inherit;
  font-size: 0.9rem;
  color: #64748B;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  width: 360px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.search-trigger-btn:hover {
  border-color: #6366F1;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
}

.ctrl-k-badge {
  background: #F1F5F9;
  color: #64748B;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-mono);
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
  margin-left: auto;
  border: 1px solid #E2E8F0;
}

/* Right Actions */
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.nav-btn-categories {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.nav-btn-categories:hover {
  background: #F1F5F9;
  color: #0F172A;
}

.icon-violet {
  color: #6366F1;
}

.nav-btn-theme {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #EFF6FF;
  border: 1px solid #DBEAFE;
  color: #3B82F6;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-btn-theme:hover {
  background: #DBEAFE;
}

.nav-divider {
  width: 1px;
  height: 26px;
  background: #E2E8F0;
}

.btn-signup {
  background: var(--grad-primary);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.6rem 1.35rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  transition: all 0.2s ease;
}

.btn-signup:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45);
}

/* ====================================================================
   BLOCK 2: TOOL HERO HEADER
   ==================================================================== */
.tool-hero-section {
  padding: 2.25rem 0 1.5rem 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}

.breadcrumb a:hover {
  color: var(--accent-indigo);
}

.breadcrumb .slash {
  color: var(--text-light);
}

.breadcrumb .current {
  color: var(--text-main);
  font-weight: 600;
}

.hero-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.65rem;
}

.hero-icon-glowing {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--grad-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--grad-glow-shadow);
}

.hero-title {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 720px;
  margin-bottom: 1.25rem;
}

/* ====================================================================
   BLOCK 3: INTERACTIVE WORKSPACE CANVAS (Side Padding & Gaps)
   ==================================================================== */
.workspace-canvas {
  padding: 2.25rem 2.5rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .workspace-canvas {
    padding: 1.5rem 1.25rem;
  }
}

.scraper-section {
  display: flex;
  flex-direction: column;
}

.scraper-form {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.scraper-input-wrap {
  position: relative;
  flex: 1;
}

.scraper-input-wrap .input-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

.scraper-input-wrap input {
  width: 100%;
  padding: 0.85rem 1.1rem 0.85rem 2.8rem;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.95);
  outline: none;
  transition: all 0.2s ease;
  color: var(--text-main);
}

.scraper-input-wrap input:focus {
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* IMPORT OG TAGS BUTTON */
#scrapeBtn {
  background: linear-gradient(135deg, #6366F1 0%, #7C3AED 100%);
  color: #ffffff;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 1.6rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  flex-shrink: 0;
}

#scrapeBtn:hover {
  background: linear-gradient(135deg, #4F46E5 0%, #6D28D9 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

#scrapeBtn:active {
  transform: translateY(0);
}

.workspace-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 1.75rem 0;
}

.workspace-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
  margin-bottom: 1.75rem;
}

@media (max-width: 768px) {
  .workspace-form-grid {
    grid-template-columns: 1fr;
  }
}

.form-col-left, .form-col-right {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.full-height {
  height: 100%;
}

label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.form-input-glass, .form-select-glass {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-main);
  outline: none;
  transition: all 0.2s ease;
}

.form-textarea-glass {
  width: 100%;
  height: 100%;
  min-height: 200px;
  padding: 0.95rem 1.1rem;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-main);
  outline: none;
  resize: vertical;
  line-height: 1.6;
  transition: all 0.2s ease;
}

.form-input-glass:focus, .form-textarea-glass:focus, .form-select-glass:focus {
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-options-row {
  display: flex;
  gap: 1.75rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.col-third {
  flex: 1;
  min-width: 150px;
}

.col-third-dyn {
  flex: 2;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

/* Action Trigger Bar */
.action-trigger-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 1.35rem;
  background: rgba(238, 242, 255, 0.6);
  border: 1px solid #C7D2FE;
  border-radius: var(--radius-md);
  margin-bottom: 2.25rem;
  flex-wrap: wrap;
}

.btn-gradient-cta {
  background: var(--grad-primary);
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.9rem 2.2rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--grad-glow-shadow);
  transition: all 0.25s ease;
}

.btn-gradient-cta:hover {
  background: var(--grad-primary-hover);
  transform: translateY(-1px);
}

.btn-outline-glass {
  background: #ffffff;
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.btn-outline-glass:hover {
  background: var(--bg-slate-ice);
  color: var(--text-main);
}

/* Output Panels */
.result-code-section {
  margin-top: 2rem;
}

.output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.output-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}

.code-box-glass {
  background: #0F172A;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  color: #E2E8F0;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.3);
}

.btn-code-action {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid #334155;
  color: #CBD5E1;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-code-action:hover {
  background: #334155;
  color: #ffffff;
}

.code-display-content {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.8;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.syn-bracket { color: #C084FC; }
.syn-attr { color: #38BDF8; }
.syn-val { color: #FEF08A; }

/* ====================================================================
   BLOCK 4: EDUCATIONAL CONTENT & SEO SECTION
   ==================================================================== */
.seo-education-section {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  margin-bottom: 4rem;
}

.seo-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-main);
  text-align: center;
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .steps-grid { grid-template-columns: 1fr; }
}

.step-card {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.step-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .features-grid { grid-template-columns: 1fr; }
}

.feature-card {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feature-icon { font-size: 2rem; }
.feature-card h3 { font-size: 1.15rem; font-weight: 700; }
.feature-card p { font-size: 0.95rem; color: var(--text-muted); }

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 840px;
  margin: 0 auto;
}

.faq-item { overflow: hidden; }

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.faq-answer {
  padding: 0 1.5rem 1.25rem 1.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  display: none;
  line-height: 1.6;
}

.faq-item.open .faq-answer { display: block; }
.faq-item.open .faq-icon { transform: rotate(180deg); }

/* ====================================================================
   BLOCK 5: RELATED TOOLS CAROUSEL & FOOTER
   ==================================================================== */
.related-tools-section { margin-bottom: 4rem; }

.carousel-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  overflow-x: auto;
}

@media (max-width: 900px) {
  .carousel-container { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .carousel-container { grid-template-columns: 1fr; }
}

.tool-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tool-card-icon { font-size: 1.85rem; }
.tool-card h3 { font-size: 1.05rem; font-weight: 700; }
.tool-card p { font-size: 0.875rem; color: var(--text-muted); flex: 1; }
.tool-link { font-size: 0.875rem; font-weight: 700; color: var(--accent-indigo); text-decoration: none; margin-top: 0.5rem; }
.tool-link:hover { text-decoration: underline; }

/* Global Footer */
.global-footer {
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid var(--glass-border);
  padding: 3.5rem 0 1.75rem 0;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

.footer-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.85rem;
  max-width: 300px;
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-col a {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
}

.footer-col a:hover { color: var(--accent-indigo); }

.footer-bottom {
  border-top: 1px solid var(--glass-border);
  padding-top: 1.25rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-light);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-card {
  width: 100%;
  max-width: 560px;
  padding: 1.75rem;
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.modal-header input {
  flex: 1;
  background: transparent;
  border: none;
  font-size: 1.05rem;
  outline: none;
  font-family: inherit;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-main);
}

.search-result-item.active, .search-result-item:hover {
  background: #EEF2FF;
}

.search-result-item small { color: var(--text-muted); display: block; }

/* Toasts */
.toast-container { position: fixed; top: 1.25rem; right: 1.25rem; z-index: 1000; display: flex; flex-direction: column; gap: 0.5rem; }
.toast { padding: 0.85rem 1.35rem; border-radius: var(--radius-md); font-size: 0.875rem; font-weight: 600; color: #ffffff; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15); display: flex; align-items: center; gap: 0.5rem; }
.toast-success { background: #10B981; }
.toast-error { background: #EF4444; }

.hidden { display: none !important; }
