:root{
  --bg:#fff;
  --text:#111;
  --muted:#666;
  --accent:#0b66ff;
  --danger:#d9534f;
  --card:#fafafa;
  --glass: rgba(0,0,0,0.04);
  font-family: 'Noto Sans SC', system-ui, sans-serif;
  --base-padding: 16px;
  --max-width: 760px;
}

*{box-sizing:border-box}
html,body,#root{height:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  padding:16px;
  display:flex;
  justify-content:center;
}

.app{
  width:100%;
  max-width:var(--max-width);
  padding:8px;
}

.header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
  flex-wrap:wrap;
  padding:6px 4px;
}
.header h1{font-size:18px;margin:0}
.controls-top{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.repeat-label{font-size:13px;color:var(--muted);margin-right:6px}
.repeat-select{padding:6px;border-radius:8px;border:1px solid var(--glass);background:#fff;font-size:13px}

.panel{
  background:var(--card);
  border-radius:10px;
  padding:12px;
  margin-bottom:12px;
  box-shadow:0 1px 0 var(--glass);
}

.selection{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}
.card{flex:1;min-width:220px}
.selected-card{
    padding:20px 18px;
    text-align:center;
    background:linear-gradient(180deg, #fff 0%, #fbfdff 100%);
    border:1px solid rgba(11,102,255,0.06);
    box-shadow: 0 6px 18px rgba(10,30,60,0.04);
    transition:transform .18s ease, box-shadow .18s ease;
    min-height:110px;
}
.selected-card:active{ transform:scale(.995); }
.label{font-size:12px;color:var(--muted);margin-bottom:8px}
.student-display{
  font-size:20px;
  font-weight:800;
  padding:14px 8px;
  color:var(--accent);
  letter-spacing:0.6px;
}
.group-display{color:var(--muted);margin-top:6px}

.actions .action-row{display:flex;gap:8px;justify-content:center}

.groups .panel-head,.roster .panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;margin-bottom:8px;
}
.groups-list{list-style:none;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:8px}
.group-item{
  min-width:140px;
  padding:12px;
  border-radius:12px;
  background:#fff;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  box-shadow:0 8px 20px rgba(12,20,40,0.04);
  border:1px solid rgba(0,0,0,0.03);
  transition:transform .14s ease, box-shadow .14s;
  flex:1 1 160px;
}
.group-item:hover{ transform:translateY(-4px); box-shadow:0 12px 28px rgba(12,20,40,0.06); }
.group-meta{display:flex;flex-direction:column}
.group-name{font-weight:700}
.group-score{
  font-size:16px;
  color:#fff;
  background:var(--accent);
  padding:6px 10px;
  border-radius:999px;
  min-width:44px;
  text-align:center;
  font-weight:800;
  box-shadow:0 6px 10px rgba(11,102,255,0.08);
}

.btn{
    border:0;
    background:var(--accent);
    color:#fff;
    padding:8px 12px;
    border-radius:10px;
    font-weight:700;
    font-size:14px;
    box-shadow: 0 6px 12px rgba(11,102,255,0.08);
    transition:transform .14s ease, box-shadow .14s ease, opacity .12s;
}
.btn.ghost{ background:transparent; color:var(--accent); border:1px solid rgba(11,102,255,0.08); box-shadow:none; }
.btn:active{ transform:translateY(1px) scale(.997); }
.btn.small{padding:6px 8px;font-size:13px;border-radius:6px}
.btn.primary{background:var(--accent)}

.students-list{list-style:none;padding:0;margin:0}
.student-row{ display:flex; gap:8px; align-items:center; justify-content:space-between; padding:10px 8px; border-radius:8px; transition:background .12s, transform .12s; }
.student-row:hover{ background:rgba(11,102,255,0.03); transform:translateY(-2px); }
.student-row .meta{display:flex;flex-direction:column}
.student-name{font-weight:600}
.student-actions{display:flex;gap:6px}

input[type="text"],input{
  padding:8px;border-radius:8px;border:1px solid var(--glass);font-size:14px
}
.roster-controls{display:flex;gap:8px;align-items:center; flex-wrap:wrap;}
.roster-controls input{flex:1 1 120px; min-width:110px;}
.roster-controls .btn{flex:0 0 auto;}

.footer{text-align:center;color:var(--muted);font-size:13px;padding:6px}

/* small screens */
@media (max-width:520px){
  .selection{flex-direction:column}
  .groups-list{flex-direction:column}
  .group-item{min-width:unset; padding:14px; flex:1 1 auto}
  .header h1{font-size:16px;width:100%;margin-bottom:6px}
  .controls-top{width:100%;justify-content:space-between;gap:6px}
  .btn{padding:12px 14px;font-size:15px;border-radius:10px}
  .btn.small{padding:10px 12px;font-size:14px}
  .student-display{font-size:18px}
  .selected-card{padding:16px}
}