/* ===== 选手个人页样式 ===== */

.artist-page {
  margin-top: 64px;
}

/* 顶部Banner */
.artist-banner {
  position: relative;
  height: 320px;
  background: linear-gradient(135deg, var(--ink), var(--ink-light));
  overflow: hidden;
}

.artist-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4a574' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.artist-banner-inner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px;
  display: flex;
  align-items: center;
  gap: 30px;
  height: 100%;
}

.artist-avatar-lg {
  width: 140px; height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(212, 165, 116, 0.5);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  flex-shrink: 0;
}

.artist-banner-info {
  color: var(--paper);
}

.artist-banner-info h1 {
  font-family: var(--serif);
  font-size: 32px;
  margin-bottom: 8px;
}

.artist-banner-info .artist-title {
  display: inline-block;
  padding: 2px 12px;
  background: rgba(197, 48, 48, 0.3);
  border: 1px solid rgba(197, 48, 48, 0.5);
  border-radius: 20px;
  font-size: 13px;
  color: var(--gold-light);
  margin-bottom: 10px;
}

.artist-banner-info .artist-specialty-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.artist-specialty-tags span {
  padding: 2px 10px;
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  font-size: 12px;
  color: var(--paper);
}

.artist-banner-info .artist-location {
  font-size: 14px;
  color: rgba(245,240,232,0.6);
}

/* 数据卡片 */
.artist-stats-row {
  max-width: 1200px;
  margin: -40px auto 0;
  padding: 0 40px;
  position: relative;
  z-index: 10;
}

.artist-stats-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  justify-content: space-around;
  box-shadow: var(--shadow-lg);
}

.artist-stat-item {
  text-align: center;
}

.artist-stat-item .num {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: bold;
  color: var(--vermillion);
}

.artist-stat-item .label {
  font-size: 13px;
  color: var(--gray);
  margin-top: 4px;
}

.artist-stat-item .gift-btn {
  margin-top: 8px;
  padding: 8px 24px;
  background: linear-gradient(135deg, var(--vermillion), var(--vermillion-light));
  color: var(--paper);
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition);
}

.artist-stat-item .gift-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(197, 48, 48, 0.3);
}

/* 个人简介 */
.artist-bio-section {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 40px;
}

.artist-bio-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}

.artist-bio-card h3 {
  font-family: var(--serif);
  font-size: 18px;
  margin-bottom: 14px;
  color: var(--ink);
  border-left: 4px solid var(--vermillion);
  padding-left: 12px;
}

.artist-bio-card p {
  font-size: 15px;
  color: #555;
  line-height: 1.8;
}

/* Tab切换 */
.artist-tabs {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 40px;
}

.artist-tab-headers {
  display: flex;
  gap: 30px;
  border-bottom: 2px solid var(--gray-light);
  margin-bottom: 24px;
}

.artist-tab-header {
  padding: 12px 0;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--gray);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
}

.artist-tab-header.active {
  color: var(--vermillion);
  border-bottom-color: var(--vermillion);
}

.artist-tab-content { display: none; }
.artist-tab-content.active { display: block; }

/* 作品画廊 */
.artwork-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1;
  box-shadow: var(--shadow);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-item .gallery-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  padding: 30px 16px 12px;
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-item:hover .gallery-overlay { opacity: 1; }

.gallery-overlay .gallery-title {
  color: var(--paper);
  font-size: 14px;
  font-family: var(--serif);
}

.gallery-overlay .gallery-likes {
  color: rgba(245,240,232,0.7);
  font-size: 12px;
  margin-top: 4px;
}

/* 礼物墙 */
.gift-wall-full {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.gift-wall-card {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.gift-wall-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.gift-wall-card .gw-icon {
  font-size: 40px;
  margin-bottom: 8px;
}

.gift-wall-card .gw-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.gift-wall-card .gw-count {
  font-size: 12px;
  color: var(--vermillion);
}

/* 礼物记录列表 */
.gift-records-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gift-record-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.gift-record-item .gr-icon {
  font-size: 28px;
  width: 48px;
  text-align: center;
}

.gift-record-item .gr-content {
  flex: 1;
}

.gift-record-item .gr-from {
  font-size: 14px;
  font-weight: 600;
}

.gift-record-item .gr-msg {
  font-size: 12px;
  color: var(--gray);
  margin-top: 2px;
}

.gift-record-item .gr-time {
  font-size: 12px;
  color: var(--gray);
}

/* 作品详情页 */
.artwork-detail-page {
  margin-top: 64px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 40px;
}

.artwork-detail-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 30px;
}

.artwork-detail-image {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.artwork-detail-info {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  height: fit-content;
  position: sticky;
  top: 80px;
}

.artwork-detail-info h1 {
  font-family: var(--serif);
  font-size: 24px;
  margin-bottom: 16px;
}

.artwork-detail-info .ad-category {
  display: inline-block;
  padding: 2px 10px;
  background: var(--paper-dark);
  border-radius: 12px;
  font-size: 12px;
  color: var(--ink);
  margin-bottom: 16px;
}

.artwork-detail-info .ad-desc {
  font-size: 14px;
  color: #555;
  line-height: 1.8;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gray-light);
}

.artwork-detail-info .ad-artist {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.artwork-detail-info .ad-artist img {
  width: 48px; height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.artwork-detail-info .ad-artist .ad-artist-info h4 {
  font-size: 15px;
}

.artwork-detail-info .ad-artist .ad-artist-info p {
  font-size: 12px;
  color: var(--gray);
}

.ad-actions {
  display: flex;
  gap: 12px;
}

.ad-actions .btn {
  flex: 1;
  justify-content: center;
  padding: 12px;
}

/* 响应式 */
@media (max-width: 768px) {
  .artist-banner-inner {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }
  .artist-avatar-lg { width: 100px; height: 100px; }
  .artist-banner-info h1 { font-size: 24px; }
  .artist-stats-row { padding: 0 16px; margin-top: -30px; }
  .artist-stats-card { padding: 16px; flex-wrap: wrap; gap: 16px; }
  .artist-stat-item .num { font-size: 22px; }
  .artist-bio-section, .artist-tabs { padding: 0 16px; }
  .artwork-detail-layout { grid-template-columns: 1fr; }
  .artwork-detail-info { position: static; }
  .artwork-gallery { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .gift-wall-full { grid-template-columns: repeat(2, 1fr); }
}

/* ===== 赞赏弹窗（底部固定式，支付按钮无需下拉） ===== */
.gift-modal-overlay.modal-overlay {
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
}

.gift-modal.modal {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  max-height: 92dvh;
  border-radius: 24px 24px 0 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #fffdfb 0%, #f9f5f0 100%);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.25);
  animation: giftModalSlideUp 0.28s ease-out;
}

@keyframes giftModalSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.gift-modal-header {
  position: relative;
  text-align: center;
  padding: 22px 20px 14px;
  background: linear-gradient(180deg, #fff 0%, #f9f5f0 100%);
  border-bottom: 1px solid rgba(212, 165, 116, 0.15);
  flex-shrink: 0;
}

.gift-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  color: var(--gray);
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}

.gift-modal-close:hover,
.gift-modal-close:active {
  background: rgba(197, 48, 48, 0.1);
  color: var(--vermillion);
  transform: rotate(90deg);
}

.gift-modal-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(212, 165, 116, 0.4);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  margin-bottom: 10px;
}

.gift-modal-title {
  font-family: var(--serif);
  font-size: 19px;
  color: var(--ink);
  margin-bottom: 4px;
}

.gift-modal-subtitle {
  font-size: 12px;
  color: var(--gray);
}

.gift-modal-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 20px 0;
  -webkit-overflow-scrolling: touch;
}

.gift-section-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
  padding-left: 8px;
  border-left: 3px solid var(--vermillion);
}

.gift-modal-body .gift-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 0 0 18px;
}

.gift-modal-body .gift-option {
  position: relative;
  text-align: center;
  padding: 12px 6px 10px;
  border: 2px solid #ede8e0;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--white);
}

.gift-modal-body .gift-option:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 165, 116, 0.15);
}

.gift-modal-body .gift-option.selected {
  border-color: var(--vermillion);
  background: linear-gradient(135deg, rgba(197, 48, 48, 0.08), rgba(197, 48, 48, 0.02));
  box-shadow: 0 4px 14px rgba(197, 48, 48, 0.18);
  transform: scale(1.03);
}

.gift-modal-body .gift-option.selected::after {
  content: '✓';
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  background: var(--vermillion);
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  line-height: 20px;
  box-shadow: 0 2px 6px rgba(197, 48, 48, 0.3);
}

.gift-modal-body .gift-option .gift-emoji {
  font-size: 30px;
  margin-bottom: 4px;
  line-height: 1.2;
}

.gift-modal-body .gift-option .gift-name-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}

.gift-modal-body .gift-option .gift-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--vermillion);
}

.gift-modal-body .gift-message-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #e5e0d8;
  border-radius: 14px;
  font-size: 14px;
  background: var(--white);
  color: var(--ink);
  margin-bottom: 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.gift-modal-body .gift-message-input:focus {
  border-color: var(--vermillion);
  box-shadow: 0 0 0 3px rgba(197, 48, 48, 0.08);
}

.gift-modal-body .gift-message-input::placeholder {
  color: #aaa;
}

.gift-modal-footer {
  flex-shrink: 0;
  padding: 12px 20px calc(16px + constant(safe-area-inset-bottom));
  padding: 12px 20px calc(16px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid rgba(212, 165, 116, 0.15);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

.gift-confirm-btn {
  width: 100%;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--vermillion), #b92e2e);
  border: none;
  color: var(--paper);
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(197, 48, 48, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
  display: flex;
}

.gift-confirm-btn:hover {
  background: linear-gradient(135deg, #c93a3a, #a82a2a);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(197, 48, 48, 0.4);
}

.gift-confirm-btn:active {
  transform: scale(0.98);
  box-shadow: 0 3px 10px rgba(197, 48, 48, 0.3);
}

.gift-confirm-btn:disabled {
  background: linear-gradient(135deg, #c9c3bb, #b0aba4);
  box-shadow: none;
  cursor: not-allowed;
}

.gift-confirm-price {
  font-size: 18px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 20px;
}

/* 微信浏览器底部安全区微调 */
@media (max-width: 480px) {
  .gift-modal.modal {
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 88vh;
    max-height: 88dvh;
  }

  .gift-modal-header {
    padding: 18px 16px 12px;
  }

  .gift-modal-avatar {
    width: 52px;
    height: 52px;
  }

  .gift-modal-title {
    font-size: 17px;
  }

  .gift-modal-body {
    padding: 14px 16px 0;
  }

  .gift-modal-body .gift-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .gift-modal-body .gift-option {
    padding: 10px 4px 8px;
    border-radius: 12px;
  }

  .gift-modal-body .gift-option .gift-emoji {
    font-size: 26px;
  }

  .gift-modal-body .gift-option .gift-name-text {
    font-size: 11px;
  }

  .gift-modal-body .gift-option .gift-price {
    font-size: 12px;
  }

  .gift-modal-footer {
    padding: 10px 16px calc(14px + constant(safe-area-inset-bottom));
    padding: 10px 16px calc(14px + env(safe-area-inset-bottom));
  }

  .gift-confirm-btn {
    padding: 13px 20px;
    font-size: 15px;
  }
}

/* 超小屏再压缩，确保一屏可见支付按钮 */
@media (max-width: 360px) {
  .gift-modal-body .gift-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }

  .gift-modal-body .gift-option {
    padding: 8px 2px 6px;
  }

  .gift-modal-body .gift-option .gift-emoji {
    font-size: 22px;
  }

  .gift-modal-body .gift-option .gift-name-text {
    font-size: 10px;
  }
}
