/* 自定义样式 - 电力系统大停电事故案例库 */

/* 视频容器 - 响应式嵌入 */
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 比例 */
  height: 0;
  overflow: hidden;
  margin: 1.5rem 0;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* 信息框样式增强 */
.md-typeset .admonition.info,
.md-typeset details.info {
  border-color: #448aff;
}

.md-typeset .admonition.warning,
.md-typeset details.warning {
  border-color: #ff9100;
}

/* 表格样式优化 */
.md-typeset table:not([class]) {
  font-size: 0.85rem;
  border-collapse: collapse;
}

.md-typeset table:not([class]) th {
  background-color: #f5f5f5;
  font-weight: 600;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
  background-color: #2d2d2d;
}

/* 贡献者信息区块 */
.contributor-info {
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 2rem;
}

[data-md-color-scheme="slate"] .contributor-info {
  background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
}

/* 首页卡片网格 */
.grid.cards > ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
}

.grid.cards > ul > li {
  background: var(--md-default-bg-color);
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 8px;
  padding: 1.5rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

.grid.cards > ul > li:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* 时间线样式 */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--md-primary-fg-color);
}

.timeline-item {
  position: relative;
  padding-bottom: 1.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  background: var(--md-primary-fg-color);
  border-radius: 50%;
  transform: translateX(-5px);
}

/* 状态标签 */
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge.completed {
  background-color: #4caf50;
  color: white;
}

.status-badge.pending {
  background-color: #ff9800;
  color: white;
}

.status-badge.in-progress {
  background-color: #2196f3;
  color: white;
}

/* Mermaid 图表居中 */
.md-typeset .mermaid {
  text-align: center;
  margin: 1.5rem 0;
}

/* 打印样式 */
@media print {
  .md-sidebar,
  .md-header,
  .md-footer {
    display: none !important;
  }
  
  .md-content {
    margin: 0 !important;
    max-width: 100% !important;
  }
}
