/* ============================================
   VOTETR.COM — Global Stylesheet
   Modern high-end UI for developer tool suite
   ============================================ */

/* --- CSS Variables / Design Tokens --- */
:root {
  --color-primary: #E4686C;
  --color-primary-light: #F0868A;
  --color-primary-dark: #C85054;
  --color-accent: #5CB8B2;
  --color-accent-light: #7DCCC7;
  --color-bg: #0F1419;
  --color-bg-elevated: #18212A;
  --color-bg-card: #1A232E;
  --color-surface: #1F2A36;
  --color-border: #2D3A48;
  --color-text: #E8EDF2;
  --color-text-secondary: #94A3B8;
  --color-text-muted: #6B7B8D;
  --color-success: #4ADE80;
  --color-warning: #FBBF24;
  --color-danger: #F87171;
  --color-white: #FFFFFF;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 32px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 30px rgba(228, 104, 108, 0.12);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  --max-width: 1200px;
  --header-height: 64px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Subtle animated background gradient */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(228, 104, 108, 0.06), transparent),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(92, 184, 178, 0.05), transparent);
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--color-primary-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

img {
  max-width: 100%;
  height: auto;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.nav-logo img {
    height: 36px;
    width: 36px;
    display: block;
    object-fit: contain;
    border-radius: 8px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(15, 20, 25, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  height: var(--header-height);
  transition: all var(--transition-normal);
}

.site-header.scrolled {
  background: rgba(15, 20, 25, 0.96);
  box-shadow: var(--shadow-md);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo — left side */
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  order: 1;
  flex-shrink: 0;
}

.header-logo img {
  height: 32px;
  width: auto;
}

.header-logo span {
  font-size: 1.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

/* Navigation — right side */
.header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  order: 2;
}

.header-nav a {
  color: var(--color-text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.header-nav a:hover,
.header-nav a.active {
  color: var(--color-white);
  background: rgba(228, 104, 108, 0.12);
}

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

.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--color-text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  background: none;
  border: none;
  font-family: inherit;
}

.nav-dropdown-trigger:hover,
.nav-dropdown-trigger.has-active {
  color: var(--color-white);
  background: rgba(228, 104, 108, 0.12);
}

/* Desktop-only: dropdown; Mobile-only: direct links */
.nav-mobile-only { display: none; }
.nav-desktop-only { display: block; }

.nav-dropdown-trigger .chevron {
  width: 14px;
  height: 14px;
  transition: transform var(--transition-fast);
}

.nav-dropdown:hover .nav-dropdown-trigger .chevron {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 8px;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-lg);
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(4px);
}

.nav-dropdown-menu a {
  display: block;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  font-size: 0.85rem;
}

.nav-dropdown-menu a:hover {
  background: rgba(228, 104, 108, 0.12);
  color: var(--color-white);
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--color-text);
  order: 2;
}

.mobile-menu-toggle svg {
  width: 24px;
  height: 24px;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
  flex: 1;
  position: relative;
  z-index: 1;
}

/* ============================================
   HERO SECTION (Home Page)
   ============================================ */
.hero {
  padding: 60px 0 50px;
  text-align: center;
  position: relative;
}

.hero-badge {
  display: inline-block;
  padding: 6px 20px;
  background: rgba(228, 104, 108, 0.1);
  border: 1px solid rgba(228, 104, 108, 0.2);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-primary-light);
  margin-bottom: 20px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 18px;
  letter-spacing: -1px;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: var(--color-white);
  box-shadow: 0 4px 15px rgba(228, 104, 108, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 25px rgba(228, 104, 108, 0.5);
  color: var(--color-white);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-bg-elevated);
  border-color: var(--color-primary);
  color: var(--color-white);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.85rem;
}

.btn-icon {
  width: 18px;
  height: 18px;
}

/* ============================================
   SECTION TITLES
   ============================================ */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.section-header p {
  color: var(--color-text-secondary);
  font-size: 1.05rem;
}

/* ============================================
   TOOL CARDS GRID (Home Page)
   ============================================ */
.tools-section {
  padding: 60px 0 80px;
  background: rgba(26, 35, 46, 0.3);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.tool-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 28px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.tool-card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(228, 104, 108, 0.4);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.4rem;
}

.tool-card-icon.purple { background: rgba(228, 104, 108, 0.15); color: var(--color-primary-light); }
.tool-card-icon.teal { background: rgba(92, 184, 178, 0.15); color: var(--color-accent); }
.tool-card-icon.green { background: rgba(74, 222, 128, 0.15); color: var(--color-success); }
.tool-card-icon.amber { background: rgba(251, 191, 36, 0.15); color: var(--color-warning); }
.tool-card-icon.rose { background: rgba(248, 113, 113, 0.15); color: var(--color-danger); }
.tool-card-icon.blue { background: rgba(96, 165, 250, 0.15); color: #60A5FA; }

.tool-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.tool-card p {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  flex: 1;
}

.tool-card .card-arrow {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary-light);
}

.tool-card:hover .card-arrow {
  color: var(--color-accent);
  gap: 10px;
}

/* Featured card (first tool, larger) */
.tool-card.featured {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 28px;
  padding: 32px;
}

.tool-card.featured .tool-card-icon {
  width: 60px;
  height: 60px;
  font-size: 1.6rem;
  flex-shrink: 0;
  margin-bottom: 0;
}

.tool-card.featured .tool-card-content {
  flex: 1;
}

/* ============================================
   SITE INTRO SECTION
   ============================================ */
.site-intro {
  padding: 80px 0;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
}

.site-intro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.intro-card {
  text-align: center;
  padding: 36px 24px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  transition: all var(--transition-normal);
}

.intro-card:hover {
  transform: translateY(-3px);
  border-color: rgba(228, 104, 108, 0.3);
}

.intro-card .intro-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.5rem;
  background: rgba(228, 104, 108, 0.1);
  color: var(--color-primary-light);
}

.intro-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.intro-card p {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ============================================
   TOOL PAGE LAYOUT
   ============================================ */
.tool-page {
  padding: 40px 0 80px;
}

.tool-page-header {
  text-align: center;
  margin-bottom: 40px;
}

.tool-page-header .tool-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 16px;
}

.tool-page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.tool-page-header p {
  color: var(--color-text-secondary);
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

/* Tool workspace */
.tool-workspace {
  display: grid;
  gap: 24px;
}

.tool-workspace.split {
  grid-template-columns: 1fr 1fr;
}

/* Textarea & Input styling */
.tool-textarea,
.tool-input {
  width: 100%;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.6;
  padding: 16px;
  resize: vertical;
  transition: border-color var(--transition-fast);
}

.tool-textarea:focus,
.tool-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(228, 104, 108, 0.15);
}

.tool-textarea {
  min-height: 280px;
}

.tool-input {
  font-family: var(--font-sans);
}

/* Panel */
.tool-panel {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.tool-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--color-border);
}

.tool-panel-header h3 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-muted);
}

.tool-panel-body {
  padding: 20px;
}

.tool-panel-body .tool-textarea,
.tool-panel-body .tool-input {
  min-height: 300px;
}

/* Tool actions */
.tool-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0;
}

/* Stats bar */
.stats-bar {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.stat-item {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  text-align: center;
  min-width: 100px;
}

.stat-item .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-accent);
}

.stat-item .stat-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* ============================================
   CONTENT PAGES (About, Contact, Privacy, ToS)
   ============================================ */
.content-page {
  padding: 60px 0 80px;
}

.content-page .page-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.content-page .page-subtitle {
  color: var(--color-text-secondary);
  font-size: 1.05rem;
  margin-bottom: 40px;
}

.content-body {
  max-width: 800px;
}

.content-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 40px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.content-body h2:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.content-body h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 24px 0 12px;
  color: var(--color-primary-light);
}

.content-body p {
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.content-body ul,
.content-body ol {
  color: var(--color-text-secondary);
  margin: 12px 0 20px 20px;
  line-height: 1.8;
}

.content-body li {
  margin-bottom: 8px;
}

/* Data tables in privacy policy */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 0.9rem;
  table-layout: auto;
}

.data-table th,
.data-table td {
  border: 1px solid var(--color-border);
  padding: 12px 16px;
  text-align: left;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
}

.data-table th {
  background: rgba(228, 104, 108, 0.1);
  color: var(--color-primary-light);
  font-weight: 600;
}

.data-table td {
  color: var(--color-text-secondary);
}

/* Highlight box */
.highlight-box {
  background: rgba(228, 104, 108, 0.08);
  border: 1px solid rgba(228, 104, 108, 0.25);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 20px 0;
}

.highlight-box p {
  margin-bottom: 8px;
}

.highlight-box p:last-child {
  margin-bottom: 0;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--color-bg-elevated);
  border-top: 1px solid var(--color-border);
  padding: 48px 0 24px;
  position: relative;
  z-index: 1;
}

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

.footer-brand h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-brand p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-links h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text);
  margin-bottom: 16px;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-primary-light);
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom p {
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .tool-card.featured {
    flex-direction: column;
    text-align: center;
  }

  .tool-workspace.split {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .content-body {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .section-header h2 {
    font-size: 1.6rem;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .content-page .page-title {
    font-size: 1.6rem;
  }

  .stats-bar {
    gap: 12px;
  }

  .stat-item {
    flex: 1;
    min-width: 80px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  /* Mobile nav */
  .mobile-menu-toggle {
    display: block;
  }

  /* Show mobile direct links, hide desktop dropdown */
  .nav-mobile-only { display: block; }
  .nav-desktop-only { display: none !important; }

  .header-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-bg-elevated);
    flex-direction: column;
    padding: 0 20px;
    border-bottom: 1px solid var(--color-border);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.35s ease, opacity 0.3s ease, padding 0.35s ease;
    z-index: 999;
  }

  .header-nav.open {
    max-height: calc(100vh - var(--header-height));
    opacity: 1;
    pointer-events: auto;
    padding: 20px;
    overflow-y: auto;
  }

  .header-nav a {
    font-size: 1rem;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    width: 100%;
  }

  .header-nav a.nav-mobile-only {
    font-size: 0.92rem;
    padding: 12px 16px 12px 32px;
    color: var(--color-text-secondary);
  }

  /* Tool pages: stack textarea on small screens */
  .tool-textarea {
    min-height: 220px;
  }

  .tool-actions {
    flex-wrap: wrap;
  }

  .tool-actions .btn {
    flex: 1;
    min-width: 110px;
    justify-content: center;
  }

  /* Content page spacing */
  .content-page {
    padding: 40px 0 60px;
  }

  .content-body {
    max-width: 100%;
  }

  /* Home page demo widget */
  .demo-section {
    padding: 48px 0;
  }

  .demo-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .demo-widget-body textarea {
    min-height: 100px;
  }

  /* Use case grid */
  .use-cases-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .use-cases-section {
    padding: 56px 0;
  }

  /* FAQ spacing */
  .faq-section {
    padding: 56px 0;
  }

  .cta-section {
    padding: 56px 0;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 50px 0 40px;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .tool-actions {
    flex-direction: column;
  }

  .tool-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .data-table {
    font-size: 0.8rem;
  }

  .data-table th,
  .data-table td {
    padding: 8px 10px;
    font-size: 0.78rem;
  }

  /* Wrap data tables in scrollable container on small screens */
  .data-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  /* Content pages */
  .content-page {
    padding: 32px 0 60px;
  }

  .content-page .page-title {
    font-size: 1.4rem;
  }

  .content-body h2 {
    font-size: 1.2rem;
  }

  /* Header tightening */
  .site-header {
    --header-height: 56px;
  }

  .header-logo span {
    font-size: 1.15rem;
  }

  .header-logo svg,
  .nav-logo img {
    width: 28px;
    height: 28px;
  }

  .header-nav a,
  .nav-dropdown-trigger {
    font-size: 0.88rem;
    padding: 10px 14px;
  }

  /* Footer */
  .site-footer {
    padding: 32px 0 20px;
  }

  /* Demo widget */
  .demo-widget-header {
    padding: 12px 16px;
  }

  .demo-widget-body {
    padding: 16px;
  }

  .demo-widget-footer {
    padding: 10px 16px;
  }

  /* Use cases */
  .use-cases-section {
    padding: 48px 0;
  }

  .use-case-card {
    padding: 20px;
  }

  /* FAQ */
  .faq-section {
    padding: 48px 0;
  }

  .faq-question {
    padding: 14px 20px;
    font-size: 0.88rem;
  }

  /* CTA */
  .cta-section {
    padding: 48px 0;
  }

  .cta-section h2 {
    font-size: 1.5rem;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* Loading state */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Copy feedback */
.copy-feedback {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-success);
  color: #000;
  padding: 10px 24px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity var(--transition-fast);
  z-index: 9999;
  pointer-events: none;
}

.copy-feedback.show {
  opacity: 1;
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  padding: 12px 24px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  transition: transform var(--transition-normal);
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-in {
  animation: fadeInUp 0.6s ease forwards;
}

/* Staggered animation for cards */
.tool-card:nth-child(1) { animation-delay: 0.05s; }
.tool-card:nth-child(2) { animation-delay: 0.1s; }
.tool-card:nth-child(3) { animation-delay: 0.15s; }
.tool-card:nth-child(4) { animation-delay: 0.2s; }
.tool-card:nth-child(5) { animation-delay: 0.25s; }
.tool-card:nth-child(6) { animation-delay: 0.3s; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   LIGHT THEME
   ============================================ */
[data-theme="light"] {
  --color-bg: #F1F5F9;
  --color-bg-elevated: #FFFFFF;
  --color-bg-card: #FFFFFF;
  --color-surface: #E8EDF3;
  --color-border: #D1D9E6;
  --color-text: #1E293B;
  --color-text-secondary: #56657A;
  --color-text-muted: #8896A8;
  --color-white: #1E293B;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.09);
  --shadow-glow: 0 0 30px rgba(228, 104, 108, 0.07);
}

[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(228, 104, 108, 0.03), transparent),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(92, 184, 178, 0.03), transparent);
}

[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--color-border);
}

[data-theme="light"] .site-header.scrolled {
  background: rgba(255, 255, 255, 0.96);
}

[data-theme="light"] .tools-section {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .use-cases-section {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .cta-section {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .site-intro {
  background: transparent;
}

[data-theme="light"] .faq-section {
  background: transparent;
}

[data-theme="light"] .tool-card {
  border: 1px solid var(--color-border);
}

[data-theme="light"] .tool-panel {
  border: 1px solid var(--color-border);
}

[data-theme="light"] .tool-panel-header {
  background: rgba(0, 0, 0, 0.02);
  border-bottom: 1px solid var(--color-border);
}

[data-theme="light"] .data-table th {
  background: rgba(228, 104, 108, 0.06);
}

[data-theme="light"] .highlight-box {
  background: rgba(228, 104, 108, 0.05);
  border: 1px solid rgba(228, 104, 108, 0.15);
}

[data-theme="light"] .stat-item {
  border: 1px solid var(--color-border);
}

[data-theme="light"] .tool-textarea,
[data-theme="light"] .tool-input {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

[data-theme="light"] .tool-textarea:focus,
[data-theme="light"] .tool-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(228, 104, 108, 0.1);
}

[data-theme="light"] .btn-secondary {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

[data-theme="light"] .btn-secondary:hover {
  background: var(--color-bg);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

[data-theme="light"] .header-nav {
  background: var(--color-bg-elevated);
  border-bottom-color: var(--color-border);
}

/* ============================================
   THEME TOGGLE BUTTON
   ============================================ */
.theme-toggle {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
  order: 2;
  margin-left: 12px;
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--color-primary-light);
  border-color: var(--color-primary);
  background: rgba(228, 104, 108, 0.1);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-normal);
}

.theme-toggle:hover svg {
  transform: rotate(30deg);
}

/* ============================================
   LAYOUT: VERTICAL FLOW (Base64)
   ============================================ */
.tool-workspace.flow {
  max-width: 780px;
  margin: 0 auto;
}

.flow-stage {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}

.flow-stage-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.flow-stage-label .flow-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.flow-stage textarea {
  min-height: 160px;
}

.flow-actions-center {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: -10px 0 20px;
  position: relative;
  z-index: 2;
}

.flow-actions-center .btn {
  border-radius: 100px;
  padding: 10px 24px;
  font-size: 0.85rem;
}

.flow-arrow {
  display: flex;
  justify-content: center;
  margin: -8px 0 12px;
  color: var(--color-primary-light);
  opacity: 0.5;
}

.flow-arrow svg {
  width: 24px;
  height: 24px;
}

/* ============================================
   LAYOUT: ASYMMETRICAL (URL Encoder)
   ============================================ */
.tool-workspace.asym {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.asym-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.asym-side {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.asym-panel {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.asym-panel .asym-panel-header {
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--color-border);
}

.asym-panel .asym-panel-header h3 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-muted);
}

.asym-panel .asym-panel-body {
  padding: 16px 20px;
}

/* ============================================
   LAYOUT: CHIP TOGGLES (Text Cleaner)
   ============================================ */
.tool-workspace.cleaner {
  max-width: 960px;
  margin: 0 auto;
}

.cleaner-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 28px;
}

.chip-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
  font-family: inherit;
  user-select: none;
}

.chip-toggle:hover {
  border-color: var(--color-primary);
  color: var(--color-text);
}

.chip-toggle.active {
  background: rgba(228, 104, 108, 0.15);
  border-color: var(--color-primary);
  color: var(--color-primary-light);
}

.chip-toggle .chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.4;
  transition: all var(--transition-fast);
}

.chip-toggle.active .chip-dot {
  opacity: 1;
  box-shadow: 0 0 8px currentColor;
}

.cleaner-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.cleaner-panel {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.cleaner-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-border);
}

.cleaner-panel-header h3 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-muted);
}

.cleaner-panel-body {
  padding: 20px;
}

.cleaner-diff {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 20px;
}

.cleaner-diff .stat-item {
  min-width: 70px;
  padding: 10px 16px;
}

.cleaner-diff .stat-item .stat-delta {
  font-size: 0.8rem;
  font-weight: 600;
}

.cleaner-diff .stat-item .stat-delta.saved {
  color: var(--color-success);
}

.cleaner-diff .stat-item .stat-delta.none {
  color: var(--color-text-muted);
}

/* Responsive for new layouts */
@media (max-width: 768px) {
  .tool-workspace.asym {
    flex-direction: column;
  }

  .asym-side {
    width: 100%;
    order: -1;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .asym-side .btn {
    flex: 1;
    min-width: 100px;
    font-size: 0.82rem;
    padding: 10px 14px;
  }

  .asym-side .btn-secondary.btn-sm {
    flex: none;
    min-width: auto;
  }

  .cleaner-compare {
    grid-template-columns: 1fr;
  }

  .cleaner-controls {
    gap: 8px;
  }

  .chip-toggle {
    font-size: 0.78rem;
    padding: 8px 14px;
  }

  .flow-stage {
    padding: 16px;
  }

  .flow-actions-center {
    flex-wrap: wrap;
    gap: 8px;
  }

  .flow-actions-center .btn {
    font-size: 0.82rem;
    padding: 8px 16px;
  }

  /* Tool page header shrinking */
  .tool-page-header h1 {
    font-size: 1.5rem;
  }

  .tool-page-header p {
    font-size: 0.9rem;
  }

  .tool-page {
    padding: 24px 0 60px;
  }

  /* Stats bar wrapping on tool pages */
  .stats-bar {
    gap: 8px;
    overflow-x: auto;
    flex-wrap: wrap;
  }

  .stat-item {
    padding: 10px 14px;
    min-width: 70px;
  }

  .stat-item .stat-value {
    font-size: 1.1rem;
  }

  .stat-item .stat-label {
    font-size: 0.65rem;
  }

  /* Tool panels compact */
  .tool-panel-body {
    padding: 14px;
  }

  .tool-panel-header {
    padding: 10px 14px;
  }

  .tool-panel-header h3 {
    font-size: 0.75rem;
  }

  /* Tool bottom sections */
  .tool-bottom {
    padding: 40px 0 0;
    margin-top: 24px;
  }

  .tool-article h3 {
    font-size: 1.05rem;
  }

  .tool-tips {
    grid-template-columns: 1fr;
  }

  .guide-step {
    gap: 14px;
    margin-bottom: 22px;
  }

  .guide-step-num {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }

  .guide-step-body h4 {
    font-size: 0.93rem;
  }
}

@media (max-width: 480px) {
  /* Tool page extra tightening */
  .tool-page-header h1 {
    font-size: 1.3rem;
  }

  .tool-page {
    padding: 16px 0 48px;
  }

  .tool-textarea {
    min-height: 200px;
    font-size: 0.82rem;
    padding: 12px;
  }

  .tool-input {
    font-size: 0.85rem;
    padding: 10px 12px;
  }

  .tool-panel-body {
    padding: 12px;
  }

  .stats-bar {
    gap: 6px;
  }

  .stat-item {
    padding: 8px 10px;
    flex: 1 1 45%;
  }

  /* Flow layout on very small screens */
  .flow-actions-center {
    flex-direction: column;
  }

  .flow-actions-center .btn {
    width: 100%;
    justify-content: center;
    border-radius: var(--radius-sm);
  }

  /* Asym sidebar buttons full width */
  .asym-side {
    flex-direction: column;
  }

  .asym-side .btn {
    min-width: auto;
    width: 100%;
  }

  /* Cleaner chips full width */
  .cleaner-controls {
    flex-direction: column;
  }

  .chip-toggle {
    width: 100%;
    justify-content: center;
  }

  /* Guide steps stacked tighter */
  .guide-step {
    gap: 12px;
  }

  .guide-step-num {
    width: 30px;
    height: 30px;
    font-size: 0.75rem;
  }

  .tool-bottom {
    padding: 32px 0 0;
  }

  /* Container padding */
  .container {
    padding: 0 16px;
  }
}

/* ============================================
   HOME PAGE: MINI TOOL DEMO WIDGET
   ============================================ */
.demo-section {
  padding: 80px 0;
  position: relative;
}

.demo-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 50%, rgba(228, 104, 108, 0.05), transparent);
  pointer-events: none;
}

.demo-widget {
  max-width: 700px;
  margin: 0 auto;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-normal);
}

.demo-widget:hover {
  border-color: rgba(228, 104, 108, 0.2);
}

.demo-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.02);
}

.demo-widget-header .demo-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 600;
}

.demo-widget-header .demo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 8px var(--color-success);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.demo-widget-header .demo-badge {
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(228, 104, 108, 0.12);
  color: var(--color-primary-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.demo-widget-body {
  padding: 24px;
}

.demo-widget-body textarea {
  width: 100%;
  min-height: 120px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.7;
  padding: 16px;
  resize: vertical;
  transition: border-color var(--transition-fast);
}

.demo-widget-body textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(228, 104, 108, 0.1);
}

.demo-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.demo-stat {
  text-align: center;
  padding: 12px 8px;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.demo-stat .demo-stat-val {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-accent);
  font-variant-numeric: tabular-nums;
}

.demo-stat .demo-stat-lbl {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.demo-widget-footer {
  padding: 12px 24px;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.demo-widget-footer .demo-hint {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

/* ============================================
   HOME PAGE: USE CASES SECTION
   ============================================ */
.use-cases-section {
  padding: 80px 0;
  background: rgba(26, 35, 46, 0.25);
}

.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.use-case-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  transition: all var(--transition-normal);
}

.use-case-card:hover {
  border-color: rgba(228, 104, 108, 0.35);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  transform: translateY(-3px);
}

.use-case-card .uc-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
}

.use-case-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.use-case-card p {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.use-case-card .uc-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.use-case-card .uc-tag {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(228, 104, 108, 0.08);
  color: var(--color-primary-light);
  font-weight: 500;
}

/* ============================================
   HOME PAGE: FAQ SECTION
   ============================================ */
.faq-section {
  padding: 80px 0;
  background: var(--color-bg);
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: 10px;
  overflow: hidden;
  transition: all var(--transition-fast);
}

.faq-item:hover {
  border-color: rgba(228, 104, 108, 0.25);
}

.faq-question {
  width: 100%;
  padding: 18px 24px;
  background: none;
  border: none;
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq-question .faq-chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
  color: var(--color-text-muted);
}

.faq-item.open .faq-question .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.open .faq-answer {
  max-height: 300px;
}

.faq-answer-inner {
  padding: 0 24px 20px;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
}

/* ============================================
   HOME PAGE: CTA SECTION
   ============================================ */
.cta-section {
  padding: 80px 0;
  text-align: center;
  background: rgba(26, 35, 46, 0.4);
}

.cta-section h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.cta-section p {
  color: var(--color-text-secondary);
  font-size: 1.05rem;
  margin-bottom: 28px;
}

/* Responsive */
@media (max-width: 600px) {
  .demo-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .demo-widget-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================
   TOOL PAGE: BOTTOM SECTIONS (Guide, FAQ, Article)
   ============================================ */
.tool-bottom {
  padding: 60px 0 0;
  border-top: 1px solid var(--color-border);
  margin-top: 40px;
}

.tool-bottom .section-header {
  margin-bottom: 36px;
}

/* --- Usage Guide (step-by-step) --- */
.guide-steps {
  max-width: 800px;
  margin: 0 auto;
  counter-reset: step;
}

.guide-step {
  display: flex;
  gap: 20px;
  margin-bottom: 28px;
  position: relative;
}

.guide-step-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(228, 104, 108, 0.3);
}

.guide-step-body h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.guide-step-body p {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 6px;
}

.guide-step-body code {
  background: rgba(228, 104, 108, 0.12);
  color: var(--color-primary-light);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* --- Tool Tips Box --- */
.tool-tips {
  max-width: 800px;
  margin: 32px auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.tip-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.tip-card .tip-icon {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.tip-card h5 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.tip-card p {
  color: var(--color-text-secondary);
  font-size: 0.82rem;
  line-height: 1.6;
}

/* --- Tool FAQ (compact accordion) --- */
.tool-faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.tool-faq-item {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  overflow: hidden;
}

.tool-faq-q {
  width: 100%;
  padding: 14px 20px;
  background: none;
  border: none;
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tool-faq-q svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--color-text-muted);
  transition: transform var(--transition-fast);
}

.tool-faq-item.open .tool-faq-q svg {
  transform: rotate(180deg);
}

.tool-faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.tool-faq-item.open .tool-faq-a {
  max-height: 400px;
}

.tool-faq-a-inner {
  padding: 0 20px 16px;
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  line-height: 1.8;
}

/* --- Article Section --- */
.tool-article {
  max-width: 800px;
  margin: 0 auto;
}

.tool-article h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--color-text);
}

.tool-article p {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.85;
  margin-bottom: 14px;
}

.tool-article ul {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
  margin: 8px 0 16px 20px;
}

.tool-article li {
  margin-bottom: 6px;
}

@media (max-width: 600px) {
  .guide-step {
    gap: 14px;
  }

  .guide-step-num {
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
  }

  .tool-tips {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   BLOG PAGE
   ============================================ */
.blog-page {
  padding: 40px 0 80px;
}

.blog-page .page-title {
  font-size: 2.2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.blog-page .page-subtitle {
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 1.05rem;
  margin-bottom: 40px;
}

/* Blog search */
.blog-search {
  max-width: 480px;
  margin: 0 auto 40px;
  position: relative;
}

.blog-search input {
  width: 100%;
  padding: 12px 44px 12px 18px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: border-color var(--transition-fast);
}

.blog-search input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(228, 104, 108, 0.12);
}

.blog-search .search-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}

/* Article grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.blog-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.blog-card:hover {
  border-color: rgba(228, 104, 108, 0.5);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}

.blog-card-top {
  padding: 24px 24px 0;
}

.blog-card-category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--color-primary-light);
  background: rgba(228, 104, 108, 0.1);
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 12px;
}

.blog-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0;
}

.blog-card-excerpt {
  padding: 12px 24px;
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.blog-card-footer .read-more {
  color: var(--color-primary-light);
  font-weight: 600;
  font-size: 0.8rem;
}

.blog-card:hover .read-more {
  color: var(--color-accent);
}

/* Article meta */
.article-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.article-meta-item svg {
  width: 14px;
  height: 14px;
}

/* Article content (blog post) */
.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 36px 0 16px;
  padding-top: 0;
  border-top: none;
}

.article-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 28px 0 12px;
  color: var(--color-primary-light);
}

.article-content p {
  color: var(--color-text-secondary);
  line-height: 1.9;
  margin-bottom: 18px;
  font-size: 0.95rem;
}

.article-content ul,
.article-content ol {
  color: var(--color-text-secondary);
  margin: 12px 0 20px 20px;
  line-height: 1.9;
  font-size: 0.95rem;
}

.article-content li {
  margin-bottom: 8px;
}

.article-content code {
  background: rgba(228, 104, 108, 0.12);
  color: var(--color-primary-light);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
}

.article-content pre {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  overflow-x: auto;
  margin: 16px 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.article-content blockquote {
  border-left: 3px solid var(--color-primary);
  padding: 14px 20px;
  margin: 20px 0;
  background: rgba(228, 104, 108, 0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--color-text-secondary);
  font-style: italic;
}

/* No results */
.blog-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-text-muted);
  grid-column: 1 / -1;
}

.blog-empty svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.blog-empty p {
  font-size: 0.95rem;
}

/* Pagination */
.blog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.blog-pagination button {
  min-width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  color: var(--color-text-secondary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.blog-pagination button:hover {
  border-color: var(--color-primary);
  color: var(--color-white);
  background: rgba(228, 104, 108, 0.15);
}

.blog-pagination button.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  font-weight: 700;
}

.blog-pagination button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Responsive blog */
@media (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .blog-page .page-title {
    font-size: 1.6rem;
  }

  .blog-page {
    padding: 24px 0 60px;
  }

  .blog-search {
    margin: 0 auto 28px;
  }

  .blog-card-top {
    padding: 18px 18px 0;
  }

  .blog-card-excerpt {
    padding: 10px 18px;
  }

  .blog-card-footer {
    padding: 10px 18px;
  }

  .blog-card h3 {
    font-size: 0.95rem;
  }

  .article-content h2 {
    font-size: 1.2rem;
  }

  .article-content p,
  .article-content ul {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .blog-pagination button {
    min-width: 32px;
    height: 32px;
    font-size: 0.78rem;
  }
}

/* ============================================
   COOKIE CONSENT BANNER
   ============================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-bg-elevated);
  border-top: 1px solid var(--color-border);
  padding: 16px 0;
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.4s ease;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-banner .container {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.cookie-banner p {
  flex: 1;
  min-width: 240px;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0;
}

.cookie-banner p a {
  color: var(--color-primary-light);
  text-decoration: underline;
}

.cookie-banner .cookie-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .cookie-banner .container {
    flex-direction: column;
    gap: 12px;
  }

  .cookie-banner .cookie-actions {
    width: 100%;
  }

  .cookie-banner .cookie-actions .btn {
    flex: 1;
    justify-content: center;
  }
}

/* ============================================
   BREADCRUMB NAVIGATION
   ============================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 16px 0 8px;
  font-size: 0.82rem;
}

.breadcrumb a {
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.breadcrumb a:hover {
  color: var(--color-primary-light);
}

.breadcrumb .breadcrumb-sep {
  color: var(--color-border);
  user-select: none;
}

.breadcrumb .breadcrumb-current {
  color: var(--color-text-secondary);
  font-weight: 500;
}

/* ============================================
   404 ERROR PAGE
   ============================================ */
.error-page {
  padding: 100px 0 100px;
  text-align: center;
}

.error-code {
  font-size: 7rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.error-page h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.error-page p {
  color: var(--color-text-secondary);
  max-width: 500px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.error-page .error-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.error-page .error-search {
  max-width: 400px;
  margin: 0 auto;
  position: relative;
}

.error-page .error-search input {
  width: 100%;
  padding: 12px 44px 12px 18px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

.error-page .error-search input:focus {
  outline: none;
  border-color: var(--color-primary);
}

@media (max-width: 600px) {
  .error-code {
    font-size: 4rem;
  }

  .error-page {
    padding: 60px 0 80px;
  }
}