/**
 * Related Characters Section Styles
 * Topical clustering and internal linking styles
 */

.related-characters-section {
  margin: 60px 0;
  padding: 40px;
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.related-characters-section h2 {
  font-size: 28px;
  color: #1a202c;
  margin-bottom: 12px;
  text-align: center;
}

.related-characters-section .section-subtitle {
  text-align: center;
  color: #718096;
  font-size: 16px;
  margin-bottom: 40px;
}

.related-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Related Group */
.related-group {
  background: white;
  padding: 28px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-group:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.related-group h3 {
  font-size: 20px;
  color: #2d3748;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.related-group .group-label-en {
  font-size: 14px;
  color: #718096;
  font-weight: 400;
}

.related-group .group-desc {
  color: #4a5568;
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.6;
}

/* Character Cards Grid */
.related-chars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.related-char-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
  min-height: 100px;
}

.related-char-card:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.related-char {
  font-size: 36px;
  color: white;
  font-weight: 500;
  margin-bottom: 6px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.related-pinyin {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
  letter-spacing: 0.5px;
}

/* View All Link */
.view-all-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.view-all-link:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

/* Scenarios Grid */
.scenarios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.scenario-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(240, 147, 251, 0.2);
  min-height: 120px;
  text-align: center;
}

.scenario-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 24px rgba(240, 147, 251, 0.4);
}

.scenario-icon {
  font-size: 32px;
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.scenario-name {
  font-size: 16px;
  font-weight: 600;
  color: white;
  margin-bottom: 4px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.scenario-subtitle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
}

/* Responsive Design */
@media (max-width: 768px) {
  .related-characters-section {
    padding: 24px 16px;
    margin: 40px 0;
  }

  .related-characters-section h2 {
    font-size: 24px;
  }

  .related-group {
    padding: 20px 16px;
  }

  .related-group h3 {
    font-size: 18px;
  }

  .related-chars-grid {
    grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
    gap: 12px;
  }

  .related-char-card {
    padding: 12px 8px;
    min-height: 85px;
  }

  .related-char {
    font-size: 28px;
  }

  .related-pinyin {
    font-size: 11px;
  }

  .scenarios-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .scenario-card {
    padding: 16px 12px;
    min-height: 100px;
  }
}

@media (max-width: 480px) {
  .related-characters-section {
    padding: 20px 12px;
  }

  .related-chars-grid {
    grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));
    gap: 10px;
  }

  .related-char-card {
    padding: 10px 6px;
    min-height: 75px;
  }

  .related-char {
    font-size: 24px;
  }

  .related-pinyin {
    font-size: 10px;
  }
}

/* Print Styles */
@media print {
  .related-characters-section {
    background: white;
    box-shadow: none;
    border: 1px solid #e2e8f0;
  }

  .related-char-card,
  .scenario-card {
    background: white;
    border: 1px solid #cbd5e0;
    color: black;
    box-shadow: none;
  }

  .related-char,
  .scenario-name {
    color: black;
    text-shadow: none;
  }

  .related-pinyin,
  .scenario-subtitle {
    color: #4a5568;
  }
}
