/* ============================================================================
   Check Plagiat by Komelate AI — premium light / trust-blue theme
   ========================================================================== */

:root {
  --bg: #f4f7fe;
  --surface: #ffffff;
  --ink: #0f1e3d;
  --ink-soft: #46546f;
  --ink-faint: #7c8aa5;
  --line: #e4eaf6;
  --line-soft: #eef2fb;

  --blue: #2563eb;
  --indigo: #4f46e5;
  --violet: #6366f1;
  --sky: #38bdf8;

  --grad: linear-gradient(120deg, #2563eb 0%, #4f46e5 55%, #7c3aed 100%);
  --grad-soft: linear-gradient(120deg, #eff4ff 0%, #f2eefe 100%);

  --good: #10b981;
  --warn: #f59e0b;
  --bad: #ef4444;

  --shadow-sm: 0 2px 8px rgba(24, 44, 92, .06);
  --shadow-md: 0 12px 34px rgba(24, 44, 92, .10);
  --shadow-lg: 0 30px 70px rgba(24, 44, 92, .16);
  --shadow-blue: 0 18px 40px rgba(79, 70, 229, .28);

  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 12px;

  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Sora', var(--font);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }

/* ── Ambient background ──────────────────────────────────────────────────── */
.aurora {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background:
    radial-gradient(1200px 600px at 80% -10%, #e6edff 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 20%, #eee9ff 0%, transparent 55%),
    var(--bg);
}
.blob {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5;
  animation: float 18s ease-in-out infinite;
}
.blob-1 { width: 420px; height: 420px; top: -80px; right: 8%;
  background: radial-gradient(circle, #93b4ff, transparent 70%); }
.blob-2 { width: 360px; height: 360px; top: 30%; left: -80px;
  background: radial-gradient(circle, #c4b5fd, transparent 70%); animation-delay: -6s; }
.blob-3 { width: 300px; height: 300px; bottom: -60px; right: 30%;
  background: radial-gradient(circle, #a5f3fc, transparent 70%); animation-delay: -12s; }
.grid {
  position: absolute; inset: 0; opacity: .5;
  background-image:
    linear-gradient(rgba(37,99,235,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37,99,235,.04) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, 26px) scale(1.08); }
}

/* ── Nav ─────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(18px, 5vw, 64px);
  backdrop-filter: saturate(1.4) blur(12px);
  background: rgba(244, 247, 254, .72);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s, box-shadow .3s;
}
.nav.scrolled { border-color: var(--line); box-shadow: var(--shadow-sm); }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 11px; background: var(--grad); box-shadow: var(--shadow-blue);
}
.brand-text { display: flex; flex-direction: column; font-family: var(--display);
  font-size: 1.05rem; letter-spacing: -.01em; line-height: 1.05; }
.brand-by { font-family: var(--font); font-size: .64rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: .92rem; font-weight: 500; }
.nav-links a { color: var(--ink-soft); transition: color .2s; }
.nav-links a:hover { color: var(--blue); }
.nav-cta {
  padding: 9px 18px; border-radius: 999px; color: #fff !important;
  background: var(--grad); box-shadow: var(--shadow-blue); font-weight: 600;
  transition: transform .2s, box-shadow .2s;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 22px 46px rgba(79,70,229,.36); }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero { padding: clamp(48px, 8vw, 96px) clamp(18px, 5vw, 40px) 40px; }
.hero-inner { max-width: 780px; margin: 0 auto; text-align: center; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: 999px; font-size: .82rem; font-weight: 600;
  color: var(--indigo); background: #fff; border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); margin-bottom: 26px;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good);
  box-shadow: 0 0 0 4px rgba(16,185,129,.18); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(16,185,129,0); } }

h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.3rem, 6vw, 4rem); line-height: 1.04;
  letter-spacing: -.03em; margin-bottom: 20px;
}
.grad { background: var(--grad); -webkit-background-clip: text;
  background-clip: text; -webkit-text-fill-color: transparent; }
.lede { font-size: clamp(1.02rem, 2.4vw, 1.22rem); color: var(--ink-soft);
  max-width: 620px; margin: 0 auto 40px; }

/* ── Stage / card ────────────────────────────────────────────────────────── */
.stage {
  position: relative; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); padding: 26px; text-align: left;
  transition: box-shadow .4s;
}
.stage::before {
  content: ""; position: absolute; inset: 0; border-radius: var(--r-lg);
  padding: 1px; background: linear-gradient(120deg, rgba(37,99,235,.35), rgba(124,58,237,.2), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}

/* Dropzone */
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 52px 24px; text-align: center; cursor: pointer;
  border: 2px dashed #c8d5f2; border-radius: var(--r-md);
  background: var(--grad-soft);
  transition: border-color .25s, transform .25s, background .25s, box-shadow .25s;
}
.dropzone:hover { border-color: var(--blue); transform: translateY(-2px);
  box-shadow: inset 0 0 0 100px rgba(37,99,235,.02); }
.dropzone.dragover { border-color: var(--indigo); background: #eef2ff;
  transform: scale(1.01); box-shadow: 0 0 0 6px rgba(79,70,229,.12); }
.dz-icon { display: grid; place-items: center; width: 62px; height: 62px;
  border-radius: 50%; color: #fff; background: var(--grad);
  box-shadow: var(--shadow-blue); animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.dz-title { font-family: var(--display); font-weight: 700; font-size: 1.2rem; margin-top: 8px; }
.dz-sub { color: var(--ink-faint); font-size: .92rem; }
.dz-link { color: var(--blue); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.trust-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px;
  margin-top: 18px; font-size: .82rem; color: var(--ink-faint); }

/* File preview */
.file-head { display: flex; align-items: center; gap: 14px; }
.file-badge { display: grid; place-items: center; width: 46px; height: 46px; flex: none;
  border-radius: 12px; color: var(--indigo); background: #eef2ff; }
.file-meta { flex: 1; min-width: 0; }
.file-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-info { font-size: .85rem; color: var(--ink-faint); }
.icon-btn { flex: none; display: grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink-faint);
  cursor: pointer; transition: all .2s; }
.icon-btn:hover { color: var(--bad); border-color: #fecaca; background: #fef2f2; }
.excerpt-label { margin: 20px 0 8px; font-size: .74rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.excerpt {
  font-size: .92rem; color: var(--ink-soft); line-height: 1.7;
  background: var(--line-soft); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 16px 18px; max-height: 168px; overflow: hidden;
  position: relative;
}
.excerpt::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 52px;
  background: linear-gradient(transparent, var(--line-soft)); }

/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; margin-top: 22px; padding: 16px 24px; border: none; cursor: pointer;
  font-family: var(--font); font-size: 1.02rem; font-weight: 700; color: #fff;
  background: var(--grad); border-radius: 14px; box-shadow: var(--shadow-blue);
  transition: transform .2s, box-shadow .2s, filter .2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 24px 50px rgba(79,70,229,.4); filter: brightness(1.04); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .6; cursor: progress; transform: none; }
.cta-band .btn-primary { width: auto; margin-top: 26px; padding: 15px 34px; }

/* ── Loading — sonar pulse scanner ───────────────────────────────────────── */
.panel-loading { text-align: center; padding: 32px 10px 14px; }
.pulse-scanner { position: relative; width: 150px; height: 150px; margin: 4px auto 34px; }
.pulse-core {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad); box-shadow: var(--shadow-blue); z-index: 2;
  animation: corepulse 2s ease-in-out infinite;
}
@keyframes corepulse {
  50% { transform: translate(-50%, -50%) scale(1.08); box-shadow: 0 22px 50px rgba(79,70,229,.42); }
}
.pulse-ring {
  position: absolute; top: 50%; left: 50%; width: 68px; height: 68px; border-radius: 50%;
  border: 2px solid var(--blue); transform: translate(-50%, -50%);
  opacity: 0; animation: sonar 2.4s ease-out infinite;
}
.pulse-ring:nth-child(2) { animation-delay: .8s; }
.pulse-ring:nth-child(3) { animation-delay: 1.6s; }
@keyframes sonar {
  0%   { transform: translate(-50%, -50%) scale(1);   opacity: .55; }
  100% { transform: translate(-50%, -50%) scale(3.2); opacity: 0; }
}
.loading-pct { font-family: var(--display); font-weight: 800; font-size: 2.1rem;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; }
.progress-track { width: min(340px, 82%); height: 8px; margin: 14px auto 0;
  background: var(--line); border-radius: 999px; overflow: hidden; }
.progress-fill { display: block; height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--violet), var(--blue));
  background-size: 200% 100%; animation: flow 1.8s linear infinite;
  transition: width .5s ease; }
@keyframes flow { to { background-position: -200% 0; } }
.loading-msg { font-family: var(--display); font-weight: 700; font-size: 1.15rem; margin-top: 20px; }
.loading-sub { color: var(--ink-faint); font-size: .9rem; margin-top: 4px; }

/* ── Report ──────────────────────────────────────────────────────────────── */
.report-section { padding: 20px clamp(18px, 5vw, 40px) 40px; }
.report { max-width: 900px; margin: 0 auto; }
.report-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 22px;
}
.report-head .rh-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.rh-badge { display: grid; place-items: center; width: 44px; height: 44px; flex: none;
  border-radius: 12px; background: var(--grad); color: #fff; box-shadow: var(--shadow-blue); font-size: 1.2rem; }
.rh-title { font-family: var(--display); font-weight: 800; font-size: 1.15rem; }
.rh-sub { font-size: .82rem; color: var(--ink-faint); }
.report-actions { display: flex; gap: 10px; }
.btn-ghost { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px;
  border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-weight: 600; font-size: .9rem; cursor: pointer; transition: all .2s; }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); box-shadow: var(--shadow-sm); }
.btn-ghost.solid { background: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--shadow-blue); }
.btn-ghost.solid:hover { color: #fff; transform: translateY(-2px); }

/* Hero score card */
.score-card {
  display: grid; grid-template-columns: auto 1fr; gap: 30px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-md); padding: 30px; margin-bottom: 20px; position: relative; overflow: hidden;
}
.score-card::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--band-color, var(--grad)); }
.gauge { position: relative; width: 168px; height: 168px; }
.gauge svg { transform: rotate(-90deg); }
.gauge .g-bg { fill: none; stroke: var(--line); stroke-width: 13; }
.gauge .g-fg { fill: none; stroke: var(--band-color, var(--indigo)); stroke-width: 13; stroke-linecap: round;
  stroke-dasharray: 439.8; stroke-dashoffset: 439.8; transition: stroke-dashoffset 1.3s cubic-bezier(.2,.8,.2,1); }
.gauge-center { position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; }
.gauge-num { font-family: var(--display); font-weight: 800; font-size: 2.6rem; line-height: 1; color: var(--band-color); }
.gauge-lbl { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }
.score-detail h2 { font-family: var(--display); font-size: 1.7rem; letter-spacing: -.02em; margin-bottom: 6px; }
.score-detail .verdict-tag { display: inline-flex; align-items: center; gap: 7px; padding: 5px 13px;
  border-radius: 999px; font-size: .82rem; font-weight: 700; margin-bottom: 10px;
  color: var(--band-color); background: var(--band-tint); }
.score-detail p { color: var(--ink-soft); font-size: .96rem; }

/* Metrics */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 18px; box-shadow: var(--shadow-sm); }
.metric .m-val { font-family: var(--display); font-weight: 800; font-size: 1.7rem; letter-spacing: -.02em; }
.metric .m-lbl { font-size: .8rem; color: var(--ink-faint); margin-top: 2px; }

/* Notices */
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 13px 16px; border-radius: 12px;
  font-size: .9rem; margin-bottom: 14px; }
.notice.warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.notice.info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

/* Blocks */
.report-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); padding: 24px; margin-bottom: 20px; }
.block-title { font-family: var(--display); font-weight: 700; font-size: 1.15rem; margin-bottom: 4px; }
.block-sub { color: var(--ink-faint); font-size: .88rem; margin-bottom: 18px; }

/* Sources table */
.src-list { display: flex; flex-direction: column; gap: 10px; }
.src-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; transition: all .2s; }
.src-row:hover { border-color: #c7d6f7; box-shadow: var(--shadow-sm); }
.src-main { min-width: 0; }
.src-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.src-name a { color: var(--blue); }
.src-meta { font-size: .8rem; color: var(--ink-faint); }
.src-bar-wrap { display: flex; align-items: center; gap: 10px; }
.src-bar { width: 120px; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.src-bar span { display: block; height: 100%; border-radius: 999px; background: var(--grad); width: 0; transition: width 1s ease; }
.src-cov { font-weight: 700; font-size: .85rem; min-width: 44px; text-align: right; }

/* Passages */
.passage { border: 1px solid var(--line); border-left: 4px solid var(--p-color, var(--blue));
  border-radius: 14px; padding: 16px 18px; margin-bottom: 12px; background: #fff; }
.passage-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.tag { font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  color: var(--p-color); background: var(--p-tint); }
.tag.score { color: var(--ink-soft); background: var(--line-soft); }
.tag.cited { color: var(--ink-faint); background: var(--line-soft); }
.p-text { color: var(--ink); font-size: .95rem; line-height: 1.7; }
.p-src { margin-top: 10px; padding: 11px 14px; border-radius: 10px; background: var(--line-soft);
  font-size: .88rem; color: var(--ink-soft); font-style: italic; }
.p-origin { margin-top: 10px; font-size: .84rem; color: var(--ink-faint); }
.p-origin a { color: var(--blue); font-weight: 600; }

.empty-good { text-align: center; padding: 30px 20px; }
.empty-good .eg-ico { font-size: 2.6rem; }
.empty-good h3 { font-family: var(--display); font-size: 1.3rem; margin: 6px 0; }
.empty-good p { color: var(--ink-soft); }

/* ── Bands / sections ────────────────────────────────────────────────────── */
.band { padding: clamp(60px, 9vw, 110px) clamp(18px, 5vw, 40px); }
.band-alt { background: linear-gradient(180deg, #fff, #f7f9ff); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-inner { max-width: 1080px; margin: 0 auto; text-align: center; }
.band h2 { font-family: var(--display); font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -.02em; margin-bottom: 10px; }
.section-lede { color: var(--ink-soft); font-size: 1.05rem; margin-bottom: 46px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; text-align: left; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 30px; box-shadow: var(--shadow-sm); position: relative; transition: transform .3s, box-shadow .3s; }
.step:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.step-num { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  font-family: var(--display); font-weight: 800; color: #fff; background: var(--grad);
  box-shadow: var(--shadow-blue); margin-bottom: 16px; }
.step h3 { font-family: var(--display); font-size: 1.2rem; margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: .95rem; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: left; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px; box-shadow: var(--shadow-sm); transition: transform .3s, box-shadow .3s, border-color .3s; }
.feature:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: #cdd9f6; }
.f-ico { font-size: 1.8rem; margin-bottom: 12px; }
.feature h3 { font-family: var(--display); font-size: 1.12rem; margin-bottom: 6px; }
.feature p { color: var(--ink-soft); font-size: .92rem; }

.cta-band { text-align: center; padding: clamp(50px, 8vw, 90px) 20px;
  background: var(--grad); color: #fff; margin: 0; }
.cta-band h2 { font-family: var(--display); font-weight: 800; font-size: clamp(1.7rem, 4vw, 2.4rem); }
.cta-band .btn-primary { background: #fff; color: var(--indigo); box-shadow: 0 18px 40px rgba(0,0,0,.18); }
.cta-band .btn-primary:hover { color: var(--indigo); }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer { text-align: center; padding: 44px 20px; border-top: 1px solid var(--line); background: #fff; }
.footer-brand { font-family: var(--display); font-weight: 800; font-size: 1.2rem; }
.footer-by { color: var(--ink-soft); margin-top: 4px; }
.footer-legal { color: var(--ink-faint); font-size: .82rem; margin-top: 10px; }

/* ── Reveal on scroll ────────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.steps .reveal.in:nth-child(2) { transition-delay: .08s; }
.steps .reveal.in:nth-child(3) { transition-delay: .16s; }
.features .feature:nth-child(2) { transition-delay: .05s; }
.features .feature:nth-child(3) { transition-delay: .1s; }
.features .feature:nth-child(5) { transition-delay: .05s; }
.features .feature:nth-child(6) { transition-delay: .1s; }

/* ── Fade helpers ────────────────────────────────────────────────────────── */
.panel { animation: fadeUp .45s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .steps, .features { grid-template-columns: 1fr; }
  .nav-links a:not(.nav-cta) { display: none; }
}
@media (max-width: 620px) {
  .score-card { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 26px; }
  .report-head { flex-direction: column; align-items: flex-start; }
  .report-actions { width: 100%; }
  .btn-ghost { flex: 1; justify-content: center; }
  .scanner { gap: 20px; }
}

/* ── Print (PDF export) ──────────────────────────────────────────────────── */
@media print {
  .aurora, .nav, .band, .cta-band, .footer, .hero, .report-actions { display: none !important; }
  body { background: #fff; }
  .report-section { padding: 0; }
  .report-block, .score-card, .metric { box-shadow: none; break-inside: avoid; }
  .passage { break-inside: avoid; }
  @page { margin: 16mm; }
}
