/**
 * 主星详解页面样式
 * 基于设计图实现星空主题效果
 */

/* 主容器 */
.star-detail-container {
  position: relative;
  min-height: 100vh;
  background: linear-gradient(135deg, #2D1B69 0%, #11082A 100%);
  padding: 20px;
  color: white;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 星空背景 */
.stars-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  animation: twinkle 3s infinite ease-in-out;
}

.star:nth-child(2n) {
  width: 1px;
  height: 1px;
  opacity: 0.8;
}

.star:nth-child(3n) {
  width: 3px;
  height: 3px;
  opacity: 0.6;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* 页面标题 */
.page-title {
  text-align: left;
  margin-bottom: 30px;
  z-index: 10;
  position: relative;
  padding: 0 20px;
}

.page-title h1 {
  font-size: 22px;
  font-weight: 500;
  margin: 0;
  color: white;
  opacity: 0.95;
  letter-spacing: 1px;
  line-height: 1.4;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 加载状态 */
.loading-container {
  text-align: center;
  padding: 60px 20px;
  z-index: 10;
  position: relative;
}

.loading-spinner {
  font-size: 48px;
  margin-bottom: 20px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.1); opacity: 1; }
}

.loading-container p {
  color: #E0E0E0;
  font-size: 16px;
  margin: 0;
}

/* 错误状态 */
.error-container {
  text-align: center;
  padding: 60px 20px;
  z-index: 10;
  position: relative;
}

.error-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.error-message {
  color: #E0E0E0;
  font-size: 16px;
  margin: 0 0 20px 0;
}

.retry-btn {
  background: linear-gradient(135deg, #2D1B69 0%, #11082A 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.2s;
}

.retry-btn:hover {
  transform: translateY(-2px);
}

/* 主内容区域 */
.star-detail-content {
  z-index: 10;
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

/* 区域标题 */
.section-title {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 25px 0;
  color: #FFD700;
  text-align: center;
  position: relative;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 6px rgba(255, 215, 0, 0.4);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #FFD700, transparent);
  border-radius: 2px;
}

/* 主星展示区域 */
.main-stars-section {
  margin-bottom: 30px;
  padding: 0 20px;
}

.main-stars-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  padding: 20px;
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.star-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 16px;
  font-size: 16px;
  color: #333;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.star-row:last-child {
  margin-bottom: 0;
  border-bottom: none;
}

.star-name {
  font-weight: 600;
  margin-right: 12px;
  min-width: 60px;
  color: #2c3e50;
  font-size: 17px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  line-height: 1.5;
}

.star-description {
  color: #34495e;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 500;
  flex: 1;
}

/* 浮动动画 */
.floating {
  animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* 个性总结区域 */
.personality-summary-section {
  margin-bottom: 30px;
  padding: 0 20px;
}

.personality-summary {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  padding: 25px;
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.summary-main {
  margin-bottom: 20px;
}

.summary-text {
  font-size: 28px;
  font-weight: 700;
  color: #8A2BE2;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
  line-height: 1.3;
  text-shadow: 0 2px 4px rgba(138, 43, 226, 0.2);
}

/* 解码语录区域 - 在白色卡片内部 */
.decode-quotes-section {
  margin-top: 25px;
  border-top: 1px solid #e0e0e0;
  padding-top: 20px;
}

.quotes-title {
  font-size: 18px;
  font-weight: 600;
  color: #34495e;
  margin-bottom: 18px;
  text-align: left;
  letter-spacing: 0.3px;
}

.decode-quote {
  background: #f8f9fa;
  border-left: 4px solid #8A2BE2;
  padding: 16px 18px;
  margin-bottom: 12px;
  border-radius: 0 10px 10px 0;
  font-size: 15px;
  color: #2c3e50;
  line-height: 1.6;
  font-weight: 400;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.decode-quote:last-child {
  margin-bottom: 0;
}

/* 主星语录区域 */
.star-quotes-section {
  margin-bottom: 50px;
}

.star-quotes-container {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.star-quote {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 15px;
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 15px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.quote-icon {
  font-size: 32px;
  color: #FFD700;
  line-height: 1;
  flex-shrink: 0;
}

.quote-text {
  color: #E0E0E0;
  font-size: 16px;
  line-height: 1.5;
  font-style: italic;
}

/* 更多标签区域 */
.remaining-tags-section {
  margin-bottom: 30px;
}

.remaining-tags-container {
  margin-top: 30px;
}

.remaining-tags-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.remaining-tag {
  background: rgba(255, 255, 255, 0.15);
  color: #FFD700;
  padding: 12px 18px;
  border-radius: 25px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid rgba(255, 215, 0, 0.4);
  backdrop-filter: blur(15px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.3px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.remaining-tag:hover {
  background: rgba(255, 215, 0, 0.25);
  border-color: #FFD700;
  color: #FFD700;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* 无数据提示 */
.no-data {
  text-align: center;
  color: #888;
  font-style: italic;
  margin: 30px 0;
  opacity: 0.7;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .star-detail-container {
    padding: 15px;
  }
  
  .page-title h1 {
    font-size: 20px;
    letter-spacing: 0.5px;
  }
  
  .section-title {
    font-size: 22px;
  }
  
  .star-name {
    font-size: 16px;
    min-width: 55px;
  }
  
  .star-description {
    font-size: 14px;
  }
  
  .summary-text {
    font-size: 24px;
  }
  
  .quotes-title {
    font-size: 16px;
  }
  
  .decode-quote {
    font-size: 14px;
    padding: 14px 16px;
  }
  
  .remaining-tag {
    font-size: 14px;
    padding: 10px 16px;
  }
}

@media (max-width: 480px) {
  .star-detail-container {
    padding: 12px;
  }
  
  .page-title h1 {
    font-size: 18px;
    letter-spacing: 0.3px;
  }
  
  .section-title {
    font-size: 20px;
    margin-bottom: 20px;
  }
  
  .star-name {
    font-size: 15px;
    min-width: 50px;
  }
  
  .star-description {
    font-size: 13px;
  }
  
  .summary-text {
    font-size: 22px;
    line-height: 1.4;
  }
  
  .quotes-title {
    font-size: 15px;
  }
  
  .decode-quote {
    font-size: 13px;
    padding: 12px 14px;
    line-height: 1.5;
  }
  
  .remaining-tags-grid {
    gap: 8px;
  }
  
  .remaining-tag {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 20px;
  }
}