* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.container {
  background: white;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  width: 100%;
  max-width: 550px;
  min-height: 600px;
  padding: 24px;
}

.page { display: none; }
.page.active { display: block; }

h1 { font-size: 28px; color: #333; margin-bottom: 8px; }
h2 { font-size: 20px; color: #333; }
h3 { font-size: 18px; color: #333; margin-bottom: 16px; }
.subtitle { color: #666; margin-bottom: 24px; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; color: #555; font-weight: 500; }

.input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #ddd;
  border-radius: 12px;
  font-size: 16px;
  transition: border-color 0.2s;
}
.input:focus { outline: none; border-color: #667eea; }

.btn {
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  width: 100%;
}
.btn-outline {
  background: transparent;
  border: 1px solid #ddd;
  color: #666;
}
.btn-small {
  padding: 8px 16px;
  font-size: 14px;
}
.btn-danger {
  background: #e53e3e;
  color: white;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
}
.tab {
  background: none;
  border: none;
  padding: 10px 12px;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.tab.active {
  color: #667eea;
  border-bottom-color: #667eea;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.search-box { margin-bottom: 16px; }

.list { display: flex; flex-direction: column; gap: 10px; }

.classmate-card, .message-card, .feedback-card {
  padding: 16px;
  border: 1px solid #eee;
  border-radius: 16px;
}
.classmate-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.classmate-card:hover { background: #f8f9ff; }

.classmate-info h4 { font-size: 16px; margin-bottom: 4px; }
.classmate-info .contact { font-size: 13px; color: #667eea; margin-top: 4px; }

.message-card {
  flex-direction: column;
  align-items: flex-start;
}
.message-from, .feedback-from {
  font-weight: 600;
  color: #667eea;
  margin-bottom: 6px;
}
.message-content, .feedback-content {
  color: #333;
  margin-bottom: 6px;
}
.message-time, .feedback-time {
  font-size: 12px;
  color: #999;
}

.feedback-card {
  position: relative;
}
.feedback-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  background: #f0f0f0;
}
.feedback-badge.evaluation { background: #fef3c7; color: #d97706; }
.feedback-badge.thanks { background: #dcfce7; color: #16a34a; }

.feedback-filter {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.filter-btn {
  padding: 8px 20px;
  border: 1px solid #ddd;
  border-radius: 20px;
  background: white;
  cursor: pointer;
}
.filter-btn.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.photos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.photo-card {
  border-radius: 16px;
  overflow: hidden;
  background: #f5f5f5;
}
.photo-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}
.photo-info {
  padding: 10px;
}
.photo-title {
  font-weight: 600;
  margin-bottom: 4px;
}
.photo-uploader {
  font-size: 12px;
  color: #888;
}
.photo-delete {
  float: right;
  color: #e53e3e;
  cursor: pointer;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.stat-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 16px;
  border-radius: 16px;
  text-align: center;
}
.stat-number {
  font-size: 32px;
  font-weight: bold;
}
.stat-label {
  font-size: 14px;
  opacity: 0.9;
}

.modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.modal.show { display: flex; }
.modal-content {
  background: white;
  padding: 24px;
  border-radius: 24px;
  width: 90%;
  max-width: 400px;
}
.modal-content h3 { margin-bottom: 16px; }
.modal-buttons {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.error { color: #e53e3e; margin-top: 10px; font-size: 14px; }
.result { margin-top: 10px; font-size: 14px; }

.empty-state {
  text-align: center;
  padding: 40px;
  color: #999;
}

.teacher-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.action-buttons {
  display: flex;
  gap: 8px;
}

/* 音乐播放器 */
.music-player {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
}
.music-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.music-icon { font-size: 28px; color: white; }
.music-toggle.playing .music-icon { animation: musicPulse 1s infinite; }
@keyframes musicPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}
.music-panel {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 300px;
  max-height: 400px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  overflow: hidden;
  display: none;
}
.music-panel.show { display: block; }
.music-header {
  padding: 15px 18px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.close-panel {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
}
.music-controls {
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #eee;
}
.music-controls button {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f5f5f5;
}
.progress-container {
  flex: 1;
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  cursor: pointer;
}
.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 3px;
}
.time-display {
  font-size: 12px;
  color: #888;
  min-width: 70px;
  text-align: right;
}
.lyrics-container {
  max-height: 250px;
  overflow-y: auto;
  padding: 15px;
}
.lyrics-content {
  text-align: center;
  line-height: 2.2;
  color: #666;
  font-size: 14px;
}
.lyric-line {
  padding: 4px 0;
  transition: all 0.3s;
}
.lyric-line.active {
  color: #667eea;
  font-weight: 600;
  font-size: 16px;
}

@media (max-width: 480px) {
  .music-panel { width: 280px; }
  .tabs { justify-content: center; }
  .tab { font-size: 12px; padding: 8px 6px; }
}
