:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --bg-color: #f8fafc;
  --surface: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --error: #ef4444;
  --success: #22c55e;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --max-width: 1200px;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-hover); text-decoration: underline; }
img, svg { max-width: 100%; height: auto; }

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

main { flex: 1; padding: 3rem 0; }

/* Header & Nav */
header {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}
.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo:hover { text-decoration: none; color: var(--primary); }
.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav-links a { color: var(--text-muted); font-weight: 500; }
.nav-links a:hover { color: var(--text-main); text-decoration: none; }
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-main);
}
.mobile-menu-btn svg { width: 24px; height: 24px; }

/* Typography */
h1 { font-size: 2.5rem; font-weight: 800; line-height: 1.2; margin-bottom: 1rem; }
h2 { font-size: 1.75rem; font-weight: 700; margin: 2.5rem 0 1rem; }
h3 { font-size: 1.25rem; font-weight: 600; margin: 1.5rem 0 0.75rem; }
p { margin-bottom: 1.25rem; }
ul, ol { margin-bottom: 1.25rem; padding-left: 1.5rem; }
li { margin-bottom: 0.5rem; }

/* Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  line-height: 1;
}
.btn-primary { background-color: var(--primary); color: white; }
.btn-primary:hover { background-color: var(--primary-hover); color: white; text-decoration: none; }
.btn-outline { background-color: transparent; border: 1px solid var(--border-color); color: var(--text-main); }
.btn-outline:hover { background-color: var(--bg-color); text-decoration: none; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.card {
  background-color: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  padding: 2rem;
}

/* Tool UI */
.tool-container {
  max-width: 600px;
  margin: 0 auto 4rem;
  text-align: center;
}
.drop-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  background-color: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.drop-zone.active {
  border-color: var(--primary);
  background-color: #eff6ff;
}
.drop-zone input[type="file"] { display: none; }
.drop-zone-icon {
  width: 48px;
  height: 48px;
  color: var(--primary);
}
.drop-zone-text { font-size: 1.125rem; font-weight: 500; }
.drop-zone-subtext { color: var(--text-muted); font-size: 0.875rem; }

.file-info { display: flex; align-items: center; justify-content: space-between; padding: 1rem; background-color: var(--bg-color); border: 1px solid var(--border-color); border-radius: var(--radius); margin-bottom: 1.5rem; text-align: left; }
.file-details { display: flex; align-items: center; gap: 1rem; overflow: hidden; }
.file-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }
.file-size { color: var(--text-muted); font-size: 0.875rem; }
.btn-remove { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 0.25rem; }
.btn-remove:hover { color: var(--error); }

.password-input-group { margin-bottom: 1.5rem; text-align: left; }
.password-input-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; }
.password-input { width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--border-color); border-radius: var(--radius); font-size: 1rem; }
.password-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }

.status-message { padding: 1rem; border-radius: var(--radius); margin-bottom: 1.5rem; display: none; }
.status-message.error { display: block; background-color: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.status-message.success { display: block; background-color: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }
.status-message.processing { display: block; background-color: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8; }

.loader { display: inline-block; width: 1.5rem; height: 1.5rem; border: 3px solid rgba(255,255,255,0.3); border-radius: 50%; border-top-color: #fff; animation: spin 1s ease-in-out infinite; margin-right: 0.5rem; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Grid / Tools List */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.tool-card { display: flex; flex-direction: column; padding: 1.5rem; background: var(--surface); border: 1px solid var(--border-color); border-radius: var(--radius-lg); transition: box-shadow 0.2s, transform 0.2s; text-decoration: none; color: inherit; }
.tool-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); text-decoration: none; color: inherit; }
.tool-card-icon { color: var(--primary); margin-bottom: 1rem; width: 32px; height: 32px; }
.tool-card-title { font-weight: 700; font-size: 1.25rem; margin-bottom: 0.5rem; }
.tool-card-desc { color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; }

/* Breadcrumbs */
.breadcrumbs { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .separator { opacity: 0.5; }
.breadcrumbs .current { color: var(--text-main); font-weight: 500; }

/* Footer */
footer { background-color: var(--surface); border-top: 1px solid var(--border-color); padding: 4rem 0 2rem; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 3rem; }
.footer-col h4 { font-weight: 600; margin-bottom: 1.25rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.75rem; }
.footer-col a { color: var(--text-muted); text-decoration: none; }
.footer-col a:hover { color: var(--primary); text-decoration: underline; }
.footer-bottom { border-top: 1px solid var(--border-color); padding-top: 2rem; text-align: center; color: var(--text-muted); font-size: 0.875rem; }

/* FAQ */
.faq-list { margin-top: 2rem; }
.faq-item { border-bottom: 1px solid var(--border-color); padding: 1.5rem 0; }
.faq-question { font-weight: 600; font-size: 1.125rem; margin-bottom: 0.5rem; }
.faq-answer { color: var(--text-muted); }

/* Responsive */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  .nav-links {
    display: none;
    position: absolute;
    top: 4rem;
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
  }
  .nav-links.active { display: flex; }
  .mobile-menu-btn { display: block; }
  .file-info { flex-direction: column; gap: 1rem; align-items: flex-start; }
  .file-name { max-width: 100%; }
}

/* ==========================================================================
   HOMEPAGE SPECIFIC
   ========================================================================== */
.hero-section {
  padding: 6rem 0 4rem;
  background-color: var(--bg-color);
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.hero-cta-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.featured-section {
  padding: 4rem 0;
}

.featured-card {
  max-width: 600px;
  margin: 0 auto;
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.featured-icon {
  width: 64px;
  height: 64px;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.featured-card h3 {
  margin-bottom: 1rem;
}

.featured-card p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.why-section, .faq-preview-section {
  padding: 5rem 0;
}

.bg-muted {
  background-color: var(--border-color); /* Very light gray/border color for subtle contrast */
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.benefit-item {
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.benefit-item svg {
  width: 48px;
  height: 48px;
  color: var(--primary);
  margin-bottom: 1rem;
}

.benefit-item h4 {
  margin-bottom: 0.75rem;
}

.benefit-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.how-section {
  padding: 5rem 0;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
  text-align: center;
}

.step-card {
  padding: 2rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--surface);
}

.step-number {
  width: 48px;
  height: 48px;
  background-color: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0 auto 1.5rem;
}

.step-card h4 {
  margin-bottom: 0.75rem;
}

.step-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.cta-section {
  padding: 6rem 0;
  background-color: var(--primary);
  color: white;
}

.cta-section h2 {
  color: white;
  margin-bottom: 2rem;
}

.cta-section .btn-primary {
  background-color: white;
  color: var(--primary);
  border-color: white;
}

.cta-section .btn-primary:hover {
  background-color: #f8f9fa;
  color: var(--primary-hover);
}

.link-arrow {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.link-arrow:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.25rem;
  }
  .hero-subtitle {
    font-size: 1.125rem;
  }
}
