/**
 * 爱情指南页面样式
 *
 * 命名规范说明：
 * - 块(Block): .block-name
 * - 元素(Element): .block-name__element-name
 * - 修饰符(Modifier): .block-name--modifier-name
 *
 * 注：部分历史类名未完全遵循BEM规范，但保持语义化和一致性
 */

/* 页面容器 */
.love-guide-page {
  padding: 16px;
  padding-bottom: 80px;
}

/* 星动卡区域 */
.star-card-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  color: white;
}

.star-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.star-card-title {
  font-size: 18px;
  font-weight: 600;
}

.star-card-count {
  font-size: 32px;
  font-weight: bold;
}

.star-card-count span {
  font-size: 14px;
  font-weight: normal;
  opacity: 0.8;
}

.star-card-detail {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 8px;
}

/* 匹配入口区域 */
.match-section {
  background: white;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.match-section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #333;
}

.match-buttons {
  display: flex;
  gap: 12px;
}

.match-btn {
  flex: 1;
  padding: 16px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.match-btn:active {
  transform: scale(0.98);
}

.match-btn-birth {
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
  color: #d63384;
}

.match-btn-id {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  color: #0d6efd;
}

.match-btn-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.match-btn-text {
  font-size: 14px;
  font-weight: 500;
}

.match-btn-desc {
  font-size: 11px;
  opacity: 0.7;
  margin-top: 4px;
}

/* 绑定列表区域 */
.binding-section {
  background: white;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.binding-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.binding-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.binding-count {
  font-size: 12px;
  color: #666;
}

.binding-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.binding-item {
  display: flex;
  align-items: center;
  padding: 14px;
  background: #f8f9fa;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.binding-item:active {
  background: #e9ecef;
}

.binding-weather {
  font-size: 32px;
  margin-right: 14px;
}

.binding-info {
  flex: 1;
}

.binding-name {
  font-size: 15px;
  font-weight: 500;
  color: #333;
}

.binding-score {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}

.binding-arrow {
  color: #ccc;
  font-size: 18px;
}

.binding-empty {
  text-align: center;
  padding: 30px 0;
  color: #999;
}

.binding-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.binding-empty-text {
  font-size: 14px;
}

/* 匹配弹窗 */
.match-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.match-modal.show {
  opacity: 1;
  visibility: visible;
}

.match-modal-content {
  background: white;
  border-radius: 20px;
  width: 90%;
  max-width: 340px;
  padding: 24px;
  transform: scale(0.9);
  transition: transform 0.3s;
}

.match-modal.show .match-modal-content {
  transform: scale(1);
}

.match-modal-title {
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}

.match-form-group {
  margin-bottom: 16px;
}

.match-form-label {
  font-size: 13px;
  color: #666;
  margin-bottom: 6px;
  display: block;
}

.match-form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.match-form-input:focus {
  border-color: #667eea;
}

.match-form-row {
  display: flex;
  gap: 10px;
}

.match-form-row .match-form-group {
  flex: 1;
}

.match-form-select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 15px;
  outline: none;
  background: white;
  cursor: pointer;
}

.match-modal-buttons {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.match-modal-btn {
  flex: 1;
  padding: 14px;
  border-radius: 12px;
  border: none;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.match-modal-btn-cancel {
  background: #f0f0f0;
  color: #666;
}

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

/* 晴雨详情页 */
.weather-page {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  z-index: 100;
  display: none;
  flex-direction: column;
}

.weather-page.show {
  display: flex;
}

.weather-header {
  display: flex;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #eee;
}

.weather-back {
  font-size: 24px;
  padding: 8px;
  cursor: pointer;
}

.weather-title {
  flex: 1;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
}

.weather-unbind {
  font-size: 13px;
  color: #dc3545;
  padding: 8px;
  cursor: pointer;
}

.weather-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* 日历区域 */
.weather-calendar {
  background: #f8f9fa;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.calendar-nav {
  font-size: 20px;
  padding: 8px;
  cursor: pointer;
  color: #666;
}

.calendar-date {
  font-size: 15px;
  font-weight: 500;
}

.calendar-days {
  display: flex;
  justify-content: space-between;
}

.calendar-day {
  flex: 1;
  text-align: center;
  padding: 10px 4px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}

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

.calendar-day-week {
  font-size: 11px;
  color: #999;
  margin-bottom: 4px;
}

.calendar-day.active .calendar-day-week {
  color: rgba(255, 255, 255, 0.8);
}

.calendar-day-num {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.calendar-day-weather {
  font-size: 16px;
}

/* 天气详情卡片 */
.weather-detail-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.weather-icon {
  font-size: 64px;
  margin-bottom: 12px;
}

.weather-temp {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.weather-desc {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
}

.weather-report {
  text-align: left;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 16px;
}

.weather-report-title {
  font-size: 13px;
  color: #999;
  margin-bottom: 8px;
}

.weather-report-text {
  font-size: 14px;
  color: #333;
  line-height: 1.6;
  margin-bottom: 16px;
}

.weather-report-text:last-child {
  margin-bottom: 0;
}

/* 加载状态 */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

.loading-spinner::after {
  content: '';
  width: 32px;
  height: 32px;
  border: 3px solid #f0f0f0;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 星动卡不足提示 */
.insufficient-modal {
  text-align: center;
}

.insufficient-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.insufficient-text {
  font-size: 15px;
  color: #333;
  margin-bottom: 8px;
}

.insufficient-subtext {
  font-size: 13px;
  color: #999;
}

/* 历史记录样式 */
.history-item {
  display: flex;
  align-items: center;
  padding: 14px;
  background: #f8f9fa;
  border-radius: 12px;
  margin-bottom: 10px;
}

.history-item.bound {
  opacity: 0.6;
}

.history-icon {
  font-size: 24px;
  margin-right: 12px;
}

.history-add-btn {
  padding: 6px 14px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 16px;
  font-size: 13px;
  cursor: pointer;
}

.history-add-btn:active {
  opacity: 0.8;
}

.history-bound-tag {
  padding: 6px 14px;
  background: #e9ecef;
  color: #999;
  border-radius: 16px;
  font-size: 13px;
}

/* 绑定列表 - 头像样式 */
.binding-avatar-container {
  position: relative;
  width: 48px;
  height: 48px;
  margin-right: 14px;
  flex-shrink: 0;
}

.binding-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.binding-weather-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  font-size: 18px;
  background: white;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* 历史列表 - 头像样式 */
.history-avatar-container {
  position: relative;
  width: 40px;
  height: 40px;
  margin-right: 12px;
  flex-shrink: 0;
}

.history-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.history-type-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  font-size: 14px;
  background: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* 性别标签 */
.gender-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
}

.gender-tag.gender-male {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.gender-tag.gender-female {
  background: rgba(236, 72, 153, 0.1);
  color: #ec4899;
}
