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

:root {
  --primary: #248af6;
  --primary-dark: #1a75d2;
  --primary-light: #e8f2fe;
  --text-dark: #000;
  --text-mid: #585858;
  --text-light: #6b6b6b;
  --bg-light: #f6f8f9;
  --bg-gray: #f2f5f8;
  --white: #fff;
  --border: #e8e8e8;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --max-width: 1160px;
}

html {
  overflow-x: hidden;
  max-width: 100vw;
}

section, header, footer, main, div, nav {
  max-width: 100vw;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
}

img, video, canvas, svg { max-width: 100%; height: auto; }

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

/* ===== Header ===== */
.header {
  background: var(--white);
  padding: 0 40px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  width: 100%;
  max-width: 100%;
}

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

.header-logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 2px;
  letter-spacing: -0.02em;
}

.header-logo:hover { text-decoration: none; }
.header-logo span { color: var(--primary); }

.header-nav { display: flex; align-items: center; gap: 28px; }
.header-nav a { color: var(--text-mid); font-size: 15px; font-weight: 500; transition: color 0.15s; }
.header-nav a:hover { color: var(--text-dark); text-decoration: none; }

.header-tools-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: var(--white);
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
}

.header-tools-btn:hover { background: var(--primary-dark); text-decoration: none; }

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 56px 24px 32px;
  max-width: 768px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 48px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 16px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 18px;
  color: var(--text-light);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ===== Featured Tool Box ===== */
.featured-tool {
  max-width: var(--max-width);
  margin: 24px auto 0;
  padding: 0 24px;
  width: 100%;
}

.featured-tool-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.featured-tool-box h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.featured-tool-box p {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 28px;
}

.featured-tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 600px;
  margin: 0 auto;
}

.featured-tool-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--bg-light);
  border-radius: var(--radius);
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.featured-tool-link:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  text-decoration: none;
}

.featured-tool-link .ft-icon {
  width: 32px;
  height: 32px;
  background: var(--primary-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

/* ===== Trust Stats ===== */
.trust-stats {
  display: flex;
  justify-content: center;
  gap: 64px;
  padding: 48px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.trust-stat { text-align: center; }

.trust-stat-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
}

.trust-stat-label {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 500;
  margin-top: 4px;
}

/* ===== Tools Grid ===== */
.tools-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 24px 72px;
  width: 100%;
}

.tools-section-header {
  margin-bottom: 28px;
}

.tools-section h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.01em;
}

.tools-section .tools-subtitle {
  font-size: 15px;
  color: var(--text-light);
  margin-top: 6px;
}

.tool-category {
  margin-bottom: 40px;
}

.tool-category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.tool-category-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
}

.tool-category-header .cat-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 10px;
  border-radius: 20px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 100%;
  padding-top: 4px;
}

.tool-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  transition: all 0.2s ease;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
  overflow: hidden;
}

.tool-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  transform: translateY(-1px);
}

.tool-card-icon {
  width: 44px;
  height: 44px;
  background: var(--primary-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
}

.tool-card-content { flex: 1; min-width: 0; overflow: hidden; }

.tool-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.tool-card p {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.5;
}

/* ===== Features Section ===== */
.features-section {
  background: var(--bg-light);
  padding: 72px 24px;
  width: 100%;
  max-width: 100%;
}

.features-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.features-section h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 8px;
}

.features-subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 16px;
  margin-bottom: 48px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow);
}

.feature-icon {
  width: 52px;
  height: 52px;
  background: var(--primary-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 14px;
}

.feature-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.6;
}

/* ===== FAQ Section ===== */
.faq-section {
  max-width: 720px;
  margin: 0 auto;
  padding: 72px 24px;
}

.faq-section h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 40px;
}

.faq-item { border-bottom: 1px solid var(--border); }

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 20px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: inherit;
}

.faq-question:hover { color: var(--primary); }
.faq-arrow { font-size: 18px; color: var(--text-light); transition: transform 0.2s; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-answer-inner { padding: 0 0 20px; font-size: 15px; color: var(--text-light); line-height: 1.7; }
.faq-item.open .faq-answer { max-height: 300px; }

/* ===== CTA Banner ===== */
.cta-banner {
  background: var(--primary);
  padding: 56px 40px;
  text-align: center;
  color: var(--white);
  width: 100%;
  max-width: 100%;
}

.cta-banner h2 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
  opacity: 0.8;
}

.cta-banner h3 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 24px;
}

.cta-banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  color: var(--primary);
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.cta-banner-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); text-decoration: none; }

/* ===== Footer ===== */
.footer {
  background: var(--text-dark);
  color: #999;
  padding: 48px 40px 32px;
  margin-top: auto;
  width: 100%;
  max-width: 100%;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand .footer-logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
}

.footer-brand .footer-logo span { color: #79b8f8; }
.footer-brand p { font-size: 14px; color: #888; line-height: 1.6; max-width: 280px; }

.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ccc;
  margin-bottom: 16px;
}

.footer-col a { display: block; font-size: 14px; color: #888; margin-bottom: 10px; transition: color 0.15s; }
.footer-col a:hover { color: var(--white); text-decoration: none; }

.footer-bottom {
  max-width: var(--max-width);
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
}

.footer-bottom p { font-size: 13px; color: #666; }

/* Legacy footer for tool pages */
.footer-simple {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  margin-top: auto;
}

.footer-simple p { font-size: 13px; color: #999; }
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 8px; }
.footer-links a { font-size: 13px; color: #888; }
.footer-links a:hover { color: var(--text-dark); }

/* ===== Tool Page Layout ===== */
.tool-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  flex: 1;
  width: 100%;
}

.tool-page h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.tool-page .tool-desc {
  color: var(--text-light);
  font-size: 15px;
  margin-bottom: 24px;
}

.tool-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}

/* ===== Form Elements ===== */
textarea, input[type="text"], input[type="number"], input[type="url"], select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-dark);
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
}

textarea:focus, input[type="text"]:focus, input[type="number"]:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(36, 138, 246, 0.1);
}

textarea {
  resize: vertical;
  min-height: 140px;
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
}

label { display: block; font-size: 13px; font-weight: 600; color: var(--text-mid); margin-bottom: 6px; }
.form-group { margin-bottom: 16px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--bg-gray); color: var(--text-mid); border: 1px solid #ddd; }
.btn-secondary:hover { background: #e8ebef; }
.btn-copy { background: #059669; color: var(--white); }
.btn-copy:hover { background: #047857; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== Output ===== */
.output-area {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  min-height: 80px;
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
  word-break: break-all;
  white-space: pre-wrap;
}

/* ===== Stats Row (tool pages) ===== */
.stats-row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
.stat-item { background: var(--bg-light); border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; flex: 1; min-width: 120px; }
.stat-item .stat-label { font-size: 12px; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-item .stat-value { font-size: 24px; font-weight: 700; color: var(--text-dark); }

/* ===== Color Picker ===== */
.color-display { width: 100%; height: 120px; border-radius: 8px; border: 1px solid var(--border); margin-bottom: 16px; }
.color-values { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.color-value-item { background: var(--bg-light); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.color-value-item:hover { background: #eee; }
.color-value-label { font-size: 12px; color: var(--text-light); font-weight: 600; }
.color-value-text { font-size: 14px; font-family: monospace; color: var(--text-dark); }

/* ===== Options ===== */
.options-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.option-check { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-mid); }
.option-check input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); }
input[type="range"] { width: 100%; accent-color: var(--primary); }

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text-dark);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
}

.toast.show { opacity: 1; transform: translateY(0); }

/* ===== SEO Content ===== */
.seo-content { max-width: 800px; margin: 48px auto 0; padding: 0 24px 64px; }
.seo-content h2 { font-size: 20px; font-weight: 700; color: var(--text-dark); margin-bottom: 12px; }
.seo-content h3 { font-size: 16px; font-weight: 600; color: var(--text-mid); margin-top: 20px; margin-bottom: 8px; }
.seo-content p, .seo-content li { font-size: 15px; color: var(--text-light); line-height: 1.7; }
.seo-content ul { padding-left: 20px; margin-bottom: 12px; }
.seo-content li { margin-bottom: 4px; }

/* ===== Breadcrumb ===== */
.breadcrumb { font-size: 13px; color: #999; margin-bottom: 16px; }
.breadcrumb a { color: #888; }
.breadcrumb a:hover { color: var(--primary); }

/* ===== Search + Filter Bar ===== */
.tools-nav {
  position: sticky;
  top: 73px;
  z-index: 90;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  overflow: hidden;
  left: 0;
  right: 0;
}

.tools-nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  overflow: hidden;
}

.tools-search {
  position: relative;
  margin-bottom: 14px;
}

.tools-search input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 2px solid var(--border);
  border-radius: 50px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text-dark);
  background: var(--bg-light);
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.tools-search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(36, 138, 246, 0.1);
  background: var(--white);
}

.tools-search input::placeholder { color: #aaa; }

.tools-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #aaa;
  pointer-events: none;
}

.tools-search .search-count {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #aaa;
  font-weight: 500;
  pointer-events: none;
  white-space: nowrap;
}

.filter-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.filter-tabs::-webkit-scrollbar { display: none; }

.filter-tab {
  padding: 7px 16px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-mid);
  white-space: nowrap;
  transition: all 0.15s;
  font-family: inherit;
}

.filter-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-tab.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* ===== No Results ===== */
.no-results {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-light);
  display: none;
}

.no-results h3 {
  font-size: 18px;
  color: var(--text-mid);
  margin-bottom: 8px;
}

/* ===== Back to Top ===== */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.show {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-dark);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-tool-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
}

@media (max-width: 640px) {
  .header { padding: 0 16px; height: 56px; }
  .header-logo { font-size: 18px; }
  .header-nav { display: none; }
  .tools-nav { top: 57px; padding: 12px 0; left: 0; right: 0; width: 100%; }
  .tools-nav-inner { padding: 0 16px; width: 100%; }
  .tools-search input { padding: 10px 14px 10px 38px; font-size: 16px; width: 100%; }
  .tools-search-icon { left: 14px; }
  .filter-tabs { gap: 6px; }
  .filter-tab { padding: 6px 12px; font-size: 12px; }
  .hero h1 { font-size: 26px; }
  .hero p { font-size: 15px; }
  .hero { padding: 32px 16px 20px; }
  .featured-tool { padding: 0 16px; }
  .featured-tool-box { padding: 24px 16px; }
  .featured-tool-box h2 { font-size: 18px; }
  .featured-tool-box p { font-size: 13px; margin-bottom: 16px; }
  .featured-tool-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .featured-tool-link { padding: 10px 12px; font-size: 12px; gap: 8px; }
  .featured-tool-link .ft-icon { width: 26px; height: 26px; font-size: 13px; border-radius: 6px; }
  .trust-stats { gap: 16px; padding: 24px 16px; flex-wrap: nowrap; }
  .trust-stat-value { font-size: 22px; }
  .trust-stat-label { font-size: 12px; }
  .tools-section { padding: 20px 16px 40px; }
  .tools-section h2 { font-size: 22px; }
  .tool-grid { grid-template-columns: 1fr; gap: 10px; }
  .tool-card { padding: 16px; gap: 10px; }
  .tool-card-icon { width: 38px; height: 38px; font-size: 18px; border-radius: 8px; }
  .tool-card h3 { font-size: 14px; }
  .tool-card p { font-size: 12px; }
  .tool-category { margin-bottom: 28px; }
  .tool-category-header h3 { font-size: 16px; }
  .features-section { padding: 40px 16px; }
  .features-section h2 { font-size: 22px; }
  .features-grid { grid-template-columns: 1fr; gap: 12px; }
  .feature-card { padding: 20px 16px; }
  .faq-section { padding: 40px 16px; }
  .faq-section h2 { font-size: 22px; }
  .faq-question { font-size: 14px; padding: 16px 0; }
  .cta-banner { padding: 40px 16px; }
  .cta-banner h3 { font-size: 20px; }
  .cta-banner-btn { padding: 12px 24px; font-size: 14px; }
  .footer { padding: 32px 16px 24px; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-brand p { font-size: 13px; }
  .footer-col h4 { margin-bottom: 10px; }
  .footer-col a { font-size: 13px; margin-bottom: 8px; }
  .tool-page { padding: 20px 16px 40px; }
  .tool-page h1 { font-size: 20px; }
  .tool-page .tool-desc { font-size: 14px; }
  .tool-box { padding: 16px; border-radius: 12px; }
  .stats-row { flex-direction: column; gap: 8px; }
  .btn-group { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .seo-content { padding: 0 16px 40px; }
  .seo-content h2 { font-size: 18px; }
  .seo-content p, .seo-content li { font-size: 14px; }
  .no-results { padding: 32px 16px; }
  .back-to-top { bottom: 16px; right: 16px; width: 40px; height: 40px; font-size: 18px; }

  /* ===== Global Tool Page Mobile Fixes ===== */
  /* Force all tool-box content to not overflow */
  .tool-box * { max-width: 100%; }
  .tool-box { overflow: hidden; }

  /* All form inputs full width */
  .tool-box input[type="text"],
  .tool-box input[type="number"],
  .tool-box input[type="url"],
  .tool-box input[type="date"],
  .tool-box input[type="datetime-local"],
  .tool-box select,
  .tool-box textarea { width: 100% !important; max-width: 100% !important; font-size: 16px !important; }

  /* Textareas reasonable height on mobile */
  .tool-box textarea { min-height: 100px; }

  /* All tables scrollable */
  table { display: block; overflow-x: auto; }
  thead, tbody, tr { max-width: 100%; }

  /* Color values grid */
  .color-values { grid-template-columns: 1fr !important; }

  /* Preview grids to single column */
  .preview-grid { grid-template-columns: 1fr !important; }

  /* Result cards */
  .result-cards { grid-template-columns: 1fr !important; }

  /* Any side-by-side flex containers in tools */
  .tool-box .form-row { flex-direction: column !important; gap: 0 !important; }

  /* Options rows wrap properly */
  .options-row { gap: 8px; }
  .option-check { font-size: 13px; }

  /* Slider rows */
  .slider-row { flex-wrap: wrap; }
  .slider-row label { min-width: auto; }
}
