/* n8n工作流自动化指南 - 现代美观样式 */

/* 全局变量定义 */
:root {
  --primary-color: #00bcd4;
  --primary-dark: #0097a7;
  --accent-color: #009688;
  --accent-light: #4db6ac;
  --success-color: #4caf50;
  --warning-color: #ff9800;
  --error-color: #f44336;
  --text-color: #333;
  --bg-color: #ffffff;
  --card-bg: #f8f9fa;
  --border-color: #e0e0e0;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
  --border-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 暗色模式变量 */
[data-md-color-scheme="slate"] {
  --primary-color: #26c6da;
  --primary-dark: #00acc1;
  --accent-color: #4dd0e1;
  --accent-light: #80deea;
  --text-color: #e0e0e0;
  --bg-color: #1e1e1e;
  --card-bg: #2d2d2d;
  --border-color: #404040;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* 英雄横幅样式 */
.hero-banner {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  color: white;
  padding: 4rem 2rem;
  margin: -2rem -2rem 3rem -2rem;
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="20" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="80" cy="30" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-banner h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* 现代按钮样式 */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  text-decoration: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  text-align: center;
  font-size: 1rem;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: white;
  color: var(--primary-color);
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  color: var(--primary-dark);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid white;
}

.btn-secondary:hover {
  background: white;
  color: var(--primary-color);
  transform: translateY(-2px);
}

/* 特色网格布局 */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.feature-card,
.content-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

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

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card:hover,
.content-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-color);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.feature-card h3,
.content-card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-weight: 600;
}

/* 统计数据网格 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
  text-align: center;
}

.stat-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 2rem 1rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-item:hover::after {
  opacity: 0.05;
}

.stat-item:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-hover);
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.8;
  position: relative;
  z-index: 1;
}

/* 警告框样式增强 */
.md-typeset .admonition {
  border-radius: var(--border-radius);
  border: none;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin: 1.5rem 0;
}

.md-typeset .admonition.tip {
  background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
  border-left: 4px solid var(--success-color);
}

.md-typeset .admonition.info {
  background: linear-gradient(135deg, #e3f2fd 0%, #f0f8ff 100%);
  border-left: 4px solid var(--primary-color);
}

.md-typeset .admonition.warning {
  background: linear-gradient(135deg, #fff3e0 0%, #fef8f0 100%);
  border-left: 4px solid var(--warning-color);
}

/* 表格样式增强 */
.md-typeset table {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 1.5rem 0;
}

.md-typeset table thead {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
}

.md-typeset table thead th {
  border: none;
  padding: 1rem;
  font-weight: 600;
}

.md-typeset table tbody tr {
  transition: var(--transition);
}

.md-typeset table tbody tr:hover {
  background: rgba(var(--primary-color), 0.05);
}

.md-typeset table tbody td {
  border: none;
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
}

/* 标签页样式 */
.md-typeset .tabbed-set {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin: 1.5rem 0;
}

.md-typeset .tabbed-labels {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
}

.md-typeset .tabbed-labels > label {
  transition: var(--transition);
}

.md-typeset .tabbed-labels > label:hover {
  background: rgba(var(--primary-color), 0.1);
}

.md-typeset .tabbed-set input:checked + label {
  background: var(--primary-color);
  color: white;
}

/* 代码块增强 */
.md-typeset .highlight {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 1.5rem 0;
}

.md-typeset .highlight > pre {
  margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .hero-banner {
    padding: 2rem 1rem;
    margin: -1rem -1rem 2rem -1rem;
  }
  
  .hero-banner h1 {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .feature-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-number {
    font-size: 2rem;
  }
}

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feature-card,
.content-card,
.stat-item {
  animation: fadeInUp 0.6s ease forwards;
}

.feature-card:nth-child(2) { animation-delay: 0.1s; }
.feature-card:nth-child(3) { animation-delay: 0.2s; }
.feature-card:nth-child(4) { animation-delay: 0.3s; }
.feature-card:nth-child(5) { animation-delay: 0.4s; }
.feature-card:nth-child(6) { animation-delay: 0.5s; }

/* 链接样式增强 */
.md-typeset a {
  color: var(--primary-color);
  transition: var(--transition);
}

.md-typeset a:hover {
  color: var(--primary-dark);
  text-decoration: none;
}

/* 导航增强 */
.md-nav__link--active {
  color: var(--primary-color) !important;
}

.md-nav__link:hover {
  color: var(--primary-color) !important;
}

/* 搜索框增强 */
.md-search__form {
  border-radius: var(--border-radius);
}

.md-search__input {
  border-radius: var(--border-radius);
}

/* 页脚样式 */
.md-footer {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* 工作流图表样式 */
.workflow-diagram {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: var(--shadow);
}

.workflow-step {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.step-box {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius);
  text-align: center;
  font-weight: 600;
  min-width: 120px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
}

.step-box:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.step-box.trigger {
  background: linear-gradient(135deg, #2196f3, #21cbf3);
}

.step-box.process {
  background: linear-gradient(135deg, #9c27b0, #e91e63);
}

.step-box.request {
  background: linear-gradient(135deg, #4caf50, #8bc34a);
}

.step-box.output {
  background: linear-gradient(135deg, #ff9800, #ffc107);
}

.step-box small {
  display: block;
  font-size: 0.8rem;
  opacity: 0.9;
  margin-top: 0.25rem;
}

.arrow {
  font-size: 1.5rem;
  color: var(--primary-color);
  font-weight: bold;
  margin: 0 0.5rem;
}

/* 学习路径样式 */
.learning-path {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: var(--shadow);
}

.path-level {
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  background: var(--bg-color);
}

.level-header {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  padding: 1rem 1.5rem;
  font-weight: 600;
  font-size: 1.1rem;
}

.level-content {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.learning-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  transition: var(--transition);
  font-weight: 500;
}

.learning-item:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.path-arrow {
  text-align: center;
  font-size: 2rem;
  margin: 1rem 0;
  color: var(--primary-color);
}

/* 响应式设计 - 工作流图表 */
@media (max-width: 768px) {
  .workflow-step {
    flex-direction: column;
  }
  
  .arrow {
    transform: rotate(90deg);
    margin: 0.5rem 0;
  }
  
  .step-box {
    min-width: 200px;
    width: 100%;
  }
  
  .level-content {
    grid-template-columns: 1fr;
  }
}

/* 流程步骤样式 */
.process-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: var(--shadow);
}

.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 150px;
  text-align: center;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.step-content h4 {
  margin: 0 0 0.5rem 0;
  color: var(--primary-color);
  font-size: 0.9rem;
}

.step-content p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-color);
  opacity: 0.8;
}

.flow-arrow {
  font-size: 1.5rem;
  color: var(--primary-color);
  font-weight: bold;
}

/* 决策分支样式 */
.decision-branches {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.branch {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1rem;
  background: var(--bg-color);
}

.branch-label {
  font-weight: 600;
  margin-bottom: 1rem;
  padding: 0.5rem;
  background: var(--card-bg);
  border-radius: 6px;
  text-align: center;
  color: var(--primary-color);
}

.branch-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.branch-flow .step-box {
  min-width: 100px;
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
}

.step-box.decision {
  background: linear-gradient(135deg, #f44336, #e91e63);
}

.step-box.ai {
  background: linear-gradient(135deg, #673ab7, #9c27b0);
}

/* 响应式设计 - 流程图 */
@media (max-width: 768px) {
  .process-flow {
    flex-direction: column;
    padding: 1rem;
  }
  
  .flow-arrow {
    transform: rotate(90deg);
    margin: 0.5rem 0;
  }
  
  .decision-branches {
    grid-template-columns: 1fr;
  }
  
  .branch-flow {
    flex-direction: column;
    gap: 1rem;
  }
  
  .branch-flow .arrow {
    transform: rotate(90deg);
  }
}