/* ========================================
   情侣空间样式
   ======================================== */

/* 页面容器（全屏覆盖层） */
.cs-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #f5f5f7;
  z-index: var(--z-drawer);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.cs-screen.is-active {
  display: flex;
}

/* 顶部导航栏 */
.cs-nav {
  height: var(--status-bar-height);
  margin-top: var(--safe-area-top);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--spacing-lg);
  background: linear-gradient(135deg, #ffc0cb 0%, #ffb3c1 100%);
  flex-shrink: 0;
  position: relative;
}

.cs-nav__back {
  display: flex;
  align-items: center;
  color: white;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  margin-left: -8px;
  width: 32px;
}

.cs-nav__back svg {
  width: 24px;
  height: 24px;
}

.cs-nav__title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: white;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.cs-nav__right {
  width: 32px;
  flex-shrink: 0;
}

/* 页面滚动区域 */
.cs-page__scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--spacing-lg) + var(--safe-area-bottom, 0px));
}

/* 头像区域 */
.couple-space-header {
  background: linear-gradient(135deg, #ffd6e0 0%, #ffc0cb 100%);
  padding: 2rem 1.5rem;
  color: #d6557a;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* 可爱的浮屏特效容器 */
.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.floating-heart,
.floating-star {
  position: absolute;
  opacity: 0;
  animation: float-up 8s ease-in infinite;
}

.floating-heart {
  font-size: 1.2rem;
  color: rgba(255, 105, 180, 0.7);
}

.floating-star {
  font-size: 1rem;
  color: rgba(255, 192, 203, 0.8);
}

@keyframes float-up {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.4;
  }
  100% {
    transform: translateY(-100vh) rotate(360deg);
    opacity: 0;
  }
}

/* 为不同元素添加延迟和位置变化 */
.floating-heart:nth-child(1) { left: 10%; animation-delay: 0s; }
.floating-heart:nth-child(2) { left: 30%; animation-delay: 2s; }
.floating-heart:nth-child(3) { left: 50%; animation-delay: 4s; }
.floating-heart:nth-child(4) { left: 70%; animation-delay: 1s; }
.floating-heart:nth-child(5) { left: 90%; animation-delay: 3s; }
.floating-star:nth-child(6) { left: 20%; animation-delay: 1.5s; }
.floating-star:nth-child(7) { left: 40%; animation-delay: 3.5s; }
.floating-star:nth-child(8) { left: 60%; animation-delay: 0.5s; }
.floating-star:nth-child(9) { left: 80%; animation-delay: 2.5s; }

.couple-avatars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.couple-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.avatar-circle {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  border: 3px solid rgba(255, 255, 255, 0.9);
  transition: transform 0.3s ease;
}

.couple-avatar:hover .avatar-circle {
  transform: scale(1.1);
}

.avatar-name {
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0.9;
}

.couple-heart-icon {
  font-size: 1.5rem;
  color: rgba(255, 105, 180, 0.9);
  animation: heartbeat 1.5s ease-in-out infinite;
}

.couple-heart-icon svg {
  width: 2rem;
  height: 2rem;
  fill: rgba(255, 105, 180, 0.9);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* 天数计数 */
.couple-days {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.couple-days-label {
  font-size: 0.875rem;
  opacity: 0.9;
}

.couple-days-count {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.couple-days-unit {
  font-size: 1.125rem;
  opacity: 0.9;
}

/* 功能区 */
.couple-space-features {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.couple-feature-card {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.couple-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  border-color: #333;
}

.couple-feature-card:active {
  transform: translateY(-2px);
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #4a4a4a 0%, #2c2c2c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.feature-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.feature-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #333;
}

.feature-desc {
  font-size: 0.75rem;
  color: #999;
  text-align: center;
}

/* 底部设置按钮 */
.couple-space-footer {
  padding: 1.5rem;
  padding-top: 0.5rem;
}

.couple-settings-btn {
  width: 100%;
  padding: 1rem;
  border: 2px dashed #ddd;
  background: white;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #666;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.couple-settings-btn:hover {
  border-color: #333;
  color: #333;
  background: #f5f5f5;
}

.couple-settings-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* 设置模态框 */
.modal-overlay {
  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: 10000;
  padding: 1rem;
}

.couple-settings-modal {
  background: white;
  border-radius: 1rem;
  width: 100%;
  max-width: 28rem;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.modal-close-btn {
  width: 2rem;
  height: 2rem;
  border: none;
  background: #f5f5f5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.5rem;
  color: #666;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: #eee;
  color: #333;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #333;
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border-color: #ffb3c1;
  box-shadow: 0 0 0 3px rgba(255, 192, 203, 0.2);
}

.modal-footer {
  padding: 1.5rem;
  border-top: 1px solid #eee;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary {
  background: #f5f5f5;
  color: #666;
}

.btn-secondary:hover {
  background: #eee;
}

.btn-primary {
  background: linear-gradient(135deg, #4a4a4a 0%, #2c2c2c 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Toast 提示 */
.toast-message {
  position: fixed;
  top: 5rem;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  z-index: 10001;
  opacity: 0;
  transition: all 0.3s ease;
  white-space: nowrap;
  max-width: 80%;
  text-align: center;
}

.toast-message.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* 响应式 */
@media (max-width: 640px) {
  .couple-space-header {
    padding: 1.5rem 1rem;
  }

  .couple-days-count {
    font-size: 2.5rem;
  }

  .couple-space-features {
    padding: 1rem;
    gap: 0.75rem;
  }

  .couple-feature-card {
    padding: 1rem 0.75rem;
  }

  .feature-icon {
    width: 2.5rem;
    height: 2.5rem;
  }

  .feature-icon svg {
    width: 1.25rem;
    height: 1.25rem;
  }
}