/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #FAF8F5;
  color: #3A3A3A;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* 页面容器 */
#app {
  max-width: 750px;
  margin: 0 auto;
  min-height: 100vh;
  background-color: #FAF8F5;
  position: relative;
}

.page {
  display: none;
  min-height: 100vh;
  padding-bottom: 80px;
}

.page.active {
  display: block;
}

/* 配色变量 - 奢华简约风格 */
/* 主色：香槟金 #C9A96E */
/* 辅色：深灰 #2C2C2C、玫瑰金 #B76E79 */
/* 背景：象牙白 #FAF8F5、米色 #F0EBE3 */

/* 头部 */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  max-width: 750px;
  margin: 0 auto;
  height: 50px;
  background: linear-gradient(135deg, #2C2C2C 0%, #3A3A3A 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.header-title {
  font-size: 18px;
  font-weight: 500;
  color: #C9A96E;
  letter-spacing: 2px;
}

.header-user {
  position: absolute;
  right: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #C9A96E;
}

.back-btn {
  position: absolute;
  left: 15px;
  background: none;
  border: none;
  color: #C9A96E;
  font-size: 20px;
  cursor: pointer;
}

/* 主内容区 */
.main-content {
  padding-top: 50px;
}

/* 登录页 */
.login-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: linear-gradient(180deg, #FAF8F5 0%, #F0EBE3 100%);
}

.logo {
  text-align: center;
  margin-bottom: 40px;
}

.logo h1 {
  font-size: 32px;
  color: #2C2C2C;
  margin-bottom: 10px;
  font-weight: 300;
  letter-spacing: 4px;
}

.logo p {
  font-size: 14px;
  color: #8A8A8A;
  letter-spacing: 1px;
}

.login-form {
  width: 100%;
  max-width: 320px;
}

.input-group {
  margin-bottom: 15px;
}

.input-group input {
  width: 100%;
  height: 48px;
  padding: 0 15px;
  border: 1px solid #E0D8D0;
  border-radius: 4px;
  font-size: 16px;
  background: #FFF;
  outline: none;
  transition: border-color 0.3s ease;
}

.input-group input:focus {
  border-color: #C9A96E;
}

.code-group {
  display: flex;
  gap: 10px;
}

.code-group input {
  flex: 1;
}

.code-btn {
  height: 48px;
  padding: 0 20px;
  border: 1px solid #C9A96E;
  border-radius: 4px;
  background: transparent;
  color: #C9A96E;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.code-btn:hover {
  background: #C9A96E;
  color: #FFF;
}

.code-btn:disabled {
  border-color: #CCC;
  color: #999;
  background: transparent;
}

/* 按钮 */
.btn {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 1px;
}

.btn-primary {
  background: #C9A96E;
  color: #FFF;
}

.btn-primary:hover {
  background: #B89A5E;
}

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

.btn-secondary {
  background: transparent;
  color: #C9A96E;
  border: 1px solid #C9A96E;
}

.btn-wechat {
  background: #2C2C2C;
  color: #C9A96E;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-buy {
  background: linear-gradient(135deg, #C9A96E 0%, #B89A5E 100%);
  color: #FFF;
}

.btn-logout {
  background: transparent;
  color: #8A8A8A;
  margin-top: 20px;
  border: 1px solid #E0E0E0;
}

.btn-pay {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 710px;
  margin: 0 auto;
}

.divider {
  text-align: center;
  margin: 20px 0;
  position: relative;
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #E0D8D0;
}

.divider span {
  background: #FAF8F5;
  color: #8A8A8A;
  padding: 0 15px;
  position: relative;
  font-size: 14px;
}

/* 海报区域 */
.poster-section {
  padding: 20px 15px;
  background: linear-gradient(180deg, #2C2C2C 0%, #3A3A3A 50%, #FAF8F5 100%);
}

.poster-container {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  border: 1px solid #E0D8D0;
}

.poster-img {
  width: 100%;
  display: block;
}

.qr-overlay {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: rgba(255,255,255,0.95);
  padding: 12px;
  border-radius: 4px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.qr-code {
  width: 100px;
  height: 100px;
}

.qr-text {
  font-size: 12px;
  color: #666;
  margin-top: 5px;
}

/* 套餐区域 */
.package-section {
  padding: 25px 15px;
  background: #FFF;
}

.section-title {
  font-size: 18px;
  font-weight: 400;
  color: #2C2C2C;
  margin-bottom: 15px;
  padding-left: 12px;
  border-left: 2px solid #C9A96E;
  letter-spacing: 1px;
}

.package-list {
  background: #FAF8F5;
  border-radius: 8px;
  padding: 15px;
  border: 1px solid #E8E4E0;
}

.package-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #E8E4E0;
}

.package-item:last-child {
  border-bottom: none;
}

.package-item.gift {
  background: linear-gradient(135deg, #F5F0E8 0%, #E8E0D8 100%);
  margin: 8px -8px;
  padding: 12px;
  border-radius: 4px;
  border: none;
}

.item-name {
  font-weight: 400;
  color: #2C2C2C;
}

.item-count {
  color: #C9A96E;
  font-weight: 500;
}

.item-value {
  color: #8A8A8A;
  font-size: 12px;
}

/* 团购奖励 */
.group-reward-section {
  padding: 25px 15px;
  background: linear-gradient(180deg, #FFF 0%, #FAF8F5 100%);
}

.reward-cards {
  display: flex;
  gap: 12px;
}

.reward-card {
  flex: 1;
  background: #FFF;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid #E8E4E0;
  transition: all 0.3s ease;
}

.reward-card.highlight {
  border-color: #C9A96E;
  background: linear-gradient(135deg, #FFF 0%, #F5F0E8 100%);
}

.reward-level {
  font-size: 15px;
  font-weight: 400;
  color: #C9A96E;
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.reward-content p {
  font-size: 13px;
  color: #5A5A5A;
  margin-bottom: 6px;
}

.reward-note {
  font-size: 11px;
  color: #8A8A8A;
  background: #F0EBE3;
  padding: 4px 8px;
  border-radius: 2px;
  display: inline-block;
  margin-top: 8px;
}

/* 红包区域 */
.redpacket-section {
  padding: 20px 15px;
  background: #FFF;
}

.redpacket-card {
  background: linear-gradient(135deg, #F5F0E8 0%, #E8E0D8 100%);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  color: #2C2C2C;
  border: 1px solid #E0D8D0;
}

.redpacket-icon {
  font-size: 40px;
  opacity: 0.9;
}

.redpacket-content h3 {
  font-size: 18px;
  margin-bottom: 6px;
  color: #C9A96E;
  font-weight: 400;
}

.redpacket-content p {
  font-size: 13px;
  color: #5A5A5A;
}

.redpacket-content .highlight {
  font-size: 14px;
  font-weight: 500;
  color: #B76E79;
  margin-top: 6px;
}

/* 团长福利 */
.leader-prize-section {
  padding: 25px 15px;
  background: #FAF8F5;
}

.prize-list {
  display: grid;
  gap: 10px;
}

.prize-item {
  background: #FFF;
  border-radius: 8px;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  border: 1px solid #E8E4E0;
}

.prize-item.grand {
  background: linear-gradient(135deg, #C9A96E 0%, #B89A5E 100%);
  border: none;
}

.prize-count {
  background: transparent;
  color: #C9A96E;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
  border: 1px solid #C9A96E;
}

.prize-item.grand .prize-count {
  background: #2C2C2C;
  color: #C9A96E;
  border: none;
}

.prize-name {
  flex: 1;
  font-size: 14px;
  color: #3A3A3A;
}

.prize-item.grand .prize-name {
  color: #FFF;
}

.prize-tag {
  background: #F0EBE3;
  color: #8A8A8A;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
}

.prize-item.grand .prize-tag {
  background: rgba(255,255,255,0.2);
  color: #FFF;
}

/* 活动规则 */
.rules-section {
  padding: 25px 15px;
  background: #FFF;
}

.rules-content {
  background: #FAF8F5;
  border-radius: 8px;
  padding: 15px;
  border: 1px solid #E8E4E0;
}

.rules-content p {
  font-size: 13px;
  color: #5A5A5A;
  margin-bottom: 12px;
  line-height: 1.7;
}

/* 底部操作栏 */
.action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 750px;
  margin: 0 auto;
  background: #FFF;
  padding: 12px 15px;
  display: flex;
  gap: 10px;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
  z-index: 100;
  border-top: 1px solid #E8E4E0;
}

.action-bar .btn {
  flex: 1;
  height: 44px;
  font-size: 14px;
  border-radius: 4px;
}

/* 个人中心 */
.profile-card {
  background: linear-gradient(135deg, #2C2C2C 0%, #3A3A3A 100%);
  padding: 30px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  color: #FFF;
}

.profile-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 3px solid #C9A96E;
}

.profile-info h3 {
  font-size: 18px;
  margin-bottom: 6px;
  color: #C9A96E;
  font-weight: 400;
}

.profile-info p {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
}

.menu-list {
  background: #FFF;
  margin-top: 15px;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #E8E4E0;
  cursor: pointer;
  transition: background 0.3s ease;
}

.menu-item:active {
  background: #FAF8F5;
}

.menu-icon {
  font-size: 18px;
  margin-right: 15px;
  color: #C9A96E;
}

.menu-text {
  flex: 1;
  font-size: 15px;
  color: #3A3A3A;
}

.menu-arrow {
  color: #C9A96E;
  font-size: 14px;
}

/* 订单页面 */
.order-tabs {
  display: flex;
  background: #FFF;
  border-bottom: 1px solid #E8E4E0;
  position: sticky;
  top: 50px;
  z-index: 10;
}

.tab {
  flex: 1;
  text-align: center;
  padding: 15px;
  font-size: 14px;
  color: #8A8A8A;
  cursor: pointer;
  position: relative;
  transition: color 0.3s ease;
}

.tab.active {
  color: #C9A96E;
}

.tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: #C9A96E;
}

.order-list {
  padding: 15px;
}

.order-item {
  background: #FFF;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  border: 1px solid #E8E4E0;
}

.order-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
  color: #8A8A8A;
}

.order-status {
  color: #C9A96E;
}

.order-product {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.order-product img {
  width: 80px;
  height: 80px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #E8E4E0;
}

.order-product-info h4 {
  font-size: 14px;
  color: #3A3A3A;
  margin-bottom: 6px;
}

.order-product-info p {
  font-size: 12px;
  color: #8A8A8A;
}

.order-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid #E8E4E0;
}

.order-amount {
  font-size: 14px;
  color: #3A3A3A;
}

.order-amount span {
  color: #C9A96E;
  font-weight: 500;
}

/* 支付页面 */
.pay-info {
  background: #FFF;
  padding: 20px;
  margin-bottom: 15px;
}

.pay-product {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.pay-product img {
  width: 100px;
  height: 100px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #E8E4E0;
}

.product-detail h3 {
  font-size: 15px;
  color: #3A3A3A;
  margin-bottom: 6px;
}

.product-detail p {
  font-size: 13px;
  color: #8A8A8A;
}

.pay-amount {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid #E8E4E0;
  font-size: 15px;
}

.pay-amount .amount {
  font-size: 22px;
  color: #C9A96E;
  font-weight: 500;
}

.pay-methods {
  background: #FFF;
  padding: 20px;
}

.pay-methods h3 {
  font-size: 15px;
  margin-bottom: 15px;
  color: #3A3A3A;
}

.pay-method {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border: 1px solid #E8E4E0;
  border-radius: 6px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.pay-method.active {
  border-color: #C9A96E;
}

.method-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #F0EBE3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
}

.pay-method.active .method-check {
  background: #C9A96E;
  color: #FFF;
}

/* 加载和提示 */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(250,248,245,0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.loading.hidden {
  display: none;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 2px solid #E8E4E0;
  border-top: 2px solid #C9A96E;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading p {
  color: #5A5A5A;
  margin-top: 15px;
  font-size: 14px;
}

.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(44,44,44,0.85);
  color: #C9A96E;
  padding: 12px 25px;
  border-radius: 4px;
  font-size: 14px;
  z-index: 1001;
  letter-spacing: 1px;
}

.toast.hidden {
  display: none;
}

/* 团购页面 */
.group-status {
  background: linear-gradient(135deg, #2C2C2C 0%, #3A3A3A 100%);
  padding: 35px 20px;
  text-align: center;
  color: #FFF;
}

.group-status h2 {
  font-size: 22px;
  margin-bottom: 10px;
  color: #C9A96E;
  font-weight: 400;
}

.group-status p {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
}

.group-members {
  padding: 20px;
  background: #FFF;
  margin-bottom: 15px;
}

.group-members h3 {
  font-size: 15px;
  margin-bottom: 15px;
  color: #3A3A3A;
}

.member-list {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.member-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.member-item img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid #C9A96E;
}

.member-item.leader img {
  border-color: #B76E79;
}

.member-item span {
  font-size: 12px;
  color: #8A8A8A;
}

.group-share {
  padding: 20px;
  background: #FFF;
  text-align: center;
}

.group-share h3 {
  font-size: 15px;
  margin-bottom: 15px;
  color: #3A3A3A;
}

.share-poster {
  margin-bottom: 15px;
}

.share-poster img {
  width: 100%;
  max-width: 300px;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  border: 1px solid #E8E4E0;
}

/* 响应式 */
@media (max-width: 375px) {
  .reward-cards {
    flex-direction: column;
  }
  
  .action-bar .btn {
    font-size: 12px;
  }
  
  .logo h1 {
    font-size: 28px;
  }
}