/* myspace.css - 我的页面专属样式 */

/* ===== 顶部用户信息 ===== */
.profile-header {
  background: linear-gradient(135deg, #0f1b3d 0%, #1a2d5a 100%);
  padding: calc(var(--nav-h) + 48px) 0 32px;
  color: #fff;
}

.profile-guest {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.profile-guest__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-guest__avatar svg {
  width: 40px;
  height: 40px;
}

.profile-guest__info {
  flex: 1;
}

.profile-guest__info h2 {
  font-size: 18px;
  margin: 0 0 4px;
}

.profile-guest__info p {
  font-size: 13px;
  opacity: 0.6;
  margin: 0;
}

.profile-user {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.profile-user__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,107,43,0.2);
  border: 2px solid rgba(255,107,43,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-user__avatar svg {
  width: 40px;
  height: 40px;
}

.profile-user__info {
  flex: 1;
  min-width: 180px;
}

.profile-user__name {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}

.profile-user__meta {
  font-size: 13px;
  opacity: 0.6;
  margin-bottom: 8px;
}

.profile-user__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.profile-user__edit {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.2s;
}

.profile-user__edit:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}

.profile-user__edit svg {
  width: 14px;
  height: 14px;
}

/* ===== 加载指示 ===== */
.loading-wrap {
  text-align: center;
  padding: 40px;
}

.loading {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255,107,43,0.2);
  border-top-color: #ff6b2b;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ===== 票务列表 ===== */
.section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section__more {
  font-size: 13px;
  color: #ff6b2b;
  text-decoration: none;
}

.section__more:hover {
  text-decoration: underline;
}

.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ticket-empty {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

.ticket-empty svg {
  width: 64px;
  height: 64px;
  margin-bottom: 12px;
}

.ticket-empty p {
  margin: 0 0 16px;
  font-size: 14px;
}

.ticket-item {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border: 1px solid #f0f0f0;
  transition: box-shadow 0.2s;
}

.ticket-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ticket-item__left {}

.ticket-item__type {
  font-size: 11px;
  font-weight: 700;
  color: #ff6b2b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.ticket-item__name {
  font-size: 15px;
  font-weight: 500;
  color: #222;
  margin-bottom: 4px;
}

.ticket-item__time {
  font-size: 12px;
  color: #999;
}

.ticket-item__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.ticket-item__price {
  font-size: 18px;
  font-weight: 700;
  color: #222;
}

/* ===== 角色专属 ===== */
.role-dashboard {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.role-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-left: 4px solid #ddd;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.role-card--speaker { border-left-color: #ff6b2b; }
.role-card--vendor { border-left-color: #4a90d9; }
.role-card--contestant { border-left-color: #f5a623; }

.role-card__icon {
  font-size: 28px;
  flex-shrink: 0;
}

.role-card h3 {
  font-size: 15px;
  margin: 0 0 4px;
}

.role-card p {
  font-size: 13px;
  color: #666;
  margin: 0;
}

/* ===== 会员权益 ===== */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.benefit-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border: 1px solid #f0f0f0;
}

.benefit-card__icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.benefit-card h3 {
  font-size: 15px;
  margin: 0 0 8px;
}

.benefit-card p {
  font-size: 13px;
  color: #666;
  margin: 0;
}

/* ===== 弹窗 ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #eee;
}

.modal__header h3 {
  font-size: 17px;
  margin: 0;
}

.modal__close {
  background: none;
  border: none;
  font-size: 18px;
  color: #999;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.modal__close:hover {
  background: #f5f5f5;
}

.modal__body {
  padding: 24px;
}

.modal__desc {
  font-size: 13px;
  color: #666;
  margin: 0 0 20px 0;
  line-height: 1.5;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: #666;
  margin-bottom: 6px;
}

.form-group .form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.form-group .form-input:focus {
  outline: none;
  border-color: #ff6b2b;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.form-actions .btn {
  flex: 1;
}

/* ===== Badge ===== */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.badge--sm {
  padding: 2px 8px;
  font-size: 11px;
}

.badge--primary { background: #fff3ee; color: #ff6b2b; }

.badge--pending { background: #fff8e6; color: #f5a623; }
.badge--approved { background: #e8f5e9; color: #4caf50; }
.badge--rejected { background: #fce4ec; color: #e53935; }

.role-card--pending { opacity: 0.75; background: #fafafa; }
.role-card--apply { border-left-style: dashed; }
.role-card--apply .role-card__icon { filter: grayscale(0.3); }
.status--paid { background: #e8f5e9; color: #4caf50; }
.status--confirmed { background: #e3f2fd; color: #2196f3; }
.status--cancelled { background: #f5f5f5; color: #999; }

/* ===== 响应式 ===== */
@media (max-width: 640px) {
  .profile-header {
    padding: calc(var(--nav-h) + 24px) 0 24px;
  }

  .profile-user__edit {
    margin-top: 8px;
  }

  .role-card {
    flex-wrap: wrap;
  }

  .role-card .btn {
    width: 100%;
    margin-top: 8px;
  }

  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== 订单详情弹窗 ===== */
.order-detail__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--c-border, #eee);
  font-size: 14px;
}
.order-detail__row span {
  color: var(--c-text-secondary, #888);
  flex-shrink: 0;
}
.order-detail__row strong {
  text-align: right;
  word-break: break-all;
}
.order-detail__row--total {
  border-bottom: none;
  padding-top: 14px;
  margin-top: 4px;
  border-top: 2px solid var(--c-primary, #0f1b3d);
}
.order-detail__row--total strong {
  color: var(--c-accent, #ff6b2b);
  font-size: 18px;
}

/* 移动端用户信息栏退出按钮 */
.profile-user__logout-mob {
  display: none;
  padding: 8px 16px;
  font-size: 13px;
  color: #fff;
  background: var(--c-accent, #ff6b2b);
  border: none;
  border-radius: 20px;
  cursor: pointer;
  flex-shrink: 0;
}
@media (max-width: 767px) {
  .profile-user {
    display: flex;
    align-items: flex-start;
    gap: 12px;
  }
  .profile-user__logout-mob {
    display: block;
  }
}

/* ===== 论坛动态 ===== */
.bbs-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  background: var(--c-bg-alt, #f5f6f8);
  border-radius: 10px;
  padding: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.bbs-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text-secondary, #666);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.bbs-tab:hover {
  color: var(--c-text, #222);
}

.bbs-tab.active {
  background: #fff;
  color: var(--c-accent, #ff6b2b);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.bbs-panel {
  display: none;
}

.bbs-panel.active {
  display: block;
}

.bbs-thread-item {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border: 1px solid #f0f0f0;
  cursor: pointer;
  transition: box-shadow 0.2s;
}

.bbs-thread-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.bbs-thread-item__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--c-primary, #0f1b3d);
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.bbs-thread-item__title a {
  color: inherit;
  text-decoration: none;
}

.bbs-thread-item__title a:hover {
  color: var(--c-accent, #ff6b2b);
}

.bbs-thread-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--c-text-secondary, #999);
}

.bbs-thread-item__meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.bbs-thread-item__forum {
  color: var(--c-accent, #ff6b2b);
  font-weight: 500;
}

.bbs-empty {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

.bbs-empty svg {
  width: 56px;
  height: 56px;
  margin-bottom: 12px;
  opacity: 0.4;
}

.bbs-empty p {
  margin: 0 0 16px;
  font-size: 14px;
}

@media (max-width: 640px) {
  .bbs-tabs {
    gap: 2px;
    padding: 3px;
  }

  .bbs-tab {
    padding: 8px 10px;
    font-size: 13px;
  }

  .bbs-thread-item {
    padding: 12px;
  }

  .bbs-thread-item__title {
    font-size: 14px;
  }

  .bbs-thread-item__meta {
    gap: 8px;
    font-size: 11px;
  }
}

/* ===== 优惠券列表（个人中心） ===== */
.coupon-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.coupon-empty {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

.coupon-empty svg {
  width: 64px;
  height: 64px;
  margin-bottom: 12px;
  opacity: 0.4;
}

.coupon-empty p {
  margin: 0 0 16px;
  font-size: 14px;
}

.coupon-item {
  background: #fff;
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border: 1px solid #f0f0f0;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.coupon-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.coupon-item--fixed::before {
  background: #ff6b2b;
}

.coupon-item--discount::before {
  background: #4a90d9;
}

.coupon-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.coupon-item--disabled {
  opacity: 0.55;
}

.coupon-item__left {
  flex: 1;
  min-width: 0;
}

.coupon-item__value {
  font-size: 22px;
  font-weight: 800;
  color: #ff6b2b;
  margin-bottom: 4px;
}

.coupon-item--discount .coupon-item__value {
  color: #4a90d9;
}

.coupon-item__value strong {
  font-size: 28px;
}

.coupon-item__title {
  font-size: 14px;
  font-weight: 600;
  color: #222;
  margin-bottom: 2px;
}

.coupon-item__meta {
  font-size: 12px;
  color: #999;
}

.coupon-item__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
  margin-left: 12px;
}

.badge--active {
  background: rgba(16,185,129,0.1);
  color: #10b981;
  font-weight: 600;
}

.badge--used {
  background: rgba(156,163,175,0.15);
  color: #9ca3af;
  font-weight: 600;
}

.badge--expired {
  background: rgba(239,68,68,0.1);
  color: #ef4444;
  font-weight: 600;
}

/* ===== 优惠券中心页面 ===== */
.coupon-center {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 0;
}

.coupon-center__tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--c-bg-alt, #f5f6f8);
  border-radius: 10px;
  padding: 4px;
}

.coupon-center__tab {
  flex: 1;
  padding: 10px 20px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text-secondary, #666);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.coupon-center__tab:hover {
  color: var(--c-text, #222);
}

.coupon-center__tab.active {
  background: #fff;
  color: var(--c-accent, #ff6b2b);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.coupon-center__grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.coupon-card {
  background: #fff;
  border-radius: 14px;
  display: flex;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid #f0f0f0;
  overflow: hidden;
  transition: all 0.2s;
}

.coupon-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.coupon-card__side {
  width: 120px;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  position: relative;
  flex-shrink: 0;
}

.coupon-card__side--fixed {
  background: linear-gradient(135deg, #ff6b2b, #ff8f5e);
  color: #fff;
}

.coupon-card__side--discount {
  background: linear-gradient(135deg, #4a90d9, #6db3f2);
  color: #fff;
}

.coupon-card__value {
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
}

.coupon-card__value strong {
  font-size: 40px;
}

.coupon-card__unit {
  font-size: 13px;
  font-weight: 600;
  margin-top: 4px;
  opacity: 0.9;
}

.coupon-card__body {
  flex: 1;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.coupon-card__title {
  font-size: 15px;
  font-weight: 700;
  color: #222;
  margin-bottom: 4px;
}

.coupon-card__desc {
  font-size: 13px;
  color: #888;
  margin-bottom: 8px;
  line-height: 1.4;
}

.coupon-card__meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: #aaa;
  flex-wrap: wrap;
}

.coupon-card__meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.coupon-card__action {
  display: flex;
  align-items: center;
  padding-right: 20px;
  flex-shrink: 0;
}

.coupon-card__action .btn {
  white-space: nowrap;
  min-width: 80px;
}

.coupon-card__action .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .coupon-card {
    flex-direction: column;
    position: relative;
  }

  .coupon-card__side {
    width: 100%;
    min-height: auto;
    padding: 12px;
    flex-direction: row;
    gap: 12px;
    justify-content: flex-start;
  }

  .coupon-card__value {
    font-size: 24px;
  }

  .coupon-card__value strong {
    font-size: 30px;
  }

  .coupon-card__unit {
    margin-top: 0;
  }

  .coupon-card__action {
    padding: 0 16px 12px;
  }

  .coupon-card__action .btn {
    width: 100%;
  }
}

/* ===== 消息中心 ===== */
.message-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message-empty {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

.message-item {
  background: #fff;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border: 1px solid #f0f0f0;
  transition: all 0.2s;
  cursor: default;
}

.message-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.message-item--unread {
  border-left: 4px solid #ff6b2b;
  background: #fffbf8;
}

.message-item__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  gap: 12px;
}

.message-item__title {
  font-size: 14px;
  font-weight: 600;
  color: #222;
  flex: 1;
}

.message-item--unread .message-item__title {
  color: #ff6b2b;
}

.message-item__time {
  font-size: 11px;
  color: #999;
  white-space: nowrap;
  flex-shrink: 0;
}

.message-item__body {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 10px;
  word-break: break-word;
}

.message-item__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.message-item__action {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid #ddd;
  background: transparent;
  color: #888;
  cursor: pointer;
  transition: all 0.2s;
}

.message-item__action:hover {
  border-color: #ff6b2b;
  color: #ff6b2b;
}

.badge--sm {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11px;
  border-radius: 12px;
  font-weight: 600;
}
