/* =========================
   CYBERPUNK STYLE (CSS ONLY)
   ========================= */

/* Reset */
*{ margin:0; padding:0; box-sizing:border-box; }
html,body{ height:100%; }

:root{
  --bg0:#05010c;
  --bg1:#070a17;
  --text:#eaf0ff;
  --muted:rgba(234,240,255,.72);

  --cyan:#00e5ff;
  --pink:#ff2bd6;
  --violet:#7c3cff;
  --lime:#a6ff00;

  --glass:rgba(255,255,255,.05);
  --glass2:rgba(255,255,255,.08);
  --stroke:rgba(0,229,255,.25);

  --shadow:0 18px 70px rgba(0,0,0,.55);
  --glowC:0 0 24px rgba(0,229,255,.35);
  --glowP:0 0 26px rgba(255,43,214,.32);
}

body{
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size:16px;
  line-height:1.6;
  color:var(--text);
  overflow-x:hidden;

  background:
    radial-gradient(1200px 900px at 18% 18%, rgba(255,43,214,.18), transparent 60%),
    radial-gradient(1100px 800px at 85% 25%, rgba(0,229,255,.18), transparent 58%),
    radial-gradient(900px 700px at 60% 95%, rgba(124,60,255,.14), transparent 60%),
    linear-gradient(135deg, var(--bg0), var(--bg1));
}

/* Scanlines + subtle noise + grid (all CSS, no HTML changes) */
body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;

  background:
    /* scanlines */
    repeating-linear-gradient(
      to bottom,
      rgba(255,255,255,.05) 0px,
      rgba(255,255,255,.05) 1px,
      rgba(0,0,0,0) 3px,
      rgba(0,0,0,0) 6px
    ),
    /* neon grid */
    linear-gradient(to right, rgba(0,229,255,.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,43,214,.05) 1px, transparent 1px);

  background-size: 100% 10px, 52px 52px, 52px 52px;
  opacity:.45;
  mix-blend-mode: overlay;
  mask-image: radial-gradient(circle at 50% 15%, rgba(0,0,0,1), rgba(0,0,0,.25) 55%, transparent 78%);
}

body::after{
  content:"";
  position:fixed;
  inset:-20%;
  z-index:0;
  pointer-events:none;
  background:
    radial-gradient(circle at 20% 30%, rgba(0,229,255,.10), transparent 45%),
    radial-gradient(circle at 80% 60%, rgba(255,43,214,.08), transparent 50%);
  filter: blur(24px);
  opacity:.70;
  animation: haze 7s ease-in-out infinite alternate;
}

@keyframes haze{
  from{ transform: translate3d(-1.5%, -1%, 0) scale(1.02); }
  to{   transform: translate3d( 1.5%,  1%, 0) scale(1.05); }
}

/* Links */
a{ text-decoration:none; color:inherit; }
a img{ border:0; }

/* Particles layer stays */
#particles-js{
  position:fixed;
  width:100%;
  height:100%;
  top:0;
  left:0;
  z-index:1;
  cursor:pointer;
}

/* ===== Layout ===== */
.xe-main{
  z-index:2;
  position:relative;
  width:600px;
  max-width:100%;
  margin:0 auto;
  padding:24px 16px 28px;
}

.xe-header{
  width:100%;
  height:auto;
  overflow:hidden;
  text-align:center;
  margin:8px 0 18px;
}

.xe-logo{
  width:150px;
  height:150px;
  border-radius:26px;
  border:1px solid rgba(0,229,255,.22);
  box-shadow: var(--shadow), var(--glowC);
  filter: saturate(1.1) contrast(1.05);
}

/* ===== Title with glitch-ish feel (pure CSS) ===== */
.xe-title-h1{
  position:relative;
  font-size:30px;
  line-height:1.15;
  font-weight:950;
  text-align:center;
  margin: 6px 0 12px;
  letter-spacing:.4px;

  background: linear-gradient(90deg, var(--cyan), var(--pink), var(--violet), var(--cyan));
  background-size: 240% 100%;
  -webkit-background-clip:text;
  background-clip:text;
  color: transparent;

  text-shadow:
    0 0 18px rgba(0,229,255,.18),
    0 0 26px rgba(255,43,214,.14);
  animation: neonShift 5.5s ease-in-out infinite;
}

@keyframes neonShift{
  0%{ background-position: 0% 50%; }
  50%{ background-position: 100% 50%; }
  100%{ background-position: 0% 50%; }
}

.xe-text{
  font-size:15px;
  color:var(--muted);
  text-align:center;
  margin-bottom:18px;
  font-weight:600;
}

/* ===== Card (holo glass + animated border) ===== */
.xe-card{
  position:relative;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  border-radius:18px;
  padding:20px;
  margin-bottom:18px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.10);
  overflow:hidden;
}

@supports ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))){
  .xe-card{
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
}

/* holographic moving rim */
.xe-card::before{
  content:"";
  position:absolute;
  inset:-2px;
  background: conic-gradient(
    from 200deg,
    rgba(0,229,255,.55),
    rgba(255,43,214,.50),
    rgba(124,60,255,.45),
    rgba(0,229,255,.55)
  );
  opacity:.55;
  filter: blur(16px);
  animation: rim 6s linear infinite;
  z-index:0;
  pointer-events:none;
}
@keyframes rim{ to{ transform: rotate(360deg); } }

.xe-card::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(120deg, rgba(0,229,255,.10), rgba(255,43,214,.08), rgba(0,0,0,0) 65%),
    radial-gradient(800px 300px at 30% 0%, rgba(255,255,255,.08), transparent 60%);
  opacity:.65;
  z-index:0;
  pointer-events:none;
}

.xe-card > *{ position:relative; z-index:1; }

/* ===== Progress ===== */
.xe-progress-bar{
  background: rgba(255,255,255,.06);
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid rgba(0,229,255,.18);
  box-shadow: inset 0 1px 10px rgba(0,0,0,.45);
}

.xe-progress{
  height:100%;
  width:2%;
  min-width:2%;
  border-radius:999px;
  transition: all .35s cubic-bezier(0.4,0,0.2,1);

  background:
    linear-gradient(90deg, rgba(0,229,255,1), rgba(255,43,214,1), rgba(124,60,255,1));
  box-shadow: 0 0 18px rgba(0,229,255,.25), 0 0 22px rgba(255,43,214,.18);

  position:relative;
  overflow:hidden;
}

/* animated stripes */
.xe-progress::after{
  content:"";
  position:absolute;
  inset:-2px;
  background: repeating-linear-gradient(
    135deg,
    rgba(255,255,255,.22) 0 10px,
    rgba(255,255,255,0) 10px 20px
  );
  opacity:.35;
  animation: stripes 1.15s linear infinite;
}
@keyframes stripes{ to{ transform: translateX(24px); } }

.progress-text{
  font-size:14px;
  color: rgba(234,240,255,.75);
  text-align:center;
  font-weight:700;
  margin-bottom: 10px;
}

/* ===== Question ===== */
.xe-question-section{ display:block; }

.xe-question-title{
  text-align:center;
  font-size:15px;
  color: rgba(234,240,255,.92);
  font-weight:900;
  margin: 10px 0 18px;
  letter-spacing:.2px;
}

/* ===== Options ===== */
.xe-options-list{ list-style:none; }

.xe-option-item{
  display:flex;
  align-items:center;
  padding: 12px 14px;
  border-radius: 14px;
  cursor:pointer;
  margin-bottom: 10px;

  background: rgba(255,255,255,.05);
  border: 1px solid rgba(0,229,255,.16);
  box-shadow: 0 10px 26px rgba(0,0,0,.25);

  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
  color: rgba(234,240,255,.92);
  font-weight: 750;
  font-size: 15px;

  position:relative;
  overflow:hidden;
}

/* holo sweep */
.xe-option-item::before{
  content:"";
  position:absolute;
  top:-40%;
  left:-60%;
  width: 70%;
  height: 180%;
  background: linear-gradient(
    120deg,
    rgba(255,255,255,0) 0%,
    rgba(0,229,255,.20) 35%,
    rgba(255,43,214,.18) 55%,
    rgba(255,255,255,0) 100%
  );
  transform: rotate(18deg);
  opacity: .0;
  transition: opacity .18s ease, left .55s ease;
  pointer-events:none;
}

.xe-option-item label{
  width:100%;
  display:flex;
  align-items:center;
  gap:10px;
}

/* radio: cyber dot */
.xe-option-item input[type="radio"],
.xe-radio{
  appearance:none;
  -webkit-appearance:none;
  width:18px;
  height:18px;
  border-radius:999px;
  border:1.6px solid rgba(0,229,255,.65);
  background: rgba(0,0,0,.25);
  box-shadow:
    inset 0 0 0 2px rgba(0,0,0,.40),
    0 0 12px rgba(0,229,255,.12);
  position:relative;
}

.xe-option-item input[type="radio"]:checked,
.xe-radio:checked{
  border-color: rgba(255,43,214,.9);
  box-shadow: var(--glowP), 0 0 20px rgba(0,229,255,.16);
}
.xe-option-item input[type="radio"]:checked::after,
.xe-radio:checked::after{
  content:"";
  position:absolute;
  inset:4px;
  border-radius:999px;
  background: linear-gradient(135deg, var(--pink), var(--cyan));
}

.xe-option-item:hover{
  transform: translateY(-1px);
  border-color: rgba(255,43,214,.45);
  background: rgba(255,43,214,.06);
  box-shadow: 0 14px 34px rgba(0,0,0,.35), var(--glowP);
}
.xe-option-item:hover::before{
  opacity:.95;
  left: 115%;
}

.xe-option-item:has(input[type="radio"]:checked){
  border-color: rgba(0,229,255,.55);
  background: rgba(0,229,255,.06);
  box-shadow: 0 14px 34px rgba(0,0,0,.35), var(--glowC);
}

/* ===== Completion ===== */
.xe-completion-section{ display:block; }

.xe-completion-title{
  text-align:center;
  font-size:16px;
  font-weight:950;
  margin-bottom: 12px;
  color: rgba(0,229,255,.95);
  text-shadow: 0 0 18px rgba(0,229,255,.20);
}

.xe-completion-text{
  font-size:14px;
  color: rgba(234,240,255,.72);
  text-align:center;
  font-weight:650;
  margin-bottom: 18px;
}

/* ===== Button: cyber neon + pulsing frame ===== */
.xe-button{
  width:100%;
  position:relative;
  overflow:hidden;

  padding: 15px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.16);

  color: #06010b;
  font-size: 16px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .9px;
  cursor:pointer;

  background:
    linear-gradient(90deg, rgba(0,229,255,1), rgba(255,43,214,1), rgba(124,60,255,1));
  background-size: 200% 100%;

  box-shadow: 0 18px 54px rgba(0,0,0,.40), var(--glowC), var(--glowP);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
  animation: btnShift 4.2s ease-in-out infinite;
}

@keyframes btnShift{
  0%{ background-position: 0% 50%; }
  50%{ background-position: 100% 50%; }
  100%{ background-position: 0% 50%; }
}

.xe-button:hover{
  transform: translateY(-1px);
  filter: saturate(1.10) contrast(1.03);
  box-shadow: 0 22px 70px rgba(0,0,0,.48), 0 0 32px rgba(0,229,255,.32), 0 0 34px rgba(255,43,214,.28);
}

.xe-button:active{ transform: translateY(0px) scale(.99); }

/* keep your .btn shine, but make it more "laser" */
.btn{ overflow:hidden; position:relative; }
.btn::after{
  content:"";
  position:absolute;
  top:0;
  left:-80%;
  width:60%;
  height:100%;
  background: linear-gradient(
    120deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,.20) 35%,
    rgba(255,255,255,.55) 50%,
    rgba(255,255,255,.20) 65%,
    rgba(255,255,255,0) 100%
  );
  transform: skewX(-28deg);
  transition: left .65s ease;
  mix-blend-mode: overlay;
}
.btn:hover::after{ left: 135%; }

/* ===== Warning ===== */
.xe-warning-title{
  font-size:15px;
  font-weight:950;
  margin-bottom:12px;
  color: rgba(255,43,214,.95);
  text-shadow: 0 0 16px rgba(255,43,214,.20);
}

.xe-warning-text{ overflow:hidden; }

.xe-warning-text p{
  color: rgba(234,240,255,.70);
  line-height:1.55;
  font-size:13px;
  margin-bottom:8px;
}

/* ===== Footer Links ===== */
.xe-links{
  text-align:center;
  border-top: 1px solid rgba(0,229,255,.18);
  margin-top: 14px;
  padding-top: 12px;
}

.xe-links a{
  display:inline-block;
  margin: 3px 6px;
  font-size:12px;
  color: rgba(234,240,255,.55);
  transition: color .16s ease, text-shadow .16s ease, transform .16s ease;
}
.xe-links a:hover{
  color: rgba(0,229,255,.95);
  text-shadow: 0 0 14px rgba(0,229,255,.22);
  transform: translateY(-1px);
}

/* image under content */
img[width="100%"]{
  border-radius: 14px;
  box-shadow: 0 18px 60px rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.10);
  margin-bottom: 16px;
  filter: saturate(1.05) contrast(1.02);
}

/* Mobile */
@media (max-width: 420px){
  .xe-title-h1{ font-size:26px; }
  .xe-logo{ width:128px; height:128px; border-radius:22px; }
  .xe-card{ padding:18px; }
  .xe-button{ font-size:15px; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce){
  body::after,
  .xe-title-h1,
  .xe-card::before,
  .xe-progress::after,
  .xe-button{
    animation:none !important;
  }
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    backdrop-filter: blur(5px);
}

.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 18px;
    padding: 24px;
    width: 90%;
    max-width: 500px;
    z-index: 1001;
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.popup-header h3 {
    color: rgba(0, 229, 255, 0.95);
    font-size: 18px;
    font-weight: 950;
    margin: 0;
    text-shadow: 0 0 16px rgba(0, 229, 255, 0.2);
}

.popup-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.popup-close:hover {
    background: rgba(255, 43, 214, 0.1);
    color: rgba(255, 43, 214, 0.95);
    box-shadow: 0 0 16px rgba(255, 43, 214, 0.3);
}

.popup-content {
    max-height: 300px;
    overflow-y: auto;
}

.popup-content p {
    color: rgba(234, 240, 255, 0.75);
    line-height: 1.5;
    margin-bottom: 10px;
    font-size: 14px;
}

/* Custom scrollbar for popup */
.popup-content::-webkit-scrollbar {
    width: 6px;
}

.popup-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.popup-content::-webkit-scrollbar-thumb {
    background: rgba(0, 229, 255, 0.3);
    border-radius: 3px;
}

.popup-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 229, 255, 0.5);
}

/* Animation for popup */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.popup.show {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.popup-overlay.show {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .popup {
        width: 95%;
        padding: 20px;
    }
    
    .popup-header h3 {
        font-size: 16px;
    }
    
    .popup-content {
        max-height: 250px;
    }
}