/* ToolFest — shared tool page styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0f;
  --surface: #13131a;
  --surface2: #1c1c27;
  --border: rgba(255, 255, 255, 0.07);
  --accent: #e8ff47;
  --accent2: #47c8ff;
  --text: #f0f0f0;
  --muted: #6b6b80;
  --radius: 12px;
  --pdf-color: #ff6b6b;
  --img-color: #47c8ff;
  --finance-color: #a78bfa;
  --text-tool-color: #34d399;
  --gen-color: #fb923c;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 300;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 999;
  opacity: 0.35;
}

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(10, 10, 15, 0.88);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
}

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

nav ul {
  list-style: none;
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav ul a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  transition: color 0.2s;
  position: relative;
}

nav ul a:hover { color: var(--text); }

nav ul a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.28rem;
  width: 0;
  height: 1px;
  background: rgba(232, 255, 71, 0.7);
  transition: width 0.2s ease;
}

nav ul a:hover::after { width: 100%; }

/* AdSense: replace ins with your unit after approval */
.ad-slot {
  min-height: 90px;
  margin: 1.25rem 0;
  padding: 0.75rem;
  border-radius: var(--radius);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
  line-height: 1.5;
}

.ad-slot.filled { border-style: solid; border-color: var(--border); padding: 0; min-height: auto; }

.page-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 2rem 2rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}

.page-hero-text { min-width: 0; }

.breadcrumb {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { margin: 0 0.35rem; opacity: 0.5; }

.page-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
}

.page-desc {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
  max-width: 520px;
}

.page-hero-badge {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.tool-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
}

.tool-main {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tool-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: 5rem;
}

.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
  background: var(--surface);
}

.dropzone:hover, .dropzone.drag-over {
  border-color: rgba(232, 255, 71, 0.35);
  background: rgba(232, 255, 71, 0.03);
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.dropzone-title { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1.1rem; margin-bottom: 0.35rem; }
.dropzone-sub { font-size: 0.85rem; color: var(--muted); }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
}

.panel-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.form-group { margin-bottom: 1rem; }
.form-group:last-child { margin-bottom: 0; }

.form-label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
}

.form-textarea {
  min-height: 160px;
  resize: vertical;
  line-height: 1.5;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: rgba(232, 255, 71, 0.4);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.range-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.range-wrap input[type="range"] {
  flex: 1;
  accent-color: var(--accent);
}

.range-val {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  min-width: 2.5rem;
  text-align: right;
  color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 500;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  text-decoration: none;
}

.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--accent);
  color: #0a0a0f;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(232, 255, 71, 0.25);
}

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

.btn-ghost:hover:not(:disabled) {
  background: var(--surface2);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-download {
  background: linear-gradient(135deg, rgba(71, 200, 255, 0.2), rgba(71, 200, 255, 0.08));
  color: var(--img-color);
  border: 1px solid rgba(71, 200, 255, 0.35);
}

.btn-download:hover:not(:disabled) {
  transform: translateY(-2px);
}

.status-msg {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  font-size: 0.88rem;
}

.status-msg.success {
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: #6ee7b7;
}

.status-msg.error {
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.3);
  color: #fca5a5;
}

.file-queue {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--surface2);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.file-icon { font-size: 1.75rem; }
.file-info { flex: 1; min-width: 0; }
.file-name { font-weight: 500; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-size { font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; }

.file-remove {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.25rem;
}

.file-remove:hover { color: #ff6b6b; }

.progress-wrap {
  height: 6px;
  background: var(--surface2);
  border-radius: 100px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 100px;
  transition: width 0.25s ease;
}

.other-tools-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.other-tool-link {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  background: var(--surface2);
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  border: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}

.other-tool-link:hover {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.seo-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.seo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.2s, border-color 0.2s;
}

.seo-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
}

.seo-card h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.65rem;
}

.seo-card p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.65;
}

footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Editorial / AdSense-friendly publisher content (visible before ads) */
.publisher-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem 2.5rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.8;
}

.publisher-content h2 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text);
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

.publisher-content h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  margin: 1.75rem 0 0.65rem;
}

.publisher-content p { margin: 0 0 1rem; }

.publisher-content ul {
  margin: 0 0 1.25rem 1.25rem;
  padding: 0;
}

.publisher-content li { margin-bottom: 0.5rem; }

.publisher-content strong { color: var(--text); font-weight: 500; }

.hub-quick-strip {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.7rem;
}

.hub-quick-link {
  display: block;
  text-decoration: none;
  color: var(--text);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  font-size: 0.83rem;
  line-height: 1.35;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.hub-quick-link:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.22);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.hub-quick-link strong {
  display: block;
  margin-bottom: 0.15rem;
  font-family: 'Syne', sans-serif;
  font-size: 0.9rem;
  letter-spacing: -0.02em;
}

.site-footer-links {
  margin-bottom: 1rem;
  line-height: 1.9;
}

.site-footer-links a {
  color: var(--muted);
  text-decoration: none;
  margin: 0 0.35rem;
}

.site-footer-links a:hover { color: var(--accent); }

footer a { color: var(--muted); }

.footer-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.footer-logo span { color: var(--accent); }

.result-highlight {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.75rem;
  color: var(--accent);
  letter-spacing: -0.03em;
}

@media (max-width: 900px) {
  .tool-layout { grid-template-columns: 1fr; }
  .tool-sidebar { position: static; }
  .page-hero { grid-template-columns: 1fr; }
  .page-hero-badge { display: none; }
  nav ul { gap: 0.65rem; }
}

@media (max-width: 600px) {
  nav { padding: 0.85rem 1.25rem; }
  .form-row { grid-template-columns: 1fr; }
}
