/* 全局样式 - 泸州老窖主题 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 现代CSS重置 */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* CSS自定义属性 - 主题变量 */
:root {
  --primary-color: #dc2626;
  --primary-light: #b91c1c;
  --secondary-color: #3b82f6;
  --success-color: #10b981;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --background-primary: #fef7f7;
  --background-secondary: #f0f9ff;
  --background-tertiary: #f8fafc;
  --border-color: rgba(220, 38, 38, 0.2);
  --shadow-light: 0 1px 6px rgba(220, 38, 38, 0.1);
  --shadow-medium: 0 2px 12px rgba(220, 38, 38, 0.1);
  --shadow-heavy: 0 4px 20px rgba(220, 38, 38, 0.2);
  --border-radius: 1.5px;
  --border-radius-lg: 3px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
  background: linear-gradient(135deg, #fef7f7 0%, #f0f9ff 50%, #f8fafc 100%);
  color: #1f2937;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

/* 页面容器 */
.page {
  /*display: none;*/
  min-height: 100vh;
}

.page.active {
  display: block;
}

/* 容器样式 - 泸州老窖主题 */
.container { 
  padding: 12px 10px; 
  box-sizing: border-box; 
  min-height: 100vh;
  padding-bottom: calc(70px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(5px);
  border-radius: 0;
  margin-top: 0;
  border: 1px solid rgba(220, 38, 38, 0.1);
}

/* 标题样式 - 泸州老窖主题 */
.section-title { 
  font-size: 18px; 
  font-weight: 600; 
  margin: 16px 0 12px 0; 
  color: #1f2937;
  line-height: 1.4;
  text-align: center;
  background: linear-gradient(135deg, #dc2626 0%, #3b82f6 50%, #1d4ed8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.25px;
}

/* 卡片样式 - 泸州老窖主题 */
.card { 
  background: rgba(255, 255, 255, 0.9); 
  border-radius: 1.5px; 
  box-shadow: 0 1px 6px rgba(220, 38, 38, 0.1), inset 0 0.5px 0 rgba(255, 255, 255, 0.8); 
  margin-bottom: 10px;
  overflow: hidden;
  border: 1px solid rgba(220, 38, 38, 0.2);
  backdrop-filter: blur(5px);
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.3), transparent);
}

/* 按钮样式 - 泸州老窖主题 */
.btn-primary { 
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); 
  color: #ffffff; 
  box-shadow: 0 1px 4px rgba(220, 38, 38, 0.3), inset 0 0.5px 0 rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(220, 38, 38, 0.3);
  position: relative;
  overflow: hidden;
}

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

.btn-primary:active::before {
  left: 100%;
}

.btn-secondary { 
  background: rgba(59, 130, 246, 0.1); 
  color: #1e40af; 
  border: 1px solid rgba(59, 130, 246, 0.3);
  box-shadow: 0 0.5px 2px rgba(59, 130, 246, 0.2), inset 0 0.5px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(5px);
}

.btn-danger { 
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); 
  color: #ffffff; 
  box-shadow: 0 1px 4px rgba(220, 38, 38, 0.3), inset 0 0.5px 0 rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(220, 38, 38, 0.3);
}

.btn { 
  height: 44px; 
  border-radius: 1px; 
  font-size: 15px; 
  font-weight: 500;
  display: flex; 
  align-items: center; 
  justify-content: center; 
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  position: relative;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  flex: 1;
  letter-spacing: 0.25px;
  text-transform: none;
  cursor: pointer;
  border: none;
}

.btn:active {
  transform: scale(0.98) translateY(0.5px);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

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

/* 布局工具类 */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

/* 间距工具类 */
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }

.mt-6 { margin-top: 6px; }
.mt-8 { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }

.mb-6 { margin-bottom: 6px; }
.mb-8 { margin-bottom: 8px; }
.mb-10 { margin-bottom: 10px; }
.mb-12 { margin-bottom: 12px; }

/* 安全区域适配 */
.pb-safe { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }

/* 文字样式 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-sm { font-size: 12px; }
.text-base { font-size: 14px; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 18px; }

.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-900 { color: #111827; }

/* 手机端按钮优化 */
@media screen and (max-width: 375px) {
  .btn {
    height: 40px;
    font-size: 14px;
    min-width: 0;
    max-width: 100%;
    padding: 0 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .container {
    padding: 10px 8px;
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
  }
}

/* 超小屏幕按钮优化 */
@media screen and (max-width: 300px) {
  .btn {
    height: 38px;
    font-size: 13px;
    padding: 0 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .container {
    padding: 8px 6px;
    padding-bottom: calc(50px + env(safe-area-inset-bottom));
  }
}

/* 极小屏幕优化 */
@media screen and (max-width: 240px) {
  .btn {
    height: 36px;
    font-size: 12px;
    padding: 0 4px;
  }
  
  .container {
    padding: 6px 4px;
    padding-bottom: calc(45px + env(safe-area-inset-bottom));
  }
}
