* {
  box-sizing: border-box;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
body {
  margin: 0;
  background: #ffe4e9;
  color: #23314b;
}
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #ffe4e9;
}
.login-box {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  max-width: 400px;
  width: 90%;
}
.login-box h1 {
  margin: 0 0 30px 0;
  text-align: center;
  color: #f5576c;
}
.header {
  background: #ffb3c1;
  color: white;
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.header h1 {
  font-size: 24px;
  margin: 0;
}
.header-info {
  display: flex;
  gap: 15px;
  align-items: center;
}
.badge {
  background: rgba(255,255,255,0.3);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
}
.main-wrap {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 20px;
  padding: 20px;
  min-height: calc(100vh - 84px);
}
.game-area {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 18px;
  border: 1px solid rgba(172, 197, 236, 0.9);
  box-shadow: 0 14px 35px rgba(120, 152, 204, 0.35);
  padding: 20px;
}
.side-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.panel {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.panel h3 {
  margin: 0 0 15px 0;
  color: #f5576c;
  border-bottom: 2px solid #f5576c;
  padding-bottom: 8px;
}
.chat-panel {
  display: flex;
  flex-direction: column;
  min-height: 300px;
  max-height: 300px;
}
.qa-panel {
  display: flex;
  flex-direction: column;
  min-height: 300px;
  max-height: 300px;
}
.qa-messages {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 15px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 8px;
  max-height: 200px;
}
.qa-message {
  margin: 8px 0;
  padding: 8px 12px;
  border-radius: 8px;
}
.qa-message.user {
  background: #ffe4e9;
  border-left: 3px solid #ffb3c1;
  text-align: right;
}
.qa-message.bot {
  background: white;
  border-left: 3px solid #90caf9;
}
.qa-message .label {
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 4px;
}
.qa-message.user .label {
  color: #f5576c;
}
.qa-message.bot .label {
  color: #1976d2;
}
.qa-message .content {
  font-size: 13px;
  line-height: 1.5;
}
.qa-input {
  display: flex;
  gap: 10px;
}
.qa-input input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 15px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 8px;
  max-height: 400px;
}
.chat-message {
  margin: 8px 0;
  padding: 8px 12px;
  background: white;
  border-radius: 8px;
  border-left: 3px solid #f5576c;
}
.chat-message .sender {
  font-weight: 600;
  color: #f5576c;
  font-size: 13px;
}
.chat-message .content {
  margin-top: 4px;
  font-size: 14px;
}
.chat-input {
  display: flex;
  gap: 10px;
}
.chat-input input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}
.notification-panel {
  max-height: 200px;
  overflow-y: auto;
}
.fireworks-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  display: none;
}
.notification-item {
  padding: 12px;
  margin: 8px 0;
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  border-radius: 4px;
  font-size: 14px;
}
.notification-item.teacher {
  background: #d1ecf1;
  border-left-color: #0dcaf0;
}
.empty-hint {
  text-align: center;
  color: #999;
  font-size: 14px;
}
.description {
  font-size: 14px;
  color: #4a5a7a;
  margin-bottom: 15px;
  line-height: 1.6;
}
.board {
  background: #e8f2ff;
  border-radius: 14px;
  border: 1px dashed rgba(151, 175, 216, 0.9);
  padding: 10px;
  margin-bottom: 15px;
}
.card-list {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: 170px;
  gap: 10px;
}
.slot {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background: #f4f7ff;
  border: 1px dashed rgba(163, 185, 224, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.slot.has-card {
  background: transparent;
  border-style: none;
}
.slot.hover {
  background: #dde9ff;
  border-color: #4a8cff;
}
.card {
  width: 100%;
  max-width: 104px;
  height: 160px;
  border-radius: 12px;
  background: #fffef7;
  color: #222;
  padding: 4px 6px 6px;
  position: relative;
  cursor: grab;
  user-select: none;
  box-shadow: 0 6px 10px rgba(150, 170, 210, 0.7);
  border: 3px solid #e8b84d;
}
.card.border-green {
  border-color: #57b652;
}
.card.dragging {
  opacity: 0.6;
}
.card-top-row {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  margin-bottom: 2px;
  color: #3f4b66;
}
.card-top-row span:first-child {
  font-weight: 600;
}
.orbit-area {
  position: relative;
  margin: 2px auto 4px;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: #f7fafc;
  display: flex;
  align-items: center;
  justify-content: center;
}
.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed #4f7ed5;
}
.orbit-ring.r1 { width: 32px; height: 32px; }
.orbit-ring.r2 { width: 46px; height: 46px; }
.orbit-ring.r3 { width: 60px; height: 60px; }
.orbit-ring.r4 { width: 74px; height: 74px; }
.nucleus {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, #666, #333);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 11px;
}
.electron {
  position: absolute;
  width: 6px;
  height: 6px;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}
.card.border-green .electron { background: #57b652; }
.card:not(.border-green) .electron { background: #e8b84d; }
.card-bottom {
  position: absolute;
  bottom: 4px;
  left: 6px;
  right: 6px;
  font-size: 10px;
  text-align: center;
  color: #3f4b66;
  line-height: 1.25;
}
.card-bottom strong {
  font-weight: 600;
  display: block;
  margin-top: 1px;
}
.controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}
.btn-primary {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}
.btn-secondary {
  background: #e9ecef;
  color: #495057;
}
.btn-secondary:hover {
  background: #dee2e6;
}
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal.show {
  display: flex;
}
.modal-content {
  background: white;
  border-radius: 12px;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}
.modal-content h2 {
  margin-top: 0;
  color: #f5576c;
}
.feedback-reason {
  color: #2d6a4f;
  font-weight: 600;
  margin-bottom: 12px;
  padding: 10px;
  background: #d4edda;
  border-radius: 6px;
}
.feedback-reason em {
  color: #1b4332;
  font-style: italic;
}
.feedback-tip {
  color: #7c5c1a;
  font-weight: 600;
  margin-top: 15px;
}
#feedbackContent p {
  line-height: 1.6;
  margin-bottom: 10px;
}
#feedbackContent ul {
  margin: 10px 0 10px 20px;
  line-height: 1.8;
}
#feedbackContent li {
  margin-bottom: 8px;
}
.form-group {
  margin: 15px 0;
}
.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
}
.form-group input, .form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}
.form-group textarea {
  min-height: 100px;
  resize: vertical;
}
.peer-work-item {
  padding: 15px;
  margin: 10px 0;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #f5576c;
}
.peer-work-item h4 {
  margin: 0 0 10px 0;
}
.peer-mini-layout {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin: 10px 0;
  grid-auto-rows: 50px;
}
.peer-mini-slot {
  width: 100%;
  height: 100%;
  background: #e9ecef;
  border-radius: 2px;
  font-size: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 1100px) {
  .main-wrap {
    grid-template-columns: 1fr;
  }
}

