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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);
  color: #fff;
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

.header {
  text-align: center;
  margin-bottom: 40px;
}

.header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: #f1f5f9;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
  font-size: 1.1rem;
  color: #cbd5e1;
}

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

.timeline-line {
  position: absolute;
  left: 150px;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, #3b82f6, #8b5cf6);
  border-radius: 2px;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 30px;
  position: relative;

  /* アニメーションの初期状態 */
  opacity: 0;
  transform: translateX(-30px);
  transition: transform 0.5s ease, opacity 0.5s ease;
  transition-delay: var(--animation-delay, 0s);
  will-change: transform, opacity;
}

.year-label {
  width: 130px;
  font-weight: bold;
  font-size: 1rem;
  color: #f8fafc;
  padding-right: 20px;
  text-align: right;
  flex-shrink: 0;
  margin-top: 15px;
}

.timeline-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin: 15px 12px 0 12px;
  z-index: 2;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
}

.timeline-content {
  flex: 1;
  margin-left: 20px;
}

.model-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: flex-start;
}

.model-card {
  /* パフォーマンス改善のため、負荷の高いbackdrop-filterを半透明の背景色に変更 */
  /* background: rgba(255, 255, 255, 0.1); */
  /* backdrop-filter: blur(10px); */
  background: rgba(51, 65, 85, 0.7);
  border-radius: 16px;
  padding: 20px;
  min-width: 280px;
  max-width: 400px;
  border: 2px solid transparent;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.model-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.model-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 16px;
  padding: 2px;
  background: var(--company-color);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
}

.company-name {
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0.8;
  margin-bottom: 8px;
  color: var(--company-color);
}

.model-name {
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 8px;
  color: #f1f5f9;
}

.model-params {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--company-color);
}

.model-features {
  font-size: 0.95rem;
  line-height: 1.4;
  color: #e2e8f0;
}

.connection-line {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

/* Company Colors */
.openai {
  --company-color: #10b981;
}
.google {
  --company-color: #3b82f6;
}
.anthropic {
  --company-color: #f97316;
}
.meta {
  --company-color: #06b6d4;
}
.xai {
  --company-color: #ec4899;
}
.deepseek {
  --company-color: #84cc16;
}
.historical {
  --company-color: #ef4444;
}
.future {
  --company-color: #8b5cf6;
}

.event-card {
  background: rgba(255, 255, 255, 0.95);
  /* パフォーマンス改善のため、負荷の高いbackdrop-filterをコメントアウト */
  color: #1a1a1a;
  /* backdrop-filter: blur(10px); */
  border-radius: 16px;
  padding: 20px;
  min-width: 280px;
  max-width: 400px;
  border: 3px solid var(--event-color);
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.event-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.event-title {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 8px;
  color: #1a1a1a;
}

.event-description {
  font-size: 0.95rem;
  line-height: 1.4;
  color: #374151;
}

.event-icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 40px 0;
  padding: 30px;
  background: rgba(30, 41, 59, 0.5); /* パフォーマンス改善のため背景色を調整 */
  border-radius: 20px;
  /* backdrop-filter: blur(10px); */
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.section-divider {
  margin: 50px 0;
  text-align: center;
  position: relative;
}

.section-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, #64748b, transparent);
}

.section-title {
  background: #1e293b;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: bold;
  font-size: 1.2rem;
  color: #f1f5f9;
  position: relative;
  z-index: 1;
  border: 2px solid #475569;
}

.future-indicator {
  opacity: 0.8;
  border-style: dashed !important;
}

/* アニメーションの実行状態 */
.timeline-item.is-visible {
  opacity: 1;
  transform: translateX(0);
}

@media (max-width: 768px) {
  .timeline-item {
    flex-direction: column;
    align-items: stretch;
  }

  .year-label {
    width: 100%;
    text-align: left;
    margin-bottom: 10px;
  }

  .timeline-line {
    display: none;
  }

  .timeline-dot {
    margin: 0;
    align-self: flex-start;
  }

  .timeline-content {
    margin-left: 0;
  }

  .model-cards {
    justify-content: center;
  }
}
