/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* 主色调 - 现代化紫金配色 */
  --primary-color: #6B4E9A;        /* 神秘紫 */
  --primary-light: #8B6FB8;        /* 浅紫 */
  --primary-dark: #4A3570;         /* 深紫 */
  --accent-color: #D4AF37;         /* 金色 */
  --accent-light: #F0D87C;         /* 浅金 */
  
  /* 中性色 - 更温暖专业 */
  --bg-primary: #F8F6F3;           /* 主背景-米白 */
  --bg-secondary: #FFFFFF;         /* 卡片背景 */
  --bg-tertiary: #FAF9F7;          /* 次级背景 */
  
  /* 文字颜色 */
  --text-primary: #2C2C2C;         /* 主文字 */
  --text-secondary: #666666;       /* 次要文字 */
  --text-tertiary: #999999;        /* 辅助文字 */
  --text-inverse: #FFFFFF;         /* 反色文字 */
  
  /* 边框颜色 */
  --border-color: #E0E0E0;         /* 边框 */
  --border-light: #F0F0F0;         /* 浅边框 */
  
  /* 功能色 */
  --success-color: #52C41A;        /* 成功 */
  --warning-color: #FAAD14;        /* 警告 */
  --error-color: #F5222D;          /* 错误 */
  --info-color: #1890FF;           /* 信息 */
  
  /* 阴影 */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.16);
  
  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: linear-gradient(135deg, #F5F3FF 0%, #FAFAFA 50%, #FFF9F0 100%);
  min-height: 100vh;
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: -0.5px;
}

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

/* 卡片样式 */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card:hover::before {
  opacity: 1;
}

.card-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 按钮样式 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: var(--text-inverse);
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-secondary {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-light) 100%);
  color: var(--text-primary);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: var(--text-inverse);
}

.btn-danger {
  background: linear-gradient(135deg, var(--error-color) 0%, #FF4D4F 100%);
}

.btn-success {
  background: linear-gradient(135deg, var(--success-color) 0%, #73D13D 100%);
}

/* 表单样式 */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 15px;
}

.form-label .required {
  color: var(--error-color);
  font-size: 16px;
}

.form-input,
.form-select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 15px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
}

.form-input:hover,
.form-select:hover {
  border-color: var(--primary-light);
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(107, 78, 154, 0.1);
  background: var(--bg-tertiary);
}

.form-input::placeholder {
  color: var(--text-tertiary);
}

.form-hint {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 加载动画 */
.loading {
  text-align: center;
  padding: 60px 20px;
}

.loading-spinner {
  display: inline-block;
  width: 60px;
  height: 60px;
  border: 4px solid var(--border-light);
  border-top-color: var(--primary-color);
  border-right-color: var(--accent-color);
  border-radius: 50%;
  animation: spin 1s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

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

.loading-text {
  margin-top: 20px;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
}

.loading-progress {
  margin-top: 12px;
  color: var(--primary-color);
  font-size: 18px;
  font-weight: 600;
}

/* 提示信息 */
.alert {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-left: 4px solid;
  box-shadow: var(--shadow-sm);
}

.alert::before {
  content: '';
  font-size: 20px;
  flex-shrink: 0;
}

.alert-info {
  background: #E6F7FF;
  border-color: var(--info-color);
  color: #0050B3;
}

.alert-info::before {
  content: 'ℹ️';
}

.alert-error {
  background: #FFF1F0;
  border-color: var(--error-color);
  color: #CF1322;
}

.alert-error::before {
  content: '⚠️';
}

.alert-success {
  background: #F6FFED;
  border-color: var(--success-color);
  color: #389E0D;
}

.alert-success::before {
  content: '✅';
}

.alert-warning {
  background: #FFFBE6;
  border-color: var(--warning-color);
  color: #D46B08;
}

.alert-warning::before {
  content: '⚡';
}

/* 页面头部 */
.page-header {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--text-inverse);
  margin: -20px -20px 30px -20px;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.05)"/></svg>');
  opacity: 0.3;
}

.page-title {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 8px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
}

.page-subtitle {
  font-size: 15px;
  opacity: 0.95;
  font-weight: 400;
  position: relative;
  z-index: 1;
}

/* 返回按钮 */
.back-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 48px;
  height: 48px;
  background: var(--bg-secondary);
  color: var(--primary-color);
  border: 2px solid var(--border-color);
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-md);
}

.back-btn:hover {
  background: var(--primary-color);
  color: var(--text-inverse);
  border-color: var(--primary-color);
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}

.back-btn:active {
  transform: scale(1.05);
}

/* 免责声明 */
.disclaimer {
  text-align: center;
  font-size: 12px;
  color: #999;
  padding: 20px;
  line-height: 1.6;
}

/* 响应式 */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .page-title {
    font-size: 24px;
  }

  .btn {
    padding: 10px 20px;
    font-size: 14px;
  }
}

/* 隐藏类 */
.hidden {
  display: none !important;
}

/* 文本对齐 */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

/* 间距 */
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }

/* 进度条样式 */
.progress-container {
  width: 100%;
  max-width: 400px;
  margin: 24px auto;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: var(--border-light);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 20px;
  width: 0%;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.progress-text {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}
