/* =====================================================================
   style.css — ONE shared design for every page of the site.
   Style: dark space theme, warm gradient (orange → pink → purple),
   glass panels, code-style "// labels", 3D tilt cards.
   Each page can change its small accent with <body data-accent="...">.
   ===================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  --bg: #090b12;
  --panel: rgba(20, 24, 38, .72);          /* see-through glass */
  --panel-solid: #141826;
  --panel-2: #0d1019;
  --line: #2a3248;
  --line-2: #465373;
  --text: #f2f4fa;
  --muted: #b3bccf;                        /* ≈ 9:1 on --bg → easy to read */
  --c1: #ff8a3d;                           /* orange */
  --c2: #f0457a;                           /* pink   */
  --c3: #9b4dff;                           /* purple */
  --grad: linear-gradient(105deg, var(--c1), var(--c2) 50%, var(--c3));
  --accent: #ffad73;                       /* small highlights (per page) */
  --good: #4ade80;
  --warn: #fbbf24;
  --bad: #f87171;
  --r: 18px;
  --mono: ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: dark;
}
body[data-accent="pink"]   { --accent: #ff8fb6; }
body[data-accent="green"]  { --accent: #6ee7b7; }
body[data-accent="amber"]  { --accent: #fcd34d; }
body[data-accent="violet"] { --accent: #c8a8ff; }

/* ---------- 2. Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh;
  font-family: var(--sans); font-size: 16px; line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(155, 77, 255, .20), transparent 60%),
    radial-gradient(900px 420px at -10% 30%, rgba(255, 138, 61, .12), transparent 55%),
    var(--bg);
}
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--c1); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 780px; margin: 0 auto; padding: 0 18px 30px; }
.muted, small { color: var(--muted); }
.center { text-align: center; }
#bg3d { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* ---------- 3. Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .75rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(9, 11, 18, .7); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar .home { color: var(--text); text-decoration: none; font-weight: 700; }
.topbar .home:hover { color: var(--c1); }
.topbar .tag {
  font-family: var(--mono); font-size: .78rem; color: var(--muted);
  border: 1px solid var(--line-2); padding: .2rem .7rem; border-radius: 999px;
}

/* ---------- 4. Hero ---------- */
.hero { text-align: center; padding: 64px 0 30px; }
.eyebrow { font-family: var(--mono); font-size: .82rem; color: var(--c1); margin: 0 0 .7rem; }
.eyebrow::before { content: "// "; color: var(--muted); }
.hero .icon { font-size: 2.6rem; display: inline-block; animation: float 5s ease-in-out infinite;
              filter: drop-shadow(0 14px 12px rgba(0, 0, 0, .5)); }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-10px) rotate(4deg); } }
.hero h1 { font-size: clamp(2.3rem, 6.5vw, 3.6rem); line-height: 1.05; letter-spacing: -.03em; margin: .4rem 0 .8rem; font-weight: 800; }
.hero h1 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); max-width: 580px; margin: 0 auto; font-size: 1.06rem; }

/* ---------- 5. Glass cards ---------- */
.card {
  background: var(--panel); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 22px; margin: 18px 0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 20px 45px rgba(0, 0, 0, .45);
}
.card h2 { margin: 0 0 12px; font-size: 1.15rem; letter-spacing: -.01em; }
.card h3 { margin: 4px 0 10px; }

/* ---------- 6. Form controls ---------- */
textarea {
  width: 100%; padding: 14px; font: inherit; color: var(--text);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; resize: vertical;
  transition: border-color .15s, box-shadow .15s;
}
textarea:focus { outline: none; border-color: var(--c2); box-shadow: 0 0 0 3px rgba(240, 69, 122, .2); }

/* main buttons: gradient, with a 3D "push" feel */
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; margin-top: 12px; padding: 13px 18px;
  font: inherit; font-weight: 700; color: #fff; cursor: pointer; text-decoration: none;
  background: var(--grad); border: 0; border-radius: 12px;
  box-shadow: 0 4px 0 #5a1f6e, 0 12px 22px rgba(0, 0, 0, .4);
  transition: transform .12s, box-shadow .12s, filter .12s;
}
button:hover, .btn:hover { filter: brightness(1.08); transform: translateY(-2px); box-shadow: 0 6px 0 #5a1f6e, 0 16px 26px rgba(0, 0, 0, .45); }
button:active, .btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #5a1f6e, 0 4px 8px rgba(0, 0, 0, .3); }
button.secondary { background: var(--panel-solid); border: 1px solid var(--line-2); box-shadow: 0 4px 0 #05060b, 0 10px 18px rgba(0, 0, 0, .35); }
button.secondary:active { box-shadow: 0 1px 0 #05060b; }
.btn-row { display: flex; gap: 10px; }
.btn-row button { flex: 1; }

/* file picker drawn as a drop zone */
.upload {
  display: block; text-align: center; padding: 26px 16px; cursor: pointer; font-weight: 600;
  border: 2px dashed var(--line-2); border-radius: 14px; background: rgba(255, 255, 255, .02);
  transition: border-color .15s, background .15s;
}
.upload:hover { border-color: var(--c2); background: rgba(240, 69, 122, .06); }
.upload input { display: block; margin: 10px auto 0; color: var(--muted); font-size: .9rem; }

/* ---------- 7. Results ---------- */
.result { margin-top: 16px; }
.result:empty { display: none; }
.alert { border-radius: 12px; padding: 14px 16px; border-left: 5px solid; margin: 10px 0; }
.alert.good { border-color: var(--good); background: rgba(74, 222, 128, .1); }
.alert.warn { border-color: var(--warn); background: rgba(251, 191, 36, .1); }
.alert.bad  { border-color: var(--bad);  background: rgba(248, 113, 113, .12); }
.alert h3 { margin: 0 0 4px; font-size: 1.05rem; }
.alert p { margin: 4px 0 0; }
.meter { height: 8px; background: var(--panel-2); border-radius: 99px; overflow: hidden; margin: 10px 0 4px; }
.meter span { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--grad); transition: width .7s ease; }
.quote { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; white-space: pre-wrap; word-break: break-word; }
mark { background: #ffd166; color: #1a1300; border-radius: 4px; padding: 0 3px; }
ul.reasons { padding-left: 20px; margin: 10px 0 0; }
ul.reasons li { margin-bottom: 6px; }

/* ---------- 8. Terminal look ---------- */
.code, pre {
  font-family: var(--mono); font-size: .92rem;
  background: #04050a; color: #5eead4; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); word-break: break-all; white-space: pre-wrap;
}
.code::before { content: "$ "; color: var(--muted); }
pre { color: #fca5a5; }

/* ---------- 9. Home: project cards with 3D tilt ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin: 10px 0 40px; }
.project {
  --rx: 0deg; --ry: 0deg;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 6px; padding: 22px;
  text-decoration: none; color: var(--text);
  background: var(--panel); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: var(--r);
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .22s ease-out, border-color .2s, box-shadow .25s;
  box-shadow: 0 16px 34px rgba(0, 0, 0, .4);
}
.project:hover, .project:focus-visible {
  border-color: var(--line-2);
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(-5px);
  box-shadow: 0 26px 50px rgba(0, 0, 0, .55);
}
/* gradient line on top of each card */
.project::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--grad); opacity: .85; }
/* soft light that follows the mouse (tilt.js sets --mx / --my) */
.project::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .2s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .10), transparent 60%);
}
.project:hover::after { opacity: 1; }
.project .emoji { font-size: 1.9rem; }
.project h2 { margin: 0; font-size: 1.12rem; }
.project p { margin: 0; color: var(--muted); font-size: .93rem; }
.project .chip { align-self: flex-start; font-family: var(--mono); font-size: .7rem; padding: .1rem .55rem; border-radius: 999px; border: 1px solid var(--line-2); color: var(--accent); }
.project .go { margin-top: auto; padding-top: 10px; font-family: var(--mono); font-size: .82rem; color: var(--c1); }

/* ---------- 10. Footer ---------- */
footer {
  text-align: center; color: var(--muted); font-size: .86rem;
  padding: 26px 18px 34px; margin-top: 30px;
  border-top: 1px solid var(--line); background: rgba(9, 11, 18, .6); backdrop-filter: blur(8px);
}
footer b { color: var(--text); }

/* ---------- 11. Extras used by single tools ---------- */
.preview { display: block; max-width: 100%; max-height: 280px; margin: 16px auto; border-radius: 12px; border: 1px solid var(--line); }
ul:has(> li.bad) { padding: 0; }
li.bad { list-style: none; border-left: 4px solid var(--bad); background: rgba(248, 113, 113, .1); padding: 10px 12px; border-radius: 10px; margin-bottom: 8px; }
.ok { color: var(--good); }
.id-card { text-align: center; }
#fpId { font-family: var(--mono); font-size: clamp(1.6rem, 6vw, 2.2rem); letter-spacing: 2px; margin: 6px 0;
        background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.row { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .icon { font-size: 1.4rem; }
.row b { display: block; }
.val { margin: 2px 0; font-family: var(--mono); color: #ffd6a8; word-break: break-word; }
.hidden { position: absolute; left: -9999px; font-size: 0; }      /* pastejacking trick */
#verdict.bad { border-left: 5px solid var(--bad); background: rgba(248, 113, 113, .12); padding: 14px; border-radius: 12px; margin-top: 12px; }
#verdict.ok  { border-left: 5px solid var(--good); background: rgba(74, 222, 128, .1); padding: 14px; border-radius: 12px; margin-top: 12px; }

/* ---------- 12. Phone + reduced motion ---------- */
@media (max-width: 560px) {
  .hero { padding-top: 40px; }
  .card { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero .icon { animation: none; }
  .project { transform: none !important; }
}

/* Pastejacking: fake terminal + scanner findings */
.terminal { margin-top: 14px; background: #02030a; border: 1px solid var(--line); border-radius: 12px; padding: 14px;
            font-family: var(--mono); font-size: .88rem; color: #cbd5e1; min-height: 120px; white-space: pre-wrap; word-break: break-all; }
.terminal .t-red { color: #f87171; } .terminal .t-grn { color: #4ade80; } .terminal .t-dim { color: #64748b; }
.terminal .cursor { display: inline-block; width: 8px; height: 1em; background: #4ade80; vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.finding { font-family: var(--mono); font-size: .86rem; }

/* ---------- 13. New tools ---------- */
/* Link X-Ray */
.url-parts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-family: var(--mono); font-size: .88rem; margin-top: 10px; }
.url-parts dt { color: var(--muted); }
.url-parts dd { margin: 0; word-break: break-all; }
.url-parts .real { color: #ffd166; font-weight: 700; }
.history { padding-left: 18px; font-family: var(--mono); font-size: .86rem; }
.history li { margin-bottom: 4px; word-break: break-all; }
.pill { display: inline-block; font-family: var(--mono); font-size: .72rem; padding: 0 .5rem; border-radius: 999px; margin-left: 6px; }
.pill.good { background: rgba(74, 222, 128, .15); color: var(--good); }
.pill.warn { background: rgba(251, 191, 36, .15); color: var(--warn); }
.pill.bad  { background: rgba(248, 113, 113, .15); color: var(--bad); }
/* Hash Lab */
.hashes { display: grid; gap: 8px; margin-top: 12px; }
.hash { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-family: var(--mono); font-size: .8rem; word-break: break-all; }
.hash b { display: block; color: var(--accent); font-size: .72rem; margin-bottom: 2px; }
textarea + .result, .upload + textarea { margin-top: 12px; }
/* Cipher Lab */
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { cursor: pointer; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; font-size: .9rem; }
.seg label:has(input:checked) { border-color: var(--c1); background: rgba(255, 138, 61, .12); }
.seg input { accent-color: var(--c1); }
.keyrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0; }
.keyrow input { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font: inherit; width: 170px; }
#out:empty { display: none; }
#out.quote { margin-top: 12px; font-family: var(--mono); }
.crack-list { list-style: none; padding: 0; margin: 10px 0 0; font-family: var(--mono); font-size: .85rem; max-height: 320px; overflow: auto; }
.crack-list li { padding: 4px 8px; border-radius: 6px; }
.crack-list li.best { background: rgba(74, 222, 128, .15); color: var(--good); font-weight: 700; }
/* Unicode X-Ray */
.chars { line-height: 2.2; font-family: var(--mono); word-break: break-all; }
.ch-zw { background: #f87171; color: #000; border-radius: 4px; padding: 1px 4px; font-size: .75rem; }
.ch-fake { background: #fbbf24; color: #000; border-radius: 4px; padding: 0 3px; }
/* Stego Studio */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.pair figure { margin: 0; text-align: center; }
.pair canvas { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); }
.pair figcaption { color: var(--muted); font-size: .85rem; margin-top: 4px; }
/* Spot the Phish */
.game-top { display: flex; justify-content: space-between; margin-bottom: 12px; }
.mono-chip { font-family: var(--mono); font-size: .8rem; border: 1px solid var(--line-2); padding: .15rem .7rem; border-radius: 999px; color: var(--accent); }
.q { min-height: 90px; font-size: 1.02rem; }
.q .from { display: block; font-family: var(--mono); font-size: .78rem; color: var(--muted); margin-bottom: 6px; }
