/* Sidebar / Timeline CSS extracted from main.css */

/* 浮动时间线侧边栏样式 */
.timeline-sidebar {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 320px;
  height: auto;
  max-height: 80vh;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 16px 0 0 16px;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-right: none;
  z-index: 100;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow: hidden;
  min-width: 50px; /* 确保收起时有最小宽度 */
  display: flex;
  flex-direction: column;
}

.timeline-sidebar.collapsed {
  transform: translateY(-50%) translateX(calc(100% - 50px));
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  background: transparent;
  width: 50px;
  min-width: 50px;
  border-radius: 25px 0 0 25px;
  height: auto;
}

/* Collapsed header & toggle btn */
.timeline-sidebar.collapsed .timeline-sidebar-header {
  padding: 16px 8px;
  justify-content: center;
  border-bottom: none;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  min-height: 64px;
  box-sizing: border-box;
  border-radius: 25px;
}

.timeline-sidebar.collapsed .timeline-sidebar-title {
  display: none;
}

.timeline-sidebar.collapsed .timeline-sidebar-content {
  display: none;
}

.timeline-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(0, 82, 217, 0.05);
  flex-shrink: 0;
}

.timeline-sidebar-title {
  font-size: 16px;
  font-weight: 700;
  color: #1d1d1f;
}

.timeline-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.timeline-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: scale(1.05);
}

.timeline-sidebar.collapsed .timeline-toggle-btn {
  background: rgba(0, 82, 217, 0.1);
  border: 1px solid rgba(0, 82, 217, 0.2);
}

.timeline-sidebar.collapsed .timeline-toggle-btn:hover {
  background: rgba(0, 82, 217, 0.15);
}

.timeline-toggle-icon {
  width: 18px;
  height: 18px;
  color: #666;
  transition: transform 0.3s ease;
}

.timeline-sidebar-content {
  flex: 1 1 auto;
  height: auto;
  overflow-y: auto;
  padding: 16px 0;
}

.compact-timeline {
  position: relative;
  padding: 0 20px;
}

.compact-timeline::before {
  content: '';
  position: absolute;
  left: 32px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent 0%, #0052D9 10%, #007AFF 30%, #34C759 50%, #FF9500 70%, #FF3B30 90%, transparent 100%);
  border-radius: 1px;
}

.compact-timeline-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeInRight 0.5s ease-out forwards;
}

.compact-timeline-item:nth-child(1) { animation-delay: 0.1s; }
.compact-timeline-item:nth-child(2) { animation-delay: 0.2s; }
.compact-timeline-item:nth-child(3) { animation-delay: 0.3s; }
.compact-timeline-item:nth-child(4) { animation-delay: 0.4s; }
.compact-timeline-item:nth-child(5) { animation-delay: 0.5s; }
.compact-timeline-item:nth-child(6) { animation-delay: 0.6s; }
.compact-timeline-item:nth-child(7) { animation-delay: 0.7s; }

@keyframes fadeInRight {
  0% { opacity: 0; transform: translateX(20px); }
  100% { opacity: 1; transform: translateX(0); }
}

.compact-timeline-marker {
  position: relative;
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  background: #fff;
  border: 2px solid #0052D9;
  border-radius: 50%;
  margin-right: 16px;
  margin-top: 4px;
  z-index: 2;
}

.compact-timeline-item.latest .compact-timeline-marker {
  width: 14px;
  height: 14px;
  border-color: #FF3B30;
  background: #FF3B30;
  box-shadow: 0 0 8px rgba(255, 59, 48, 0.4);
  animation: compactPulse 2s infinite;
}

@keyframes compactPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.compact-timeline-content { flex: 1; min-width: 0; }

.compact-timeline-date {
  font-size: 11px;
  color: #8e8e93;
  font-weight: 500;
  margin-bottom: 4px;
}

.compact-timeline-version {
  display: inline-block;
  background: linear-gradient(135deg, #0052D9, #007AFF);
  color: white;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
  margin-bottom: 6px;
}

.compact-timeline-item.latest .compact-timeline-version {
  background: linear-gradient(135deg, #FF3B30, #FF9500);
  animation: compactGlow 2s ease-in-out infinite alternate;
}

@keyframes compactGlow {
  0% { box-shadow: 0 0 3px rgba(255, 59, 48, 0.3); }
  100% { box-shadow: 0 0 8px rgba(255, 59, 48, 0.6); }
}

.compact-timeline-title {
  font-size: 13px;
  font-weight: 600;
  color: #1d1d1f;
  line-height: 1.3;
  margin: 0;
}

/* 平台标签样式 */
.compact-timeline-platforms {
  margin-top: 4px;
  margin-bottom: 6px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.platform-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.platform-tag::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0.1;
  border-radius: 6px;
}

.platform-tag.miniprogram {
  background: linear-gradient(135deg, #07C160, #00D976);
  color: white;
  box-shadow: 0 1px 3px rgba(7, 193, 96, 0.3);
}

.platform-tag.miniprogram::before {
  background: linear-gradient(135deg, #ffffff, #ffffff);
}

.platform-tag.web {
  background: linear-gradient(135deg, #0052D9, #007AFF);
  color: white;
  box-shadow: 0 1px 3px rgba(0, 82, 217, 0.3);
}

.platform-tag.web::before {
  background: linear-gradient(135deg, #ffffff, #ffffff);
}

.platform-tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* 为不同平台添加图标效果 */
.platform-tag.miniprogram::after {
  content: '📱';
  margin-left: 2px;
  font-size: 8px;
  opacity: 0.8;
}

.platform-tag.web::after {
  content: '🌐';
  margin-left: 2px;
  font-size: 8px;
  opacity: 0.8;
}
