/* ========== 酒遇 - 全局样式 ========== */
:root {
  /* 主色 - 酒红/深紫 */
  --primary: #8B2252;
  --primary-dark: #6B1B3F;
  --primary-light: #A63366;
  --secondary: #4A0E4E;
  --gradient: linear-gradient(135deg, #8B2252, #4A0E4E);
  --gradient-light: linear-gradient(135deg, #A63366, #5E1A5E);
  --gradient-horizontal: linear-gradient(90deg, #8B2252, #4A0E4E);

  /* 辅助色 */
  --wine-red-bg: rgba(139, 34, 82, 0.08);
  --purple-bg: rgba(74, 14, 78, 0.08);
  --gold: #D4A843;
  --gold-light: rgba(212, 168, 67, 0.15);

  /* 中性色 */
  --bg: #F5F5F5;
  --white: #FFFFFF;
  --text: #333333;
  --text-secondary: #666666;
  --text-light: #999999;
  --text-lighter: #CCCCCC;
  --border: #EEEEEE;
  --divider: #F0F0F0;

  /* 功能色 */
  --success: #4CAF50;
  --warning: #FF9800;
  --danger: #F44336;
  --info: #2196F3;
  --wechat: #07C160;
  --qq: #12B7F5;

  /* 阴影和圆角 */
  --shadow: 0 2px 12px rgba(139, 34, 82, 0.08);
  --shadow-lg: 0 4px 24px rgba(139, 34, 82, 0.12);
  --shadow-sm: 0 1px 6px rgba(0, 0, 0, 0.06);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-full: 50%;

  /* 安全区域 */
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ========== Reset ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

button, input, textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: none;
}

button {
  cursor: pointer;
}

/* ========== 通用类 ========== */
.screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  z-index: 1;
}

.screen.active {
  display: flex;
  flex-direction: column;
}

.page {
  display: none;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.page.active {
  display: flex;
}

/* ========== Toast ========== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  pointer-events: none;
  animation: toastFade 2s ease forwards;
}

@keyframes toastFade {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  85% { opacity: 1; }
  100% { opacity: 0; }
}

/* ========== 遮罩层 ========== */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: overlayIn 0.3s ease;
}

@keyframes overlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.overlay-content {
  width: 100%;
  max-height: 85vh;
  background: var(--white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* ========== 通用卡片 ========== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* ========== 通用标签 ========== */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.6;
}

.tag-primary {
  background: var(--wine-red-bg);
  color: var(--primary);
}

.tag-gold {
  background: var(--gold-light);
  color: var(--gold);
}

/* ========== 渐变按钮 ========== */
.btn-gradient {
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.3s;
}

.btn-gradient:active {
  opacity: 0.85;
}

/* ========== 输入框 ========== */
.input-field {
  width: 100%;
  height: 44px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 16px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.input-field:focus {
  border-color: var(--primary);
}

/* ========== 头像 ========== */
.avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  flex-shrink: 0;
}

.avatar-male {
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.avatar-female {
  background: linear-gradient(135deg, #f093fb, #f5576c);
}

/* ========== 星级评分 ========== */
.stars {
  display: inline-flex;
  gap: 2px;
  color: var(--gold);
  font-size: 12px;
}

.stars .star-empty {
  color: var(--text-lighter);
}
