/*
Theme Name: CSV File Viewer
Theme URI: https://csvfileviewer.com
Author: CSV File Viewer Team
Author URI: https://csvfileviewer.com
Description: A fast, SEO-optimized, AdSense-ready theme for CSVFileViewer.com — the free online CSV file viewer tool.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: csvfileviewer
Tags: tool, utility, seo, adsense, mobile-friendly
*/

/* ======================================
   CSS CUSTOM PROPERTIES
====================================== */
:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #EFF6FF;
  --primary-mid: #BFDBFE;
  --accent: #0EA5E9;
  --success: #059669;
  --warning: #D97706;
  --danger: #DC2626;
  --text: #0F172A;
  --text-secondary: #475569;
  --text-light: #94A3B8;
  --border: #E2E8F0;
  --bg: #F8FAFC;
  --bg-white: #FFFFFF;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow: 0 4px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --max-w: 1200px;
  --max-w-narrow: 760px;
  --transition: 0.2s ease;
}

/* ======================================
   RESET & BASE
====================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { padding-left: 1.5rem; }
li { margin-bottom: .4rem; }
p { margin-bottom: 1rem; }
h1,h2,h3,h4,h5,h6 { line-height: 1.3; font-weight: 700; color: var(--text); }
h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); margin-bottom: .75rem; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: .6rem; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); margin-bottom: .5rem; }
code { font-family: var(--font-mono); background: #F1F5F9; padding: 2px 6px; border-radius: 4px; font-size: .9em; }

/* ======================================
   LAYOUT
====================================== */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: var(--max-w-narrow); margin: 0 auto; padding: 0 20px; }

/* ======================================
   HEADER
====================================== */
#site-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: var(--max-w);
  margin: 0 auto;
  gap: 16px;
}
.site-logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.logo-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.logo-text {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -.5px;
  line-height: 1.2;
}
.logo-text span { color: var(--primary); }
.logo-tagline {
  font-size: .65rem;
  color: var(--text-secondary);
  font-weight: 400;
  display: block;
}
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a:hover, .site-nav a.active { background: var(--primary-light); color: var(--primary); }
.nav-cta {
  background: var(--primary) !important;
  color: white !important;
  padding: 8px 18px !important;
  border-radius: 50px !important;
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--primary-dark) !important; }

/* Mobile Nav Toggle */
.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: all var(--transition); }

/* ======================================
   HERO SECTION
====================================== */
.csv-hero {
  background: linear-gradient(135deg, #EFF6FF 0%, #F0F9FF 50%, #ECFDF5 100%);
  padding: 60px 0 50px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.csv-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(37,99,235,.08) 0%, transparent 70%);
  border-radius: 50%;
}
.csv-hero::after {
  content: '';
  position: absolute;
  bottom: -40px; left: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(14,165,233,.06) 0%, transparent 70%);
  border-radius: 50%;
}
.csv-hero .container { position: relative; z-index: 1; }
.csv-hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}
.hero-sub {
  font-size: clamp(.95rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto 24px;
  line-height: 1.7;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.hero-badges span {
  background: white;
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px 16px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}

/* ======================================
   TOOL SECTION
====================================== */
.csv-tool-section {
  padding: 40px 0 60px;
  background: var(--bg-white);
}
.tool-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.tab-btn {
  padding: 10px 20px;
  border: 2px solid var(--border);
  border-radius: 50px;
  background: white;
  cursor: pointer;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition);
  white-space: nowrap;
}
.tab-btn:hover { border-color: var(--primary); color: var(--primary); }
.tab-btn.active { background: var(--primary); border-color: var(--primary); color: white; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Drop Zone */
.drop-zone {
  border: 2px dashed var(--primary-mid);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--primary-light);
  position: relative;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--primary);
  background: #DBEAFE;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.drop-zone svg { margin: 0 auto 16px; }
.drop-zone h3 { margin-bottom: 8px; font-size: 1.2rem; color: var(--text); }
.drop-zone p { color: var(--text-secondary); font-size: .9rem; margin-bottom: 20px; }

/* Paste Area */
#pasteArea {
  width: 100%;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: .9rem;
  line-height: 1.6;
  resize: vertical;
  transition: border-color var(--transition);
  margin-bottom: 12px;
  color: var(--text);
  background: var(--bg-white);
}
#pasteArea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }

/* URL Input */
.url-input-wrap { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
#csvUrl {
  flex: 1;
  min-width: 200px;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  transition: border-color var(--transition);
}
#csvUrl:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.note { font-size: .82rem; color: var(--text-light); margin-top: 8px; }

/* Buttons */
.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,.3); }
.btn-secondary {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 10px 24px;
  border-radius: 50px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  margin-left: 8px;
}
.btn-secondary:hover { background: var(--primary-light); }
.btn-sm {
  background: white;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-sm:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.btn-sm.danger:hover { border-color: var(--danger); color: var(--danger); background: #FEF2F2; }

/* Results */
.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.results-info { display: flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 600; color: var(--text-secondary); }
.file-badge {
  background: var(--primary-light);
  color: var(--primary);
  padding: 3px 10px;
  border-radius: 50px;
  font-size: .78rem;
  font-weight: 600;
}
.results-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#searchInput {
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  min-width: 180px;
  transition: all var(--transition);
}
#searchInput:focus { outline: none; border-color: var(--primary); }

/* Table */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
#csvTable {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
  background: white;
}
#csvTable thead tr { background: var(--primary); }
#csvTable th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  position: sticky;
  top: 0;
}
.sort-icon {
  cursor: pointer;
  margin-left: 6px;
  opacity: .7;
  font-style: normal;
}
.sort-icon:hover { opacity: 1; }
#csvTable td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#csvTable tbody tr:hover { background: var(--primary-light); }
#csvTable tbody tr:last-child td { border-bottom: none; }
.row-num { color: var(--text-light); font-size: .78rem; font-family: var(--font-mono); }

/* Pagination */
.pagination { display: flex; align-items: center; gap: 6px; padding: 12px 0; flex-wrap: wrap; }
.pagination button {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  cursor: pointer;
  font-size: .85rem;
  transition: all var(--transition);
}
.pagination button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pagination button.active { background: var(--primary); color: white; border-color: var(--primary); }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }
.page-info { font-size: .82rem; color: var(--text-secondary); margin-left: 8px; }

/* Error & Loading */
.error-box {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: var(--danger);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  margin-top: 16px;
}
.spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 40px;
  color: var(--text-secondary);
}
.spin-circle {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ======================================
   SECTIONS COMMON
====================================== */
section { padding: 64px 0; }
.section-sub { color: var(--text-secondary); font-size: 1rem; max-width: 560px; margin: 0 auto 40px; text-align: center; line-height: 1.7; }

/* ======================================
   FEATURES
====================================== */
.features-section { background: var(--bg); }
.features-section h2, .features-section .section-sub { text-align: center; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.feature-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: all var(--transition);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--primary-mid); }
.feature-icon { width: 52px; height: 52px; margin-bottom: 16px; }
.feature-icon svg { width: 52px; height: 52px; }
.feature-card h3 { font-size: 1rem; margin-bottom: 8px; }
.feature-card p { color: var(--text-secondary); font-size: .9rem; line-height: 1.6; margin: 0; }

/* ======================================
   HOW TO
====================================== */
.how-to-section { background: white; }
.how-to-section h2, .how-to-section .section-sub { text-align: center; }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.step-card {
  text-align: center;
  padding: 32px 24px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  position: relative;
}
.step-number {
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-weight: 800;
  font-size: .95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.step-card svg { margin: 0 auto 16px; width: 80px; height: 80px; }
.step-card h3 { font-size: 1rem; margin-bottom: 8px; }
.step-card p { color: var(--text-secondary); font-size: .9rem; line-height: 1.6; margin: 0; }

/* ======================================
   INFO / WHAT IS CSV
====================================== */
.info-section { background: var(--bg); }
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.info-content h3 { margin-top: 24px; }
.code-example {
  background: #1E293B;
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 16px 0;
}
.code-example code {
  background: none;
  padding: 0;
  color: #94A3B8;
  font-size: .88rem;
  line-height: 1.7;
  display: block;
}
.info-visual { display: flex; justify-content: center; }

/* ======================================
   USE CASES
====================================== */
.use-cases-section { background: white; }
.use-cases-section h2, .use-cases-section .section-sub { text-align: center; }
.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.use-case {
  padding: 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}
.use-case:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.use-icon { font-size: 2rem; display: block; margin-bottom: 12px; }
.use-case h3 { font-size: .95rem; margin-bottom: 6px; }
.use-case p { color: var(--text-secondary); font-size: .875rem; line-height: 1.6; margin: 0; }

/* ======================================
   FAQ
====================================== */
.faq-section { background: var(--bg); }
.faq-section h2, .faq-section .section-sub { text-align: center; }
.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.faq-item.open { box-shadow: var(--shadow); }
.faq-q {
  width: 100%;
  background: none;
  border: none;
  padding: 18px 20px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
  transition: color var(--transition);
}
.faq-q:hover { color: var(--primary); }
.faq-arrow {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform var(--transition);
  color: var(--text-secondary);
}
.faq-item.open .faq-arrow { transform: rotate(180deg); color: var(--primary); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, padding .35s ease;
  padding: 0 20px;
}
.faq-item.open .faq-a { max-height: 400px; padding: 0 20px 18px; }
.faq-a p { color: var(--text-secondary); font-size: .9rem; line-height: 1.7; margin: 0; }

/* ======================================
   TIPS
====================================== */
.tips-section { background: white; }
.tips-section h2 { text-align: center; margin-bottom: 32px; }
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.tip-card {
  padding: 22px 20px;
  background: var(--bg);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.tip-card h3 { font-size: .95rem; margin-bottom: 8px; }
.tip-card p { color: var(--text-secondary); font-size: .875rem; line-height: 1.6; margin: 0; }

/* ======================================
   RELATED TOOLS
====================================== */
.related-section { background: var(--bg); }
.related-section h2 { text-align: center; margin-bottom: 28px; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.related-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all var(--transition);
}
.related-card:hover { border-color: var(--primary); box-shadow: var(--shadow); text-decoration: none; transform: translateY(-2px); }
.rel-icon { font-size: 1.8rem; flex-shrink: 0; }
.related-card strong { display: block; color: var(--text); font-size: .95rem; margin-bottom: 4px; }
.related-card p { color: var(--text-secondary); font-size: .85rem; line-height: 1.5; margin: 0; }

/* ======================================
   ADSENSE AD SLOTS
====================================== */
.ad-slot {
  text-align: center;
  padding: 20px 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.ad-slot-label {
  font-size: .72rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

/* ======================================
   INNER PAGES (About, Privacy, etc.)
====================================== */
.inner-page-wrap { min-height: 60vh; }
.inner-hero {
  background: linear-gradient(135deg, var(--primary-light) 0%, #F0F9FF 100%);
  padding: 50px 0 40px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.inner-hero h1 { font-size: clamp(1.75rem, 4vw, 2.4rem); }
.inner-hero p { color: var(--text-secondary); margin: 0; }
.inner-content { padding: 50px 0 64px; }
.inner-content h2 { margin-top: 32px; margin-bottom: 12px; font-size: 1.3rem; }
.inner-content h2:first-child { margin-top: 0; }
.inner-content ul, .inner-content ol { margin-bottom: 1rem; }

/* Contact page */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 48px;
  margin-top: 8px;
}
.contact-items { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.contact-item { display: flex; align-items: flex-start; gap: 12px; }
.contact-icon { font-size: 1.5rem; flex-shrink: 0; }
.contact-item strong { display: block; margin-bottom: 2px; }
.contact-item p { color: var(--text-secondary); font-size: .9rem; margin: 0; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-family: var(--font);
  transition: border-color var(--transition);
  background: var(--bg-white);
  color: var(--text);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}

/* ======================================
   BLOG
====================================== */
.blog-post-wrap { min-height: 60vh; }
.blog-article { padding: 50px 0 64px; }
.blog-header { text-align: center; margin-bottom: 36px; }
.blog-cat {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  padding: 4px 14px;
  border-radius: 50px;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
}
.blog-meta { color: var(--text-light); font-size: .88rem; margin-top: 8px; }
.blog-article h2 { margin-top: 32px; }
.code-block {
  background: #1E293B;
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 16px 0;
  overflow-x: auto;
}
.code-block code {
  background: none;
  padding: 0;
  color: #94A3B8;
  font-size: .88rem;
  line-height: 1.7;
  display: block;
  white-space: pre;
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.comparison-table th {
  background: var(--primary);
  color: white;
  padding: 12px 16px;
  text-align: left;
  font-size: .88rem;
}
.comparison-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  font-size: .88rem;
  color: var(--text-secondary);
}
.comparison-table tbody tr:hover { background: var(--primary-light); }
.comparison-table tbody tr:last-child td { border-bottom: none; }

/* ======================================
   FOOTER
====================================== */
#site-footer {
  background: #0F172A;
  color: #94A3B8;
}
.footer-top {
  padding: 52px 0 36px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-brand .logo-text { color: white; }
.footer-brand .logo-text span { color: #60A5FA; }
.footer-desc {
  font-size: .875rem;
  line-height: 1.7;
  margin: 14px 0 20px;
  color: #64748B;
}
.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(37,99,235,.15);
  border: 1px solid rgba(37,99,235,.3);
  color: #60A5FA;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: .78rem;
  font-weight: 600;
}
.footer-col h4 {
  color: white;
  font-size: .88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  color: #64748B;
  font-size: .875rem;
  text-decoration: none;
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: #60A5FA; }
.footer-bottom {
  border-top: 1px solid #1E293B;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-bottom p { font-size: .82rem; color: #475569; margin: 0; }
.footer-legal { display: flex; gap: 16px; }
.footer-legal a { font-size: .82rem; color: #475569; text-decoration: none; transition: color var(--transition); }
.footer-legal a:hover { color: #60A5FA; }

/* ======================================
   RESPONSIVE
====================================== */
@media (max-width: 900px) {
  .info-grid { grid-template-columns: 1fr; }
  .info-visual { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .site-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: white; flex-direction: column; padding: 12px 16px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); gap: 2px; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 16px; border-radius: var(--radius-sm); }
  .nav-cta { text-align: center; }
  .nav-toggle { display: flex; }
  .header-inner { position: relative; }
  .csv-hero { padding: 40px 0 36px; }
  .tool-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .drop-zone { padding: 36px 16px; }
  .results-toolbar { flex-direction: column; align-items: flex-start; }
  .results-actions { width: 100%; }
  #searchInput { flex: 1; min-width: 0; }
  .features-grid, .steps-grid, .use-cases-grid, .tips-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .ad-slot { overflow: hidden; }
  section { padding: 44px 0; }
}
@media (max-width: 480px) {
  .hero-badges { gap: 7px; }
  .hero-badges span { font-size: .76rem; padding: 5px 12px; }
  .url-input-wrap { flex-direction: column; }
  .pagination { gap: 4px; }
  .pagination button { padding: 6px 10px; font-size: .8rem; }
  .comparison-table { font-size: .82rem; }
  .comparison-table th, .comparison-table td { padding: 9px 12px; }
}

/* ======================================
   PRINT
====================================== */
@media print {
  #site-header, #site-footer, .ad-slot, .tool-tabs, .drop-zone, #tab-paste, #tab-url { display: none; }
  .table-wrap { overflow: visible; }
  #csvTable { font-size: .8rem; }
}

/* ======================================
   ACCESSIBILITY
====================================== */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
