/* FileXL P2P page. Matches the FileXL tools look: same tokens, cards, gradient, dark mode.
   Only classes starting with .px- are defined here, so nothing leaks into the shared navbar or footer. */

:root { --hj-blue:#0d6efd; --hj-sky:#4facfe; --hj-violet:#7c3aed; --hj-cyan:#22d3ee; --hj-green:#16a34a; --hj-red:#dc2626;
        --text-main:#1e293b; --text-muted:#64748b; --bg-card:rgba(255,255,255,.97); --bg-soft:#f1f5f9; --line:#e2e8f0; }
body.dark-theme { --text-main:#f8fafc; --text-muted:#a5b4cc; --bg-card:rgba(30,41,59,.96); --bg-soft:rgba(15,23,42,.7); --line:rgba(255,255,255,.12); }

/* Static gradient (the old page repainted a moving one all the time). */
.px-body { font-family:'Poppins',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif; background:linear-gradient(135deg,#0b1226 0%,#14213d 35%,#003a78 70%,#0d4fd1 100%); min-height:100vh; display:flex; flex-direction:column; color:var(--text-main); overflow-x:hidden; padding-top:80px; }
[hidden] { display:none !important; }
.px-wrap { flex:1; width:100%; max-width:1080px; margin:0 auto; padding:0 16px 3rem; }
.px-sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.px-ico { width:1.1em; height:1.1em; flex:none; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; vertical-align:-.16em; }
.px-body button, .px-body input { font-family:inherit; }
.px-body :focus-visible { outline:3px solid #93c5fd; outline-offset:2px; }

/* ------------------------------------------------------------------ hero */
.px-hero { position:relative; text-align:center; padding:14px 0 6px; color:#fff; }
.px-hero::before, .px-hero::after { content:''; position:absolute; z-index:0; pointer-events:none; border-radius:50%; }
.px-hero::before { width:380px; height:380px; left:-80px; top:-60px; background:radial-gradient(circle,rgba(79,172,254,.38),rgba(79,172,254,0) 68%); }
.px-hero::after  { width:340px; height:340px; right:-16px; top:60px; background:radial-gradient(circle,rgba(124,58,237,.34),rgba(124,58,237,0) 68%); }
.px-hero > * { position:relative; z-index:1; }
.px-crumbs { font-size:.8rem; margin:0 0 14px; padding:0; list-style:none; display:flex; gap:8px; justify-content:center; color:rgba(255,255,255,.75); }
.px-crumbs a { color:#fff; text-decoration:none; } .px-crumbs a:hover { text-decoration:underline; }
.px-crumbs li + li::before { content:'/'; margin-right:8px; opacity:.55; }
.px-eyebrow { display:inline-flex; align-items:center; gap:7px; font-size:.78rem; font-weight:600; letter-spacing:.04em; padding:6px 14px; border-radius:999px; background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.22); margin-bottom:14px; }
.px-h1 { font-size:clamp(2rem,5.6vw,3.4rem); font-weight:800; line-height:1.12; letter-spacing:-.02em; margin:0 0 12px; text-shadow:0 6px 30px rgba(0,0,0,.25); }
.px-grad { background:linear-gradient(90deg,#67e8f9,#a5b4fc 55%,#f0abfc); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; color:transparent; }
.px-lead { font-size:clamp(1rem,2.3vw,1.18rem); max-width:620px; margin:0 auto 4px; color:rgba(255,255,255,.88); line-height:1.6; }

/* ------------------------------------------------------------------ main card */
.px-card { position:relative; width:100%; max-width:720px; margin:26px auto 0; padding:22px; border-radius:24px; background:var(--bg-card); border:1px solid rgba(255,255,255,.45); box-shadow:0 18px 44px rgba(0,0,0,.28); color:var(--text-main); }
body.dark-theme .px-card, body.dark-theme .px-panel { border-color:rgba(255,255,255,.1); }
.px-note { margin:0 0 14px; padding:11px 14px; border-radius:14px; font-size:.9rem; line-height:1.5; }
.px-err { background:rgba(220,38,38,.1); color:#b91c1c; border:1px solid rgba(220,38,38,.3); }
body.dark-theme .px-err { color:#fca5a5; }
.px-muted { color:var(--text-muted); font-size:.88rem; line-height:1.55; margin:.4rem 0 0; }

.px-tabs { display:grid; grid-template-columns:1fr 1fr; gap:6px; padding:5px; border-radius:16px; background:var(--bg-soft); border:1px solid var(--line); margin-bottom:18px; }
.px-tab { appearance:none; border:0; background:transparent; padding:11px 10px; border-radius:12px; font-weight:600; font-size:.98rem; color:var(--text-muted); display:inline-flex; align-items:center; justify-content:center; gap:8px; cursor:pointer; transition:background .15s,color .15s; }
.px-tab:hover { color:var(--text-main); }
.px-tab.is-on { color:#fff; background:linear-gradient(135deg,var(--hj-blue),#6d28d9); box-shadow:0 8px 18px rgba(13,110,253,.32); }

.px-kicker { display:block; font-size:.78rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--text-muted); margin:0 0 8px; text-align:center; }
.px-row { display:flex; flex-wrap:wrap; gap:10px; margin-top:14px; }
.px-row-c { justify-content:center; } .px-row-end { justify-content:flex-end; }

.px-btn { appearance:none; border:0; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:11px 20px; border-radius:14px; font-weight:600; font-size:.95rem; line-height:1.2; text-decoration:none; color:#fff; background:linear-gradient(135deg,var(--hj-blue),#6d28d9); box-shadow:0 10px 22px rgba(13,110,253,.3); transition:transform .15s, box-shadow .15s, opacity .15s; }
.px-btn:hover { transform:translateY(-1px); color:#fff; box-shadow:0 14px 26px rgba(13,110,253,.38); }
.px-btn:active { transform:none; }
.px-btn[disabled] { opacity:.45; cursor:not-allowed; transform:none; box-shadow:none; }
.px-btn.big { padding:14px 28px; font-size:1.05rem; border-radius:16px; }
.px-btn.ghost { background:var(--bg-soft); color:var(--text-main); border:1px solid var(--line); box-shadow:none; }
.px-btn.ghost:hover { color:var(--text-main); background:var(--line); box-shadow:none; }
.px-btn.danger { color:#b91c1c; } body.dark-theme .px-btn.danger { color:#fca5a5; }
.px-btn.light { background:#fff; color:#4c1d95; box-shadow:0 12px 28px rgba(0,0,0,.25); } .px-btn.light:hover { color:#4c1d95; }
.px-link { appearance:none; border:0; background:none; padding:0; color:var(--hj-blue); font-weight:600; font-size:.9rem; cursor:pointer; }
body.dark-theme .px-link { color:#93c5fd; } .px-link:hover { text-decoration:underline; }

/* drop zone */
.px-drop { display:flex; flex-direction:column; align-items:center; gap:8px; text-align:center; padding:34px 18px 26px; border:2px dashed #94a3b8; border-radius:20px; background:var(--bg-soft); cursor:pointer; transition:border-color .15s, background .15s, transform .15s; }
body.dark-theme .px-drop { border-color:rgba(255,255,255,.28); }
.px-drop:hover, .px-drop.is-over { border-color:var(--hj-blue); background:rgba(13,110,253,.07); }
.px-drop.is-over { transform:scale(1.01); }
.px-drop-ico { width:62px; height:62px; border-radius:20px; display:grid; place-items:center; color:#fff; font-size:1.6rem; background:linear-gradient(135deg,var(--hj-blue),var(--hj-violet)); box-shadow:0 12px 24px rgba(13,110,253,.32); }
.px-drop-t { font-size:1.15rem; font-weight:700; }
.px-drop-s { color:var(--text-muted); font-size:.9rem; max-width:420px; line-height:1.55; }

/* file list */
.px-files { list-style:none; margin:0; padding:0; display:grid; gap:8px; max-height:260px; overflow:auto; }
.px-files li { display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:14px; background:var(--bg-soft); border:1px solid var(--line); min-width:0; }
.px-files .px-fi { width:38px; height:38px; flex:none; border-radius:12px; display:grid; place-items:center; color:#fff; background:linear-gradient(135deg,var(--hj-blue),var(--hj-sky)); }
.px-files .px-fn { flex:1; min-width:0; }
.px-files .px-fn b { display:block; font-size:.92rem; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.px-files .px-fn span { font-size:.8rem; color:var(--text-muted); }
.px-files button { appearance:none; border:0; background:none; color:var(--text-muted); cursor:pointer; padding:6px; border-radius:10px; display:grid; place-items:center; }
.px-files button:hover { color:var(--hj-red); background:rgba(220,38,38,.1); }
.px-files-sm { max-height:150px; margin-top:12px; }
.px-total { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:12px; font-size:.9rem; color:var(--text-muted); }
.px-total span { font-weight:600; color:var(--text-main); }

/* code display */
.px-code { display:block; appearance:none; border:0; background:none; width:100%; cursor:copy; font-family:'SFMono-Regular',ui-monospace,Menlo,Consolas,monospace; font-weight:700; font-size:clamp(2.6rem,12vw,4rem); letter-spacing:.14em; text-indent:.14em; line-height:1.15; text-align:center; padding:6px 0; color:var(--text-main); font-variant-numeric:tabular-nums; }
.px-code:hover { color:var(--hj-blue); }
#expiry { text-align:center; }
.px-qr { display:flex; flex-direction:column; align-items:center; margin-top:18px; }
.px-qr-img { width:168px; height:168px; padding:10px; border-radius:16px; background:#fff; border:1px solid var(--line); }
.px-qr-img svg { display:block; width:100%; height:100%; shape-rendering:crispEdges; }
.px-qr .px-muted { text-align:center; }
.px-wait { display:flex; align-items:center; justify-content:center; gap:10px; margin:18px 0 0; color:var(--text-main); font-weight:500; text-align:center; }
.px-spin { width:18px; height:18px; flex:none; border-radius:50%; border:3px solid rgba(13,110,253,.22); border-top-color:var(--hj-blue); animation:px-rot 0.9s linear infinite; }
@keyframes px-rot { to { transform:rotate(360deg); } }

/* receive */
.px-codein { display:block; width:100%; max-width:340px; margin:6px auto 0; padding:14px 12px; text-align:center; font-family:'SFMono-Regular',ui-monospace,Menlo,Consolas,monospace; font-size:2rem; font-weight:700; letter-spacing:.2em; border-radius:16px; border:2px solid var(--line); background:var(--bg-soft); color:var(--text-main); }
.px-codein::placeholder { color:var(--text-muted); opacity:.5; }
.px-codein:focus { outline:none; border-color:var(--hj-blue); box-shadow:0 0 0 4px rgba(13,110,253,.18); }
#codeHelp { text-align:center; }
.px-offer { display:flex; align-items:center; gap:14px; padding:14px; border-radius:18px; background:var(--bg-soft); border:1px solid var(--line); }
.px-offer-ico { width:48px; height:48px; flex:none; border-radius:15px; display:grid; place-items:center; color:#fff; font-size:1.25rem; background:linear-gradient(135deg,var(--hj-blue),var(--hj-violet)); }
.px-offer-t { min-width:0; display:flex; flex-direction:column; }
.px-offer-t strong { font-size:1rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#offHint { text-align:center; margin-top:14px; }

/* live transfer */
.px-run-head { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:6px; font-size:1.1rem; }
.px-route { font-size:.74rem; font-weight:700; letter-spacing:.04em; padding:4px 10px; border-radius:999px; background:rgba(22,163,74,.14); color:#15803d; }
.px-route.relay { background:rgba(245,158,11,.16); color:#b45309; }
body.dark-theme .px-route { color:#86efac; } body.dark-theme .px-route.relay { color:#fcd34d; }
.px-run-file { margin:0 0 12px; color:var(--text-muted); font-size:.9rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.px-bar { height:14px; border-radius:999px; background:var(--bg-soft); border:1px solid var(--line); overflow:hidden; }
.px-bar-fill { display:block; height:100%; width:100%; transform:scaleX(0); transform-origin:left; border-radius:999px; background:linear-gradient(90deg,var(--hj-blue),var(--hj-violet),var(--hj-cyan)); transition:transform .25s linear; will-change:transform; }
.px-bar.is-wait .px-bar-fill { width:30%; transform:translateX(-100%); animation:px-slide 1.3s ease-in-out infinite; }
@keyframes px-slide { 0% { transform:translateX(-100%); } 100% { transform:translateX(340%); } }
.px-bar.is-done .px-bar-fill { background:linear-gradient(90deg,#22c55e,#16a34a); }
.px-bar.is-fail .px-bar-fill { background:#dc2626; }
.px-run-status { margin:12px 0 0; text-align:center; font-weight:500; min-height:1.5em; }
.px-metrics { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-top:14px; }
.px-metrics > div { padding:10px 8px; border-radius:14px; background:var(--bg-soft); border:1px solid var(--line); text-align:center; min-width:0; }
.px-m-l { display:block; font-size:.7rem; letter-spacing:.06em; text-transform:uppercase; color:var(--text-muted); }
.px-metrics strong { font-size:.95rem; font-variant-numeric:tabular-nums; white-space:nowrap; }
.px-spark { display:block; width:100%; height:44px; margin-top:12px; border-radius:12px; background:var(--bg-soft); }
.px-spark path:first-child { fill:rgba(13,110,253,.18); stroke:none; }
.px-spark path:last-child { fill:none; stroke:var(--hj-blue); stroke-width:2; vector-effect:non-scaling-stroke; stroke-linejoin:round; }
.px-done { text-align:center; margin-top:12px; }
.px-done p { margin:10px 0 0; font-weight:500; }
.px-done-ico { width:58px; height:58px; margin:0 auto; border-radius:50%; display:grid; place-items:center; font-size:1.6rem; color:#fff; background:linear-gradient(135deg,#22c55e,#16a34a); box-shadow:0 12px 24px rgba(22,163,74,.35); animation:px-pop .35s ease-out; }
.px-done-ico.fail { background:linear-gradient(135deg,#ef4444,#b91c1c); box-shadow:0 12px 24px rgba(220,38,38,.3); }
@keyframes px-pop { from { transform:scale(.4); opacity:0; } to { transform:none; opacity:1; } }

.px-assure { list-style:none; margin:20px 0 0; padding:16px 0 0; border-top:1px solid var(--line); display:flex; flex-wrap:wrap; justify-content:center; gap:8px 20px; font-size:.85rem; font-weight:500; color:var(--text-muted); }
.px-assure li { display:inline-flex; align-items:center; gap:7px; }
.px-assure .px-ico { color:var(--hj-green); }

/* ------------------------------------------------------------------ content sections */
.px-sec { margin-top:28px; }
.px-panel { background:var(--bg-card); border:1px solid rgba(255,255,255,.45); border-radius:24px; padding:30px 28px; box-shadow:0 18px 44px rgba(0,0,0,.22); }
.px-eyebrow-d { display:inline-block; font-size:.74rem; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--hj-blue); margin-bottom:6px; }
body.dark-theme .px-eyebrow-d { color:#93c5fd; }
.px-h2 { font-size:clamp(1.4rem,3.4vw,1.9rem); font-weight:700; margin:0 0 10px; color:var(--text-main); }
.px-p { color:var(--text-muted); line-height:1.7; margin:0 0 6px; }
.px-tiles { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin-top:16px; }
.px-tile { padding:18px; border-radius:18px; background:var(--bg-soft); border:1px solid var(--line); }
.px-tile-n { width:38px; height:38px; border-radius:12px; display:grid; place-items:center; color:#fff; font-weight:700; margin-bottom:10px; background:linear-gradient(135deg,var(--hj-blue),var(--hj-sky)); }
.px-tile:nth-child(2) .px-tile-n { background:linear-gradient(135deg,var(--hj-violet),#a78bfa); }
.px-tile:nth-child(3) .px-tile-n { background:linear-gradient(135deg,#0891b2,var(--hj-cyan)); }
.px-tile h3 { font-size:1rem; font-weight:700; margin:0 0 4px; color:var(--text-main); }
.px-tile p { margin:0; font-size:.88rem; line-height:1.6; color:var(--text-muted); }
.px-tradeoff { margin:16px 0 0; padding:12px 16px; border-radius:14px; background:rgba(245,158,11,.12); color:var(--text-main); font-size:.9rem; line-height:1.6; border:1px solid rgba(245,158,11,.3); }
.px-tradeoff a, .px-cta a:not(.px-btn) { color:var(--hj-blue); font-weight:600; } body.dark-theme .px-tradeoff a { color:#93c5fd; }
.px-tablewrap { overflow-x:auto; margin-top:12px; border-radius:16px; border:1px solid var(--line); }
.px-table { width:100%; border-collapse:collapse; font-size:.92rem; min-width:520px; }
.px-table th, .px-table td { padding:12px 14px; text-align:left; border-bottom:1px solid var(--line); color:var(--text-main); }
.px-table thead th { background:var(--bg-soft); font-size:.78rem; letter-spacing:.05em; text-transform:uppercase; color:var(--text-muted); }
.px-table tbody th { font-weight:600; }
.px-table tr:last-child th, .px-table tr:last-child td { border-bottom:0; }
.px-table td:nth-child(2), .px-table thead th:nth-child(2) { color:var(--hj-blue); font-weight:600; background:rgba(13,110,253,.06); }
body.dark-theme .px-table td:nth-child(2), body.dark-theme .px-table thead th:nth-child(2) { color:#93c5fd; }
.px-acc { margin-top:14px; display:grid; gap:10px; }
.px-acc details { border-radius:16px; background:var(--bg-soft); border:1px solid var(--line); overflow:hidden; }
.px-acc summary { list-style:none; cursor:pointer; padding:15px 18px; font-weight:600; display:flex; align-items:center; justify-content:space-between; gap:12px; color:var(--text-main); }
.px-acc summary::-webkit-details-marker { display:none; }
.px-acc summary::after { content:''; width:9px; height:9px; flex:none; border-right:2px solid var(--hj-blue); border-bottom:2px solid var(--hj-blue); transform:rotate(45deg) translateY(-2px); transition:transform .2s; }
.px-acc details[open] summary::after { transform:rotate(225deg); }
.px-acc summary:focus-visible { outline:2px solid var(--hj-blue); outline-offset:-2px; border-radius:16px; }
.px-acc-b { padding:0 18px 16px; color:var(--text-muted); line-height:1.7; font-size:.93rem; }
.px-acc-b p { margin:0; }
.px-cta { text-align:center; color:#fff; border:0; background:linear-gradient(135deg,#0d6efd,#6d28d9 70%,#9333ea); }
.px-cta .px-h2 { color:#fff; }
.px-cta p { color:rgba(255,255,255,.9); max-width:560px; margin:0 auto 16px; line-height:1.7; }
.px-cta p a { color:#fff; text-decoration:underline; }

.px-js .px-reveal { opacity:0; transform:translateY(18px); transition:opacity .6s ease, transform .6s ease; }
.px-js .px-reveal.in { opacity:1; transform:none; }

@media (max-width:860px) { .px-tiles { grid-template-columns:1fr; } }
@media (max-width:640px) {
  .px-body { padding-top:72px; }
  .px-card { padding:16px; border-radius:20px; }
  .px-panel { padding:22px 16px; border-radius:20px; }
  .px-metrics { grid-template-columns:repeat(2,1fr); }
  .px-btn { padding:11px 16px; }
  .px-drop { padding:26px 12px 20px; }
  .px-row-end { justify-content:stretch; } .px-row-end .px-btn { flex:1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; transition:none !important; }
  .px-js .px-reveal { opacity:1; transform:none; }
}
