/* ===== 星光活动日历 6-7 ===== */
.cal-page {
  position: relative;
  width: 100%;
  min-height: 100%;
  height: auto;
  align-self: flex-start;
  border-radius: 24px;
  overflow: visible;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.cal-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.cal-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.cal-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(80, 70, 180, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse at 70% 80%, rgba(30, 70, 160, 0.25) 0%, transparent 50%),
    linear-gradient(180deg, rgba(10, 14, 56, 0.58) 0%, rgba(8, 12, 48, 0.75) 100%);
  pointer-events: none;
}

.cal-content {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 24px 36px;
  overflow: visible;
}

/* ===== 顶部标题 ===== */
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}

.cal-header-left {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

.cal-title {
  font-size: 28px;
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: 2px;
  text-shadow:
    0 0 20px rgba(120, 150, 255, 0.8),
    0 0 40px rgba(110, 80, 220, 0.45),
    0 4px 12px rgba(0, 0, 0, 0.5);
}

.cal-subtitle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #C8D8FF;
  font-weight: 600;
  letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.cal-star {
  color: #FFD166;
  font-size: 12px;
  text-shadow: 0 0 12px rgba(255, 209, 102, 0.9);
}

.cal-toggle {
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: 16px;
  background: rgba(28, 36, 110, 0.7);
  border: 1px solid rgba(120, 150, 255, 0.2);
  flex-shrink: 0;
}

.cal-toggle-btn {
  padding: 6px 18px;
  border-radius: 12px;
  border: none;
  font-size: 13px;
  font-weight: 700;
  color: rgba(200, 215, 255, 0.75);
  background: transparent;
  cursor: pointer;
  transition: all 0.25s ease;
}

.cal-toggle-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
}

.cal-toggle-btn.active {
  color: #5C3D05;
  background: linear-gradient(135deg, #FFECB3, #FFD166);
  box-shadow: 0 3px 10px rgba(244, 197, 66, 0.4);
}

/* ===== 中部三列 ===== */
.cal-body {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}

.cal-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(28, 36, 110, 0.74) 0%, rgba(18, 24, 84, 0.8) 100%);
  border: 1px solid rgba(120, 150, 255, 0.18);
  box-shadow:
    0 10px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.cal-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  color: #FFFFFF;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.cal-panel-icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.cal-panel-icon-text {
  font-size: 18px;
  line-height: 1;
}

/* ===== 左侧日历 ===== */
.cal-calendar-panel {
  flex: 1.5;
  min-width: 0;
}

.cal-month-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.cal-month-label {
  font-size: 17px;
  font-weight: 800;
  color: #FFD166;
  letter-spacing: 1px;
  text-shadow: 0 0 14px rgba(255, 209, 102, 0.5);
}

.cal-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(150, 170, 255, 0.3);
  background: rgba(100, 120, 220, 0.25);
  color: #FFFFFF;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cal-nav-btn:hover {
  background: rgba(255, 209, 102, 0.3);
  border-color: rgba(255, 209, 102, 0.5);
  transform: scale(1.1);
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(120, 150, 255, 0.15);
}

.cal-weekdays span {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: rgba(180, 200, 255, 0.75);
}

.cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  padding-top: 6px;
}

.cal-day {
  aspect-ratio: 1/0.78;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(120, 150, 255, 0.08);
  transition: all 0.2s ease;
  cursor: pointer;
}

.cal-day:hover {
  background: rgba(100, 120, 220, 0.2);
  border-color: rgba(150, 170, 255, 0.3);
  transform: scale(1.06);
}

.cal-day-other .cal-day-num {
  color: rgba(150, 165, 220, 0.35);
}

.cal-day-num {
  font-size: 13px;
  font-weight: 700;
  color: #E0E8FF;
}

.cal-day-markers {
  display: flex;
  gap: 3px;
}

.cal-marker {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  display: inline-block;
}

.cal-marker-green { background: #6FE3A5; box-shadow: 0 0 6px rgba(111, 227, 165, 0.8); }
.cal-marker-orange { background: #FFB45A; box-shadow: 0 0 6px rgba(255, 180, 90, 0.8); }
.cal-marker-blue { background: #6FB6FF; box-shadow: 0 0 6px rgba(111, 182, 255, 0.8); }

.cal-day-today {
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.35), rgba(244, 197, 66, 0.25));
  border: 2px solid #FFD166;
  box-shadow: 0 0 18px rgba(255, 209, 102, 0.45);
}

.cal-day-today .cal-day-num {
  color: #FFD166;
  font-weight: 900;
  font-size: 15px;
}
.cal-day.is-selected:not(.cal-day-today) {
  outline: 2px solid rgba(255, 209, 102, 0.7);
}
.cal-empty {
  margin: 10px 4px;
  color: rgba(255,255,255,0.7);
  font-size: 13px;
}

.cal-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-top: 8px;
  border-top: 1px solid rgba(120, 150, 255, 0.15);
}

.cal-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(200, 215, 255, 0.8);
}

/* ===== 中间时间轴 ===== */
.cal-timeline-panel {
  flex: 1.2;
  min-width: 0;
}

.cal-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 8px;
}

.cal-timeline::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(180deg, rgba(111, 227, 165, 0.6), rgba(255, 180, 90, 0.6), rgba(111, 182, 255, 0.6));
  border-radius: 2px;
}

.cal-timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.cal-timeline-item:hover {
  background: rgba(100, 120, 220, 0.14);
  transform: translateX(4px);
}

.cal-timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 14px;
  margin-left: 0;
  border: 2px solid rgba(255, 255, 255, 0.6);
  z-index: 1;
}

.cal-dot-green { background: #6FE3A5; box-shadow: 0 0 10px rgba(111, 227, 165, 0.8); }
.cal-dot-orange { background: #FFB45A; box-shadow: 0 0 10px rgba(255, 180, 90, 0.8); }
.cal-dot-blue { background: #6FB6FF; box-shadow: 0 0 10px rgba(111, 182, 255, 0.8); }

.cal-timeline-time {
  font-size: 15px;
  font-weight: 900;
  color: #FFD166;
  width: 48px;
  flex-shrink: 0;
  margin-top: 12px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.cal-timeline-body {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(120, 150, 255, 0.1);
}

.cal-timeline-img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.cal-timeline-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.cal-timeline-name {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-timeline-status {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
}

.cal-status-green { color: #0E4A2A; background: #6FE3A5; }
.cal-status-orange { color: #5C3405; background: #FFB45A; }
.cal-status-blue { color: #0E3A5C; background: #6FB6FF; }

/* ===== 右侧栏 ===== */
.cal-sidebar {
  flex: 1.1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cal-sidebar .cal-panel {
  flex: 1;
}

/* 今天的安排 */
.cal-today-list,
.cal-upcoming-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cal-today-item,
.cal-upcoming-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(120, 150, 255, 0.1);
  cursor: pointer;
  transition: all 0.25s ease;
}

.cal-today-item:hover,
.cal-upcoming-item:hover {
  background: rgba(100, 120, 220, 0.16);
  transform: translateX(3px);
  border-color: rgba(150, 170, 255, 0.25);
}

.cal-today-img,
.cal-upcoming-img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.cal-today-info,
.cal-upcoming-info {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.cal-today-name,
.cal-upcoming-name {
  font-size: 12px;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-today-status {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
  flex-shrink: 0;
}

.cal-upcoming-countdown {
  font-size: 11px;
  font-weight: 800;
  color: #FFD166;
  flex-shrink: 0;
}

/* 我的预约 */
.cal-remind-switch {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.cal-remind-switch input {
  display: none;
}

.cal-switch-track {
  width: 34px;
  height: 18px;
  border-radius: 10px;
  background: rgba(120, 140, 220, 0.35);
  position: relative;
  transition: all 0.25s ease;
  border: 1px solid rgba(150, 170, 255, 0.25);
}

.cal-switch-thumb {
  position: absolute;
  top: 1px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #FFFFFF;
  transition: all 0.25s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.cal-remind-switch input:checked + .cal-switch-track {
  background: linear-gradient(135deg, #6FE3A5, #3BA972);
  border-color: rgba(111, 227, 165, 0.5);
}

.cal-remind-switch input:checked + .cal-switch-track .cal-switch-thumb {
  left: 17px;
}

.cal-switch-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(200, 215, 255, 0.8);
}

.cal-bookings-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cal-booking-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(120, 150, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
}

.cal-booking-item:hover {
  background: rgba(100, 120, 220, 0.16);
  transform: translateX(3px);
}

.cal-booking-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cal-booking-name {
  font-size: 12px;
  font-weight: 700;
  color: #E0E8FF;
}

/* 活动足迹 */
.cal-footprint {
  display: flex;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px dashed rgba(120, 150, 255, 0.2);
}

.cal-footprint-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(120, 150, 255, 0.1);
  transition: all 0.25s ease;
}

.cal-footprint-item:hover {
  transform: translateY(-2px);
  background: rgba(255, 209, 102, 0.1);
  border-color: rgba(255, 209, 102, 0.3);
}

.cal-footprint-num {
  font-size: 18px;
  font-weight: 900;
  color: #FFD166;
  text-shadow: 0 0 10px rgba(255, 209, 102, 0.5);
}

.cal-footprint-label {
  font-size: 10px;
  font-weight: 600;
  color: rgba(200, 215, 255, 0.75);
}

/* ===== 底部推荐区 ===== */
.cal-section {
  flex-shrink: 0;
}

.cal-section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 10px;
  text-shadow: 0 0 16px rgba(120, 150, 255, 0.7), 0 2px 8px rgba(0, 0, 0, 0.4);
}

.cal-recommend-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.cal-recommend-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(120, 150, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.cal-recommend-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 209, 102, 0.45);
  box-shadow: 0 14px 36px rgba(60, 70, 190, 0.45);
}

.cal-recommend-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.cal-recommend-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 22px 12px 10px;
  background: linear-gradient(180deg, transparent, rgba(8, 12, 48, 0.9));
}

.cal-recommend-name {
  font-size: 13px;
  font-weight: 800;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-recommend-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
  flex-shrink: 0;
}

.cal-tag-green { color: #0E4A2A; background: #6FE3A5; }
.cal-tag-orange { color: #5C3405; background: #FFB45A; }
.cal-tag-blue { color: #0E3A5C; background: #6FB6FF; }

/* 探索世界 */
.cal-worlds-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.cal-world-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(28, 36, 110, 0.7) 0%, rgba(18, 24, 84, 0.75) 100%);
  border: 1px solid rgba(120, 150, 255, 0.18);
  cursor: pointer;
  transition: all 0.3s ease;
}

.cal-world-card:hover {
  transform: translateY(-4px) scale(1.04);
  border-color: rgba(255, 209, 102, 0.45);
  box-shadow: 0 10px 26px rgba(60, 70, 190, 0.4);
}

.cal-world-card img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(150, 170, 255, 0.3);
}

.cal-world-name {
  font-size: 12px;
  font-weight: 700;
  color: #E0E8FF;
  text-align: center;
}

/* ===== Toast 提示 ===== */
.cal-toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(30, 40, 120, 0.95), rgba(50, 30, 100, 0.95));
  border: 1px solid rgba(255, 215, 100, 0.3);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(120, 100, 220, 0.2);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  white-space: nowrap;
}

.cal-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== 响应式 ===== */
@media (max-width: 1300px) {
  .cal-title {
    font-size: 24px;
  }
}

@media (max-width: 1100px) {
  .cal-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .cal-body {
    flex-direction: column;
  }

  .cal-recommend-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cal-worlds-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
