/* =========================================================
   WordMasters Practice — Professional Dark / Glass Theme
   Purplish + Green vibe, tight nav spacing, pro typography
   ========================================================= */

*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: #eaf0ff;
  background: #070915;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

:root{
  --bg0: #050714;
  --bg1: #07091a;

  --panel: rgba(255,255,255,0.07);
  --panel2: rgba(255,255,255,0.05);
  --border: rgba(255,255,255,0.12);

  --text: #eaf0ff;
  --muted: rgba(234,240,255,0.76);
  --faint: rgba(234,240,255,0.58);

  --purple: #7c5cff;
  --green: #4cd964;
  --red: #ff4d6d;

  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;

  --shadow: 0 18px 55px rgba(0,0,0,0.55);
  --shadow-soft: 0 10px 28px rgba(0,0,0,0.38);

  --max: 1120px;
  --pad: 18px;

  --ring: 0 0 0 4px rgba(124,92,255,0.26);
}

/* Background glow */
.bg-glow{
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 18% 10%, rgba(124,92,255,0.27), transparent 56%),
    radial-gradient(900px 520px at 82% 24%, rgba(76,217,100,0.17), transparent 56%),
    linear-gradient(180deg, var(--bg1), var(--bg0));
  filter: saturate(118%);
}

.container{
  width: min(var(--max), calc(100% - (var(--pad) * 2)));
  margin: 0 auto;
}

/* ---------- Topbar / Nav ---------- */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: linear-gradient(180deg, rgba(12,15,35,0.88), rgba(12,15,35,0.52));
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.topbar-inner{
  width: min(var(--max), calc(100% - (var(--pad) * 2)));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
}

.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  font-weight: 900;
  letter-spacing: 0.2px;
}

.brand small{
  display: block;
  font-weight: 650;
  letter-spacing: 0;
  color: var(--faint);
  margin-top: 2px;
}

.logo{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.55), transparent 35%),
    linear-gradient(135deg, rgba(124,92,255,0.92), rgba(76,217,100,0.28));
  box-shadow: 0 12px 28px rgba(124,92,255,0.14);
  border: 1px solid rgba(255,255,255,0.16);
  cursor: pointer;
  user-select: none;
}

.nav{
  display: flex;
  align-items: center;
  gap: 6px; /* closer together */
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill{
  display: inline-flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.11);
  background: rgba(255,255,255,0.05);
  color: rgba(234,240,255,0.88);
  font-weight: 800;
  letter-spacing: 0.15px;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}

.pill:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.075);
  border-color: rgba(255,255,255,0.18);
}

.pill.is-active{
  background: linear-gradient(135deg, rgba(124,92,255,0.22), rgba(76,217,100,0.12));
  border-color: rgba(124,92,255,0.40);
  box-shadow: 0 14px 30px rgba(124,92,255,0.12);
}

/* ---------- Hero ---------- */
.hero{
  margin-top: 20px;
  padding: 28px 26px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(255,255,255,0.10);
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.04));
  box-shadow: var(--shadow);
}

.hero h1{
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 3.0vw, 2.6rem);
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.hero p{
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 72ch;
  line-height: 1.6;
}

/* ---------- Panel / content blocks ---------- */
.panel{
  margin-top: 18px;
  padding: 18px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.075), rgba(255,255,255,0.045));
  box-shadow: var(--shadow-soft);
}

.panel h2{
  margin: 0 0 12px;
  font-size: 1.1rem;
  font-weight: 950;
  letter-spacing: 0.1px;
}

.divider{
  height: 1px;
  background: rgba(255,255,255,0.10);
  margin: 14px 0;
}

.actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.actions-left{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(234,240,255,0.92);
  font-weight: 900;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
  user-select: none;
}

.btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.085);
  border-color: rgba(255,255,255,0.18);
}

.btn:focus-visible{ outline: none; box-shadow: var(--ring); }

.btn.primary{
  background: linear-gradient(135deg, rgba(124,92,255,0.26), rgba(76,217,100,0.12));
  border-color: rgba(124,92,255,0.46);
}

.btn.ghost{
  background: transparent;
}

/* ---------- Inputs ---------- */
select, input, textarea{
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: rgba(234,240,255,0.92);
  padding: 10px 12px;
}

select:focus-visible,
input:focus-visible,
textarea:focus-visible{ outline: none; box-shadow: var(--ring); }

/* ---------- Question blocks ---------- */
.q{
  padding: 14px;
  border-radius: var(--r-md);
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  margin-bottom: 12px;
}

.qhead{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.qnum{
  font-weight: 950;
  color: rgba(234,240,255,0.92);
}

.prompt{
  margin: 8px 0 10px;
  font-weight: 850;
  color: rgba(234,240,255,0.95);
  line-height: 1.5;
}

.qmeta{
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.65;
}

.row{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.small-note{
  color: var(--faint);
  font-size: 0.92rem;
}

/* feedback */
.correct-badge{
  color: rgba(76,217,100,0.95);
  font-weight: 900;
}
.wrong-badge{
  color: rgba(255,77,109,0.95);
  font-weight: 900;
}

.explain{
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  line-height: 1.65;
}

.explain .label{
  font-weight: 950;
  color: rgba(234,240,255,0.93);
}

/* ---------- Story: inline blanks ---------- */
.story-text{
  font-size: 1.06rem;
  line-height: 2.0;
  color: rgba(234,240,255,0.94);
}

.story-text select{ width:auto !important; max-width:100%; }

.blank{
  display: inline-block;
  vertical-align: baseline;
  margin: 0 4px;
}

.blank-select{
  display: inline-block;
  width: auto;
  min-width: 135px;
  max-width: 240px;
  padding: 2px 6px;
  border: none;
  border-bottom: 2px solid rgba(234,240,255,0.35);
  background: transparent;
  color: rgba(234,240,255,0.92);
  font-weight: 850;
}

.blank-select:focus-visible{
  outline: none;
  box-shadow: none;
  border-bottom-color: rgba(124,92,255,0.75);
}

.blank-select.is-correct{ border-bottom-color: rgba(76,217,100,0.85); }
.blank-select.is-wrong{ border-bottom-color: rgba(255,77,109,0.85); }

/* ---------- Footer ---------- */
.footer{
  padding: 24px 0 38px;
  color: rgba(234,240,255,0.55);
  font-size: 0.9rem;
  text-align: center;
}

.hidden{ display:none !important; }

@media (max-width: 900px){
  .brand{ min-width: unset; }
}





