/* ========== 全局样式与配色 ========== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Nunito:wght@300;400;600;700&display=swap');

:root {
  /* 配色方案 - 优雅莫兰迪色系 */
  --bg-color: #F9F6F1;
  --primary-color: #A6B1E1;
  --accent-color: #E9A6A6;
  --status-inprogress: #7D9D9C;
  --status-pending: #D4C5B9;
  --status-completed: #88B04B;
  --status-confirmed: #6B9080;
  --status-unconfirmed: #E8B4B8;
  --text-color: #2C2C2C;
  --text-secondary: #6B6B6B;
  --card-bg: #FFFFFF;
  --shadow-light: rgba(166, 177, 225, 0.08);
  --shadow-medium: rgba(166, 177, 225, 0.12);
  --shadow-hover: rgba(166, 177, 225, 0.2);
  --border-light: rgba(166, 177, 225, 0.15);
}

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

body {
  font-family: 'Nunito', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ========== 顶部标题区域 ========== */
.header {
  text-align: center;
  padding: 3rem 2rem 2rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  color: white;
  position: relative;
  box-shadow: 0 4px 12px var(--shadow-light);
}

.header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

.header p {
  font-size: 1rem;
  opacity: 0.95;
  font-weight: 300;
  margin-bottom: 1.5rem;
}

.header-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin-top: 1.5rem;
}

.header-btn {
  padding: 0.7rem 1.5rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.header-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.header-btn.primary {
  background: white;
  color: var(--primary-color);
  border-color: white;
}

.header-btn.primary:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px) scale(1.05);
}

/* ========== 主容器 ========== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
}

/* ========== 工具栏（筛选与切换） ========== */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  padding: 2rem;
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 4px 16px var(--shadow-light);
  border: 1px solid var(--border-light);
}

.filters {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.filters select {
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--border-light);
  border-radius: 10px;
  background: white;
  color: var(--text-color);
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.filters select:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px var(--shadow-medium);
  transform: translateY(-1px);
}

.filters select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(166, 177, 225, 0.1);
}

.view-toggle {
  display: flex;
  gap: 0.5rem;
}

.view-btn {
  padding: 0.75rem 1.8rem;
  border: 2px solid var(--border-light);
  border-radius: 10px;
  background: white;
  color: var(--text-color);
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.view-btn:hover {
  background: linear-gradient(135deg, rgba(166, 177, 225, 0.1), rgba(233, 166, 166, 0.1));
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-medium);
}

.view-btn.active {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  font-weight: 600;
  border-color: transparent;
  box-shadow: 0 4px 16px var(--shadow-hover);
}

/* ========== 月份导航 ========== */
.month-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.month-nav button {
  padding: 0.8rem 2rem;
  border: 2px solid var(--border-light);
  border-radius: 12px;
  background: white;
  color: var(--text-color);
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px var(--shadow-light);
}

.month-nav button:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  border-color: transparent;
  transform: scale(1.05);
  box-shadow: 0 4px 16px var(--shadow-hover);
}

.current-month {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(166, 177, 225, 0.1);
}

/* ========== 视图容器 ========== */
.view-container {
  min-height: 500px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.view-container.hidden {
  display: none;
}

/* ========== 列表视图 ========== */
.list-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

.task-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 16px var(--shadow-light);
  border-left: 6px solid var(--status-pending);
  border: 1px solid var(--border-light);
  border-left: 6px solid var(--status-pending);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.task-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.task-card:hover::before {
  opacity: 1;
}

.task-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px var(--shadow-hover);
  border-color: transparent;
}

.task-card.进行中 {
  border-left-color: var(--status-inprogress);
}

.task-card.待开始 {
  border-left-color: var(--status-pending);
}

.task-card.已完成 {
  border-left-color: var(--status-completed);
}

.task-card.已确认 {
  border-left-color: var(--status-confirmed);
}

.task-card.未确认 {
  border-left-color: var(--status-unconfirmed);
}

.task-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
  color: var(--text-color);
  font-weight: 600;
  letter-spacing: 0.3px;
}

.task-card .month {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 1rem;
  padding: 0.3rem 0.8rem;
  background: rgba(166, 177, 225, 0.1);
  border-radius: 6px;
}

.task-card .partner,
.task-card .location {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.task-card .artists {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
  line-height: 1.6;
  padding: 0.8rem;
  background: rgba(249, 246, 241, 0.5);
  border-radius: 8px;
  border-left: 3px solid var(--border-light);
}

.task-card .status-badge {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  border-radius: 25px;
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.status-badge.进行中 {
  background: var(--status-inprogress);
}

.status-badge.待开始 {
  background: var(--status-pending);
}

.status-badge.已完成 {
  background: var(--status-completed);
}

.status-badge.已确认 {
  background: var(--status-confirmed);
}

.status-badge.未确认 {
  background: var(--status-unconfirmed);
}

/* ========== 日历视图 ========== */
.calendar-view {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 8px var(--shadow-light);
}

/* 年历视图 - 按月份分组 */
.year-calendar {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.month-section {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px var(--shadow-light);
  border: 1px solid var(--border-light);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.month-section:hover {
  box-shadow: 0 8px 24px var(--shadow-hover);
  transform: translateY(-6px);
  border-color: var(--primary-color);
}

.month-header {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  padding: 1.3rem;
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.month-tasks {
  padding: 1.2rem;
  min-height: 120px;
}

.no-tasks {
  text-align: center;
  color: var(--text-secondary);
  padding: 2.5rem 0;
  font-size: 0.95rem;
  opacity: 0.6;
}

.calendar-task {
  background: var(--status-pending);
  color: white;
  padding: 1rem;
  margin-bottom: 0.8rem;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.calendar-task:hover {
  opacity: 0.9;
  transform: translateX(6px) scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.calendar-task:last-child {
  margin-bottom: 0;
}

.calendar-task .task-type {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  letter-spacing: 0.3px;
}

.calendar-task .task-artists {
  font-size: 0.85rem;
  opacity: 0.95;
  margin-bottom: 0.3rem;
}

.calendar-task .task-partner,
.calendar-task .task-location {
  font-size: 0.8rem;
  opacity: 0.9;
  margin-top: 0.3rem;
}

.calendar-task.已确认 {
  background: var(--status-confirmed);
}

.calendar-task.未确认 {
  background: var(--status-unconfirmed);
}

.calendar-task.待开始 {
  background: var(--status-pending);
}

/* 旧的日历网格样式 - 保留以防需要 */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: #ddd;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}

.calendar-header {
  background: var(--primary-color);
  color: white;
  padding: 1rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
}

.calendar-day {
  background: white;
  min-height: 100px;
  padding: 0.5rem;
  position: relative;
  transition: background 0.2s ease;
}

.calendar-day:hover {
  background: #f9f9f9;
}

.calendar-day.other-month {
  background: #f5f5f5;
  opacity: 0.5;
}

.day-number {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.3rem;
  font-weight: 600;
}

.calendar-day.other-month .day-number {
  color: #999;
}

.calendar-task {
  background: var(--status-pending);
  color: white;
  font-size: 0.7rem;
  padding: 0.2rem 0.4rem;
  margin: 0.2rem 0;
  border-radius: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.calendar-task:hover {
  opacity: 0.8;
  transform: scale(1.02);
}

.calendar-task.进行中 {
  background: var(--status-inprogress);
}

.calendar-task.已完成 {
  background: var(--status-completed);
}

/* ========== 时间轴视图 ========== */
.timeline-view {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 8px var(--shadow-light);
}

.timeline-wrapper {
  position: relative;
  padding-left: 2rem;
  max-width: 900px;
}

.timeline-wrapper::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
  border-radius: 2px;
}

.timeline-month-marker {
  position: relative;
  display: flex;
  align-items: center;
  margin: 2rem 0 1rem 0;
  padding-left: 1.5rem;
}

.timeline-month-dot {
  position: absolute;
  left: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-color);
  border: 4px solid var(--bg-color);
  box-shadow: 0 0 0 2px var(--primary-color);
  z-index: 2;
}

.timeline-month-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-color);
  background: rgba(166, 177, 225, 0.12);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.timeline-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  margin-bottom: 0.6rem;
  padding-left: 1.5rem;
  opacity: 0;
  animation: timelineFadeIn 0.4s ease forwards;
}

@keyframes timelineFadeIn {
  from {
    opacity: 0;
    transform: translateX(-15px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.timeline-dot {
  position: absolute;
  left: 3px;
  top: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-color);
  border: 2px solid var(--bg-color);
  z-index: 1;
}

.timeline-content {
  flex: 1;
  background: white;
  border-radius: 8px;
  padding: 0.7rem 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  border-left: 3px solid var(--status-pending);
  transition: all 0.3s ease;
}

.timeline-content:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateX(5px);
}

.timeline-content.已确认,
.timeline-content.待开始 {
  border-left-color: var(--status-confirmed);
}

.timeline-content.未确认 {
  border-left-color: var(--status-unconfirmed);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.timeline-type {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-color);
}

.timeline-status {
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
  font-weight: 600;
}

.timeline-status.已确认,
.timeline-status.待开始 {
  background: rgba(107, 144, 128, 0.15);
  color: var(--status-confirmed);
}

.timeline-status.未确认 {
  background: rgba(232, 180, 184, 0.15);
  color: var(--status-unconfirmed);
}

.timeline-info {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.timeline-location,
.timeline-artists {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* ========== 页脚 ========== */
.footer {
  text-align: center;
  padding: 2rem;
  margin-top: 3rem;
  color: #999;
  font-size: 0.9rem;
}

.footer a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: var(--accent-color);
}

/* ========== 页面加载动画 ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.toolbar {
  animation: fadeInUp 0.6s ease-out;
}

.month-nav {
  animation: fadeInUp 0.6s ease-out 0.1s backwards;
}

.view-container {
  animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
  .year-calendar {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .header h1 {
    font-size: 1.8rem;
  }

  .container {
    padding: 1.5rem 1rem;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem;
    gap: 1rem;
  }

  .filters,
  .view-toggle {
    flex-direction: column;
    width: 100%;
  }

  .filters select,
  .view-btn {
    width: 100%;
  }

  .month-nav {
    gap: 1rem;
    flex-wrap: wrap;
  }

  .current-month {
    font-size: 1.5rem;
    width: 100%;
    text-align: center;
  }

  .list-view {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .year-calendar {
    grid-template-columns: 1fr;
  }

  .calendar-grid {
    grid-template-columns: repeat(7, 1fr);
  }

  .calendar-day {
    min-height: 80px;
    font-size: 0.75rem;
  }

  .calendar-task {
    font-size: 0.6rem;
  }

  .timeline-card {
    margin-left: 0.5rem;
    padding: 1.5rem;
  }

  .timeline-item {
    padding-left: 1.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 1rem;
  }

  .header {
    padding: 2rem 1rem 1.5rem;
  }

  .header h1 {
    font-size: 1.5rem;
  }

  .task-card,
  .timeline-card {
    padding: 1.5rem;
  }

  .task-card h3,
  .timeline-card h3 {
    font-size: 1.3rem;
  }

  .calendar-day {
    min-height: 60px;
    padding: 0.3rem;
  }

  .day-number {
    font-size: 0.75rem;
  }

  .month-nav button {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }
}

/* ========== 加载动画 ========== */
.loading {
  text-align: center;
  padding: 3rem;
  font-size: 1.2rem;
  color: var(--primary-color);
}

.loading::after {
  content: '...';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%, 20% {
    content: '.';
  }
  40% {
    content: '..';
  }
  60%, 100% {
    content: '...';
  }
}

/* ========== 空状态 ========== */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: #999;
}

.empty-state p {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}
