:root {
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: #0b0f14;
  color: #e8edf2;
}

.topbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: end;
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}

.title {
  font-size: 18px;
  font-weight: 700;
}

.status {
  font-size: 13px;
  opacity: 0.8;
  margin-top: 2px;
}

.spacer { flex: 1; }

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  opacity: 0.9;
}

.field input {
  width: 180px;
  padding: 10px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: #e8edf2;
}

.btn {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: #e8edf2;
  cursor: pointer;
  font-weight: 600;
}
.btn:hover { background: rgba(255,255,255,0.10); }
.btn:active { transform: translateY(1px); }

.btn.danger {
  border-color: rgba(255,80,80,0.35);
  background: rgba(255,80,80,0.12);
}

main {
  padding: 16px;
}

.board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  max-width: 980px;
  margin: 0 auto;
}

.cell {
  position: relative;
  border-radius: 14px;
  padding: 12px;
  min-height: 105px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  user-select: none;
  overflow: hidden;
}
.cell:hover { background: rgba(255,255,255,0.06); }

.cellIndex {
  font-size: 12px;
  opacity: 0.65;
  margin-bottom: 6px;
}

.cellText {
  font-size: 14px;
  line-height: 1.25;
  white-space: pre-wrap;
}

.marks {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  max-width: calc(100% - 20px);
}

.chip {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  color: rgba(0,0,0,0.85);
  font-weight: 800;
  border: 1px solid rgba(0,0,0,0.20);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
