:root {
  --bg: #0b1020;
  --bg-soft: #121a33;
  --card: #161f3d;
  --border: #26325c;
  --text: #e8ecf8;
  --muted: #9aa5c4;
  --accent: #6c5ce7;
  --accent-2: #00cec9;
  --danger: #ff6b6b;
  --radius: 14px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); font-size: .95rem; }

.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 16, 32, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-size: 1.35rem; font-weight: 800; color: var(--text); text-decoration: none; letter-spacing: -.02em; }
.logo span { color: var(--accent); }
.header nav a { color: var(--muted); text-decoration: none; margin-left: 22px; font-size: .95rem; }
.header nav a:hover { color: var(--text); }

.hero { padding: 64px 0 36px; text-align: center; }
.hero h1 { font-size: clamp(1.8rem, 4.5vw, 3rem); line-height: 1.15; letter-spacing: -.02em; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { max-width: 640px; margin: 18px auto 0; color: var(--muted); font-size: 1.08rem; }

.tool { padding-bottom: 30px; }

.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--accent); background: #18224a; }
.dropzone svg { color: var(--accent); margin-bottom: 10px; }
.dropzone-hint { color: var(--muted); font-size: .88rem; margin-top: 6px; }

.controls { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-top: 18px; }
.control-row { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-end; margin-top: 14px; }
.control-group { border: none; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.control-group legend, .control-label { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: block; margin-bottom: 6px; }
.control-group label { cursor: pointer; display: flex; align-items: center; gap: 6px; }
.actions { margin-left: auto; gap: 10px; }

.btn {
  display: inline-block; border: none; border-radius: 10px;
  padding: 12px 22px; font-size: 1rem; font-weight: 600;
  cursor: pointer; text-decoration: none; text-align: center;
  transition: transform .1s, opacity .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: linear-gradient(90deg, var(--accent), #a55ce7); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-link { background: none; border: none; color: var(--accent-2); cursor: pointer; font-size: .9rem; text-decoration: underline; }

.progress-wrap { margin-top: 22px; }
.progress-track { height: 10px; background: var(--bg-soft); border-radius: 99px; overflow: hidden; border: 1px solid var(--border); }
.progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .25s ease; border-radius: 99px; }
#progressText { margin-bottom: 8px; color: var(--muted); }

.error { margin-top: 16px; color: var(--danger); background: rgba(255, 107, 107, .08); border: 1px solid rgba(255, 107, 107, .35); padding: 12px 16px; border-radius: 10px; }

.result { margin-top: 34px; }
.result h2 { margin-bottom: 14px; }
.compare {
  position: relative; overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--border); background:
    repeating-conic-gradient(#1a2340 0% 25%, #141b33 0% 50%) 0 / 20px 20px;
  touch-action: none;
}
.compare img { display: block; width: 100%; height: auto; user-select: none; }
.compare-overlay { position: absolute; top: 0; left: 0; bottom: 0; width: 50%; overflow: hidden; }
.compare-overlay img { max-width: none; }
.compare input[type="range"] {
  position: absolute; left: 0; right: 0; bottom: 10px; width: calc(100% - 20px); margin: 0 10px;
  accent-color: var(--accent); cursor: ew-resize;
}
.compare-tag {
  position: absolute; top: 10px; font-size: .75rem; font-weight: 700;
  background: rgba(0, 0, 0, .55); padding: 3px 10px; border-radius: 99px; letter-spacing: .04em;
}
.tag-left { left: 10px; } .tag-right { right: 10px; }

.result-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
#resultInfo { margin-top: 12px; }

.ad-slot { min-height: 90px; margin: 34px auto; }
.ad-slot ins.adsbygoogle { display: block !important; background: transparent; }

.section { padding: 40px 20px; }
.section h2 { font-size: 1.6rem; margin-bottom: 22px; letter-spacing: -.01em; }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.card { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.card h3 { margin-bottom: 8px; font-size: 1.05rem; }
.card p { color: var(--muted); font-size: .95rem; }

details { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 600; }
details p { color: var(--muted); margin-top: 8px; }

.footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 26px 0; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: .9rem; }
.footer a { color: var(--muted); }

.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: var(--card); border-top: 1px solid var(--border);
  padding: 14px 20px; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.cookie-banner p { color: var(--muted); font-size: .9rem; }

.article { max-width: 760px; margin: 0 auto; }
.article .back { display: inline-block; margin-bottom: 18px; color: var(--accent-2); text-decoration: none; font-size: .95rem; }
.article h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); line-height: 1.2; letter-spacing: -.01em; margin-bottom: 8px; }
.article .meta { color: var(--muted); font-size: .9rem; margin-bottom: 28px; }
.article h2 { font-size: 1.35rem; margin: 32px 0 12px; }
.article h3 { font-size: 1.1rem; margin: 24px 0 10px; }
.article p { color: #c4cce6; margin-bottom: 14px; }
.article ul, .article ol { color: #c4cce6; margin: 0 0 14px 22px; }
.article li { margin-bottom: 8px; }
.article strong { color: var(--text); }
.article table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: .95rem; }
.article th, .article td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; }
.article th { background: var(--bg-soft); color: var(--text); }
.article td { color: #c4cce6; }
.article .cta-box {
  background: linear-gradient(135deg, rgba(108, 92, 231, .15), rgba(0, 206, 201, .1));
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 28px 0;
}
.article .cta-box p { margin-bottom: 14px; }

@media (max-width: 640px) {
  .header nav a { margin-left: 14px; }
  .actions { margin-left: 0; }
  .hero { padding: 44px 0 28px; }
}
