:root {
  --primary-color: #3498db;
  --secondary-color: #2c3e50;
  --highlight-color: #e74c3c;
  --text-color: #333;
  --light-gray: #f5f7fa;
  --border-radius: 10px;
  --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
  padding: 20px;
  min-height: 100vh;
}

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

header {
  text-align: center;
  margin-bottom: 20px;
  padding: 20px;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  position: relative;
}

h1 {
  color: var(--secondary-color);
  margin-bottom: 5px;
  font-size: 2.2rem;
}

.subtitle {
  color: #7f8c8d;
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.term-info {
  background: #f8f9fa;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.95rem;
  margin-top: 10px;
}

/* 周数控制 */
.week-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 25px;
  gap: 15px;
  flex-wrap: wrap;
  background: white;
  padding: 15px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.week-nav {
  display: flex;
  gap: 10px;
}

.week-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 1.4rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.week-btn:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
}

.current-week {
  font-size: 1.5rem;
  font-weight: bold;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 12px 35px;
  border-radius: 30px;
  box-shadow: var(--box-shadow);
  min-width: 200px;
  text-align: center;
  border: 2px solid var(--primary-color);
  display: flex;
  flex-direction: column;
  align-items: center;
}

#week-number {
  font-size: 2.2rem;
  /* color: var(--highlight-color); */
  margin: 0 5px;
  min-width: 50px;
  display: inline-block;
  text-align: center;
}

.week-selector {
  display: flex;
  gap: 10px;
  align-items: center;
}

#week-input {
  width: 70px;
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1.1rem;
  text-align: center;
  outline: none;
  transition: border-color 0.3s;
}

#week-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.jump-btn {
  background-color: #2ecc71;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.jump-btn:hover {
  background-color: #27ae60;
  transform: translateY(-2px);
}

.today-highlight {
  background-color: var(--highlight-color);
  color: white;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
  }
}

/* 课程表格 */
.schedule-container {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  margin-bottom: 30px;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
}

.schedule-table th {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #1a2530 100%);
  color: white;
  padding: 15px 10px;
  text-align: center;
  font-weight: 600;
}

.schedule-table td {
  padding: 15px 10px;
  border: 1px solid #eaeaea;
  text-align: center;
  vertical-align: top;
  height: 120px;
  position: relative;
  transition: all 0.2s ease;
}

.time-cell {
  background-color: #f8f9fa;
  font-weight: 600;
  color: var(--secondary-color);
  width: 100px;
}

.course-card {
  padding: 12px;
  border-radius: 8px;
  color: white;
  margin-bottom: 8px;
  font-size: 0.85rem;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.course-card:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
}

.course-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.course-name {
  font-weight: bold;
  margin-bottom: 5px;
  font-size: 0.95rem;
  position: relative;
  z-index: 2;
}

.course-detail {
  font-size: 0.8rem;
  opacity: 0.9;
  line-height: 1.4;
  position: relative;
  z-index: 2;
}

.course-teacher {
  display: block;
  margin-top: 5px;
  font-style: italic;
}

/* 课程颜色 */
.course-1 {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}
.course-2 {
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}
.course-3 {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}
.course-4 {
  background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
}
.course-5 {
  background: linear-gradient(135deg, #f39c12 0%, #d35400 100%);
}
.course-6 {
  background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
}
.course-7 {
  background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
}

/* 响应式设计 */
@media (max-width: 992px) {
  .schedule-table th,
  .schedule-table td {
    padding: 10px 5px;
    font-size: 0.9rem;
  }

  .course-card {
    padding: 8px;
    font-size: 0.8rem;
  }

  .week-controls {
    flex-direction: column;
    gap: 20px;
  }

  .current-week {
    order: 2;
  }
}

@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .container {
    overflow-x: auto;
  }

  .schedule-container {
    min-width: 700px;
  }

  h1 {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .subtitle {
    font-size: 0.95rem;
  }

  .schedule-container {
    min-width: 520px;
  }

  .current-week {
    font-size: 1.3rem;
    padding: 10px 20px;
  }

  #week-number {
    font-size: 1.8rem;
  }

  .week-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}
