/* 皓文的大学成长计划 - 蓝色主题 */
:root {
  --primary: #1565c0;
  --secondary: #0d47a1;
  --accent: #42a5f5;
  --light: #e3f2fd;
  --dark: #0d2137;
  --success: #2e7d32;
  --warning: #f57c00;
  --danger: #c62828;
  --gray: #546e7a;
  --card-bg: #ffffff;
  --header-gradient: linear-gradient(135deg, #0d47a1, #1565c0, #42a5f5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  background: var(--light);
  color: var(--dark);
  line-height: 1.6;
}

header {
  background: var(--header-gradient);
  color: white;
  padding: 1.8rem 2rem;
  box-shadow: 0 4px 15px rgba(13, 71, 161, 0.3);
  text-align: center;
}

header h1 {
  font-size: 2rem;
  margin-bottom: 0.4rem;
  font-weight: 700;
  letter-spacing: 1px;
}

header p {
  opacity: 0.95;
  font-size: 1rem;
}

nav {
  background: white;
  padding: 0.9rem 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

nav a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.3s;
}

nav a:hover, nav a.active {
  background: var(--primary);
  color: white;
}

.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.card {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 1.2rem 1.4rem;
  margin-bottom: 1.2rem;
  box-shadow: 0 4px 20px rgba(13, 71, 161, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
  border-top: 3px solid var(--accent);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(13, 71, 161, 0.15);
}

.card h2, .card h3 {
  color: var(--secondary);
  margin-bottom: 1rem;
  border-left: 5px solid var(--primary);
  padding-left: 0.8rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.overview-card {
  background: white;
  border-radius: 10px;
  padding: 1rem 0.8rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
  text-decoration: none;
  color: inherit;
  transition: all 0.3s;
  border: 1px solid #bbdefb;
}

.overview-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(21, 101, 192, 0.2);
  border-color: var(--primary);
}

.overview-card .icon {
  font-size: 2.5rem;
  margin-bottom: 0.8rem;
}

.overview-card h3 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.progress-bar {
  background: #e3f2fd;
  border-radius: 10px;
  height: 14px;
  overflow: hidden;
  margin: 0.8rem 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 10px;
  transition: width 0.5s ease;
}

.progress-text {
  font-size: 0.9rem;
  color: var(--gray);
}

/* 甘特图样式 */
.gantt-container {
  overflow-x: auto;
}

.gantt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.gantt-table th, .gantt-table td {
  border: 1px solid #bbdefb;
  padding: 0.6rem;
  text-align: center;
}

.gantt-table th {
  background: var(--primary);
  color: white;
}

.gantt-bar {
  background: var(--accent);
  color: white;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  display: inline-block;
  min-width: 60%;
}

.task-list {
  list-style: none;
}

.task-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid #e3f2fd;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.task-list li:last-child {
  border-bottom: none;
}

.task-list input[type="checkbox"] {
  margin-top: 0.3rem;
  accent-color: var(--primary);
}

.task-list label.completed {
  text-decoration: line-through;
  color: var(--gray);
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: bold;
  margin-right: 0.5rem;
}

.badge-high {
  background: #ffebee;
  color: #c62828;
}

.badge-medium {
  background: #fff3e0;
  color: #e65100;
}

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
  padding-left: 1rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.7rem;
  top: 0.3rem;
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 0 2px var(--primary);
}

.timeline-item .date {
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 0.3rem;
}

footer {
  text-align: center;
  padding: 1.5rem;
  background: var(--secondary);
  color: white;
  margin-top: 2rem;
}

footer p {
  opacity: 0.9;
}

/* Modal and other styles preserved with blue tweaks */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(13, 33, 55, 0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-content h3 {
  color: var(--secondary);
  margin-bottom: 1rem;
}

.modal-content textarea {
  width: 100%;
  min-height: 150px;
  padding: 0.8rem;
  border: 1px solid #bbdefb;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
}

.modal-content textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.modal-actions {
  display: flex;
  gap: 0.8rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.modal-actions button {
  padding: 0.5rem 1.2rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
}

.btn-save {
  background: var(--primary);
  color: white;
}

.btn-save:hover {
  background: var(--secondary);
}

.btn-cancel {
  background: #eee;
  color: #333;
}

.btn-cancel:hover {
  background: #ddd;
}

.photo-section {
  margin-top: 1rem;
}

.photo-upload-area {
  border: 2px dashed #90caf9;
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1rem;
  background: #f5faff;
}

.photo-upload-area input[type="file"] {
  display: none;
}

.photo-upload-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
}

.photo-upload-btn:hover {
  background: var(--secondary);
}

.photo-preview-container {
  display: none;
  margin: 1rem 0;
  text-align: center;
}

.photo-preview-container.active {
  display: block;
}

.photo-preview-container img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.photo-controls {
  margin-top: 0.8rem;
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
}

.photo-controls button {
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.btn-rotate {
  background: var(--accent);
  color: white;
}

.btn-confirm {
  background: var(--success);
  color: white;
}

.btn-cancel-photo {
  background: #eee;
  color: #333;
}

.inserted-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.inserted-photo-item {
  position: relative;
  max-width: 200px;
}

.inserted-photo-item img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.inserted-photo-item .delete-photo {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(198, 40, 40, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 14px;
}

.quarter-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.quarter-table th, .quarter-table td {
  border: 1px solid #bbdefb;
  padding: 0.7rem;
  text-align: left;
}

.quarter-table th {
  background: var(--primary);
  color: white;
}

.quarter-table tr:nth-child(even) {
  background: #f5faff;
}

@media (max-width: 768px) {
  header, nav, .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  header h1 {
    font-size: 1.5rem;
  }
  nav a {
    margin-right: 0;
    font-size: 0.85rem;
    padding: 0.4rem 0.7rem;
  }
  .gantt-table {
    font-size: 0.8rem;
  }
}

/* 日历增强 */
#calendarGrid > div {
  transition: background 0.2s;
}
#calendarGrid > div:hover {
  background: #bbdefb !important;
}

/* 首页顶部左右分栏 */
.top-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.2rem;
  align-items: start;
}

.top-split .card {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .top-split {
    grid-template-columns: 1fr;
  }
}

/* 英语六级课程列表 */
.cet6-scroll {
  max-height: 460px;
  overflow-y: auto;
  margin-top: 0.6rem;
}

.cet6-group {
  position: sticky;
  top: 0;
  background: white;
  color: var(--secondary);
  font-weight: bold;
  font-size: 0.85rem;
  padding: 0.35rem 0.4rem;
  border-bottom: 1px solid #bbdefb;
  z-index: 1;
}

.cet6-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.4rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.cet6-item:hover {
  background: var(--light);
}

.cet6-num {
  flex: none;
  width: 2rem;
  text-align: right;
  color: var(--gray);
  font-size: 0.78rem;
}

.cet6-name {
  flex: 1;
  min-width: 0;
}

.cet6-item.watched .cet6-name {
  color: var(--gray);
  text-decoration: line-through;
}

.cet6-dur {
  flex: none;
  color: var(--gray);
  font-size: 0.75rem;
}

.cet6-mark {
  flex: none;
  width: 22px;
  height: 22px;
  border: 1px solid #bbdefb;
  border-radius: 4px;
  background: white;
  color: var(--success);
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
}

.cet6-item.watched .cet6-mark {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.cet6-empty {
  padding: 0.4rem;
  color: #999;
  font-size: 0.85rem;
}

/* 六级播放弹窗 */
.cet6-modal-content {
  max-width: 900px;
  width: 92%;
}

.cet6-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.cet6-modal-head h3 {
  margin: 0;
  border: none;
  padding: 0;
  font-size: 1rem;
}

.player-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 8px;
  background: #000;
}

/* 登录状态与弹窗 */
.auth-box {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 0.6rem;
}

.auth-box button {
  border: 1px solid #bbdefb;
  background: white;
  color: var(--primary);
  border-radius: 6px;
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.auth-box button:hover {
  background: var(--primary);
  color: white;
}

.auth-on {
  font-size: 0.85rem;
  color: var(--success);
  font-weight: bold;
}

.auth-modal .auth-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.auth-modal .auth-row label {
  flex: none;
  width: 4rem;
  font-size: 0.9rem;
  color: var(--secondary);
}

.auth-modal .auth-row input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.6rem;
  border: 1px solid #bbdefb;
  border-radius: 6px;
  font-size: 1rem;
}

/* 上传确认区与作业展示 */
.upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  margin-bottom: 0.8rem;
}

.upload-row label {
  font-size: 0.9rem;
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.upload-row select {
  padding: 0.35rem 0.5rem;
  border: 1px solid #bbdefb;
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
  background: white;
}

.pending-box {
  border: 2px dashed var(--accent);
  border-radius: 8px;
  padding: 0.8rem;
  background: #f5faff;
  text-align: center;
}

.pending-info {
  font-size: 0.85rem;
  color: var(--secondary);
  margin-bottom: 0.5rem;
  word-break: break-all;
}

#pendingImg {
  max-width: 100%;
  max-height: 52vh;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.wall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.wall-item {
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  background: white;
  cursor: zoom-in;
}

.wall-item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.wall-cap {
  padding: 0.5rem;
  font-size: 0.85rem;
}

.wall-sub {
  color: #666;
  font-size: 0.78rem;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hw-group h3 {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.6rem;
}

.hw-count {
  font-size: 0.8rem;
  color: var(--gray);
  font-weight: normal;
}

.lightbox-content {
  max-width: 1000px;
  width: 94%;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.lightbox-content img {
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  background: #000;
}

.lightbox-cap {
  color: white;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}

