* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 微软雅黑, sans-serif;
}


body {
  background: var(--bg);
  padding: 15px;
  color: var(--text);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.top-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  align-items: center;
}

.btn {
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  background: var(--btn-bg);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.btn:hover {
  background: var(--btn-hover);
}

.btn-danger {
  background: #ff3b30;
  color: #fff;
}

.btn-danger:hover {
  background: #ff453a;
}

.week-type {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.type-btn {
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  background: var(--btn-hover);
  cursor: pointer;
  transition: background 0.2s;
}

.type-btn.active {
  background: #007aff;
  color: #fff;
}

.time-status {
  background: var(--btn-bg);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.main-status {
  font-size: 18px;
  font-weight: bold;
  color: #333;
}

.sub-status {
  font-size: 14px;
  color: #666;
  margin-top: 8px;
}

.week-box {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.week-btn {
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  background: var(--btn-bg);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: background 0.2s;
}

.week-btn.active {
  background: #007aff;
  color: #fff;
}

.set-time {
  background: var(--btn-bg);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.set-time h4 {
  margin-bottom: 10px;
  font-size: 16px;
  color: #333;
}

.time-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.time-line label {
  width: 60px;
  font-size: 14px;
}

.time-line input {
  flex: 1;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  text-align: center;
  font-size: 14px;
  transition: border 0.2s;
}

.time-line input:focus {
  border-color: #007aff;
  outline: none;
}

.time-line .del-btn {
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  background: #ff3b30;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}

.time-line .del-btn:hover {
  background: #ff453a;
}

.table-wrap {
  background: var(--btn-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-top: 20px;
  overflow-x: auto;
  isolation: isolate;
  position: relative;
  z-index: 10;
}

#courseTable {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

th {
  background: #007aff;
  color: #fff;
  padding: 12px 5px;
  font-size: 14px;
  text-align: center;
  border: 1px solid #0066dd;
}

td {
  border: 1px solid #f0f0f0;
  height: 80px;
  position: relative;
  text-align: center;
  vertical-align: middle;
  background: transparent !important;
  overflow: hidden;
}

td:first-child {
  background: var(--bg) !important;
  font-weight: bold;
  font-size: 14px;
  line-height: 80px;
}

/* 🔴 终极杀招：输入框完全透明，只保留光标，彻底消除重叠 */
.course-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: transparent !important;
  text-align: center;
  font-size: 15px;
  padding: 5px;
  outline: none;
  z-index: 3;
  /* 核心：输入框文字100%透明，只做输入载体 */
  color: transparent !important;
  /* 只保留光标可见，用户知道在输入 */
  caret-color: #000;
  resize: none;
  font-family: inherit;
  /* 强制覆盖所有JS样式 */
  all: initial !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  background: transparent !important;
  text-align: center !important;
  font-size: 15px !important;
  padding: 5px !important;
  outline: none !important;
  z-index: 3 !important;
  color: transparent !important;
  caret-color: #000 !important;
  resize: none !important;
  font-family: inherit !important;
}

/* 显示层：完全覆盖输入框，用户只看到这一层 */
.course-show {
  position: absolute;
  inset: 2px;
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
  word-break: break-all;
  padding: 2px;
  background: inherit;
  /* 强制覆盖所有JS样式 */
  all: initial !important;
  position: absolute !important;
  inset: 2px !important;
  border-radius: 6px !important;
  color: var(--text) !important;
  font-size: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 2 !important;
  pointer-events: none !important;
  word-break: break-all !important;
  padding: 2px !important;
  background: inherit !important;
}

/* 课程背景色，强制最高优先级 */
.c1 { background: #34A853 !important; }
.c2 { background: #FBBC05 !important; color: #222 !important; }
.c3 { background: #EA4335 !important; }
.c4 { background: #8E24AA !important; }
.c5 { background: #4285F4 !important; }
.c6 { background: #F06292 !important; }
.c7 { background: #00ACC1 !important; }
.c8 { background: #7CB342 !important; }
.c9 { background: #FF5722 !important; }
.c10 { background: #5C6BC0 !important; }

.week-tag {
  position: absolute;
  top: 3px;
  right: 5px;
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  z-index: 4;
  pointer-events: none;
}