/* ================================
   暑假课程表样式文件
   ================================ */

/* 基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Microsoft YaHei", Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
  touch-action: manipulation;
}

/* 容器布局 */
.container {
  max-width: 800px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* 头部样式 */
.header {
  background: linear-gradient(135deg, #ff6b6b, #ffa726);
  color: white;
  padding: 30px;
  text-align: center;
}

.header h1 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.current-date {
  font-size: 1.3rem;
  opacity: 0.9;
}

/* 主内容区域 */
.main-content {
  padding: 30px;
}

/* 导航按钮 */
.calendar-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.nav-btn {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.3s ease;
  touch-action: manipulation;
  user-select: none;
}

.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

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

.date-display {
  font-size: 1.2rem;
  font-weight: bold;
  color: #333;
}

/* 课程展示区域 */
.today-schedule {
  background: #f8f9ff;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 30px;
  border-left: 5px solid #667eea;
}

.schedule-title {
  font-size: 1.5rem;
  color: #333;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

.course-item {
  background: white;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

.course-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.course-time {
  font-weight: bold;
  color: #ff6b6b;
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.course-name {
  color: #333;
  font-size: 1rem;
}

/* ================================
   课程类型样式 - 与小程序对齐的5类分类
   ================================ */
.course-english { 
  background: #ffe066; 
  border-left: 4px solid #ffd700; 
}  /* 英语-黄色 */

.course-maths { 
  background: #66e0ff; 
  border-left: 4px solid #00bcd4; 
}  /* 数学-蓝色 */

.course-exercise { 
  background: #90ee90; 
  border-left: 4px solid #32cd32; 
}  /* 体锻-浅绿 */

.course-teacher { 
  background: #ff9999; 
  border-left: 4px solid #f44336; 
}  /* 中文-红色 */

.course-other { 
  background: #e0e0e0; 
  border-left: 4px solid #757575; 
}  /* 其他-灰色 */

.no-courses {
  text-align: center;
  color: #666;
  font-size: 1.2rem;
  padding: 40px;
}

/* 统计卡片 */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.stat-card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  color: #667eea;
}

.stat-label {
  color: #666;
  margin-top: 5px;
}

/* 编辑按钮 */
.edit-toggle {
  background: linear-gradient(135deg, #ff6b6b, #ffa726);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  margin-top: 20px;
  transition: all 0.3s ease;
  user-select: none;
}

.edit-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

/* 编辑器样式 */
.editor-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.editor-panel {
  background: white;
  border-radius: 15px;
  padding: 30px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  position: relative;
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f0f0f0;
}

.editor-title {
  font-size: 1.4rem;
  font-weight: bold;
  color: #333;
}

.close-btn {
  background: #f0f0f0;
  border: none;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  cursor: pointer;
  font-size: 1.2rem;
  color: #666;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background: #e0e0e0;
  transform: scale(1.1);
}

/* 表单样式 */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #333;
  font-size: 0.9rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
  min-height: 80px;
  resize: vertical;
}

.time-inputs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
}

.time-separator {
  text-align: center;
  font-weight: bold;
  color: #666;
}

/* 课程列表编辑 */
.course-list {
  margin-bottom: 20px;
}

.course-item-edit {
  background: #f8f9ff;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-left: 4px solid #667eea;
}

.course-info {
  flex-grow: 1;
}

.course-time-edit {
  font-weight: bold;
  color: #ff6b6b;
  font-size: 0.9rem;
}

.course-name-edit {
  color: #333;
  font-size: 0.95rem;
  margin-top: 2px;
}

.course-actions {
  display: flex;
  gap: 8px;
}

/* 按钮样式 */
.btn-small {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.3s ease;
}

.btn-edit {
  background: #667eea;
  color: white;
}

.btn-edit:hover {
  background: #5a6fd8;
  transform: translateY(-1px);
}

.btn-delete {
  background: #ff6b6b;
  color: white;
}

.btn-delete:hover {
  background: #ff5252;
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 10px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: #f0f0f0;
  color: #333;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  margin-right: 10px;
}

.btn-secondary:hover {
  background: #e0e0e0;
  transform: translateY(-1px);
}

.editor-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 2px solid #f0f0f0;
}

/* 快速时间选择 */
.quick-times {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.quick-time-btn {
  background: #f8f9ff;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  text-align: center;
}

.quick-time-btn:hover {
  border-color: #667eea;
  background: #667eea;
  color: white;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
  .editor-panel {
    padding: 20px;
    margin: 10px;
  }
  
  .time-inputs {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .time-separator {
    order: -1;
  }
  
  .quick-times {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .course-item-edit {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .course-actions {
    width: 100%;
    justify-content: flex-end;
  }
}