/* ===== 墨韵·书画人才库 — 全局样式 ===== */

:root {
  --ink: #1a1a2e;
  --ink-light: #2d2d44;
  --vermillion: #c53030;
  --vermillion-light: #e53e3e;
  --gold: #d4a574;
  --gold-light: #e8c9a0;
  --jade: #4a7c59;
  --paper: #f5f0e8;
  --paper-dark: #e8e0d0;
  --white: #ffffff;
  --gray: #888;
  --gray-light: #eee;
  --shadow: 0 2px 12px rgba(26, 26, 46, 0.08);
  --shadow-lg: 0 8px 30px rgba(26, 26, 46, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s ease;
  --serif: 'Noto Serif SC', 'SimSun', 'Songti SC', serif;
  --sans: -apple-system, 'Microsoft YaHei', 'PingFang SC', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* ===== 导航栏 ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.navbar .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: bold;
  color: var(--gold);
}

.navbar .logo .logo-icon {
  width: 36px; height: 36px;
  background: var(--vermillion);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--paper);
}

.navbar .nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}

.navbar .nav-links a {
  color: var(--paper);
  font-size: 15px;
  opacity: 0.85;
  transition: var(--transition);
  position: relative;
}

.navbar .nav-links a:hover {
  opacity: 1;
  color: var(--gold);
}

.navbar .nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--gold);
  transition: width 0.3s;
}

.navbar .nav-links a:hover::after { width: 100%; }

.navbar .nav-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn {
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background: var(--vermillion);
  color: var(--paper);
}

.btn-primary:hover {
  background: var(--vermillion-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(197, 48, 48, 0.3);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--ink);
  font-weight: 600;
}

.btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 165, 116, 0.4);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(245, 240, 232, 0.3);
  color: var(--paper);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ===== 首页容器 ===== */
.main-content {
  margin-top: 64px;
}

/* ===== 轮播Banner ===== */
.hero-banner {
  position: relative;
  height: 480px;
  overflow: hidden;
  background: var(--ink);
}

.hero-slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  opacity: 0;
  transition: opacity 1s ease;
  background-size: cover;
  background-position: center;
}

.hero-slide.active { opacity: 1; }

.hero-slide::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(26,26,46,0.7), rgba(26,26,46,0.4));
}

.hero-slide-content {
  position: relative;
  text-align: center;
  color: var(--paper);
  z-index: 1;
  padding: 0 20px;
}

.hero-slide-content h1 {
  font-family: var(--serif);
  font-size: 48px;
  margin-bottom: 16px;
  letter-spacing: 4px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.hero-slide-content p {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 30px;
  letter-spacing: 2px;
}

.hero-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 2;
}

.hero-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: var(--transition);
}

.hero-dot.active {
  background: var(--gold);
  width: 30px;
  border-radius: 5px;
}

/* ===== 通用Section ===== */
.section {
  padding: 60px 40px;
  max-width: 1400px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h2 {
  font-family: var(--serif);
  font-size: 32px;
  color: var(--ink);
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px; height: 3px;
  background: var(--vermillion);
  border-radius: 2px;
}

.section-header p {
  color: var(--gray);
  font-size: 15px;
  margin-top: 12px;
}

/* ===== 排行榜 ===== */
.ranking-section {
  background: var(--white);
  padding: 60px 0;
}

.ranking-tabs {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 30px;
}

.ranking-tab {
  cursor: pointer;
  padding: 10px 30px;
  font-size: 16px;
  color: var(--gray);
  border-bottom: 3px solid transparent;
  transition: var(--transition);
  font-family: var(--serif);
}

.ranking-tab.active {
  color: var(--vermillion);
  border-bottom-color: var(--vermillion);
}

.ranking-list {
  max-width: 800px;
  margin: 0 auto;
  display: none;
}

.ranking-list.active { display: block; }

.ranking-item {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
  margin-bottom: 6px;
}

.ranking-item:hover {
  background: var(--paper);
  transform: translateX(6px);
}

.rank-number {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: bold;
  margin-right: 16px;
  border-radius: 50%;
  flex-shrink: 0;
}

.rank-1 { background: linear-gradient(135deg, #FFD700, #FFA500); color: var(--ink); }
.rank-2 { background: linear-gradient(135deg, #C0C0C0, #A8A8A8); color: var(--ink); }
.rank-3 { background: linear-gradient(135deg, #CD7F32, #B87333); color: var(--paper); }
.rank-other { background: var(--gray-light); color: var(--gray); }

.rank-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 14px;
  border: 2px solid var(--paper-dark);
}

.rank-info {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rank-name {
  font-weight: 600;
  font-size: 15px;
}

.rank-specialty {
  font-size: 12px;
  color: var(--gray);
}

.rank-value {
  font-family: var(--serif);
  font-weight: bold;
  color: var(--vermillion);
}

/* ===== 推荐选手网格 ===== */
.artist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 24px;
}

.artist-card {
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  padding: 20px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.artist-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.artist-card-avatar {
  width: 120px; height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 14px;
  border: 3px solid var(--paper-dark);
  transition: var(--transition);
}

.artist-card:hover .artist-card-avatar {
  border-color: var(--gold);
}

.artist-card-name {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.artist-card-title {
  font-size: 12px;
  color: var(--vermillion);
  margin-bottom: 6px;
}

.artist-card-specialty {
  font-size: 12px;
  color: var(--gray);
}

.artist-card-stats {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--gray);
}

.artist-card-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== 作品网格 ===== */
.artwork-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.artwork-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
}

.artwork-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.artwork-card-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform 0.4s;
}

.artwork-card:hover .artwork-card-img {
  transform: scale(1.05);
}

.artwork-card-body {
  padding: 14px 16px;
}

.artwork-card-title {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.artwork-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--gray);
}

.artwork-card-artist {
  display: flex;
  align-items: center;
  gap: 6px;
}

.artwork-card-artist img {
  width: 24px; height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

/* ===== 礼物墙预览 ===== */
.gift-wall-preview {
  background: linear-gradient(135deg, var(--ink), var(--ink-light));
  color: var(--paper);
  padding: 60px 0;
}

.gift-wall-preview .section-header h2 { color: var(--paper); }
.gift-wall-preview .section-header p { color: rgba(245,240,232,0.6); }

.gift-wall-scroll {
  max-width: 1000px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
}

.gift-wall-track {
  display: flex;
  gap: 16px;
  animation: scrollGifts 30s linear infinite;
}

@keyframes scrollGifts {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.gift-wall-item {
  flex-shrink: 0;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  border: 1px solid rgba(212, 165, 116, 0.2);
}

.gift-wall-item .gift-icon-lg {
  font-size: 32px;
}

.gift-wall-item .gift-info {
  flex: 1;
}

.gift-wall-item .gift-to {
  font-size: 13px;
  color: var(--gold);
  margin-bottom: 2px;
}

.gift-wall-item .gift-msg {
  font-size: 12px;
  color: rgba(245,240,232,0.7);
}

/* ===== 如何加入 ===== */
.how-to-join {
  background: var(--white);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
}

.step-card {
  text-align: center;
  padding: 30px;
}

.step-number {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--vermillion), var(--vermillion-light));
  color: var(--paper);
  font-family: var(--serif);
  font-size: 24px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.step-card h3 {
  font-family: var(--serif);
  font-size: 18px;
  margin-bottom: 8px;
}

.step-card p {
  color: var(--gray);
  font-size: 14px;
}

/* ===== 数据统计 ===== */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 60px;
  padding: 40px;
  background: var(--paper);
  border-radius: var(--radius);
  margin-top: 40px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: bold;
  color: var(--vermillion);
}

.stat-label {
  font-size: 14px;
  color: var(--gray);
  margin-top: 4px;
}

/* ===== 底部 ===== */
.footer {
  background: var(--ink);
  color: rgba(245,240,232,0.7);
  padding: 40px 40px 20px;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 20px;
}

.footer-links a {
  font-size: 14px;
  transition: var(--transition);
}

.footer-links a:hover { color: var(--gold); }

.footer-bottom {
  font-size: 13px;
  color: rgba(245,240,232,0.4);
  border-top: 1px solid rgba(245,240,232,0.1);
  padding-top: 20px;
}

/* ===== 弹窗 ===== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-overlay.show { display: flex; }

.modal {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-title {
  font-family: var(--serif);
  font-size: 20px;
  margin-bottom: 20px;
  text-align: center;
}

.modal-close {
  float: right;
  cursor: pointer;
  font-size: 24px;
  color: var(--gray);
}

/* ===== 礼物选择弹窗 ===== */
.gift-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.gift-option {
  text-align: center;
  padding: 16px 8px;
  border: 2px solid var(--gray-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.gift-option:hover, .gift-option.selected {
  border-color: var(--vermillion);
  background: rgba(197, 48, 48, 0.05);
}

.gift-option .gift-emoji {
  font-size: 36px;
  margin-bottom: 6px;
}

.gift-option .gift-name-text {
  font-size: 13px;
  font-weight: 600;
}

.gift-option .gift-price {
  font-size: 12px;
  color: var(--vermillion);
  margin-top: 2px;
}

.gift-message-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 16px;
}

/* ===== 表单 ===== */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--ink);
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--vermillion);
  box-shadow: 0 0 0 3px rgba(197, 48, 48, 0.1);
}

textarea.form-input { min-height: 80px; resize: vertical; }

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: var(--ink);
  color: var(--paper);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  z-index: 3000;
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.error { background: var(--vermillion); }
.toast.success { background: var(--jade); }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .navbar { padding: 0 16px; }
  .navbar .nav-links { display: none; }
  .hero-slide-content h1 { font-size: 28px; }
  .hero-slide-content p { font-size: 14px; }
  .section { padding: 40px 16px; }
  .section-header h2 { font-size: 24px; }
  .steps-grid { grid-template-columns: 1fr; gap: 20px; }
  .stats-bar { gap: 30px; flex-wrap: wrap; }
  .stat-number { font-size: 28px; }
  .ranking-tabs { gap: 20px; }
  .ranking-tab { padding: 8px 16px; font-size: 14px; }
  .artist-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
  .artist-card-avatar { width: 80px; height: 80px; }
  .artwork-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .gift-grid { grid-template-columns: repeat(3, 1fr); }
}
