/* 
 * 文件名: tutorial.css
 * 功能说明: GROK使用教程页面专用样式
 * 创建日期: 2024-12-19
 * 更新日期: 2025-12-31
 * 作者: GROK官网开发团队
 * 版权: grok-4.top
 */

/* 教程页面标题区域 */
.tutorial-hero {
  background: transparent;
  padding: 160px 0 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.tutorial-hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1000px;
  height: 1000px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, rgba(56, 189, 248, 0.05) 30%, transparent 70%);
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
}

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

.tutorial-hero h1 {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.tutorial-hero .hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: 3rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.tutorial-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.stat-icon {
  font-size: 1.5rem;
}

/* 教程导航 */
.tutorial-nav {
  background: rgba(15, 23, 42, 0.8);
  padding: 1.5rem 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  position: sticky;
  top: 80px;
  z-index: 99;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-tab {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.nav-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.nav-tab.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
  box-shadow: var(--shadow-glow);
}

/* 教程内容 */
.tutorial-content {
  padding: 4rem 0;
  min-height: 800px;
}

.content-section {
  display: none;
  animation: fadeIn 0.5s ease-in-out;
}

.content-section.active {
  display: block;
}

.content-section h2 {
  font-size: 2.5rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  text-align: center;
}

.section-intro {
  font-size: 1.2rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 4rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* 教程步骤 */
.tutorial-steps {
  max-width: 900px;
  margin: 0 auto;
}

.step-card {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.step-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.step-number {
  background: var(--gradient-primary);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  flex-shrink: 0;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

.step-content {
  flex: 1;
}

.step-content h3 {
  color: var(--text-primary);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.step-content p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.step-content ul {
  color: var(--text-secondary);
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.step-content li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* 提示框 */
.tip-box, .success-box {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  padding: 1.2rem;
  margin-top: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}

.tip-box {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.2);
}

.tip-icon, .success-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.tip-box p, .success-box p {
  margin: 0;
  color: #fbbf24;
}

.success-box p {
  color: #34d399;
}

/* 代码示例 */
.code-example {
  background: #0f172a;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.code-example h4 {
  color: #e2e8f0;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.code-example pre {
  color: #e2e8f0;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
  overflow-x: auto;
}

/* 聊天示例 */
.chat-example {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 16px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-message {
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}

.chat-message.user {
  justify-content: flex-end;
}

.chat-message.user .message-content {
  background: #2563eb;
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-message.assistant .message-content {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom-left-radius: 4px;
}

.message-content {
  max-width: 80%;
  padding: 1rem;
  border-radius: 16px;
  line-height: 1.6;
}

/* 功能网格 */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.feature-card {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: var(--shadow-glow);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  display: block;
}

.feature-card h3 {
  color: var(--text-primary);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.feature-examples h4 {
  color: var(--text-primary);
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
}

.example-list {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.example-item {
  margin-bottom: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.example-item:last-child {
  margin-bottom: 0;
}

.example-item strong {
  color: #38bdf8;
}

/* 最佳实践 */
.best-practices {
  background: var(--bg-card);
  border-radius: 24px;
  padding: 3rem;
  margin-top: 4rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.best-practices h3 {
  color: var(--text-primary);
  font-size: 1.8rem;
  margin-bottom: 3rem;
  text-align: center;
}

.practice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
}

.practice-item h4 {
  color: var(--text-primary);
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.practice-item p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.example {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.good {
  color: #34d399;
  margin-bottom: 0.8rem;
  padding: 0.8rem;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 8px;
  border-left: 3px solid #10b981;
}

.bad {
  color: #f87171;
  padding: 0.8rem;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 8px;
  border-left: 3px solid #ef4444;
}

/* 高级功能卡片 */
.advanced-features {
  max-width: 1000px;
  margin: 0 auto;
}

.advanced-card {
  background: var(--bg-card);
  border-radius: 20px;
  margin-bottom: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transition: all 0.3s ease;
}

.advanced-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

.card-header {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-icon {
  font-size: 2.5rem;
}

.card-header h3 {
  font-size: 1.8rem;
  margin: 0;
  color: var(--text-primary);
}

.card-content {
  padding: 2.5rem;
}

.card-content h4 {
  color: #38bdf8;
  font-size: 1.2rem;
  margin: 2rem 0 1rem;
}

.card-content p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.card-content ul {
  color: var(--text-secondary);
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.card-content li {
  margin-bottom: 0.8rem;
  line-height: 1.6;
}

/* 语言标签 */
.language-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1.5rem 0;
}

.language-tag {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.language-tag:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.3);
  color: #38bdf8;
}

/* 代码块 */
.code-block {
  background: #0f172a;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.code-block pre {
  color: #e2e8f0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

.example-request {
  background: rgba(16, 185, 129, 0.1);
  border-left: 4px solid #10b981;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  color: var(--text-primary);
}

/* 使用示例 */
.usage-example {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.example-input {
  background: rgba(59, 130, 246, 0.1);
  border-left: 4px solid #3b82f6;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 6px;
  color: var(--text-secondary);
}

.example-output {
  background: rgba(255, 255, 255, 0.05);
  border-left: 4px solid #8b5cf6;
  padding: 1rem;
  border-radius: 6px;
  color: var(--text-primary);
}

/* 场景网格 */
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.scenario-item {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.scenario-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-3px);
}

.scenario-item h5 {
  color: var(--text-primary);
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
}

.scenario-item p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
  font-style: italic;
}

/* 角色网格 */
.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.role-item {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.role-item:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}

.role-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.role-info h5 {
  color: var(--text-primary);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.role-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

/* 角色示例 */
.role-example {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  padding: 1.5rem;
  margin: 2rem 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.example-prompt {
  background: rgba(245, 158, 11, 0.1);
  border-left: 4px solid #f59e0b;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 6px;
  color: var(--text-secondary);
}

.example-response {
  background: rgba(16, 185, 129, 0.1);
  border-left: 4px solid #10b981;
  padding: 1rem;
  border-radius: 6px;
  color: var(--text-primary);
}

/* 技巧容器 */
.tips-container {
  max-width: 1000px;
  margin: 0 auto;
}

.tip-category {
  background: var(--bg-card);
  border-radius: 24px;
  padding: 3rem;
  margin-bottom: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.tip-category h3 {
  color: var(--text-primary);
  font-size: 1.8rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1.5rem;
}

.tips-list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.tip-item {
  border-left: 3px solid #38bdf8;
  padding-left: 2rem;
}

.tip-item h4 {
  color: var(--text-primary);
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.tip-item p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.tip-example {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 1.2rem;
  margin-top: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.example-template, .batch-example, .context-example, .brainstorm-example, .cross-domain-example {
  background: rgba(59, 130, 246, 0.1);
  border-radius: 8px;
  padding: 1.2rem;
  margin-top: 1rem;
  border-left: 4px solid #3b82f6;
  color: var(--text-secondary);
}

/* FAQ容器 */
.faq-container {
  max-width: 900px;
  margin: 0 auto;
}

.faq-category {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 2.5rem;
  margin-bottom: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.faq-category h3 {
  color: var(--text-primary);
  font-size: 1.8rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.02);
}

.faq-item:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.faq-question {
  background: transparent;
  padding: 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question h4 {
  color: var(--text-primary);
  font-size: 1.1rem;
  margin: 0;
  flex: 1;
}

.faq-toggle {
  font-size: 1.5rem;
  color: #38bdf8;
  font-weight: bold;
  transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
  transform: rotate(45deg);
  color: #f87171;
}

.faq-answer {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  background: rgba(0, 0, 0, 0.2);
}

.faq-item.active .faq-answer {
  padding: 1.5rem;
  max-height: 1000px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.faq-answer p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.faq-answer ul {
  color: var(--text-secondary);
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.faq-answer li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* 帮助区域 */
.help-section {
  background: linear-gradient(180deg, transparent 0%, rgba(56, 189, 248, 0.05) 100%);
  padding: 6rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.help-content h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.help-content p {
  font-size: 1.2rem;
  margin-bottom: 4rem;
  color: var(--text-secondary);
}

.help-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.help-option {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 2.5rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.help-option:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: var(--shadow-glow);
}

.help-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

.help-option h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.help-option p {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.help-actions {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* 动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .tutorial-hero {
    padding: 120px 0 60px;
  }
  
  .tutorial-hero h1 {
    font-size: 2.8rem;
  }
  
  .tutorial-stats {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }
  
  .nav-tabs {
    gap: 0.8rem;
  }
  
  .nav-tab {
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
  }
  
  .content-section h2 {
    font-size: 2rem;
  }
  
  .step-card {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
    align-items: center;
  }
  
  .step-number {
    margin-bottom: 0.5rem;
  }
  
  .step-content ul {
    text-align: left;
  }
  
  .feature-grid, .practice-grid, .scenario-grid, .role-grid {
    grid-template-columns: 1fr;
  }
  
  .card-header {
    flex-direction: column;
    text-align: center;
  }
  
  .language-grid {
    justify-content: center;
  }
  
  .help-options {
    grid-template-columns: 1fr;
  }
  
  .help-actions {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .tutorial-hero h1 {
    font-size: 2.2rem;
  }
  
  .step-card {
    padding: 1.5rem;
  }
  
  .advanced-card .card-content {
    padding: 1.5rem;
  }
  
  .tip-category, .faq-category {
    padding: 1.5rem;
  }
  
  .message-content {
    max-width: 95%;
  }
}
