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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
  min-height: 100vh;
  color: #333;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

/* 登录页面 */
.login-box {
  background: white;
  border-radius: 20px;
  padding: 60px 40px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  margin: 100px auto;
}

.logo-small img {
  width: 120px;
  height: 120px;
  margin-bottom: 20px;
}

.logo-large img {
  width: 200px;
  height: 200px;
  margin-bottom: 20px;
}

.login-box h1 {
  color: #c41e3a;
  font-size: 28px;
  margin-bottom: 10px;
  font-weight: 600;
}

.login-box h2 {
  color: #666;
  font-size: 20px;
  margin-bottom: 40px;
  font-weight: 400;
}

.form-group {
  margin-bottom: 30px;
}

input[type="text"] {
  width: 100%;
  padding: 15px 20px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 18px;
  text-align: center;
  transition: border-color 0.3s;
}

input[type="text"]:focus {
  outline: none;
  border-color: #c41e3a;
}

.btn-primary {
  background: #c41e3a;
  color: white;
  border: none;
  padding: 15px 40px;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

.btn-primary:hover {
  background: #a01830;
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
}

.error {
  color: #c41e3a;
  margin-top: 20px;
  font-size: 14px;
}

/* 导航栏 */
.navbar {
  background: white;
  padding: 20px 30px;
  border-radius: 15px;
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.nav-brand {
  font-size: 24px;
  font-weight: 600;
  color: #c41e3a;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 15px;
}

#user-name {
  font-size: 16px;
  color: #666;
}

.btn-icon {
  background: #f5f5f5;
  color: #333;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
}

.btn-icon:hover {
  background: #e0e0e0;
}

/* 内容区域 */
.content {
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

/* 通知区域 */
.notification {
  background: linear-gradient(135deg, #c41e3a 0%, #a01830 100%);
  color: white;
  padding: 20px 30px;
  border-radius: 15px;
  margin-bottom: 30px;
  text-align: center;
  font-size: 16px;
  line-height: 1.6;
}

/* 祝福区域 */
.blessing-section {
  text-align: center;
  padding: 40px 20px;
  margin-bottom: 30px;
  border-bottom: 2px solid #f0f0f0;
}

.blessing-intro {
  font-size: 18px;
  color: #999;
  margin-bottom: 30px;
}

.blessing-text {
  font-size: 24px;
  line-height: 2;
  color: #333;
  max-width: 800px;
  margin: 0 auto;
  min-height: 200px;
}

/* 老师管理区域 */
.teacher-section {
  border-top: 2px solid #f0f0f0;
  padding-top: 30px;
  margin-top: 30px;
}

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

.section-header h3 {
  color: #c41e3a;
  font-size: 22px;
}

.prize-input-area {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.prize-input-area input {
  flex: 1;
  text-align: left;
}

.prizes-list {
  margin-bottom: 30px;
  max-height: 300px;
  overflow-y: auto;
}

.prize-item {
  background: #f9f9f9;
  padding: 15px 20px;
  border-radius: 10px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.3s;
}

.prize-item:hover {
  background: #f0f0f0;
}

.prize-item .prize-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 15px;
}

.prize-item .prize-name {
  font-size: 16px;
  color: #333;
  font-weight: 500;
}

.prize-item .prize-actions {
  display: flex;
  gap: 10px;
}

.prize-item .btn-draw {
  background: #c41e3a;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
}

.prize-item .btn-draw:hover {
  background: #a01830;
}

.prize-item .btn-delete {
  background: #f5f5f5;
  color: #999;
  border: none;
  padding: 8px 15px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
}

.prize-item .btn-delete:hover {
  background: #ff4444;
  color: white;
}

.draw-section {
  text-align: center;
  margin: 30px 0;
}

.btn-draw-large {
  background: linear-gradient(135deg, #c41e3a 0%, #a01830 100%);
  color: white;
  border: none;
  padding: 20px 60px;
  border-radius: 15px;
  font-size: 24px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.3s;
  box-shadow: 0 5px 20px rgba(196, 30, 58, 0.3);
}

.btn-draw-large:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(196, 30, 58, 0.4);
}

.btn-draw-large:active {
  transform: translateY(0);
}

.btn-draw-large:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.data-management {
  border-top: 2px solid #f0f0f0;
  padding-top: 20px;
  margin-top: 30px;
}

.data-management h4 {
  color: #666;
  margin-bottom: 15px;
  font-size: 18px;
}

.btn-danger {
  background: #ff4444;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
}

.btn-danger:hover {
  background: #cc0000;
}

/* 抽奖记录区域 */
.draw-records-section {
  border-top: 2px solid #f0f0f0;
  padding-top: 30px;
  margin-top: 30px;
}

.draw-records-section h3 {
  color: #c41e3a;
  margin-bottom: 20px;
  font-size: 22px;
}

.records-list {
  max-height: 400px;
  overflow-y: auto;
}

.record-item {
  background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
  padding: 20px 25px;
  border-radius: 12px;
  margin-bottom: 15px;
  border-left: 4px solid #c41e3a;
  transition: transform 0.2s;
}

.record-item:hover {
  transform: translateX(5px);
}

.record-item .record-prize {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.record-item .record-winner {
  font-size: 20px;
  color: #c41e3a;
  font-weight: 600;
  margin-bottom: 8px;
}

.record-item .record-time {
  font-size: 12px;
  color: #999;
}

/* 弹窗 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.wheel-modal-content {
  background: white;
  padding: 40px 60px;
  border-radius: 30px;
  text-align: center;
  animation: popIn 0.5s ease;
  position: relative;
  max-width: 600px;
  width: 90%;
}

.wheel-title {
  font-size: 28px;
  color: #c41e3a;
  margin-bottom: 30px;
}

.wheel-container {
  position: relative;
  width: 500px;
  height: 500px;
  margin: 0 auto 30px;
}

#wheel-canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.wheel-pointer {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-top: 40px solid #c41e3a;
  z-index: 10;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}

.btn-spin {
  background: linear-gradient(135deg, #c41e3a 0%, #a01830 100%);
  color: white;
  border: none;
  padding: 18px 50px;
  border-radius: 15px;
  font-size: 22px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 5px 20px rgba(196, 30, 58, 0.3);
}

.btn-spin:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(196, 30, 58, 0.4);
}

.btn-spin:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.wheel-result {
  margin-top: 25px;
  font-size: 24px;
  font-weight: 600;
  color: #c41e3a;
  min-height: 40px;
}

.select-modal-content {
  background: white;
  padding: 40px 50px;
  border-radius: 25px;
  text-align: center;
  animation: popIn 0.5s ease;
  min-width: 500px;
  max-width: 90%;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 32px;
  color: #999;
  cursor: pointer;
  transition: color 0.3s;
}

.modal-close:hover {
  color: #333;
}

.select-modal-content h2 {
  font-size: 24px;
  color: #333;
  margin-bottom: 10px;
}

.modal-desc {
  font-size: 16px;
  color: #666;
  margin-bottom: 25px;
}

.student-list {
  background: #f9f9f9;
  padding: 25px;
  border-radius: 15px;
  margin-bottom: 25px;
  max-height: 350px;
  overflow-y: auto;
  text-align: left;
}

.student-checkbox {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  margin: 8px 0;
  background: white;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
  border: 2px solid #e0e0e0;
}

.student-checkbox:hover {
  border-color: #c41e3a;
  background: #fff5f5;
}

.student-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-right: 15px;
  cursor: pointer;
}

.student-checkbox label {
  font-size: 16px;
  color: #333;
  cursor: pointer;
  flex: 1;
}

.result-modal-content {
  background: white;
  padding: 60px 80px;
  border-radius: 30px;
  text-align: center;
  animation: popIn 0.5s ease;
  min-width: 400px;
}

@keyframes popIn {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.congrats-title {
  font-size: 42px;
  color: #c41e3a;
  margin-bottom: 30px;
}

.winner-name {
  font-size: 48px;
  font-weight: 700;
  color: #333;
  margin: 20px 0;
}

.win-text {
  font-size: 24px;
  color: #666;
  margin-top: 30px;
}

.prize-name {
  font-size: 36px;
  color: #c41e3a;
  font-weight: 600;
  margin-top: 15px;
}

/* 个人页 */
.profile-box {
  background: white;
  border-radius: 20px;
  padding: 60px 40px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  margin: 50px auto;
}

.btn-back {
  background: #f5f5f5;
  color: #333;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  margin-bottom: 30px;
  transition: background 0.3s;
}

.btn-back:hover {
  background: #e0e0e0;
}

.profile-box h2 {
  color: #c41e3a;
  font-size: 28px;
  margin-bottom: 10px;
}

.school-en {
  color: #999;
  font-size: 16px;
  margin-bottom: 40px;
  font-style: italic;
}

.profile-info {
  text-align: left;
  background: #f9f9f9;
  padding: 30px;
  border-radius: 15px;
}

.profile-info p {
  font-size: 18px;
  margin-bottom: 15px;
  color: #333;
}

.profile-info strong {
  color: #c41e3a;
}

/* 响应式 */
@media (max-width: 768px) {
  .login-box {
    padding: 40px 20px;
    margin: 50px 20px;
  }

  .content {
    padding: 20px;
  }

  .navbar {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .prize-input-area {
    flex-direction: column;
  }

  .section-header {
    flex-direction: column;
    gap: 15px;
  }

  .result-modal-content {
    padding: 40px 30px;
    min-width: auto;
    width: 90%;
  }

  .winner-name {
    font-size: 32px;
  }

  .prize-name {
    font-size: 24px;
  }

  .btn-draw-large {
    width: 100%;
    font-size: 20px;
    padding: 18px 40px;
  }
}
