/* ============================================================
   ./public/css/solo-lobby.css
   SOLO LOBBY — based on your lobby.css theme + subject picker vibe
   ============================================================ */

/* reuse theme vars idea */
:root{
  --bg1:#ff5a2e; --bg2:#ffb24a;
  --ink:#111827; --ink2:rgba(17,24,39,.75);
  --panel:rgba(255,255,255,.86);
  --panel2:rgba(255,255,255,.72);
  --stroke:rgba(17,24,39,.12);
  --shadow:0 18px 45px rgba(0,0,0,.18);
  --shadow2:0 12px 30px rgba(0,0,0,.14);
  --radius:22px;
}
body.theme-dark{
  --bg1:#0b1020; --bg2:#1b2a6b;
  --ink:#e5e7eb; --ink2:rgba(229,231,235,.78);
  --panel:rgba(17,24,39,.70);
  --panel2:rgba(17,24,39,.55);
  --stroke:rgba(255,255,255,.12);
  --shadow:0 18px 45px rgba(0,0,0,.35);
  --shadow2:0 12px 30px rgba(0,0,0,.28);
}

*{box-sizing:border-box;margin:0;padding:0;}
html,body{height:100%;}
body{
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--ink);
  overflow-x:hidden;
}

/* ===== Page + background ===== */
.lobby-page{
  min-height:100vh;
  position:relative;
  isolation:isolate;
  padding:80px 16px 60px;
  display:flex;
  justify-content:center;
}
.lobby-bg{position:absolute;inset:0;z-index:-1;overflow:hidden;}
.lobby-sky{position:absolute;inset:0;background:linear-gradient(135deg,var(--bg1),var(--bg2));}

.lobby-clouds{
  position:absolute;inset:0;opacity:.85;
  background:
    radial-gradient(circle at 12% 22%, rgba(255,255,255,.95) 0 18px, transparent 19px),
    radial-gradient(circle at 17% 20%, rgba(255,255,255,.95) 0 26px, transparent 27px),
    radial-gradient(circle at 24% 22%, rgba(255,255,255,.95) 0 20px, transparent 21px),
    radial-gradient(circle at 58% 18%, rgba(255,255,255,.90) 0 16px, transparent 17px),
    radial-gradient(circle at 63% 16%, rgba(255,255,255,.90) 0 24px, transparent 25px),
    radial-gradient(circle at 70% 18%, rgba(255,255,255,.90) 0 18px, transparent 19px);
  animation:drift 34s linear infinite;
  filter:blur(.2px);
}
.lobby-clouds2{opacity:.55;transform:translateX(-35%);animation:drift 52s linear infinite reverse;}
@keyframes drift{from{transform:translateX(-20%);}to{transform:translateX(20%);}}

/* keep ground subtle */
.lobby-ground{
  position:absolute;left:0;right:0;bottom:0;height:120px;opacity:.22;
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,0)),
    repeating-linear-gradient(90deg, rgba(0,0,0,.18) 0 18px, rgba(0,0,0,.10) 18px 36px);
  animation:groundMove 6.5s linear infinite;
}
@keyframes groundMove{from{background-position:0 0,0 0;}to{background-position:0 0,360px 0;}}

.lobby-wrap{
  width:min(1100px,100%);
  display:flex;
  flex-direction:column;
  gap:14px;
}

/* ===== Header ===== */
.lobby-head{
  display:flex;
  gap:12px;
  align-items:center;
  background:var(--panel);
  border:1px solid var(--stroke);
  border-radius:var(--radius);
  padding:16px;
  box-shadow:var(--shadow);
  backdrop-filter:blur(12px);
}
.badge{
  width:52px;height:52px;border-radius:18px;
  display:grid;place-items:center;
  background:linear-gradient(135deg, rgba(255,255,255,.75), rgba(255,255,255,.35));
  border:1px solid rgba(255,255,255,.35);
  box-shadow:0 16px 28px rgba(0,0,0,.14);
  font-size:22px;
}
.lobby-head h1{font-weight:950;font-size:28px;}
.sub{color:var(--ink2);margin-top:4px;}

/* ===== Panels ===== */
.panel{
  background:var(--panel);
  border:1px solid var(--stroke);
  border-radius:var(--radius);
  padding:18px;
  box-shadow:var(--shadow2);
  backdrop-filter:blur(12px);
}
.panel.big{padding:18px;}

.big-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom: 6px;
}

.panel h2{font-size:18px;font-weight:950;margin-bottom:10px;}

/* ===== Buttons ===== */
.btn{
  padding:12px 14px;
  border-radius:999px;
  font-weight:950;
  border:1px solid var(--stroke);
  background:var(--panel);
  box-shadow:var(--shadow2);
  transition:transform .2s ease, box-shadow .2s ease;
  position:relative;
  overflow:hidden;
}
.btn:hover{
  transform:translateY(-2px) scale(1.01);
  box-shadow:0 18px 38px rgba(0,0,0,.18);
}
.btn:active{transform:translateY(0) scale(.99);}
.btn::after{
  content:"";
  position:absolute;
  inset:-2px;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.6),transparent);
  transform:translateX(-120%);
  opacity:.65;
}
.btn:hover::after{animation:shine .7s ease forwards;}
@keyframes shine{to{transform:translateX(120%);} }

.btn.start{
  min-width:200px;
  background:linear-gradient(135deg, rgba(34,197,94,.95), rgba(250,204,21,.9));
  border:1px solid rgba(255,255,255,.35);
  color:#111827;
}
.btn:disabled{opacity:.55;cursor:not-allowed;transform:none;box-shadow:var(--shadow2);}

/* ===== Form bits (solo uses difficulty + timer) ===== */
.field{ margin-top: 12px; }
.field label{
  font-size:13px;
  font-weight:900;
  color:var(--ink2);
  display:block;
  margin-bottom:6px;
}

/* ===== Segmented controls ===== */
.seg{
  display:flex;
  gap:8px;
  margin-top:6px;
  flex-wrap:wrap;
}
.seg-btn{
  padding:10px 12px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background:var(--panel);
  box-shadow:0 10px 18px rgba(0,0,0,.08);
  font-weight:950;
  transition:transform .2s ease, box-shadow .2s ease;
}
.seg-btn:hover{ transform: translateY(-1px); box-shadow: 0 18px 36px rgba(0,0,0,.12); }
.seg-btn.active{
  background: linear-gradient(135deg, rgba(255,122,0,.95), rgba(255,214,102,.92));
  color: #111827;
  border-color: rgba(255,255,255,.35);
}
body.theme-dark .seg-btn.active{
  background: linear-gradient(135deg, rgba(110,231,255,.95), rgba(167,139,250,.92));
  color: #0b1020;
}

/* ===== Timer UI ===== */
.timer-row{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
}
.check{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:900;
}
.timer-ctrl{
  display:flex;
  align-items:center;
  gap:10px;
  flex:1;
  min-width: 220px;
}
.timer-pill{
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background:var(--panel2);
  font-weight:950;
  min-width:54px;
  text-align:center;
}
input[type="range"]{ width:100%; }

/* small helpers */
.tiny{ font-size: 12px; opacity:.8; }
.note{ margin-top: 10px; font-size: 12px; opacity:.85; }
.msg{ margin-top: 12px; font-weight: 950; }

/* ============================================================
   SUBJECT PICKER (screenshot vibe)
   IDs/class names match your HTML:
   - .settings-card, .picker-head, .picker-meta
   - #selected-chips, #subject-grid
   - #sub-overlay, #sub-card, #sub-grid
   ============================================================ */
.settings-card{
  background: var(--panel2);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow2);
  backdrop-filter: blur(10px);
  margin-top: 12px;
}

.picker-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.picker-meta{ display:flex; align-items:center; gap: 10px; }

.btn-mini{
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--panel);
  font-weight: 900;
  box-shadow: var(--shadow2);
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn-mini:hover{ transform: translateY(-1px); box-shadow: 0 18px 36px rgba(0,0,0,.12); }

/* chips */
.chips{
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
  margin: 8px 0 14px;
}
.chip{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 10px 18px rgba(0,0,0,.08);
  font-weight: 950;
  font-size: 12px;
}
body.theme-dark .chip{
  background: rgba(17,24,39,.55);
  border: 1px solid rgba(255,255,255,.12);
}
.chip button{
  width: 24px;
  height: 24px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(0,0,0,.08);
  font-weight: 950;
  cursor:pointer;
  transition: transform .15s ease;
}
body.theme-dark .chip button{
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.10);
}
.chip button:hover{ transform: translateY(-1px); }

/* Subject cards grid */
.subject-cards{
  display:grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 16px;
  padding: 8px 6px;
}
@media(max-width:1200px){ .subject-cards{ grid-template-columns: repeat(5, 1fr); } }
@media(max-width:900px){  .subject-cards{ grid-template-columns: repeat(3, 1fr); } }
@media(max-width:540px){  .subject-cards{ grid-template-columns: repeat(2, 1fr); } }

.subject-card{
  position:relative;
  border-radius: 18px;
  overflow:hidden;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.75);
  box-shadow: 0 12px 25px rgba(0,0,0,.10);
  transition: transform .18s ease, box-shadow .18s ease;
  cursor:pointer;
  padding:0;
  text-align: initial;
}
body.theme-dark .subject-card{
  background: rgba(17,24,39,.62);
  border: 1px solid rgba(255,255,255,.12);
}
.subject-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 22px 44px rgba(0,0,0,.16);
}
.subject-card.selected{
  outline: 3px solid rgba(255,138,61,.65);
  outline-offset: 2px;
}

/* art area */
.subject-art{
  height: 130px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.75), transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(255,255,255,.55), transparent 50%),
    linear-gradient(180deg, rgba(66,133,244,.18), rgba(66,133,244,.05));
  display:grid;
  place-items:center;
}
body.theme-dark .subject-art{
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.10), transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(255,255,255,.08), transparent 50%),
    linear-gradient(180deg, rgba(110,231,255,.12), rgba(110,231,255,.02));
}
.subject-emoji{
  font-size: 52px;
  filter: drop-shadow(0 12px 18px rgba(0,0,0,.18));
}

/* orange name bar */
.subject-name{
  height: 46px;
  background: #ff8a3d;
  color: #fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 1000;
  letter-spacing:.01em;
}

/* ===== overlay for subsubjects ===== */
.sub-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  display:none;
  z-index: 9999;
  padding: 18px;
}
.sub-overlay.open{ display:grid; place-items:center; }

.sub-card{
  width: min(820px, 100%);
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--stroke);
  box-shadow: 0 24px 70px rgba(0,0,0,.24);
  overflow:hidden;
  backdrop-filter: blur(10px);
  animation: fadeSwap .22s ease both;
}

.sub-top{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 12px;
  background: rgba(255,138,61,.15);
}
.sub-back{
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(0,0,0,.08);
  font-weight: 1000;
  cursor:pointer;
}
body.theme-dark .sub-back{
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.10);
}

.sub-title{ font-weight: 1000; font-size: 16px; }
.sub-body{ padding: 12px; }

.sub-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
@media(max-width:680px){ .sub-grid{ grid-template-columns: repeat(2, 1fr); } }

.sub-btn{
  border-radius: 16px;
  padding: 12px;
  border: 1px solid var(--stroke);
  background: var(--panel2);
  font-weight: 1000;
  box-shadow: 0 12px 22px rgba(0,0,0,.10);
  transition: transform .18s ease, box-shadow .18s ease;
  cursor:pointer;
}
.sub-btn:hover{
  transform: translateY(-3px);
  box-shadow: 0 22px 44px rgba(0,0,0,.14);
}

/* ===== Animations ===== */
@keyframes fadeSwap{
  from{ opacity:0; transform:scale(.98); }
  to{ opacity:1; transform:scale(1); }
}

/* ===== Responsive ===== */
@media(max-width:480px){
  .lobby-head{flex-direction:column;align-items:flex-start;}
}
