/* PixDocs - Clean Daylight Pro & Midnight Slate Dark Theme */
:root {
  --bg-body: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-subtle: #F1F5F9;
  --bg-header: rgba(255, 255, 255, 0.92);
  --text-main: #0F172A;
  --text-muted: #475569;
  --text-light: #64748B;
  --border-color: #E2E8F0;
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-soft: #EFF6FF;
  --success: #10B981;
  --success-hover: #059669;
  --danger: #EF4444;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.07);
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-body: #0F172A;
  --bg-card: #1E293B;
  --bg-subtle: #263348;
  --bg-header: rgba(15, 23, 42, 0.92);
  --text-main: #F1F5F9;
  --text-muted: #CBD5E1;
  --text-light: #94A3B8;
  --border-color: #334155;
  --primary: #3B82F6;
  --primary-hover: #60A5FA;
  --primary-soft: rgba(59, 130, 246, 0.14);
  --success: #10B981;
  --success-hover: #34D399;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.35);
}

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

html {
  scroll-behavior: smooth;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  transition: background-color 0.2s ease, color 0.2s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 18px;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-header);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.brand-logo span {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text-muted);
}

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

.theme-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
}

.theme-btn:hover {
  border-color: var(--primary);
  transform: scale(1.05);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 46px 0 30px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.65rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}

.hero p {
  color: var(--text-muted);
  font-size: clamp(0.98rem, 2vw, 1.12rem);
  max-width: 680px;
  margin: 0 auto 24px;
}

/* Search & Category Filters */
.search-box {
  max-width: 540px;
  margin: 0 auto 22px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 14px 18px 14px 44px;
  border-radius: 14px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 0.98rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}

.filter-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

/* AdSense Safe Containers */
.ad-slot {
  margin: 26px auto;
  text-align: center;
  width: 100%;
  overflow: hidden;
}

.ad-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-bottom: 6px;
}

.ad-box-inner {
  min-height: 90px;
  background: var(--bg-subtle);
  border: 1px dashed var(--border-color);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.8rem;
}

.ad-box-rect .ad-box-inner {
  min-height: 250px;
  max-width: 340px;
  margin: 0 auto;
}

/* Category Sections & Tool Cards Grid */
.category-section {
  margin: 34px 0;
}

.section-title {
  font-size: 1.32rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
}

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

.tool-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: transform 0.25s ease;
}

.tool-card:hover .tool-icon {
  transform: scale(1.08);
}

.icon-blue { background: rgba(37, 99, 235, 0.12); color: #2563EB; }
.icon-indigo { background: rgba(79, 70, 229, 0.12); color: #4F46E5; }
.icon-emerald { background: rgba(16, 185, 129, 0.12); color: #10B981; }
.icon-amber { background: rgba(245, 158, 11, 0.14); color: #D97706; }
.icon-rose { background: rgba(244, 63, 94, 0.12); color: #E11D48; }

.tool-card h3 {
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--text-main);
}

.tool-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Shared Workspace Styles for All 15 Tool Pages */
.tool-workspace {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: clamp(18px, 4vw, 32px);
  box-shadow: var(--shadow-md);
  margin: 18px 0 28px;
}

.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--success);
  background: rgba(16, 185, 129, 0.1);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.dropzone {
  border: 2px dashed var(--primary);
  background: var(--primary-soft);
  border-radius: var(--radius-lg);
  padding: 38px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.dropzone:hover,
.dropzone.dragover {
  background: rgba(37, 99, 235, 0.16);
  transform: scale(1.005);
}

.dropzone h3 {
  font-size: 1.15rem;
  margin: 10px 0 6px;
}

.dropzone p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Buttons & Controls */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 11px;
  font-size: 0.96rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-success {
  background: var(--success);
  color: #FFFFFF;
}

.btn-success:hover:not(:disabled) {
  background: var(--success-hover);
}

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

.btn-secondary:hover:not(:disabled) {
  border-color: var(--primary);
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-control {
  padding: 11px 13px;
  border-radius: 10px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-body);
  color: var(--text-main);
  font-size: 0.95rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.preset-chip {
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.preset-chip:hover,
.preset-chip.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

/* Progress Bar & Result Comparison */
.progress-wrap {
  width: 100%;
  height: 10px;
  background: var(--bg-subtle);
  border-radius: 999px;
  overflow: hidden;
  margin: 16px 0;
  display: none;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--success));
  transition: width 0.25s ease;
}

.result-card {
  margin-top: 22px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
}

.stat-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 16px;
}

.stat-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 600;
}

/* SEO Content & FAQ Section */
.seo-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 4vw, 34px);
  margin: 26px 0;
}

.seo-content h2 {
  font-size: 1.35rem;
  margin: 22px 0 10px;
}

.seo-content h2:first-child {
  margin-top: 0;
}

.seo-content h3 {
  font-size: 1.06rem;
  margin: 16px 0 6px;
  color: var(--primary);
}

.seo-content p,
.seo-content li {
  color: var(--text-muted);
  font-size: 0.96rem;
  margin-bottom: 10px;
}

.seo-content ul,
.seo-content ol {
  padding-left: 20px;
  margin-bottom: 14px;
}

.related-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.related-link {
  padding: 8px 14px;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.88rem;
  font-weight: 600;
  transition: var(--transition);
}

.related-link:hover {
  background: var(--primary);
  color: #FFFFFF;
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 36px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.footer-col h4 {
  font-size: 0.96rem;
  margin-bottom: 12px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

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

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.84rem;
  color: var(--text-light);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  background: #0F172A;
  color: #FFFFFF;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  z-index: 999;
  opacity: 0;
  transform: translateY(15px);
  pointer-events: none;
  transition: all 0.25s ease;
}

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

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
  .tools-grid {
    grid-template-columns: 1fr;
  }
    }
