/**
 * 主星分析页面样式
 * 复刻小程序的设计风格
 */

/* 页面容器 */
#star-page-content {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px 15px 120px;
  box-sizing: border-box;
}

/* 通用卡片样式 */
.main-star-card,
.charm-card,
.spouse-categories-compact {
  width: 100%;
  box-sizing: border-box;
}

/* 页面头部 */
.star-header-section {
  text-align: center;
  margin-bottom: 30px;
}

.user-greeting {
  margin-bottom: 0;
}

.greeting-text {
  display: block;
  font-size: 32px;
  font-weight: bold;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 主星选择器 */
.main-star-selector {
  margin: 20px 0;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.selector-title {
  font-size: 14px;
  color: #ffffff;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.6;
  font-weight: 500;
}

.star-options {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.star-option {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 30px;
  font-size: 15px;
  color: #ffffff;
  text-align: center;
  transition: all 0.3s ease;
  min-width: 60px;
  cursor: pointer;
  font-weight: 500;
}

.star-option.active {
  background: #ffffff;
  border-color: #ffffff;
  color: #667eea;
  transform: scale(1.05);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.star-option:active {
  transform: scale(0.95);
}

.selector-confirm {
  margin-top: 20px;
  text-align: center;
}

.confirm-star-btn {
  width: 100%;
  max-width: 300px;
  padding: 12px 24px;
  background: #ffffff;
  color: #667eea;
  border: none;
  border-radius: 25px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.confirm-star-btn:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.confirm-star-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* 主星卡片 */
.main-star-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 30px;
  padding: 30px;
  margin-bottom: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}

.star-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 10px 0;
}

.star-title {
  font-size: 18px;
  font-weight: bold;
  color: #333;
}

.star-name-large {
  font-size: 36px;
  font-weight: bold;
  color: #667eea;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.star-description {
  margin-bottom: 20px;
}

.star-desc-text {
  font-size: 15px;
  color: #333;
  line-height: 1.6;
  text-align: center;
}

/* 性格标签 */
.character-tags-inline {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  padding: 15px 0 0 0;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.character-tag-inline {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 30px;
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

/* 魅力指数卡片 */
.charm-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 30px;
  padding: 30px;
  margin-bottom: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}

.charm-index {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.charm-label {
  font-size: 18px;
  font-weight: bold;
  color: #333;
}

.charm-right {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
  justify-content: flex-end;
}

.charm-value {
  font-size: 32px;
  font-weight: bold;
  color: #667eea;
  min-width: 60px;
  text-align: right;
}

.charm-bar {
  flex: 1;
  max-width: 200px;
  height: 20px;
  background: rgba(102, 126, 234, 0.1);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.charm-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 10px;
  transition: width 1s ease;
  box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

/* 配偶特征部分 */
.spouse-section {
  margin-bottom: 15px;
}

.spouse-categories-compact {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 30px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}

.spouse-title {
  font-size: 20px;
  font-weight: bold;
  color: #333;
  text-align: center;
  margin-bottom: 25px;
}

.spouse-category-compact {
  margin-bottom: 20px;
}

.spouse-category-compact:last-child {
  margin-bottom: 0;
}

.category-title-compact {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 15px;
}

.category-icon {
  font-size: 18px;
}

.category-tags-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.spouse-tag-compact {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.spouse-tag-compact.personality {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  color: #8b4513;
}

.spouse-tag-compact.career {
  background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
  color: #2c5aa0;
}

/* 底部操作按钮 */
.bottom-actions {
  display: flex;
  gap: 15px;
  padding: 20px 0;
  justify-content: center;
}

.action-btn {
  flex: 1;
  max-width: 200px;
  padding: 15px 30px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.action-btn.primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.action-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.action-btn.primary:active {
  transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 600px) {
  .greeting-text {
    font-size: 28px;
  }

  .star-name-large {
    font-size: 30px;
  }

  .charm-right {
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
  }

  .charm-bar {
    width: 100%;
    max-width: 100%;
  }
}

/* 平滑滚动 */
#star-page-content {
  scroll-behavior: smooth;
}

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

.main-star-card,
.charm-card,
.spouse-categories-compact {
  animation: fadeIn 0.5s ease forwards;
}

.main-star-card {
  animation-delay: 0.1s;
}

.charm-card {
  animation-delay: 0.2s;
}

.spouse-categories-compact {
  animation-delay: 0.3s;
}

/* 知星兽介绍页面 */
.guardian-intro-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(5px);
}

.guardian-intro-page.show {
  opacity: 1;
}

.guardian-intro-content {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 30px;
  padding: 40px 30px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.guardian-intro-page.show .guardian-intro-content {
  transform: scale(1);
}

/* 顶部关闭按钮 */
.intro-header {
  text-align: right;
  margin-bottom: 10px;
}

.intro-header .close-btn {
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 24px;
  line-height: 1;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.intro-header .close-btn:hover {
  background: rgba(255, 255, 255, 1);
  color: #333;
  transform: rotate(90deg);
}

/* 知星兽头像区域 */
.guardian-avatar-section {
  text-align: center;
  margin-bottom: 30px;
}

.guardian-avatar-wrapper {
  display: inline-block;
  position: relative;
  padding: 10px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4);
  }
  50% {
    box-shadow: 0 10px 60px rgba(102, 126, 234, 0.6);
  }
}

.guardian-avatar-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid white;
  display: block;
}

/* 知星兽名称区域 */
.guardian-name-section {
  text-align: center;
  margin-bottom: 25px;
}

.guardian-name {
  font-size: 28px;
  font-weight: bold;
  color: #333;
  margin: 0 0 10px 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.guardian-subtitle {
  font-size: 14px;
  color: #666;
  margin: 0;
  font-weight: 500;
}

/* 知星兽介绍区域 */
.guardian-description-section {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.guardian-description {
  font-size: 15px;
  line-height: 1.8;
  color: #555;
  margin: 0;
  text-align: center;
}

/* 操作按钮区域 */
.guardian-action-section {
  text-align: center;
}

.guardian-chat-btn {
  width: 100%;
  max-width: 300px;
  padding: 16px 40px;
  font-size: 17px;
  font-weight: 600;
  border-radius: 30px;
  border: none;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.guardian-chat-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.guardian-chat-btn:active {
  transform: translateY(0);
}

/* 响应式设计 - 知星兽介绍页 */
@media (max-width: 600px) {
  .guardian-intro-content {
    padding: 30px 20px;
    border-radius: 20px;
  }

  .guardian-avatar-img {
    width: 120px;
    height: 120px;
  }

  .guardian-name {
    font-size: 24px;
  }

  .guardian-description {
    font-size: 14px;
  }

  .guardian-chat-btn {
    font-size: 16px;
    padding: 14px 35px;
  }
}
