/* 晶体详情页 - 样式 */

/* 基本信息区域 */
.crystal-detail-header {
  padding: 24px;
  background: #FFFFFF;
  border-radius: 8px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.crystal-title {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 16px;
  color: #333333;
}

.crystal-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  padding: 4px 12px;
  background: #F0F5FF;
  color: #2A5DAA;
  border-radius: 16px;
  font-size: 12px;
}

/* 信息概览区域 */
.info-overview {
  padding: 32px;
  background: #FFFFFF;
  border-radius: 8px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.info-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.info-column h3 {
  font-size: 18px;
  margin-bottom: 16px;
  color: #333333;
}

.info-item {
  margin-bottom: 12px;
  display: flex;
}

.info-label {
  width: 100px;
  color: #666666;
}

.info-value {
  color: #333333;
  font-weight: 500;
}

/* 导航栏 */
.nav-tabs {
  position: sticky;
  top: 64px;
  background: #FFFFFF;
  z-index: 100;
  padding: 0 32px;
  border-bottom: 1px solid #E8E8E8;
  display: flex;
  margin-bottom: 24px;
}

.tab-btn {
  padding: 16px 24px;
  background: none;
  border: none;
  font-size: 16px;
  color: #666666;
  cursor: pointer;
  position: relative;
}

.tab-btn:hover {
  color: #2A5DAA;
}

.tab-btn.active {
  color: #2A5DAA;
  font-weight: bold;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: #2A5DAA;
}

/* 3D模型视图 */
.model-view {
  height: 600px;
  background: #FAFAFA;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

#crystal-model {
  width: 100%;
  height: 100%;
}

/* 视图工具 */
.view-tools {
  position: absolute;
  right: 24px;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tool-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #FFFFFF;
  border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #666666;
}

.tool-btn:hover {
  background: #F0F5FF;
  color: #2A5DAA;
}

/* 显示设置 */
.display-settings {
  position: absolute;
  left: 24px;
  top: 24px;
  background: #FFFFFF;
  border-radius: 8px;
  padding: 16px;
  width: 240px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.setting-group {
  margin-bottom: 16px;
}

.setting-group h4 {
  font-size: 14px;
  margin-bottom: 8px;
  color: #666666;
}

.setting-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option-btn {
  padding: 6px 12px;
  background: #F5F8FC;
  border: 1px solid #E8E8E8;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  text-align: left;
}

.option-btn.active {
  background: #F0F5FF;
  border-color: #2A5DAA;
  color: #2A5DAA;
}

.setting-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #666666;
}

/* 详细内容区域 */
.detail-content {
  margin-bottom: 48px;
}

.tab-content {
  display: none;
  background: #FFFFFF;
  border-radius: 8px;
  padding: 32px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

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

/* 结构信息 */
.structure-info {
  color: #333333;
}

.structure-info h3 {
  font-size: 20px;
  margin-bottom: 16px;
}

.structure-info p {
  line-height: 1.6;
  margin-bottom: 24px;
}

.structure-data {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.data-section h4 {
  font-size: 16px;
  margin-bottom: 12px;
  color: #555555;
}

.data-table {
  border: 1px solid #E8E8E8;
  border-radius: 4px;
  overflow: hidden;
}

.data-table table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #E8E8E8;
}

.data-table th {
  background: #F5F8FC;
  font-weight: 500;
  color: #555555;
}

.structure-analysis h4 {
  font-size: 16px;
  margin-bottom: 12px;
  color: #555555;
}

.structure-analysis ul {
  padding-left: 24px;
  margin-bottom: 24px;
}

.structure-analysis li {
  margin-bottom: 8px;
  line-height: 1.5;
}

/* 性质分析 */
.property-analysis h3 {
  font-size: 20px;
  margin-bottom: 24px;
}

.property-section {
  margin-bottom: 32px;
}

.property-section h4 {
  font-size: 16px;
  margin-bottom: 12px;
  color: #555555;
  border-left: 3px solid #2A5DAA;
  padding-left: 12px;
}

.property-section p {
  line-height: 1.6;
  margin-bottom: 16px;
}

.chart-container {
  height: 300px;
  margin: 24px 0;
}

/* 应用领域 */
.applications h3 {
  font-size: 20px;
  margin-bottom: 24px;
}

.application-section {
  margin-bottom: 32px;
}

.application-section h4 {
  font-size: 16px;
  margin-bottom: 12px;
  color: #555555;
  border-left: 3px solid #2A5DAA;
  padding-left: 12px;
}

.application-section p {
  line-height: 1.6;
  margin-bottom: 16px;
}

.application-image {
  margin: 24px 0;
  text-align: center;
}

.application-image img {
  max-width: 100%;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.image-caption {
  margin-top: 8px;
  font-size: 12px;
  color: #666666;
}

/* 相关资源 */
.related-resources h3 {
  font-size: 20px;
  margin-bottom: 24px;
}

.resource-section {
  margin-bottom: 32px;
}

.resource-section h4 {
  font-size: 16px;
  margin-bottom: 12px;
  color: #555555;
}

.resource-list {
  list-style: none;
}

.resource-list li {
  margin-bottom: 12px;
}

.resource-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #F5F8FC;
  border-radius: 4px;
  color: #333333;
  text-decoration: none;
  transition: background-color 0.3s;
}

.resource-link:hover {
  background: #E0EAFF;
  color: #2A5DAA;
}

.resource-link i {
  color: #2A5DAA;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .info-columns {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .structure-data {
    grid-template-columns: 1fr;
  }
  
  .nav-tabs {
    padding: 0 16px;
    overflow-x: auto;
  }
  
  .tab-btn {
    padding: 12px 16px;
    font-size: 14px;
    white-space: nowrap;
  }
  
  .model-view {
    height: 400px;
  }
  
  .display-settings {
    width: 200px;
  }
}

/* 晶体详情页美化样式 */
.crystal-detail-container {
  max-width: 1600px;
  margin: 40px auto 40px auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  padding: 32px 40px 40px 40px;
}

.crystal-detail-container .header {
  display: flex;
  align-items: center;
  margin-bottom: 32px;
}
.crystal-detail-container .header .thumbnail {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border-radius: 8px;
  margin-right: 32px;
  background: #f6f6f6;
  border: 1px solid #eee;
}
.crystal-detail-container .header h1 {
  font-size: 2rem;
  margin-bottom: 12px;
}
.crystal-detail-container .header .tags span {
  display: inline-block;
  background: #f0f4fa;
  color: #3a6ea5;
  border-radius: 4px;
  padding: 2px 10px;
  margin-right: 8px;
  font-size: 0.95rem;
}

.basic-info {
  margin-bottom: 32px;
}
.basic-info table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}
.basic-info th, .basic-info td {
  text-align: left;
  padding: 6px 12px;
  border-bottom: 1px solid #f0f0f0;
  min-width: 120px;
}
.basic-info th {
  color: #3a6ea5;
  width: 120px;
  font-weight: 600;
  background: #f8fafc;
}

.model-section {
  margin-bottom: 32px;
}
.model-section h2 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}
#crystal-model {
  width: 100%;
  height: 320px;
  background: #f6f6f6;
  border-radius: 8px;
  border: 1px solid #eee;
}

.description-section h2 {
  font-size: 1.1rem;
  margin-top: 18px;
  margin-bottom: 6px;
  color: #3a6ea5;
}
.description-section p {
  margin-bottom: 10px;
  color: #333;
  line-height: 1.7;
}

.meta-info {
  margin-top: 32px;
  color: #888;
  font-size: 0.95rem;
  display: flex;
  gap: 24px;
}