:root{
  --bg:#0b0c10;
  --panel:#12131a;
  --ink:#e8f5ef;
  --muted:#a8b3ad;
  --emerald:#10d6a0;
  --accent:#7b5cff;
  --chip:#1b1c26;
}

.cover{
  width: 40rem;
}
*{box-sizing:border-box}
html,body{height:100%;background:var(--bg);color:var(--ink);margin:0;font-family:Inter,system-ui,Segoe UI,Roboto,Helvetica,Arial,sans-serif}
#ef_app {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
  overflow: hidden;     
    isolation: isolate;
}

/* Full black overlay across the entire ef_app area */
#ef_app::before {
  content: "";
  position: absolute;
  inset: 0;
  /* Softer dim – still moody, but not blackout */
  background: rgba(0, 0, 0, 0.35);
  z-index: 1;
}

.start{
  font-size: 2rem;
  margin-top: 10px;
}

.start_screen{
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Everything inside the app should sit ABOVE the overlay */
#ef_app > * {
  position: relative;
  z-index: 2;
}


/* Screens */
.ef-screen{
  position: relative;
  display:none;
  min-height:100vh;
  align-items:center;
  justify-content:center;
  padding:32px;
  z-index: 1;     
    background: transparent !important;        /* remove any white/gray wash */
  backdrop-filter: none !important;               /* above #ef_quad */
}.ef-active{display:flex}
.ef-card{background:rgba(18,19,26,.85);backdrop-filter:saturate(120%) blur(6px);border:1px solid #242536;padding:24px;border-radius:16px;box-shadow:0 20px 60px rgba(0,0,0,.4);max-width:880px;width:100%}
.ef-wide{max-width:1100px}
.ef-title{margin:0 0 8px;font-size:clamp(28px,5vw,52px);line-height:1.1}
.ef-sub{margin:0 0 16px;color:var(--muted)}


.ef-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.ef-skill-card{border:1px solid #232433;border-radius:12px;padding:16px;background:linear-gradient(180deg,#141520,#0f1018);cursor:pointer}
.ef-skill-card:hover{border-color:#37384a}
.ef-skill-title{font-weight:700;margin-bottom:8px}
.ef-chip{display:inline-flex;align-items:center;gap:6px;background:var(--chip);border:1px solid #2a2c3b;color:#cfe9df;border-radius:999px;padding:6px 10px;font-size:12px}
.ef-muted{color:var(--muted)}
.ef-locked{opacity:.6}


.ef-list{margin:0;padding-left:20px}
.ef-list li{margin:8px 0}


.ef-filter{margin-bottom:16px}
.ef-filter input{width:100%;
  padding:12px 14px;
  border-radius:10px;border:1px solid #26283a;background:#0e0f16;color:#dbe9e2}
.ef-mark{background:#ffee58;color:#1a1a1a;padding:0 2px;border-radius:3px}


.ef-footer-row{display:flex;align-items:center;justify-content:space-between;margin-top:14px;gap:12px}
.ef-selection{color:#cfe9df}


.ef-actions{display:flex;gap:10px;justify-content:flex-end}
.ef-btn{appearance:none;border:1px solid #2a2c3b;background:#151624;color:#e7fff6;border-radius:10px;padding:10px 14px;font-weight:600;cursor:pointer}
.ef-btn:hover{border-color:#3b3e54}
.ef-primary{background:linear-gradient(180deg,#21f0b9,#10d6a0);color:#04110c;border:none}
.ef-ghost{background:transparent;border:1px solid #384149;color:#d8e8e0}


.ef-diff-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px;margin:14px 0}
.ef-diff{background:linear-gradient(180deg,#161827,#0f1017);border:1px solid #26283a;border-radius:12px;padding:16px;text-align:left;cursor:pointer;
color: white;
font-size: 1.5rem;}
.ef-diff[data-selected="true"]{outline:2px solid var(--emerald)}
.ef-diff span{display:block;font-weight:800}
.ef-diff small{color:var(--muted)}


/* Start/subject/… GIF grid */

/* Start/subject/… GIF grid */
#ef_quad{
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  opacity: 0.6;                 /* let more of the GIFs show through */
  z-index: 0;
  pointer-events: none;

  /* 🔥 Force out any stray gradients from other CSS files */
  background: transparent !important;
}

/* Individual GIF cells */
#ef_quad .cell{
  background:#0e0f16 center/cover no-repeat;
  border-radius:22px;
  filter:saturate(120%) contrast(110%) brightness(.9);
}

/* Kill extra overlay */
#ef_quad::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:none !important;
}




/* GAME */
.ef-playfield{position:relative;max-width:1200px;width:100%;aspect-ratio:16/9;background:#090a0f;border-radius:14px;border:1px solid #20222f;overflow:hidden}
#ef_canvas{display:block;width:100%;height:100%;min-height:260px}


.ef-hud{position:absolute;left:14px;top:14px;display:flex;gap:10px;align-items:center}
.ef-footer-bar{position:absolute;left:0;right:0;bottom:8px;text-align:center;color:#cfe9df;font-size:14px}


/* Quiz */
#ef_quiz{max-width:720px;border:none;border-radius:16px;padding:18px;background:#141624;color:#e9fff6}
#ef_quiz[open]{display:grid}
.ef-choices{display:grid;gap:10px;margin-top:10px}
.ef-choice{border:1px solid #28433a;background:#0f1412;color:#d5efe6;border-radius:10px;padding:10px 12px;cursor:pointer}
.ef-choice.correct{border-color:#1fe3b1;background:#07231a}
.ef-choice.wrong{border-color:#6b2e2e;background:#1a0f0f}


.ef-skill-meta{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  margin-top:6px;
  font-size:12px;
}
.ef-skill-meta small{
  color:var(--muted);
}

@media (max-width: 680px){
  .ef-card{padding:16px}
  .ef-playfield{border-radius:10px}
}



/* ===== SUBJECT SCREEN: LAYOUT ===== */

.ef-path-layout{
  display:grid;
  grid-template-columns:minmax(180px,260px) minmax(0,1fr);
  gap:24px;
  margin-top:18px;
}

.ef-path-col--labels{
  border-right:1px solid #1f202a;
  padding-right:18px;
}

.ef-path-col--skills{
  display:flex;
  flex-direction:column;
  gap:18px;
}

/* Left column labels */
.ef-path-label-group{
  margin-bottom:18px;
}

.ef-path-label-heading{
  margin:0 0 4px;
  font-weight:700;
  letter-spacing:0.02em;
}

.ef-path-label-sub{
  margin:0;
  font-size:13px;
  color:var(--muted);
}

.ef-path-label-group--muted{
  opacity:0.55;
}

/* Pills / tags */
.ef-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:2px 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.06em;
  margin-left:6px;
}

.ef-pill-muted{
  background:#1b1c26;
  color:var(--muted);
  border:1px solid #292a37;
}

/* Skill groups on right */
.ef-skill-group{
  background:linear-gradient(145deg, rgba(20,21,32,0.96), rgba(9,10,16,0.96));
  border-radius:16px;
  border:1px solid #232433;
  padding:14px 14px 12px;
}

.ef-skill-group-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:6px;
}

.ef-skill-group-header h2{
  margin:0;
  font-size:16px;
}

.ef-skill-tag{
  font-size:11px;
  padding:3px 9px;
  border-radius:999px;
  border:1px solid #2b3651;
  background:rgba(17,22,38,0.95);
  color:#cfd7ff;
}

.ef-skill-description{
  margin:0 0 8px;
  font-size:13px;
  color:var(--muted);
}

.ef-skill-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.ef-skill-row--chips{
  margin-top:4px;
}

/* ===== Skill buttons with hover + active + selected ===== */

.ef-skill-btn{
  position:relative;
  border-radius:999px;
  border:1px solid #2a2c3b;
  background:var(--chip);
  color:#e7fff6;
  padding:7px 14px;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  white-space:nowrap;
  box-shadow:0 6px 18px rgba(0,0,0,0.35);
  transition:
    background 0.12s ease,
    border-color 0.12s ease,
    box-shadow 0.12s ease,
    transform 0.08s ease;
}

.ef-skill-btn:hover{
  border-color:#3a435b;
  background:linear-gradient(135deg,#171827,#10111a);
  transform:translateY(-1px);
  box-shadow:0 10px 26px rgba(0,0,0,0.55);
}

/* “Click” feel */
.ef-skill-btn:active{
  transform:translateY(1px) scale(0.98);
  box-shadow:0 4px 10px rgba(0,0,0,0.6);
}

/* Selected state – JS should toggle .is-selected */
.ef-skill-btn.is-selected{
  background:linear-gradient(120deg,var(--emerald),var(--accent));
  color:#06120d;
  border-color:transparent;
  box-shadow:
    0 0 0 1px rgba(19,255,189,0.55),
    0 10px 26px rgba(0,0,0,0.65);
}

.ef-skill-btn.is-selected::after{
  content:"✓";
  font-size:12px;
  font-weight:800;
}

/* Mobile layout */
@media (max-width: 720px){
  .ef-path-layout{
    grid-template-columns:1fr;
  }
  .ef-path-col--labels{
    border-right:none;
    border-bottom:1px solid #1f202a;
    padding-right:0;
    padding-bottom:12px;
  }
}

/* Make skill pills stretch nicely in the grid */
.ef-grid .ef-skill-btn{
  width: 100%;
  justify-content: center;
}

/* When used inside rows (if you ever do), let them size to content */
.ef-skill-row .ef-skill-btn{
  width: auto;
}

/* Slightly bigger font on desktop so grade buttons pop */
@media (min-width: 720px){
  .ef-skill-btn{
    font-size: 14px;
    padding: 8px 16px;
  }
}
