:root {
  --black: #0a0a0a;
  --panel: #141414;
  --panel-2: #1c1c1c;
  --line: #2a2a2a;
  --yellow: #fcc702;
  --yellow-2: #e8b500;
  --text: #f5f5f5;
  --muted: #a3a3a3;
  --danger: #ff6b6b;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Nirmala UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--black); color: var(--text); }
body { line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--yellow); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(10, 10, 10, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; gap: 20px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.35rem; letter-spacing: -.02em; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--yellow); color: var(--black); display: grid; place-items: center; font-size: 1.1rem; font-weight: 900; }
.logo b { color: var(--yellow); }
.main-nav { display: flex; gap: 4px; margin-left: 12px; }
.main-nav a { color: var(--text); padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: .95rem; }
.main-nav a:hover { background: var(--panel-2); text-decoration: none; color: var(--yellow); }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang { display: flex; align-items: center; gap: 6px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 12px; }
.lang select { background: transparent; color: var(--text); border: 0; font: inherit; font-weight: 600; padding: 4px; cursor: pointer; }
.lang select option { background: var(--panel); }
#menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 6px 10px; font-size: 1.1rem; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 10px 18px; font: inherit; font-weight: 700; cursor: pointer; transition: transform .08s, background .15s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-yellow { background: var(--yellow); color: var(--black); }
.btn-yellow:hover:not(:disabled) { background: var(--yellow-2); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--yellow); color: var(--yellow); }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.icon-btn { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; width: 32px; height: 32px; cursor: pointer; font-size: .95rem; flex: none; }
.icon-btn:hover:not(:disabled) { border-color: var(--yellow); color: var(--yellow); }
.icon-btn:disabled { opacity: .35; cursor: default; }

/* ---------- hero ---------- */
.hero { padding: 64px 0 28px; text-align: center; background: radial-gradient(1000px 400px at 50% -10%, rgba(252, 199, 2, .14), transparent 70%); }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.1; margin: 0 0 14px; letter-spacing: -.03em; }
.hero h1 .hl { color: var(--yellow); }
.hero p.sub { color: var(--muted); font-size: 1.1rem; max-width: 680px; margin: 0 auto 26px; }
.search { max-width: 620px; margin: 0 auto; position: relative; }
.search input { width: 100%; padding: 16px 20px 16px 48px; border-radius: 999px; border: 2px solid var(--line); background: var(--panel); color: var(--text); font: inherit; font-size: 1.05rem; }
.search input:focus { border-color: var(--yellow); outline: none; }
.search::before { content: "⌕"; position: absolute; left: 18px; top: 50%; transform: translateY(-52%); font-size: 1.4rem; color: var(--muted); }
.trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; margin: 22px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: .92rem; }
.trust li::before { content: "✓ "; color: var(--yellow); font-weight: 900; }

/* ---------- tabs & grid ---------- */
.tabs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 30px 0 22px; }
.tabs button { background: var(--panel); color: var(--text); border: 1px solid var(--line); padding: 8px 18px; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; }
.tabs button.active, .tabs button:hover { background: var(--yellow); color: var(--black); border-color: var(--yellow); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.card { position: relative; display: flex; flex-direction: column; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; color: var(--text); transition: border-color .15s, transform .15s; min-height: 150px; }
.card:hover { border-color: var(--yellow); transform: translateY(-2px); text-decoration: none; }
.card h3 { margin: 4px 0 0; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: .9rem; }
.badge { align-self: flex-start; background: var(--yellow); color: var(--black); font-weight: 900; font-size: .72rem; letter-spacing: .04em; padding: 6px 9px; border-radius: 8px; min-width: 44px; text-align: center; }
.cat-pdf .badge { background: #fcc702; }
.cat-image .badge { background: #fff; }
.cat-video .badge { background: #ffc300; }
.cat-audio .badge { background: #e9e9e9; }
.card.soon { opacity: .6; }
.soon-tag { position: absolute; top: 14px; right: 14px; font-size: .7rem; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; color: var(--muted); }
.section-title { font-size: 1.5rem; margin: 54px 0 16px; letter-spacing: -.02em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; color: var(--text); font-size: .9rem; }
.chips a:hover, .chips a.hit { border-color: var(--yellow); color: var(--yellow); text-decoration: none; }
.chips a.hit { background: rgba(252, 199, 2, .12); }

/* ---------- tool page ---------- */
.tool-hero { padding: 40px 0 14px; text-align: center; }
.tool-hero h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); margin: 10px 0 8px; letter-spacing: -.02em; }
.tool-hero p { color: var(--muted); margin: 0 auto; max-width: 640px; font-size: 1.05rem; }
.crumbs { font-size: .85rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
#tool-app { margin: 24px auto 0; }
.dropzone { border: 2.5px dashed var(--yellow); border-radius: 22px; background: rgba(252, 199, 2, .04); padding: 56px 20px; text-align: center; cursor: pointer; transition: background .15s, transform .15s; max-width: 820px; margin: 0 auto; }
.dropzone:hover, .dropzone.over { background: rgba(252, 199, 2, .1); }
.dropzone.over { transform: scale(1.01); }
.dz-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--yellow); color: var(--black); display: grid; place-items: center; margin: 0 auto 18px; font-size: 1.8rem; font-weight: 900; }
.dropzone p { margin: 10px 0 0; }
.privacy-note { text-align: center; color: var(--muted); font-size: .9rem; margin-top: 14px; }
.work { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.work-main, .work-side, .results { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.work-side { position: sticky; top: 80px; }
.work-side h3 { margin: 0 0 12px; }
.results { max-width: 820px; margin: 0 auto; }
.results h2 { margin: 0 0 12px; color: var(--yellow); }
.file-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.file-list li { display: flex; align-items: center; gap: 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.fmeta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fmeta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fmeta span { color: var(--muted); font-size: .85rem; }
.thumb { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; background: #fff; }
.row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: .92rem; }
.field input[type=text], .field input[type=number], .field input[type=password], .field select { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; width: 100%; }
.field input:focus, .field select:focus { border-color: var(--yellow); outline: none; }
.field.check { flex-direction: row; align-items: center; }
.field.check input { width: 18px; height: 18px; accent-color: var(--yellow); }
.range-head { display: flex; justify-content: space-between; }
.range-head output { color: var(--yellow); font-weight: 700; }
input[type=range] { accent-color: var(--yellow); width: 100%; }
.progress { height: 8px; background: var(--panel-2); border-radius: 999px; overflow: hidden; margin-top: 14px; }
.progress > div { height: 100%; width: 0; background: var(--yellow); transition: width .2s; }
.status { min-height: 1.2em; margin: 8px 0 0; }
.alert { background: rgba(255, 107, 107, .12); border: 1px solid rgba(255, 107, 107, .5); color: #ffd1d1; border-radius: 10px; padding: 10px 14px; margin: 0 auto 14px; max-width: 820px; }
.custom-ui { margin-top: 14px; }
.crop-wrap { text-align: center; }
.crop-canvas { max-width: 100%; touch-action: none; cursor: crosshair; border-radius: 6px; }
.page-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.page-card { position: relative; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; text-align: center; cursor: grab; }
.page-card img { height: 150px; object-fit: contain; background: #fff; border-radius: 4px; transition: transform .2s; }
.page-card .pg { position: absolute; top: 6px; left: 8px; background: var(--yellow); color: var(--black); font-weight: 800; font-size: .75rem; border-radius: 6px; padding: 1px 6px; }
.page-actions { display: flex; justify-content: center; gap: 4px; margin-top: 8px; }
.page-actions .icon-btn { width: 28px; height: 28px; font-size: .85rem; }

/* ---------- content ---------- */
.content { max-width: 820px; margin: 60px auto 0; }
.content h2 { font-size: 1.4rem; margin: 40px 0 12px; }
.content ol { padding-left: 1.2em; }
.content li { margin: 6px 0; }
details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin: 10px 0; }
details summary { cursor: pointer; font-weight: 700; }
details p { color: var(--muted); margin: 10px 0 0; }
.soon-box { max-width: 680px; margin: 10px auto; text-align: center; background: var(--panel); border: 1px dashed var(--yellow); border-radius: var(--radius); padding: 30px; }
.prose { max-width: 760px; margin: 40px auto; }
.prose h1 { letter-spacing: -.02em; }

/* ---------- footer ---------- */
.site-footer { margin-top: 90px; border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted); font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 24px; }
.site-footer h4 { color: var(--text); margin: 0 0 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--yellow); }
.copy { margin-top: 30px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

@media (max-width: 900px) {
  .work { grid-template-columns: 1fr; }
  .work-side { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .main-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--black); flex-direction: column; padding: 10px 16px; border-bottom: 1px solid var(--line); margin: 0; }
  .nav-open .main-nav { display: flex; }
  #menu-btn { display: block; }
  .hero { padding-top: 40px; }
  .dropzone { padding: 40px 16px; }
  .lang { padding-left: 8px; }
}
.warn { background: rgba(252,199,2,.1); border: 1px solid rgba(252,199,2,.45); color: #ffe98a; border-radius: 10px; padding: 10px 14px; }
.hero-tag { font-size: clamp(1.1rem, 2.4vw, 1.5rem); font-weight: 700; color: var(--text); margin: 0 0 10px; }
@media (max-width: 480px) {
  .logo { font-size: 1.1rem; gap: 8px; }
  .logo-mark { width: 30px; height: 30px; }
  .lang span[aria-hidden] { display: none; }
  .lang { padding: 2px 4px 2px 8px; }
  .site-header .container { gap: 10px; }
}

.logo img { height: 40px; width: auto; display: block; }
.site-footer .logo img { height: 44px; margin-bottom: 6px; }
@media (max-width: 480px) { .logo img { height: 32px; } }
