/* ========== 个人中心样式 ========== */

/* 用户信息头部 */
.profile-header {
  background: var(--gradient);
  padding: 32px 16px 24px;
  color: #fff;
  text-align: center;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.2);
  border: 3px solid rgba(255, 255, 255, 0.4);
}

.profile-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.profile-gender-age {
  font-size: 13px;
  opacity: 0.8;
  margin-bottom: 6px;
}

.profile-signature {
  font-size: 13px;
  opacity: 0.7;
  font-style: italic;
}

/* 统计数据 */
.profile-stats {
  display: flex;
  background: var(--white);
  padding: 16px 0;
  margin: -12px 16px 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
}

.profile-stat-item {
  flex: 1;
  text-align: center;
  border-right: 1px solid var(--divider);
}

.profile-stat-item:last-child {
  border-right: none;
}

.profile-stat-number {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.profile-stat-label {
  font-size: 11px;
  color: var(--text-light);
}

/* 菜单组 */
.profile-menu-group {
  background: var(--white);
  margin: 0 16px 12px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--divider);
  cursor: pointer;
  transition: background 0.3s;
}

.profile-menu-item:last-child {
  border-bottom: none;
}

.profile-menu-item:active {
  background: var(--bg);
}

.profile-menu-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  font-size: 16px;
  flex-shrink: 0;
}

.profile-menu-icon.wine {
  background: var(--wine-red-bg);
  color: var(--primary);
}

.profile-menu-icon.purple {
  background: var(--purple-bg);
  color: var(--secondary);
}

.profile-menu-icon.gold {
  background: var(--gold-light);
  color: var(--gold);
}

.profile-menu-icon.blue {
  background: rgba(33, 150, 243, 0.1);
  color: var(--info);
}

.profile-menu-icon.green {
  background: rgba(76, 175, 80, 0.1);
  color: var(--success);
}

.profile-menu-text {
  flex: 1;
  font-size: 14px;
}

.profile-menu-arrow {
  color: var(--text-lighter);
  font-size: 16px;
}

.profile-menu-value {
  font-size: 13px;
  color: var(--text-light);
  margin-right: 8px;
}

/* 开关 */
.toggle-switch {
  width: 44px;
  height: 24px;
  background: var(--text-lighter);
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
}

.toggle-switch.on {
  background: var(--primary);
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: var(--white);
  border-radius: var(--radius-full);
  transition: transform 0.3s;
}

.toggle-switch.on::after {
  transform: translateX(20px);
}

/* 退出按钮 */
.profile-logout {
  margin: 24px 16px;
  text-align: center;
}

.btn-logout {
  width: 100%;
  height: 48px;
  background: var(--white);
  color: var(--danger);
  border: 1px solid var(--danger);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-logout:active {
  background: rgba(244, 67, 54, 0.05);
}

/* 版本信息 */
.profile-version {
  text-align: center;
  padding: 16px;
  font-size: 12px;
  color: var(--text-lighter);
}

/* ========== 钱包页面样式 ========== */

/* 钱包弹窗遮罩 */
.wallet-panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
  backdrop-filter: blur(5px);
}

/* 钱包弹窗 */
.wallet-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, #fff 0%, #f8f9fa 100%);
  border-radius: 24px 24px 0 0;
  z-index: 201;
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
}

.wallet-panel.active {
  transform: translateY(0);
}

.wallet-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
}

.wallet-panel-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.wallet-panel-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: 50%;
  font-size: 22px;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.3s;
}

.wallet-panel-close:active {
  background: var(--border);
}

.wallet-panel-body {
  padding: 20px;
}

/* 余额卡片 */
.wallet-balance-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 24px;
}

.wallet-balance-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #8B2252 0%, #6331de 50%, #4f46e5 100%);
}

.wallet-balance-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.wallet-balance-bg::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -20%;
  width: 150px;
  height: 150px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.wallet-balance-content {
  position: relative;
  padding: 24px;
  color: #fff;
}

.wallet-balance-label {
  font-size: 13px;
  opacity: 0.8;
  margin-bottom: 8px;
}

.wallet-balance-amount {
  display: flex;
  align-items: baseline;
  margin-bottom: 20px;
}

.wallet-balance-amount .currency {
  font-size: 24px;
  font-weight: 500;
  margin-right: 4px;
}

.wallet-balance-amount .amount {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -1px;
}

.wallet-extra-info {
  display: flex;
  gap: 24px;
}

.wallet-info-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.wallet-info-item .info-icon {
  font-size: 14px;
}

.wallet-info-item .info-label {
  opacity: 0.7;
}

.wallet-info-item .info-value {
  font-weight: 600;
}

/* 分区标题 */
.wallet-section {
  margin-bottom: 24px;
}

.wallet-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wallet-section-title .section-icon {
  font-size: 16px;
}

/* 充值选项 */
.recharge-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.recharge-option {
  position: relative;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.recharge-option:active {
  transform: scale(0.98);
}

.recharge-option.selected {
  border-color: var(--primary);
  background: var(--wine-red-bg);
}

.recharge-option.hot::before,
.recharge-option.best::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 40px 40px 0;
}

.recharge-option.hot::before {
  border-color: transparent #ff6b6b transparent transparent;
}

.recharge-option.best::before {
  border-color: transparent #ffd700 transparent transparent;
}

.recharge-amount {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.recharge-bonus {
  font-size: 11px;
  color: var(--danger);
  font-weight: 500;
}

.recharge-tag {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 9px;
  color: #fff;
  font-weight: 500;
  transform: rotate(45deg) translateX(2px);
}

/* 自定义金额 */
.recharge-custom {
  display: flex;
  align-items: center;
  gap: 12px;
}

.custom-label {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.custom-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
}

.custom-currency {
  color: var(--text-secondary);
  font-size: 14px;
}

.custom-input {
  flex: 1;
  height: 40px;
  background: transparent;
  border: none;
  font-size: 14px;
  color: var(--text);
  padding: 0 8px;
}

.custom-input:focus {
  outline: none;
}

/* 支付方式 */
.payment-methods {
  display: flex;
  gap: 12px;
}

.payment-method {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
}

.payment-method.selected {
  border-color: var(--primary);
  background: var(--wine-red-bg);
}

.payment-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.payment-icon svg {
  width: 24px;
  height: 24px;
}

.payment-icon.wechat {
  background: #07c160;
  color: #fff;
}

.payment-icon.alipay {
  background: #1677ff;
  color: #fff;
}

.payment-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.payment-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--border);
  color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.3s;
}

.payment-method.selected .payment-check {
  background: var(--primary);
  color: #fff;
}

/* 充值按钮 */
.recharge-submit-btn {
  width: 100%;
  height: 52px;
  background: linear-gradient(135deg, #8B2252 0%, #6331de 100%);
  color: #fff;
  border: none;
  border-radius: 26px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(139, 34, 82, 0.3);
  margin-bottom: 24px;
}

.recharge-submit-btn:active {
  transform: scale(0.98);
  opacity: 0.9;
}

.recharge-submit-btn .btn-icon {
  font-size: 18px;
}

/* 交易记录 */
.transaction-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.transaction-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg);
  border-radius: 10px;
}

.transaction-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.transaction-icon.recharge {
  background: rgba(0, 200, 83, 0.1);
}

.transaction-icon.spend {
  background: rgba(255, 107, 107, 0.1);
}

.transaction-icon.reward {
  background: rgba(255, 215, 0, 0.1);
}

.transaction-info {
  flex: 1;
}

.transaction-desc {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2px;
}

.transaction-time {
  font-size: 12px;
  color: var(--text-light);
}

.transaction-amount {
  font-size: 16px;
  font-weight: 600;
}

.transaction-amount.income {
  color: #00c853;
}

.transaction-amount.expense {
  color: #ff6b6b;
}

/* ========== 编辑资料面板 ========== */
.edit-profile-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  z-index: 1002;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  max-height: 85vh;
  overflow-y: auto;
}

.edit-profile-panel.active {
  transform: translateY(0);
}

.edit-profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--card-bg);
}

.edit-profile-close {
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
  width: 40px;
}

.edit-profile-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.edit-profile-save {
  color: var(--primary);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  width: 40px;
  text-align: right;
}

.edit-profile-content {
  padding: 20px;
}

.edit-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

.edit-avatar {
  position: relative;
  margin-bottom: 8px;
}

.edit-avatar .avatar {
  width: 80px;
  height: 80px;
  font-size: 32px;
}

.edit-avatar-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 28px;
  height: 28px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: 2px solid var(--card-bg);
  cursor: pointer;
}

.edit-avatar-tip {
  font-size: 12px;
  color: var(--text-light);
}

.edit-form {
  background: var(--bg);
  border-radius: 12px;
  overflow: hidden;
}

.edit-form-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.edit-form-item:last-child {
  border-bottom: none;
}

.edit-form-item label {
  width: 60px;
  font-size: 14px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.edit-form-item input,
.edit-form-item textarea {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--text);
  outline: none;
  text-align: right;
}

.edit-form-item textarea {
  resize: none;
  min-height: 60px;
  text-align: left;
  padding: 8px;
  background: var(--card-bg);
  border-radius: 8px;
}

.edit-char-count {
  position: absolute;
  right: 16px;
  bottom: 18px;
  font-size: 11px;
  color: var(--text-light);
}

.edit-gender-selector {
  display: flex;
  gap: 12px;
  margin-left: auto;
}

.gender-option {
  padding: 6px 16px;
  border-radius: 16px;
  font-size: 13px;
  background: var(--bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.gender-option.active {
  background: var(--primary);
  color: #fff;
}

.edit-phone {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  gap: 12px;
}

.edit-phone span:first-child {
  color: var(--text);
  font-size: 14px;
}

.edit-phone-change {
  color: var(--primary);
  font-size: 13px;
  cursor: pointer;
}

/* ========== 我的帖子面板 ========== */
.my-posts-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  z-index: 1002;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  max-height: 85vh;
  overflow-y: auto;
}

.my-posts-panel.active {
  transform: translateY(0);
}

.my-posts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--card-bg);
}

.my-posts-close {
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
  width: 40px;
}

.my-posts-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.my-posts-count {
  font-size: 13px;
  color: var(--text-light);
  width: 40px;
  text-align: right;
}

.my-posts-content {
  padding: 16px;
}

.my-post-card {
  background: var(--bg);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.my-post-content {
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 12px;
}

.my-post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 12px;
}

.my-post-stats {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.my-post-actions {
  display: flex;
  gap: 24px;
}

.my-post-edit,
.my-post-delete {
  font-size: 13px;
  cursor: pointer;
}

.my-post-edit {
  color: var(--primary);
}

.my-post-delete {
  color: #ff6b6b;
}

/* ========== 我的收藏面板 ========== */
.favorites-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  z-index: 1002;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  max-height: 85vh;
  overflow-y: auto;
}

.favorites-panel.active {
  transform: translateY(0);
}

.favorites-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--card-bg);
}

.favorites-close {
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
  width: 40px;
}

.favorites-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.favorites-count {
  font-size: 13px;
  color: var(--text-light);
  width: 40px;
  text-align: right;
}

.favorites-tabs {
  display: flex;
  padding: 12px 16px;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  background: var(--card-bg);
  position: sticky;
  top: 52px;
}

.fav-tab {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg);
  cursor: pointer;
  transition: all 0.2s;
}

.fav-tab.active {
  background: var(--primary);
  color: #fff;
}

.favorites-content {
  padding: 16px;
}

.fav-section {
  display: none;
}

.fav-section.active {
  display: block;
}

.fav-item {
  display: flex;
  align-items: center;
  padding: 14px;
  background: var(--bg);
  border-radius: 12px;
  margin-bottom: 10px;
  gap: 12px;
}

.fav-wine-icon,
.fav-bar-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.fav-wine-info,
.fav-bar-info,
.fav-post-info {
  flex: 1;
  min-width: 0;
}

.fav-wine-name,
.fav-bar-name,
.fav-post-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fav-wine-meta,
.fav-bar-meta {
  font-size: 12px;
  color: var(--text-light);
}

.fav-post-avatar {
  width: 44px;
  height: 44px;
  font-size: 18px;
  flex-shrink: 0;
}

.fav-post-content {
  font-size: 12px;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fav-remove {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-light);
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s;
}

.fav-remove:hover {
  background: rgba(255,107,107,0.1);
  color: #ff6b6b;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 14px;
  color: var(--text-light);
}
