@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #f5f5f7;
  --bg2: #ffffff;
  --bg3: #eeeef0;
  --surface: #ffffff;
  --surface2: #f8f8fa;
  --surface3: #f0f0f3;
  --border: #e2e2e8;
  --border2: #d1d1d9;
  --text: #1a1a2e;
  --text2: #5c5c72;
  --text3: #8e8ea0;
  --primary: #6c5ce7;
  --primary2: #7c6df0;
  --primaryLight: #ede9ff;
  --primaryBg: rgba(108,92,231,.06);
  --green: #00b894;
  --greenLight: #e6faf5;
  --blue: #0984e3;
  --blueLight: #e8f4fd;
  --orange: #f39c12;
  --orangeLight: #fef5e7;
  --red: #e74c3c;
  --redLight: #fdecea;
  --pink: #e84393;
  --radius: 14px;
  --radius2: 18px;
  --maxW: 1260px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow2: 0 4px 12px rgba(0,0,0,.08);
  --shadow3: 0 8px 30px rgba(0,0,0,.1);
}

* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:'Outfit',sans-serif; background:var(--bg); color:var(--text); min-height:100vh; -webkit-font-smoothing:antialiased; overflow-x:hidden; }
a { color:var(--primary); text-decoration:none; transition:.2s; }
a:hover { color:var(--primary2); }
::selection { background:var(--primary); color:#fff; }
img { max-width:100%; }

/* ===== ANIMATIONS ===== */
@keyframes fadeUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes slideDown { from { opacity:0; transform:translateY(-10px); } to { opacity:1; transform:translateY(0); } }
@keyframes pulse { 0%,100% { transform:scale(1); } 50% { transform:scale(1.05); } }
@keyframes shimmer { 0% { background-position:-200% 0; } 100% { background-position:200% 0; } }
@keyframes float { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-6px); } }
@keyframes glow { 0%,100% { box-shadow:0 0 20px rgba(108,92,231,.2); } 50% { box-shadow:0 0 35px rgba(108,92,231,.4); } }

.animate-up { animation: fadeUp .5s ease both; }
.animate-up:nth-child(1) { animation-delay:.05s; }
.animate-up:nth-child(2) { animation-delay:.1s; }
.animate-up:nth-child(3) { animation-delay:.15s; }
.animate-up:nth-child(4) { animation-delay:.2s; }
.animate-up:nth-child(5) { animation-delay:.25s; }
.animate-up:nth-child(6) { animation-delay:.3s; }

/* ===== NAV ===== */
.nav {
  position:sticky; top:0; z-index:100;
  background:rgba(255,255,255,.85);
  backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px);
  border-bottom:1px solid var(--border);
  height:64px; display:flex; align-items:center; padding:0 24px;
  animation: slideDown .4s ease;
}
.nav-inner { max-width:var(--maxW); width:100%; margin:0 auto; display:flex; align-items:center; justify-content:space-between; gap:16px; }
.logo { font-size:22px; font-weight:800; color:var(--text); letter-spacing:2px; display:flex; align-items:center; gap:10px; text-transform:uppercase; }
.logo-icon {
  width:36px; height:36px; background:linear-gradient(135deg,var(--primary),var(--pink));
  border-radius:10px; display:flex; align-items:center; justify-content:center;
  font-size:18px; color:#fff; animation:float 3s ease-in-out infinite;
  box-shadow:0 4px 15px rgba(108,92,231,.3);
}
.logo span {
  background:linear-gradient(135deg,var(--primary),var(--pink));
  -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
}
.nav-links { display:flex; gap:4px; }
.nav-link { color:var(--text2); font-size:13.5px; font-weight:500; padding:8px 14px; border-radius:10px; transition:.2s; white-space:nowrap; }
.nav-link:hover { color:var(--text); background:var(--surface3); text-decoration:none; }
.nav-link.active { color:var(--primary); background:var(--primaryLight); font-weight:600; }
.nav-right { display:flex; align-items:center; gap:12px; }
.nav-search {
  background:var(--surface3); border:1.5px solid transparent; border-radius:10px;
  padding:8px 14px; color:var(--text); font-size:13px; width:220px; font-family:inherit; transition:.2s;
}
.nav-search:focus { outline:none; border-color:var(--primary); background:var(--surface); box-shadow:0 0 0 3px rgba(108,92,231,.12); }
.nav-search::placeholder { color:var(--text3); }

/* ===== AD SLOTS ===== */
.ad-banner {
  background:var(--surface2); border:1px solid var(--border); border-radius:var(--radius);
  display:flex; align-items:center; justify-content:center; color:var(--text3); font-size:11px;
  margin:16px auto; max-width:728px; width:calc(100% - 32px); overflow:hidden; min-height:90px;
  letter-spacing:.5px; text-transform:uppercase;
}
.ad-banner-large { min-height:250px; max-width:970px; }
.ad-sidebar {
  min-height:250px; width:300px; background:var(--surface2); border:1px solid var(--border);
  border-radius:var(--radius); display:flex; align-items:center; justify-content:center;
  color:var(--text3); font-size:11px; letter-spacing:.5px; text-transform:uppercase;
}
.ad-inline {
  background:var(--surface2); border:1px solid var(--border); border-radius:var(--radius);
  display:flex; align-items:center; justify-content:center; color:var(--text3); font-size:11px;
  min-height:100px; margin:16px 0; letter-spacing:.5px; text-transform:uppercase;
}

/* ===== HERO ===== */
.hero {
  text-align:center; padding:56px 24px 32px; position:relative;
  animation: fadeUp .6s ease;
}
.hero::before {
  content:''; position:absolute; top:-60px; left:50%; transform:translateX(-50%);
  width:700px; height:500px;
  background:radial-gradient(ellipse, rgba(108,92,231,.08) 0%, rgba(232,67,147,.04) 40%, transparent 70%);
  pointer-events:none;
}
.hero h1 {
  font-size:clamp(28px,5vw,50px); font-weight:800; letter-spacing:-.5px;
  line-height:1.12; position:relative; max-width:700px; margin:0 auto;
}
.hero h1 em {
  font-style:normal;
  background:linear-gradient(135deg,var(--primary),var(--pink),var(--blue));
  background-size:200% 200%;
  animation:shimmer 4s ease infinite;
  -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
}
.hero p {
  color:var(--text2); font-size:17px; margin-top:14px;
  max-width:520px; margin-left:auto; margin-right:auto; line-height:1.55; position:relative;
}
.hero-search {
  max-width:500px; margin:24px auto 0; position:relative;
  animation: fadeUp .7s ease both;
}
.hero-search input {
  width:100%; padding:15px 20px 15px 46px;
  background:var(--surface); border:1.5px solid var(--border);
  border-radius:14px; color:var(--text); font-size:15px; font-family:inherit;
  box-shadow:var(--shadow2); transition:.25s;
}
.hero-search input:focus { outline:none; border-color:var(--primary); box-shadow:0 0 0 4px rgba(108,92,231,.1),var(--shadow2); }
.hero-search input::placeholder { color:var(--text3); }
.hero-search .search-icon { position:absolute; left:16px; top:50%; transform:translateY(-50%); font-size:18px; color:var(--text3); }

/* ===== SECTIONS ===== */
.section { max-width:var(--maxW); margin:0 auto; padding:0 24px 40px; }
.section-header { display:flex; align-items:center; gap:10px; margin-bottom:16px; }
.section-icon {
  width:38px; height:38px; border-radius:11px; display:flex; align-items:center;
  justify-content:center; font-size:18px; transition:.3s;
}
.section-icon.pdf { background:var(--redLight); color:var(--red); }
.section-icon.image { background:var(--blueLight); color:var(--blue); }
.section-icon.write { background:var(--greenLight); color:var(--green); }
.section-icon.video { background:var(--orangeLight); color:var(--orange); }
.section-icon.other { background:var(--primaryLight); color:var(--primary); }
.section-title { font-size:20px; font-weight:700; }

/* ===== TOOL GRID ===== */
.grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:12px; }
.tool-card {
  background:var(--surface); border:1.5px solid var(--border);
  border-radius:var(--radius); padding:18px; transition:.3s cubic-bezier(.4,0,.2,1);
  cursor:pointer; display:flex; align-items:flex-start; gap:14px; text-decoration:none;
  animation: fadeUp .5s ease both;
  position:relative; overflow:hidden;
}
.tool-card::after {
  content:''; position:absolute; inset:0;
  background:linear-gradient(135deg,rgba(108,92,231,.04),rgba(232,67,147,.04));
  opacity:0; transition:.3s;
}
.tool-card:hover {
  border-color:var(--primary); transform:translateY(-3px);
  box-shadow:var(--shadow3); text-decoration:none;
}
.tool-card:hover::after { opacity:1; }
.tool-card:hover .tc-icon { transform:scale(1.1) rotate(3deg); }
.tc-icon {
  width:42px; height:42px; border-radius:11px; display:flex; align-items:center;
  justify-content:center; font-size:20px; flex-shrink:0; transition:.3s;
}
.tc-icon.pdf { background:var(--redLight); color:var(--red); }
.tc-icon.image { background:var(--blueLight); color:var(--blue); }
.tc-icon.write { background:var(--greenLight); color:var(--green); }
.tc-icon.video { background:var(--orangeLight); color:var(--orange); }
.tc-icon.other { background:var(--primaryLight); color:var(--primary); }
.tc-text h3 { font-size:14px; font-weight:600; color:var(--text); line-height:1.3; margin-bottom:3px; }
.tc-text p { font-size:12px; color:var(--text3); line-height:1.4; }

/* ===== TOOL PAGE LAYOUT ===== */
.tool-layout { max-width:var(--maxW); margin:0 auto; padding:24px 24px 40px; display:grid; grid-template-columns:1fr 300px; gap:24px; align-items:start; }
.tool-main { min-width:0; }
.tool-sidebar { display:flex; flex-direction:column; gap:16px; }
.tool-page-header { margin-bottom:20px; animation:fadeUp .5s ease; }
.tool-page-header h1 { font-size:28px; font-weight:800; margin-bottom:4px; }
.tool-page-header .breadcrumb { font-size:13px; color:var(--text3); margin-bottom:8px; }
.tool-page-header .breadcrumb a { color:var(--text3); }
.tool-page-header .breadcrumb a:hover { color:var(--primary); }
.tool-page-header .subtitle { color:var(--text2); font-size:14px; }

/* ===== TOOL BOX ===== */
.tool-box {
  background:var(--surface); border:1.5px solid var(--border);
  border-radius:var(--radius2); padding:30px; margin-bottom:20px;
  box-shadow:var(--shadow); animation:fadeUp .5s ease .1s both;
}

/* ===== UPLOAD AREA ===== */
.upload-area {
  border:2px dashed var(--border2); border-radius:var(--radius);
  padding:50px 24px; text-align:center; cursor:pointer; transition:.3s;
  background:var(--surface2); position:relative; overflow:hidden;
}
.upload-area::before {
  content:''; position:absolute; inset:0;
  background:linear-gradient(135deg,rgba(108,92,231,.04),rgba(0,184,148,.04));
  opacity:0; transition:.3s;
}
.upload-area:hover { border-color:var(--primary); transform:scale(1.01); }
.upload-area:hover::before { opacity:1; }
.upload-area.active { border-color:var(--green); background:var(--greenLight); }
.upload-area .ua-icon { font-size:40px; margin-bottom:12px; animation:float 3s ease-in-out infinite; position:relative; }
.upload-area p { color:var(--text2); font-size:14px; position:relative; }
.upload-area p span { color:var(--primary); font-weight:600; }

/* ===== FILE INFO ===== */
.file-info {
  display:flex; align-items:center; gap:12px; background:var(--surface2); border:1px solid var(--border);
  border-radius:10px; padding:10px 14px; margin-top:12px; animation:fadeIn .3s ease;
}
.file-info .fi-icon { font-size:20px; }
.file-info .fi-name { font-size:13px; font-weight:500; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.file-info .fi-size { font-size:12px; color:var(--text3); }
.file-info .fi-remove { cursor:pointer; color:var(--red); font-size:16px; padding:4px; border-radius:6px; transition:.2s; }
.file-info .fi-remove:hover { background:var(--redLight); }

/* ===== INPUTS ===== */
.input-area {
  width:100%; min-height:140px; background:var(--surface2); border:1.5px solid var(--border);
  border-radius:12px; padding:14px; color:var(--text); font-family:'Outfit',sans-serif;
  font-size:14px; resize:vertical; line-height:1.6; transition:.2s;
}
.input-area:focus { outline:none; border-color:var(--primary); box-shadow:0 0 0 3px rgba(108,92,231,.1); background:var(--surface); }
.input-row { display:flex; gap:10px; margin-top:14px; flex-wrap:wrap; align-items:center; }
select,.input-field {
  background:var(--surface2); border:1.5px solid var(--border); border-radius:10px;
  padding:10px 14px; color:var(--text); font-family:inherit; font-size:14px; transition:.2s;
}
select:focus,.input-field:focus { outline:none; border-color:var(--primary); box-shadow:0 0 0 3px rgba(108,92,231,.1); }

/* ===== BUTTONS ===== */
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  background:var(--primary); color:#fff; border:none; border-radius:12px;
  padding:13px 24px; font-size:14px; font-weight:600; cursor:pointer;
  transition:.3s cubic-bezier(.4,0,.2,1); font-family:inherit; width:100%; margin-top:14px;
  box-shadow:0 2px 8px rgba(108,92,231,.25); position:relative; overflow:hidden;
}
.btn::after {
  content:''; position:absolute; inset:0;
  background:linear-gradient(135deg,rgba(255,255,255,.2),transparent);
  opacity:0; transition:.3s;
}
.btn:hover { transform:translateY(-2px); box-shadow:0 4px 20px rgba(108,92,231,.4); }
.btn:hover::after { opacity:1; }
.btn:active { transform:translateY(0); }
.btn:disabled { opacity:.4; cursor:not-allowed; transform:none; box-shadow:none; }
.btn-green { background:var(--green); box-shadow:0 2px 8px rgba(0,184,148,.25); }
.btn-green:hover { box-shadow:0 4px 20px rgba(0,184,148,.4); }
.btn-secondary { background:var(--surface); border:1.5px solid var(--border); color:var(--text); box-shadow:none; }
.btn-secondary:hover { background:var(--surface3); box-shadow:var(--shadow); }
.btn-sm { padding:8px 16px; font-size:13px; width:auto; margin-top:0; border-radius:10px; }

/* ===== RESULTS ===== */
.result { background:var(--surface2); border:1.5px solid var(--border); border-radius:var(--radius); padding:20px; margin-top:16px; display:none; }
.result.show { display:block; animation:fadeUp .4s ease; }
.result-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; }
.result-header h3 { font-size:15px; font-weight:600; display:flex; align-items:center; gap:6px; }
.result-stats { display:flex; gap:28px; flex-wrap:wrap; }
.stat { text-align:center; }
.stat .val { font-size:26px; font-weight:800; color:var(--green); }
.stat .label { font-size:11px; color:var(--text3); margin-top:2px; text-transform:uppercase; letter-spacing:.5px; }
.output-text {
  background:var(--bg); border:1px solid var(--border); border-radius:10px; padding:14px;
  font-family:'JetBrains Mono',monospace; font-size:13px; white-space:pre-wrap;
  word-break:break-all; max-height:300px; overflow-y:auto; line-height:1.6;
}
.copy-btn {
  background:var(--surface3); border:1.5px solid var(--border); border-radius:8px;
  padding:6px 14px; color:var(--text2); font-size:12px; cursor:pointer;
  font-family:inherit; transition:.2s;
}
.copy-btn:hover { background:var(--primary); color:#fff; border-color:var(--primary); }

/* ===== PROGRESS ===== */
.progress-wrap { width:100%; height:5px; background:var(--bg3); border-radius:3px; overflow:hidden; margin-top:12px; display:none; }
.progress-wrap.show { display:block; }
.progress-bar { height:100%; width:0%; background:linear-gradient(90deg,var(--primary),var(--green)); border-radius:3px; transition:width .3s; }

/* ===== SLIDER ===== */
.slider-row { display:flex; align-items:center; gap:14px; margin-top:14px; }
.slider-row label { font-size:13px; color:var(--text2); white-space:nowrap; font-weight:500; }
.slider-row input[type=range] { flex:1; accent-color:var(--primary); height:5px; }
.slider-row .slider-val { font-family:'JetBrains Mono',monospace; font-size:14px; min-width:45px; text-align:right; color:var(--primary); font-weight:600; }

/* ===== FEATURES ===== */
.features-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:12px; margin-top:28px; }
.feature-card {
  background:var(--surface); border:1.5px solid var(--border); border-radius:var(--radius);
  padding:18px; transition:.3s; animation:fadeUp .5s ease both;
}
.feature-card:hover { transform:translateY(-3px); box-shadow:var(--shadow2); }
.feature-card .f-icon { font-size:24px; margin-bottom:10px; }
.feature-card h4 { font-size:14px; font-weight:600; margin-bottom:4px; }
.feature-card p { font-size:12px; color:var(--text3); line-height:1.5; }

/* ===== SEO CONTENT ===== */
.seo-block { margin-top:24px; }
.seo-block h2 { font-size:20px; font-weight:700; margin-bottom:8px; margin-top:28px; }
.seo-block h2:first-child { margin-top:0; }
.seo-block h3 { font-size:15px; font-weight:600; margin-top:18px; margin-bottom:6px; color:var(--text); }
.seo-block p { color:var(--text2); font-size:14.5px; line-height:1.75; margin-bottom:12px; }

/* ===== LEGAL PAGES ===== */
.legal-page { max-width:800px; margin:0 auto; padding:40px 24px 60px; animation:fadeUp .5s ease; }
.legal-page h1 { font-size:30px; font-weight:800; margin-bottom:6px; }
.legal-page .updated { color:var(--text3); font-size:13px; margin-bottom:28px; }
.legal-page h2 { font-size:18px; font-weight:700; margin-top:32px; margin-bottom:10px; color:var(--text); }
.legal-page p,.legal-page li { color:var(--text2); font-size:14.5px; line-height:1.75; margin-bottom:12px; }
.legal-page ul { padding-left:24px; }
.legal-page a { color:var(--primary); }

/* ===== FOOTER ===== */
.footer {
  border-top:1px solid var(--border); background:var(--surface);
  padding:48px 24px 0; margin-top:20px;
}
.footer-inner {
  max-width:var(--maxW); margin:0 auto;
  display:grid; grid-template-columns:2fr repeat(5,1fr); gap:32px;
}
.footer-col h4 {
  font-size:12px; font-weight:700; color:var(--text); margin-bottom:16px;
  text-transform:uppercase; letter-spacing:1px;
}
.footer-col p { color:var(--text3); font-size:13px; line-height:1.65; }
.footer-col a {
  display:block; color:var(--text2); font-size:13px; padding:4px 0;
  transition:.2s;
}
.footer-col a:hover { color:var(--primary); text-decoration:none; transform:translateX(3px); }
.footer-bottom {
  max-width:var(--maxW); margin:24px auto 0; padding:20px 0;
  border-top:1px solid var(--border);
  display:flex; justify-content:space-between; align-items:center;
  font-size:12px; color:var(--text3);
}

/* ===== RESPONSIVE ===== */
@media(max-width:1024px) {
  .footer-inner { grid-template-columns:1fr 1fr 1fr; }
}
@media(max-width:900px) {
  .tool-layout { grid-template-columns:1fr; }
  .tool-sidebar { display:none; }
  .footer-inner { grid-template-columns:1fr 1fr; }
}
@media(max-width:640px) {
  .nav-links { display:none; }
  .nav-search { width:140px; }
  .hero { padding:36px 16px 20px; }
  .hero h1 { font-size:28px; }
  .section { padding:0 16px 28px; }
  .grid { grid-template-columns:repeat(auto-fill,minmax(155px,1fr)); gap:8px; }
  .tool-card { padding:14px; gap:10px; }
  .tc-icon { width:36px; height:36px; font-size:17px; }
  .tool-box { padding:20px; border-radius:var(--radius); }
  .features-grid { grid-template-columns:1fr; }
  .footer-inner { grid-template-columns:1fr; gap:20px; }
  .footer-bottom { flex-direction:column; gap:8px; text-align:center; }
}
