@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&display=swap');

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

:root {
  --bg: #faf9f7;
  --bg-card: #f0ede8;
  --bg-dark: #1f1a15;
  --text: #1f1a15;
  --text-muted: #7a6f66;
  --text-light: #a89f96;
  --accent: #c47c2b;
  --accent-light: #f5e9d8;
  --border: rgba(31,26,21,0.12);
  --border-hover: rgba(31,26,21,0.28);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow: 0 1px 3px rgba(31,26,21,0.08);
  --shadow-md: 0 4px 16px rgba(31,26,21,0.1);
  --font: 'DM Sans', sans-serif;
  --transition: 0.18s ease;
}

html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: var(--font); cursor: pointer; border: none; outline: none; }
input, select, textarea { font-family: var(--font); outline: none; }

/* ── NAVBAR ── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; height: 60px;
  background: rgba(250,249,247,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--border);
}
.nav-logo { font-size: 20px; font-weight: 600; letter-spacing: -0.4px; color: var(--text); }
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-size: 14px; color: var(--text-muted); padding: 6px 12px;
  border-radius: var(--radius-sm); transition: var(--transition);
}
.nav-links a:hover { color: var(--text); background: var(--bg-card); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.btn-login {
  font-size: 14px; color: var(--text-muted); padding: 7px 16px;
  border-radius: var(--radius-sm); border: 0.5px solid var(--border);
  background: transparent; transition: var(--transition);
}
.btn-login:hover { border-color: var(--border-hover); color: var(--text); background: var(--bg-card); }
.btn-pro {
  font-size: 14px; font-weight: 500; color: var(--bg);
  padding: 7px 18px; border-radius: var(--radius-sm);
  background: var(--text); transition: var(--transition);
}
.btn-pro:hover { background: #2e2820; }
.nav-hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; cursor: pointer; }
.nav-hamburger span { display: block; width: 22px; height: 1.5px; background: var(--text); border-radius: 2px; transition: var(--transition); }
.nav-mobile { display: none; flex-direction: column; background: var(--bg); border-bottom: 0.5px solid var(--border); padding: 12px 24px 20px; gap: 4px; }
.nav-mobile a { font-size: 15px; color: var(--text-muted); padding: 10px 0; border-bottom: 0.5px solid var(--border); }
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile.open { display: flex; }

/* ── HERO ── */
.hero {
  text-align: center; padding: 64px 24px 40px;
  max-width: 680px; margin: 0 auto;
}
.hero h1 { font-size: clamp(28px, 5vw, 44px); font-weight: 500; letter-spacing: -0.8px; line-height: 1.15; color: var(--text); }
.hero h1 span { color: var(--accent); }
.hero p { font-size: 16px; color: var(--text-muted); margin-top: 12px; font-weight: 300; }
.search-wrap { margin-top: 28px; display: flex; align-items: center; gap: 10px; background: var(--bg-card); border: 0.5px solid var(--border); border-radius: var(--radius-xl); padding: 12px 20px; transition: var(--transition); }
.search-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(196,124,43,0.1); }
.search-wrap svg { flex-shrink: 0; color: var(--text-light); }
.search-wrap input { flex: 1; border: none; background: transparent; font-size: 15px; color: var(--text); }
.search-wrap input::placeholder { color: var(--text-light); }

/* ── CATEGORIES ── */
.categories { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; padding: 0 24px 32px; }
.cat-pill {
  font-size: 13px; padding: 7px 16px; border-radius: 20px;
  border: 0.5px solid var(--border); background: var(--bg-card);
  color: var(--text-muted); cursor: pointer; transition: var(--transition);
  white-space: nowrap;
}
.cat-pill:hover { border-color: var(--border-hover); color: var(--text); }
.cat-pill.active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ── SECTIONS ── */
.section { padding: 8px 32px 32px; max-width: 1200px; margin: 0 auto; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-title { font-size: 11px; font-weight: 500; color: var(--text-light); text-transform: uppercase; letter-spacing: 1px; }
.section-count { font-size: 12px; color: var(--text-light); }

/* ── TOOL GRID ── */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.tool-card {
  background: var(--bg-card); border: 0.5px solid var(--border);
  border-radius: var(--radius-md); padding: 16px 14px;
  cursor: pointer; transition: var(--transition);
  display: flex; flex-direction: column; gap: 8px;
  text-decoration: none; color: inherit;
}
.tool-card:hover { border-color: var(--border-hover); background: #ebe7e1; transform: translateY(-1px); box-shadow: var(--shadow); }
.tool-card.hidden { display: none; }
.tool-icon { font-size: 22px; line-height: 1; }
.tool-name { font-size: 13px; font-weight: 500; color: var(--text); line-height: 1.3; }
.tool-desc { font-size: 11px; color: var(--text-muted); line-height: 1.4; }
.tool-badge { font-size: 10px; font-weight: 500; padding: 2px 7px; border-radius: 10px; width: fit-content; }
.tool-badge.pro { background: var(--accent-light); color: var(--accent); }
.tool-badge.free { background: #e8f5e9; color: #388e3c; }

/* ── DIVIDER ── */
.divider { height: 0.5px; background: var(--border); margin: 8px 32px; }

/* ── NO RESULTS ── */
.no-results { text-align: center; padding: 60px 24px; color: var(--text-muted); font-size: 15px; display: none; }
.no-results.show { display: block; }

/* ── FOOTER ── */
.footer { margin-top: 48px; border-top: 0.5px solid var(--border); padding: 24px 32px; display: flex; align-items: center; justify-content: space-between; flex-wrap: gap; gap: 12px; }
.footer-left { font-size: 13px; color: var(--text-light); }
.footer-left strong { color: var(--text); font-weight: 500; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 13px; color: var(--text-light); transition: var(--transition); }
.footer-links a:hover { color: var(--text); }
.footer-note { font-size: 12px; color: var(--text-light); text-align: center; padding: 0 32px 20px; }

/* ── AUTH PAGES ── */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { background: var(--bg); border: 0.5px solid var(--border); border-radius: var(--radius-lg); padding: 40px; width: 100%; max-width: 420px; box-shadow: var(--shadow-md); }
.auth-logo { font-size: 22px; font-weight: 600; letter-spacing: -0.4px; text-align: center; margin-bottom: 28px; }
.auth-logo span { color: var(--accent); }
.auth-title { font-size: 20px; font-weight: 500; margin-bottom: 6px; }
.auth-sub { font-size: 14px; color: var(--text-muted); margin-bottom: 28px; }
.form-group { margin-bottom: 16px; }
.form-label { font-size: 13px; font-weight: 500; color: var(--text); display: block; margin-bottom: 6px; }
.form-input {
  width: 100%; padding: 11px 14px; border-radius: var(--radius-sm);
  border: 0.5px solid var(--border); background: var(--bg-card);
  font-size: 14px; color: var(--text); transition: var(--transition);
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(196,124,43,0.1); }
.form-input::placeholder { color: var(--text-light); }
.btn-submit {
  width: 100%; padding: 12px; border-radius: var(--radius-sm);
  background: var(--text); color: var(--bg); font-size: 15px;
  font-weight: 500; margin-top: 8px; transition: var(--transition);
}
.btn-submit:hover { background: #2e2820; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.auth-divider span { font-size: 12px; color: var(--text-light); white-space: nowrap; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 0.5px; background: var(--border); }
.auth-switch { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 20px; }
.auth-switch a { color: var(--accent); font-weight: 500; }
.form-error { font-size: 12px; color: #c0392b; margin-top: 4px; display: none; }
.form-error.show { display: block; }
.form-success { font-size: 13px; color: #27ae60; background: #e8f5e9; padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; display: none; }
.form-success.show { display: flex; align-items: center; gap: 8px; }
.btn-google {
  width: 100%; padding: 11px 14px; border-radius: var(--radius-sm);
  border: 0.5px solid var(--border); background: var(--bg);
  font-size: 14px; font-weight: 500; color: var(--text);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  cursor: pointer; transition: var(--transition); margin-bottom: 4px;
}
.btn-google:hover { background: var(--bg-card); border-color: var(--border-hover); }
.btn-google img { width: 18px; height: 18px; flex-shrink: 0; }

/* ── PRICING PAGE ── */
.pricing-hero { text-align: center; padding: 60px 24px 40px; }
.pricing-hero h1 { font-size: clamp(26px, 4vw, 40px); font-weight: 500; letter-spacing: -0.6px; }
.pricing-hero p { font-size: 16px; color: var(--text-muted); margin-top: 10px; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; max-width: 860px; margin: 0 auto; padding: 0 24px 60px; }
.pricing-card { background: var(--bg-card); border: 0.5px solid var(--border); border-radius: var(--radius-lg); padding: 28px 24px; }
.pricing-card.featured { background: var(--text); border-color: var(--text); }
.pricing-card.featured * { color: var(--bg) !important; }
.pricing-card.featured .plan-price-sub { color: rgba(250,249,247,0.6) !important; }
.pricing-card.featured .plan-feature { border-color: rgba(250,249,247,0.12) !important; }
.pricing-card.featured .btn-plan { background: var(--accent); color: var(--bg); }
.plan-badge { font-size: 11px; font-weight: 500; padding: 3px 10px; border-radius: 10px; background: var(--accent-light); color: var(--accent); width: fit-content; margin-bottom: 16px; }
.plan-name { font-size: 18px; font-weight: 500; margin-bottom: 8px; }
.plan-price { font-size: 36px; font-weight: 500; letter-spacing: -1px; line-height: 1; }
.plan-price sup { font-size: 18px; font-weight: 400; vertical-align: super; }
.plan-price-sub { font-size: 13px; color: var(--text-muted); margin-top: 4px; margin-bottom: 24px; }
.plan-features { list-style: none; margin-bottom: 24px; }
.plan-feature { font-size: 13px; padding: 10px 0; border-bottom: 0.5px solid var(--border); display: flex; align-items: center; gap: 8px; }
.plan-feature:last-child { border-bottom: none; }
.plan-feature .check { color: #27ae60; font-size: 15px; }
.plan-feature .cross { color: var(--text-light); font-size: 15px; }
.btn-plan { width: 100%; padding: 12px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; background: var(--text); color: var(--bg); transition: var(--transition); }
.btn-plan:hover { opacity: 0.88; }
.btn-plan.outline { background: transparent; color: var(--text); border: 0.5px solid var(--border); }
.btn-plan.outline:hover { background: var(--bg-card); }

/* ── TOOL PAGE ── */
.tool-page { max-width: 760px; margin: 0 auto; padding: 48px 24px; }
.tool-page-header { margin-bottom: 32px; }
.tool-breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.tool-breadcrumb a { color: var(--accent); }
.tool-page-title { font-size: clamp(22px, 4vw, 32px); font-weight: 500; letter-spacing: -0.4px; margin-bottom: 8px; }
.tool-page-desc { font-size: 15px; color: var(--text-muted); font-weight: 300; }
.upload-area {
  border: 1.5px dashed var(--border-hover); border-radius: var(--radius-lg);
  padding: 48px 24px; text-align: center; cursor: pointer;
  transition: var(--transition); background: var(--bg-card);
  margin-bottom: 24px;
}
.upload-area:hover, .upload-area.dragover { border-color: var(--accent); background: var(--accent-light); }
.upload-icon { font-size: 36px; margin-bottom: 12px; }
.upload-title { font-size: 16px; font-weight: 500; margin-bottom: 6px; }
.upload-sub { font-size: 13px; color: var(--text-muted); }
.upload-sub span { color: var(--accent); font-weight: 500; cursor: pointer; }
.upload-limit { font-size: 12px; color: var(--text-light); margin-top: 8px; }
.file-input { display: none; }
.file-selected { display: none; background: var(--bg-card); border: 0.5px solid var(--border); border-radius: var(--radius-md); padding: 14px 16px; margin-bottom: 20px; align-items: center; gap: 12px; }
.file-selected.show { display: flex; }
.file-selected-name { font-size: 14px; font-weight: 500; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-selected-size { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.file-remove { font-size: 18px; color: var(--text-light); cursor: pointer; transition: var(--transition); background: none; padding: 0; line-height: 1; }
.file-remove:hover { color: #c0392b; }
.tool-options { background: var(--bg-card); border: 0.5px solid var(--border); border-radius: var(--radius-md); padding: 20px; margin-bottom: 24px; }
.tool-options h3 { font-size: 13px; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 16px; }
.option-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 0.5px solid var(--border); gap: 16px; }
.option-row:last-child { border-bottom: none; padding-bottom: 0; }
.option-label { font-size: 14px; color: var(--text); }
.option-select { padding: 7px 12px; border-radius: var(--radius-sm); border: 0.5px solid var(--border); background: var(--bg); font-size: 13px; color: var(--text); cursor: pointer; }
.option-select:focus { border-color: var(--accent); }
.btn-convert {
  width: 100%; padding: 14px; border-radius: var(--radius-md);
  background: var(--text); color: var(--bg); font-size: 16px;
  font-weight: 500; transition: var(--transition); margin-bottom: 12px;
}
.btn-convert:hover { background: #2e2820; }
.btn-convert:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-download {
  width: 100%; padding: 14px; border-radius: var(--radius-md);
  background: var(--accent); color: var(--bg); font-size: 16px;
  font-weight: 500; transition: var(--transition); display: none;
}
.btn-download.show { display: block; }
.btn-download:hover { background: #a8681f; }
.progress-wrap { margin-bottom: 16px; display: none; }
.progress-wrap.show { display: block; }
.progress-label { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.progress-bar { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 2px; width: 0%; transition: width 0.3s ease; }
.tool-error { font-size: 14px; color: #c0392b; background: #fdf2f2; padding: 12px 16px; border-radius: var(--radius-sm); border: 0.5px solid #f5c6c6; margin-bottom: 16px; display: none; }
.tool-error.show { display: block; }

/* ── DASHBOARD ── */
.dashboard { max-width: 900px; margin: 0 auto; padding: 40px 24px; }
.dashboard-header { margin-bottom: 32px; }
.dashboard-title { font-size: 24px; font-weight: 500; letter-spacing: -0.3px; }
.dashboard-sub { font-size: 14px; color: var(--text-muted); margin-top: 4px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 32px; }
.stat-card { background: var(--bg-card); border: 0.5px solid var(--border); border-radius: var(--radius-md); padding: 20px; }
.stat-label { font-size: 12px; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 8px; }
.stat-value { font-size: 28px; font-weight: 500; letter-spacing: -0.5px; }
.stat-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.plan-status { background: var(--bg-card); border: 0.5px solid var(--border); border-radius: var(--radius-md); padding: 20px 24px; margin-bottom: 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.plan-status-left .plan-name-label { font-size: 12px; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 4px; }
.plan-status-left .plan-name-val { font-size: 18px; font-weight: 500; }
.plan-status-left .plan-expires { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.btn-upgrade { padding: 9px 20px; border-radius: var(--radius-sm); background: var(--accent); color: var(--bg); font-size: 14px; font-weight: 500; transition: var(--transition); }
.btn-upgrade:hover { background: #a8681f; }
.section-card { background: var(--bg-card); border: 0.5px solid var(--border); border-radius: var(--radius-md); padding: 20px 24px; margin-bottom: 16px; }
.section-card h3 { font-size: 14px; font-weight: 500; margin-bottom: 16px; }
.profile-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 0.5px solid var(--border); font-size: 14px; }
.profile-row:last-child { border-bottom: none; }
.profile-row-label { color: var(--text-muted); }
.btn-small { padding: 6px 14px; border-radius: var(--radius-sm); font-size: 13px; border: 0.5px solid var(--border); background: transparent; color: var(--text); transition: var(--transition); }
.btn-small:hover { background: var(--bg); border-color: var(--border-hover); }
.btn-danger { color: #c0392b; border-color: #f5c6c6; }
.btn-danger:hover { background: #fdf2f2; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .navbar { padding: 0 20px; }
  .nav-links, .nav-actions { display: none; }
  .nav-hamburger { display: flex; }
  .hero { padding: 40px 20px 28px; }
  .section { padding: 8px 20px 24px; }
  .divider { margin: 8px 20px; }
  .tools-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
  .footer { flex-direction: column; align-items: flex-start; padding: 20px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .tool-page { padding: 32px 20px; }
  .option-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .option-select { width: 100%; }
  .plan-status { flex-direction: column; align-items: flex-start; }
  .dashboard { padding: 28px 20px; }
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .categories { gap: 6px; }
  .cat-pill { font-size: 12px; padding: 6px 12px; }
  .dashboard-grid { grid-template-columns: 1fr; }
}
