* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #e74c3c;
  --secondary-color: #3498db;
  --accent-color: #f39c12;
  --dark-bg: #2c3e50;
  --light-bg: #f8f9fa;
  --text-color: #333;
  --light-text: #666;
  --white: #ffffff;
  --shadow: 0 2px 10px rgba(0,0,0,0.1);
  --shadow-hover: 0 5px 20px rgba(0,0,0,0.15);
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-bg);
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-color);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 顶部导航 */
.header {
  background: linear-gradient(135deg, var(--dark-bg) 0%, #34495e 100%);
  color: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--white);
}

.logo a {
  color: var(--white);
}

.logo a:hover {
  color: var(--accent-color);
}

.nav {
  display: flex;
  gap: 30px;
  list-style: none;
}

.nav a {
  color: var(--white);
  font-size: 16px;
  padding: 8px 16px;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.nav a:hover,
.nav a.active {
  background-color: var(--primary-color);
}

.header-actions {
  display: flex;
  gap: 15px;
}

.mobile-link {
  background-color: var(--secondary-color);
  color: var(--white);
  padding: 8px 16px;
  border-radius: var(--border-radius);
  font-size: 14px;
}

.mobile-link:hover {
  background-color: #2980b9;
  color: var(--white);
}

/* 搜索栏 */
.search-section {
  background: var(--white);
  padding: 20px 0;
  box-shadow: var(--shadow);
  margin-bottom: 30px;
}

.search-box {
  display: flex;
  gap: 10px;
  max-width: 600px;
  margin: 0 auto;
}

.search-input {
  flex: 1;
  padding: 12px 20px;
  border: 2px solid #e0e0e0;
  border-radius: var(--border-radius);
  font-size: 16px;
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.search-btn {
  padding: 12px 30px;
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: var(--transition);
}

.search-btn:hover {
  background-color: #c0392b;
  transform: translateY(-2px);
}

/* 歌手推荐区 */
.artist-section {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-color);
  border-left: 4px solid var(--primary-color);
  padding-left: 15px;
}

.artist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  gap: 5px;
}

.artist-item {
  text-align: center;
  transition: var(--transition);
}

.artist-item:hover {
  transform: translateY(-5px);
}

.artist-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 10px;
  border: 3px solid var(--primary-color);
  transition: var(--transition);
}

.artist-item:hover .artist-img {
  border-color: var(--accent-color);
  transform: scale(1.05);
}

.artist-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-color);
}

/* 标签导航 */
.tabs {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 10px;
}

.tab-btn {
  padding: 10px 20px;
  background: none;
  border: none;
  font-size: 16px;
  font-weight: 600;
  color: var(--light-text);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.tab-btn:hover {
  color: var(--primary-color);
}

.tab-btn.active {
  color: var(--primary-color);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--primary-color);
}

/* 吉他谱卡片网格 */
.sheet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

.sheet-card {
  background: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
}

.sheet-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.sheet-img-wrapper {
  position: relative;
  overflow: hidden;
  padding-top: 66.67%; /* 3:2 aspect ratio */
}

.sheet-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.sheet-card:hover .sheet-img {
  transform: scale(1.05);
}

.sheet-content {
  padding: 20px;
}

.sheet-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-color);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sheet-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--light-text);
}

.sheet-tag {
  background-color: #f0f0f0;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
}

/* 详情页样式 */
.detail-container {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
  margin-top: 30px;
}

.detail-main {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 30px;
  box-shadow: var(--shadow);
}

.detail-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-color);
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 15px;
}

.sheet-images {
  margin: 20px 0;
}

.sheet-images img {
  max-width: 100%;
  border-radius: var(--border-radius);
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.detail-sidebar {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--shadow);
  height: fit-content;
  position: sticky;
  top: 100px;
}

.sidebar-section {
  margin-bottom: 30px;
}

.sidebar-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--text-color);
  border-left: 3px solid var(--primary-color);
  padding-left: 10px;
}

.related-list {
  list-style: none;
}

.related-list li {
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.related-list li:last-child {
  border-bottom: none;
}

.related-list a {
  font-size: 14px;
  color: var(--text-color);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-list a:hover {
  color: var(--primary-color);
}

/* 工具按钮 */
.tool-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.tool-btn {
  flex: 1;
  padding: 12px;
  background-color: var(--secondary-color);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tool-btn:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
}

.tool-btn.primary {
  background-color: var(--primary-color);
}

.tool-btn.primary:hover {
  background-color: #c0392b;
}

/* 页脚 */
.footer {
  background-color: var(--dark-bg);
  color: var(--white);
  padding: 40px 0 20px;
  margin-top: 60px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--white);
  font-size: 14px;
  opacity: 0.8;
}

.footer-links a:hover {
  opacity: 1;
  color: var(--accent-color);
}

.footer-copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    gap: 15px;
  }

  .nav {
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .detail-container {
    grid-template-columns: 1fr;
  }

  .detail-sidebar {
    position: static;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .sheet-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .nav {
    font-size: 14px;
  }

  .nav a {
    padding: 6px 12px;
  }

  .sheet-grid {
    grid-template-columns: 1fr;
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sheet-card {
  animation: fadeIn 0.6s ease forwards;
}

/* 加载状态 */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--light-text);
}

.loading::after {
  content: '';
  display: inline-block;
  width: 30px;
  height: 30px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 面包屑导航 */
.breadcrumb {
  padding: 15px 0;
  font-size: 14px;
  color: var(--light-text);
}

.breadcrumb a {
  color: var(--text-color);
}

.breadcrumb a:hover {
  color: var(--primary-color);
}

.breadcrumb span {
  color: var(--light-text);
}

/* 列表项样式 */
.sheet-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sheet-list-item {
  display: flex;
  background: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
}

.sheet-list-item:hover {
  transform: translateX(10px);
  box-shadow: var(--shadow-hover);
}

.sheet-list-img {
  width: 200px;
  flex-shrink: 0;
  overflow: hidden;
}

.sheet-list-img img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.sheet-list-content {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sheet-list-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-color);
}

.sheet-list-desc {
  font-size: 14px;
  color: var(--light-text);
  margin-bottom: 10px;
  line-height: 1.6;
}

.sheet-list-meta {
  display: flex;
  gap: 10px;
  align-items: center;
}

.sheet-type {
  background-color: var(--secondary-color);
  color: var(--white);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.pagination-btn {
  padding: 8px 16px;
  background-color: var(--white);
  border: 1px solid #e0e0e0;
  border-radius: var(--border-radius);
  color: var(--text-color);
  transition: var(--transition);
}

.pagination-btn:hover:not(.disabled) {
  background-color: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

.pagination-btn.active {
  background-color: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

.pagination-btn.disabled {
  color: #ccc;
  cursor: not-allowed;
}

/* 侧边栏元素 */
.sidebar-search {
  display: flex;
  gap: 10px;
}

.sidebar-artists {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sidebar-artist {
  padding: 8px 16px;
  background-color: #f0f0f0;
  border-radius: 20px;
  font-size: 14px;
  transition: var(--transition);
}

.sidebar-artist:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cloud-tag {
  padding: 6px 14px;
  background-color: #f0f0f0;
  border-radius: 20px;
  font-size: 13px;
  transition: var(--transition);
}

.cloud-tag:hover {
  background-color: var(--secondary-color);
  color: var(--white);
}

/* 详情页样式 */
.sheet-info {
  background: var(--light-bg);
  padding: 20px;
  border-radius: var(--border-radius);
  margin-bottom: 25px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-label {
  font-weight: 600;
  color: var(--light-text);
  font-size: 14px;
}

.info-value {
  color: var(--text-color);
  font-size: 14px;
}

.info-value a {
  color: var(--primary-color);
}

.difficulty {
  background-color: #27ae60;
  color: var(--white);
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
}

.related-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #e0e0e0;
}

.qrcode-container {
  display: flex;
  justify-content: center;
  padding: 20px;
}

.qrcode-placeholder {
  width: 150px;
  height: 150px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: var(--border-radius);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--white);
  font-size: 14px;
  gap: 10px;
}

/* 响应式补充 */
@media (max-width: 768px) {
  .sheet-list-item {
    flex-direction: column;
  }

  .sheet-list-img {
    width: 100%;
  }

  .sheet-list-img img {
    height: 200px;
  }

  .sheet-info {
    grid-template-columns: 1fr;
  }

  .tool-buttons {
    flex-wrap: wrap;
  }

  .tool-btn {
    flex: 1 1 100%;
  }
}

@media (max-width: 480px) {
  .breadcrumb {
    font-size: 12px;
  }

  .sheet-list-title {
    font-size: 16px;
  }

  .sidebar-section {
    padding: 15px;
  }
}
