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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background: #f8f9fa;
  color: #333;
  line-height: 1.5;
}

/* 页面容器 */
.page-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #fff6f8 0%, #fff9f9 100%);
}

/* 顶部装饰 */
.top-decoration {
  height: 120px;
  background: linear-gradient(135deg, #ff69b4, #ff8da1);
  border-radius: 0 0 30px 30px;
  position: relative;
  overflow: hidden;
}

.wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background: url('data:image/svg+xml,...') repeat-x;
  animation: wave 10s linear infinite;
}

/* 主容器 */
.main-container {
  max-width: 600px;
  margin: -60px auto 0;
  padding: 20px;
  position: relative;
}

/* 卡片基础样式 */
.card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
  overflow: hidden;
}

.card-header {
  padding: 20px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #f0f0f0;
}

.card-header h3 {
  margin-left: 10px;
  font-size: 18px;
  color: #333;
}

/* 用户信息卡片 */
.user-card .card-content {
  padding: 20px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.info-item label {
  color: #666;
  font-size: 15px;
}

.info-item span {
  color: #333;
  font-weight: 500;
}

/* 充值套餐网格 */
.packages-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  padding: 20px;
}

/* 套餐卡片 */
.package-item {
  background: white;
  border: 1px solid #f0f0f0;
  border-radius: 15px;
  padding: 15px;
  text-align: left;
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.package-item:active {
  transform: scale(0.98);
}

.package-item.selected {
  border-color: #ff69b4;
  box-shadow: 0 4px 12px rgba(255, 105, 180, 0.15);
  background: linear-gradient(135deg, #fff6f8 0%, #fff9f9 100%);
}

.package-tag {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ff69b4;
  color: white;
  padding: 3px 6px;
  border-radius: 8px;
  font-size: 12px;
  transform: rotate(15deg);
}

/* 左侧内容 */
.package-info {
  flex: 1;
}

.package-item h4 {
  color: #333;
  font-size: 16px;
  margin-bottom: 4px;
}

.package-count {
  color: #666;
  font-size: 14px;
}

/* 右侧价格 */
.package-price {
  color: #ff69b4;
  font-size: 24px;
  font-weight: bold;
  margin-left: 15px;
  white-space: nowrap;
}

.package-price small {
  font-size: 16px;
}

/* 支付按钮 */
.pay-button {
  width: 100%;
  background: linear-gradient(135deg, #ff69b4, #ff8da1);
  color: white;
  border: none;
  padding: 16px;
  border-radius: 15px;
  font-size: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pay-button:active {
  transform: scale(0.98);
}

/* 消息提示框 */
.message-box {
  padding: 15px;
  border-radius: 12px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.error-box {
  background: #fff2f0;
  border: 1px solid #ffccc7;
  color: #ff4d4f;
}

.info-box {
  background: #e6f7ff;
  border: 1px solid #91d5ff;
  color: #1890ff;
}

/* 图标 */
.icon {
  width: 24px;
  height: 24px;
  display: inline-block;
  background-size: contain;
}

/* 动画 */
@keyframes wave {
  0% { background-position: 0 0; }
  100% { background-position: 1000px 0; }
}

/* 响应式设计 */
@media (max-width: 480px) {
  .packages-grid {
    grid-template-columns: 1fr;
  }
  
  .main-container {
    padding: 15px;
  }
}

/* 模态框样式 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: white;
  border-radius: 20px;
  padding: 30px;
  width: 85%;
  max-width: 320px;
  text-align: center;
  animation: slideUp 0.3s ease;
}

.modal-status {
  margin-bottom: 24px;
}

.status-icon {
  margin-bottom: 16px;
}

.status-icon .icon {
  width: 48px;
  height: 48px;
  display: inline-block;
}

.icon.success {
  background: url('data:image/svg+xml,<svg...>') no-repeat center;
  background-size: contain;
}

.icon.error {
  background: url('data:image/svg+xml,<svg...>') no-repeat center;
  background-size: contain;
}

.icon.warning {
  background: url('data:image/svg+xml,<svg...>') no-repeat center;
  background-size: contain;
}

.status-text {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 16px 0;
}

.status-desc {
  font-size: 15px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 20px;
}

.modal-button {
  width: 100%;
  padding: 12px;
  border: none;
  background: linear-gradient(135deg, #ff69b4, #ff8da1);
  color: white;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-button:active {
  transform: scale(0.98);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 等待弹框样式 */
.loading-modal {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.loading-content {
  background: rgba(255, 255, 255, 0.95);
  padding: 40px 30px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #ff69b4;
  border-top-color: transparent;
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 1s linear infinite;
}

.loading-text {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.loading-desc {
  font-size: 14px;
  color: #666;
}

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

/* 模糊背景效果 */
.page-container.blur {
  filter: blur(4px);
  pointer-events: none;
}

/* 双按钮布局 */
.modal-buttons {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.modal-button.secondary {
  background: #f5f5f5;
  color: #666;
  flex: 1;
}

.modal-button.primary {
  background: linear-gradient(135deg, #ff69b4, #ff8da1);
  color: white;
  flex: 1;
}

/* 弹框动画优化 */
.timeout-modal .modal-content,
.limit-modal .modal-content {
  transform: scale(0.9);
  opacity: 0;
  animation: popIn 0.3s ease forwards;
}

@keyframes popIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
} 