/* ============================================================
   EncryptWatch — stylesheet
   UI inspired by the "Crypten" dark template:
   deep-purple theme, Barlow font, yellow accents,
   blue & pink gradient buttons, rounded cards.
   ============================================================ */

@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/barlow-400.ttf) format('truetype');
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/barlow-500.ttf) format('truetype');
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/barlow-600.ttf) format('truetype');
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/barlow-700.ttf) format('truetype');
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/assets/fonts/barlow-800.ttf) format('truetype');
}

:root {
  /* purple surfaces */
  --bg: #2a1360;
  --bg-2: #1d0e47;
  --bg-soft: #341a72;
  --card: #3a1f7d;
  --card-2: #46278f;
  --border: rgba(255,255,255,.10);
  --border-strong: rgba(255,255,255,.18);

  /* text */
  --text: #ffffff;
  --text-soft: #c7bce3;
  --muted: #9b8fc4;

  /* accents */
  --accent: #ffc50c;           /* yellow — headings, icons, highlights */
  --accent-soft: #ffd84d;
  --blue-1: #0065e8; --blue-2: #11a2f1;
  --pink-1: #c90075; --pink-2: #de00ac;
  --grad-blue: linear-gradient(to right, #0065e8 0%, #11a2f1 50%, #0065e8 100%);
  --grad-pink: linear-gradient(to right, #c90075 0%, #de00ac 50%, #c90075 100%);

  --ok: #37e0a6;
  --warn: #ffc50c;
  --danger: #ff5f87;

  --radius: 10px;
  --radius-lg: 16px;
  --maxw: 1140px;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Consolas, monospace;
  --sans: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text-soft);
  line-height: 1.7;
  background: var(--bg-2);
  background-image:
    radial-gradient(1200px 600px at 80% -10%, #4a2596 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 10%, #3a1d85 0%, transparent 55%),
    linear-gradient(180deg, #2a1360 0%, #1d0e47 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--text); font-weight: 700; line-height: 1.25; }

a { color: var(--accent); text-decoration: none; transition: .15s; }
a:hover { color: var(--accent-soft); text-decoration: none; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(29, 14, 71, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-logo { height: 42px; width: auto; display: block; }
@media (max-width: 420px) { .brand-logo { height: 34px; } }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { color: var(--text-soft); font-size: .98rem; font-weight: 600; letter-spacing: .3px; }
.nav-links a:hover { color: #fff; }
.nav-links a.cta {
  background: var(--grad-blue); color: #fff; padding: 9px 20px; border-radius: 6px;
  font-weight: 700; box-shadow: 0 6px 18px rgba(0,101,232,.35);
}
.nav-links a.cta:hover { filter: brightness(1.08); color:#fff; }

.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.6rem; cursor: pointer; }

@media (max-width: 760px) {
  .nav-links { display: none; position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; background: var(--bg-2); padding: 16px 20px; border-bottom: 1px solid var(--border); gap: 16px; align-items:flex-start; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
}

/* ---------- Hero ---------- */
.hero { padding: 72px 0 40px; text-align: center; position: relative; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.1rem); margin: 0 0 16px; font-weight: 800; }
.hero h1 .hl { color: var(--accent); }
.hero p { color: var(--text-soft); font-size: 1.15rem; max-width: 660px; margin: 0 auto 28px; }

.search-box { max-width: 560px; margin: 0 auto; position: relative; }
.search-box input {
  width: 100%; padding: 15px 20px; font-size: 1rem; font-family: var(--sans);
  background: rgba(255,255,255,.06); border: 1px solid var(--border-strong);
  border-radius: 40px; color: #fff;
}
.search-box input::placeholder { color: var(--muted); }
.search-box input:focus { outline: none; border-color: var(--accent); background: rgba(255,255,255,.09); }

/* ---------- Animated security hero ---------- */
.hero-visual { margin: 44px auto 0; display: grid; place-items: center; }
.hv-stage {
  position: relative; width: 420px; height: 420px; max-width: 92vw;
}
@media (max-width: 480px) { .hv-stage { transform: scale(.72); margin: -56px 0; } }

/* pulsing encryption waves */
.hv-rings, .hv-rings span {
  position: absolute; inset: 0; margin: auto; border-radius: 50%;
}
.hv-rings span {
  width: 150px; height: 150px; border: 1.5px solid rgba(255,197,12,.5);
  animation: hvPulse 3.2s ease-out infinite;
}
.hv-rings span:nth-child(2) { animation-delay: 1.05s; }
.hv-rings span:nth-child(3) { animation-delay: 2.1s; }
@keyframes hvPulse {
  0%   { transform: scale(.55); opacity: .9; }
  70%  { opacity: .18; }
  100% { transform: scale(2.6); opacity: 0; }
}

/* orbits */
.hv-orbit { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.hv-orbit.outer { animation: hvSpin 46s linear infinite; }
.hv-orbit.inner { animation: hvSpin 32s linear infinite reverse; }
.orbit-item { position: absolute; left: 0; top: 0;
  transform: rotate(var(--a)) translate(var(--r,180px)) rotate(calc(-1 * var(--a))); }
.hv-orbit.inner .orbit-item { --r: 118px; }
.spin-rev { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.hv-orbit.outer .spin-rev { animation: hvSpin 46s linear infinite reverse; }
.hv-orbit.inner .spin-rev { animation: hvSpin 32s linear infinite; }
@keyframes hvSpin { to { transform: rotate(360deg); } }

.chip {
  position: absolute; transform: translate(-50%, -50%); white-space: nowrap;
  font-family: var(--mono); font-size: .76rem; font-weight: 700; letter-spacing: .04em;
  padding: 7px 13px; border-radius: 20px; color: #fff;
  background: rgba(0,101,232,.22); border: 1px solid rgba(17,162,241,.5);
  box-shadow: 0 6px 18px rgba(0,0,0,.3); backdrop-filter: blur(3px);
}
.chip.alt { background: rgba(222,0,172,.2); border-color: rgba(222,0,172,.55); }

/* core shield */
.hv-core {
  position: absolute; inset: 0; margin: auto; width: 118px; height: 118px;
  display: grid; place-items: center; animation: hvFloat 5s ease-in-out infinite;
  filter: drop-shadow(0 0 22px rgba(255,197,12,.5));
}
@keyframes hvFloat { 0%,100% { transform: translateY(-7px); } 50% { transform: translateY(7px); } }

/* particles */
.hv-dot {
  position: absolute; left: var(--x); top: var(--y);
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 10px rgba(255,197,12,.8); opacity: .7;
  animation: hvDrift 4.5s ease-in-out infinite; animation-delay: var(--d);
}
@keyframes hvDrift { 0%,100% { transform: translateY(0); opacity: .35; } 50% { transform: translateY(-16px); opacity: .9; } }

@media (prefers-reduced-motion: reduce) {
  .hv-rings span, .hv-orbit, .hv-orbit .spin-rev, .hv-core, .hv-dot { animation: none !important; }
}

/* ---------- Section titles ---------- */
.section-title { font-size: 1.5rem; margin: 42px 0 4px; color: #fff; font-weight: 700; }
.section-title::before { content:""; display:inline-block; width:22px; height:3px; background:var(--accent); border-radius:3px; vertical-align:middle; margin-right:12px; }
.section-sub { color: var(--muted); margin: 0 0 20px; font-size: .98rem; }

/* ---------- Tool grid / cards ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.tool-card {
  display: block; background: rgba(255,255,255,.04);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 22px; transition: .18s; color: var(--text-soft);
  position: relative; overflow: hidden;
}
.tool-card::after { content:""; position:absolute; left:0; top:0; height:3px; width:100%; background:var(--grad-blue); opacity:0; transition:.18s; }
.tool-card:hover { border-color: var(--border-strong); transform: translateY(-4px); background: rgba(255,255,255,.07); box-shadow: 0 16px 40px rgba(0,0,0,.3); }
.tool-card:hover::after { opacity:1; }
.tool-card h3 { margin: 0 0 8px; font-size: 1.12rem; color: #fff; }
.tool-card p { margin: 0; color: var(--text-soft); font-size: .92rem; }
.tool-card .badge {
  display: inline-block; font-size: .66rem; font-weight: 700; letter-spacing: .06em;
  padding: 3px 10px; border-radius: 20px; margin-bottom: 12px; text-transform: uppercase;
  background: rgba(17,162,241,.18); color: #46b6ff;
}
.tool-card .badge.local { background: rgba(255,197,12,.16); color: var(--accent); }

.cat-pill { display:inline-block; font-size:.74rem; color: var(--text-soft); border:1px solid var(--border); border-radius: 20px; padding: 4px 12px; margin: 0 6px 6px 0; }

/* ---------- Tool page layout ---------- */
.tool-main { padding: 32px 0 60px; }
.breadcrumb { font-size: .88rem; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--text-soft); }
.breadcrumb a:hover { color: var(--accent); }
.tool-head h1 { margin: 0 0 10px; font-size: 2.1rem; font-weight: 800; }
.tool-head .lead { color: var(--text-soft); margin: 0 0 26px; font-size: 1.1rem; }

.panel {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 26px; margin-bottom: 24px;
  box-shadow: 0 12px 34px rgba(0,0,0,.22);
}
.panel h2 { margin-top: 0; font-size: 1.3rem; color: #fff; }

label { display: block; font-weight: 600; margin: 16px 0 7px; font-size: .94rem; color: #fff; }
.hint { color: var(--muted); font-weight: 400; font-size: .84rem; }

input[type=text], input[type=number], input[type=url], input[type=file], textarea, select {
  width: 100%; padding: 12px 14px; font-size: .96rem;
  background: rgba(0,0,0,.22); border: 1px solid var(--border-strong); border-radius: 8px; color: #fff;
  font-family: var(--sans);
}
input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { min-height: 150px; font-family: var(--mono); font-size: .9rem; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
select option { background: #2a1360; }

input[type=range] { accent-color: var(--accent); }

.row { display: flex; gap: 16px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 160px; }

.checkbox-row { display: flex; align-items: center; gap: 9px; margin: 9px 0; }
.checkbox-row input { width: auto; accent-color: var(--accent); transform: scale(1.1); }
.checkbox-row label { margin: 0; font-weight: 500; color: var(--text-soft); }

/* ---------- Buttons (gradient) ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--grad-blue); background-size: 200% auto; color: #fff; border: 0; font-weight: 700;
  padding: 12px 24px; border-radius: 6px; font-size: .96rem; font-family: var(--sans);
  letter-spacing: .3px; transition: .25s; box-shadow: 0 8px 22px rgba(0,101,232,.3);
}
.btn:hover { background-position: right center; color: #fff; transform: translateY(-1px); }
.btn.secondary { background: var(--grad-pink); background-size: 200% auto; box-shadow: 0 8px 22px rgba(222,0,172,.28); }
.btn.ghost { background: transparent; border: 1px solid var(--border-strong); box-shadow: none; }
.btn.ghost:hover { border-color: var(--accent); background: rgba(255,255,255,.05); }
.btn.small { padding: 8px 15px; font-size: .86rem; }
.btn-group { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

.output {
  background: rgba(0,0,0,.28); border: 1px solid var(--border); border-radius: 8px;
  padding: 15px; font-family: var(--mono); font-size: .9rem; white-space: pre-wrap;
  word-break: break-word; min-height: 20px; margin-top: 8px; color: var(--accent-soft);
}
.output.empty { color: var(--muted); }

.result-strong { font-size: 1.4rem; font-weight: 700; font-family: var(--mono); color: var(--accent); }

/* meters */
.meter { height: 11px; border-radius: 6px; background: rgba(0,0,0,.3); overflow: hidden; margin: 12px 0; border:1px solid var(--border); }
.meter > span { display: block; height: 100%; width: 0; transition: width .3s, background .3s; }

.tag { display:inline-block; padding:4px 12px; border-radius:6px; font-size:.82rem; font-weight:700; }
.tag.ok { background: rgba(55,224,166,.16); color: var(--ok); }
.tag.warn { background: rgba(255,197,12,.16); color: var(--warn); }
.tag.bad { background: rgba(255,95,135,.16); color: var(--danger); }

.copied { color: var(--ok); font-size: .86rem; margin-left: 10px; opacity: 0; transition: .2s; }
.copied.show { opacity: 1; }

/* ---------- Content / explainer ---------- */
.content h2 { font-size: 1.45rem; margin: 38px 0 12px; color: var(--accent); font-weight: 700; }
.content h3 { font-size: 1.12rem; margin: 24px 0 8px; color: #fff; }
.content p, .content li { color: var(--text-soft); }
.content ul, .content ol { padding-left: 22px; }
.content code { background: rgba(0,0,0,.3); padding: 2px 7px; border-radius: 5px; font-family: var(--mono); font-size: .85em; color: var(--accent-soft); }
.content .note { background: rgba(255,255,255,.04); border-left: 3px solid var(--accent); padding: 14px 18px; border-radius: 0 10px 10px 0; margin: 18px 0; color: var(--text-soft); }
.content .warn-note { border-left-color: var(--warn); }

.faq details { background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 10px; padding: 2px 18px; margin-bottom: 12px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; color: #fff; }

.related-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px,1fr)); gap: 12px; }
.related-list a { display:block; background: rgba(255,255,255,.04); border:1px solid var(--border); border-radius:10px; padding:14px 16px; color: #fff; font-weight:600; }
.related-list a:hover { border-color: var(--accent); background: rgba(255,255,255,.07); color: var(--accent); }

/* ---------- Ad slots ---------- */
.ad-slot {
  margin: 30px 0; min-height: 100px; display: grid; place-items: center;
  background: rgba(255,255,255,.03); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg);
  color: var(--muted); font-size: .82rem; text-align: center; letter-spacing:.1em; text-transform:uppercase;
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: rgba(0,0,0,.2); padding: 44px 0 30px; margin-top: 50px; }
.site-footer .cols { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 28px; }
.site-footer h4 { margin: 0 0 14px; font-size: 1rem; color: #fff; }
.site-footer a { color: var(--text-soft); display: block; margin-bottom: 8px; font-size: .92rem; }
.site-footer a:hover { color: var(--accent); }
.site-footer .copy { color: var(--muted); font-size: .84rem; margin-top: 28px; text-align: center; border-top:1px solid var(--border); padding-top:20px; }

.disclaimer { color: var(--muted); font-size: .84rem; margin-top: 10px; }
