/* 全域設定 */
body {
  font-family: "Microsoft JhengHei", sans-serif;
  background: linear-gradient(to bottom, #f0f4f8, #d9e2ec);
  margin: 20px;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  max-width: 1200px;
  margin: 0 auto;
}

h2 {
  text-align: center;
  color: #333;
  font-size: 28px;
  margin-bottom: 20px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* 課表外框，用於橫向滑動 */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* 滑動順暢 */
}

/* 表格樣式 */
table {
  width: 100%;
  min-width: 900px; /* 固定最小寬度，避免手機壓縮跑掉 */
  border-collapse: collapse;
  text-align: center;
  background: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

th, td {
  border: 1px solid #ddd;
  padding: 12px;
  min-width: 140px;
  vertical-align: top;
  transition: background 0.3s ease;
}

th {
  background: #4a90e2;
  color: white;
  font-weight: bold;
  text-transform: uppercase;
}

.time-col {
  width: 150px;
  background: #f7f9fc;
  font-weight: bold;
  color: #555;
}

.editable {
  height: 100px;
}

.section {
  background: #e9f1fa;
  font-weight: bold;
  color: #333;
  font-size: 16px;
}

.cell-content {
  text-align: left;
  font-size: 14px;
  line-height: 1.5em;
  padding: 5px;
  border-radius: 5px;
  background: #f9f9f9;
}

.cell-content div {
  border-bottom: 1px dashed #eee;
  padding: 4px 0;
  display: flex;
  align-items: center;
}

.cell-content div:last-child {
  border-bottom: none;
}

.cell-content div::before {
  content: "• ";
  color: #4a90e2;
  margin-right: 5px;
}

/* 標註今天 - 柔和樣式 */
.today {
  background: #e3f2fd !important; /* 淺藍色背景 */
  border-left: 4px solid #2196f3; /* 藍色邊框 */
  box-shadow: inset 0 0 10px rgba(33, 150, 243, 0.2); /* 輕微陰影效果 */
  font-weight: bold;
}

/* 清除按鈕 */
#clearBtn {
  display: block;
  margin: 20px auto;
  padding: 10px 20px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.3s ease;
}

#clearBtn:hover {
  background: #c82333;
}
