/* 全局样式 */
:root {
  --primary-color: #667eea;
  --secondary-color: #764ba2;
  --accent-color: #f093fb;
  --light-bg: #f8f9fa;
  --dark-bg: #343a40;
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  /* 滚动条宽度变量 */
  --scrollbar-width: 0px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
  padding-top: 56px;
  padding-bottom: 80px;
  /* 移动端优化 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 导航栏样式 */
.navbar {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
}

.navbar-brand img {
  border: 2px solid rgba(255, 255, 255, 0.3);
  margin-right: 10px;
  transition: var(--transition);
}

.navbar-brand:hover img {
  transform: scale(1.1);
}

.nav-link {
  font-weight: 500;
  margin: 0 5px;
  border-radius: 20px;
  padding: 8px 15px !important;
  transition: var(--transition);
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  color: white !important;
}

/* 英雄区域 */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 100px 0 80px 0 !important;
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('./images/avatar.jpg') center/cover no-repeat;
  opacity: 0.1;
  z-index: 0;
}

.hero-section .container {
  position: relative;
  z-index: 1;
}

.hero-section h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-section .lead {
  font-size: 1.5rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.hero-section img {
  border: 5px solid rgba(255, 255, 255, 0.3);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
  100% { transform: translateY(0px); }
}

/* 音乐播放器样式 */
.player-section {
  margin-bottom: 2rem;
  padding: 2rem 0;
}

.player-card {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  border: none !important;
  box-shadow: var(--card-shadow) !important;
  border-radius: 20px !important;
  overflow: hidden;
}

.player-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
  color: white;
  border-radius: 20px 20px 0 0 !important;
}

.current-track {
  padding: 1.5rem;
  background: rgba(248, 249, 250, 0.8);
  border-radius: 15px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

.current-track img {
  width: 100px !important;
  height: 100px !important;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transition: var(--transition);
}

.current-track img:hover {
  transform: scale(1.05);
}

.current-track-info {
  margin-left: 1.5rem;
  flex: 1;
}

.current-track h5 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--dark-bg);
}

.current-track p {
  font-size: 1.1rem;
  color: #6c757d;
}

.progress {
  height: 10px;
  background: #e9ecef;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
  position: relative;
  cursor: pointer;
}

.progress-bar {
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  transition: width 0.1s linear;
  height: 100%;
}

.player-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.control-btn {
  width: 50px;
  height: 50px;
  border-radius: 50% !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: var(--transition);
  border: none;
}

.control-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

#play-btn {
  width: 70px !important;
  height: 70px !important;
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
  border: none;
}

#play-btn:hover {
  transform: scale(1.15);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 150px;
}

.volume-control i {
  color: var(--primary-color);
  font-size: 1.2rem;
}

.form-range {
  width: 100px;
}

/* 音乐列表样式 */
.music-list-section {
  padding: 3rem 0;
  background: white;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  text-align: center;
  position: relative;
  color: var(--dark-bg);
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

/* 网格布局 */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
}

.col-md-6 {
  flex: 0 0 auto;
  width: 50%;
  padding-right: 15px;
  padding-left: 15px;
}

.col-lg-4 {
  flex: 0 0 auto;
  width: 33.33333333%;
  padding-right: 15px;
  padding-left: 15px;
}

/* 音乐卡片样式 */
.music-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  margin-bottom: 1rem;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border: none;
}

.music-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.music-card.active {
  border-left: 4px solid #0d6efd;
  background-color: #e7f1ff;
}

/* 音乐卡片时间样式 */
.music-card .card-body small {
  font-size: 0.85rem;
  opacity: 0.8;
}

.card-body {
  display: flex !important;
  align-items: center !important;
  padding: 1rem !important;
}

.album-cover {
  width: 60px !important;
  height: 60px !important;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.flex-grow-1 {
  min-width: 0;
  margin-left: 1rem;
}

/* 分页样式 */
.pagination-container {
  margin-top: 30px;
}

.page-btn {
  min-width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled) {
  background-color: #0d6efd;
  color: white;
}

#jump-page-input::-webkit-inner-spin-button,
#jump-page-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}


.card-title {
  font-size: 1rem !important;
  font-weight: 600;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-text {
  font-size: 0.9rem !important;
  margin-bottom: 0.25rem;
  color: #6c757d !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.text-muted {
  font-size: 0.85rem !important;
  color: #6c757d !important;
}

/* 关于我们部分 */
.about-section {
  padding: 5rem 0;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
  margin-bottom: 2rem;
}

.about-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.about-content {
  background: white;
  border-radius: 20px;
  padding: 3rem;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  align-items: center;
}

.about-text {
  flex: 1;
  min-width: 300px;
}

.about-text h3 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--dark-bg);
  position: relative;
}

.about-text h3::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #555;
  margin-bottom: 1.5rem;
}

.about-image {
  flex: 1;
  min-width: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-image img {
  max-width: 100%;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  transition: var(--transition);
}

.about-image img:hover {
  transform: scale(1.05);
}

/* 联系我们部分 */
.contact-section {
  padding: 5rem 0;
  background: white;
}

.contact-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}

.contact-form {
  background: white;
  border-radius: 20px;
  padding: 3rem;
  box-shadow: var(--card-shadow);
  border: 1px solid #e9ecef;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  font-weight: 600;
  color: var(--dark-bg);
  margin-bottom: 0.5rem;
  display: block;
}

.form-control {
  padding: 0.875rem 1rem;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.btn-submit {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  border: none;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* 页脚 */
footer {
  background: var(--dark-bg);
  color: white;
  padding: 3rem 0 2rem;
  margin-top: auto;
}

.footer-content {
  text-align: center;
}

.footer-content p:first-child {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.footer-content p:last-child {
  opacity: 0.8;
  margin-bottom: 1rem;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .music-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media (max-width: 992px) {
  .hero-section h1 {
    font-size: 2.8rem;
  }
  
  .about-content {
    flex-direction: column;
    text-align: center;
  }
  
  .about-text, .about-image {
    width: 100%;
  }
  
  .col-lg-4 {
    width: 50%;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 50px;
  }
  
  .hero-section {
    padding: 80px 0 60px 0 !important;
  }
  
  .hero-section h1 {
    font-size: 2.2rem;
  }
  
  .hero-section .lead {
    font-size: 1.2rem;
  }
  
  .player-controls {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }
  
  .volume-control {
    width: 100%;
    justify-content: center;
  }
  
  .control-btn {
    width: 45px;
    height: 45px;
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .col-lg-4 {
    width: 100%;
  }
  
  .about-content {
    padding: 2rem;
  }
  
  .contact-form {
    padding: 2rem;
  }
}

@media (max-width: 576px) {
  .hero-section h1 {
    font-size: 1.8rem;
  }
  
  .current-track {
    flex-direction: column;
    text-align: center;
  }
  
  .current-track img {
    margin-bottom: 1rem;
  }
  
  .current-track-info {
    margin-left: 0;
  }
  
  .col-md-6 {
    width: 100%;
  }
  
  #play-btn {
    width: 60px !important;
    height: 60px !important;
  }
}

/* 移动端网格布局优化 */
@media (max-width: 767px) {
  .row {
    margin-right: -10px;
    margin-left: -10px;
  }
  
  .col-md-6,
  .col-lg-4 {
    padding-right: 10px;
    padding-left: 10px;
    width: 100%;
  }
}

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.delay-1 {
  animation-delay: 0.1s;
}

.delay-2 {
  animation-delay: 0.2s;
}

.delay-3 {
  animation-delay: 0.3s;
}

/* 加载动画 */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

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

/* 播放按钮动画 */
.btn-playing {
  animation: btn-pulse 2s infinite;
}

@keyframes btn-pulse {
  0% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(102, 126, 234, 0); }
  100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0); }
}

#play-btn {
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

#play-btn:not(.btn-playing):hover {
  transform: scale(1.05);
}

#play-btn i {
  transition: none;
}

/* 导航栏搜索框样式 */
.navbar .input-group-sm {
  max-width: 200px;
}

.navbar .form-control-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  border-radius: 0.25rem;
}

.navbar .input-group-text {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: white;
}

.navbar .form-control-sm:focus {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

@media (max-width: 768px) {
  .navbar .input-group-sm {
    display: none;
  }
  
  .search-section {
    display: block !important;
  }
}

/* 底部悬浮播放器样式 */
.bottom-player {
  z-index: 1050;
  padding: 12px 0;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  /* 解决滚动条遮挡问题 - 保持原有定位但给滚动条留出空间 */
  right: 8px !important; /* 留出8px空间给滚动条 */
  left: 0 !important;
  width: calc(100% - 8px) !important; /* 减少8px宽度以适应滚动条空间 */
}

.bottom-player .current-track-info img {
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: transform 0.2s ease;
}

.bottom-player .current-track-info img:hover {
  transform: scale(1.1);
}

.bottom-player .btn-outline-light {
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
}

.bottom-player .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.bottom-player #play-btn {
  background: white !important;
  color: var(--primary-color) !important;
}

.bottom-player #play-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.bottom-player .progress {
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  cursor: pointer;
}

.bottom-player .progress-bar {
  background: linear-gradient(90deg, #ffffff 0%, #e0e0e0 100%);
  transition: width 0.1s linear;
  height: 100%;
}

.bottom-player .form-range {
  --bs-form-range-thumb-bg: white;
  --bs-form-range-thumb-border: 1px solid rgba(0,0,0,0.2);
  --bs-form-range-thumb-active-bg: #f8f9fa;
}

@media (max-width: 768px) {
  .bottom-player {
    padding: 10px 0;
  }
  
  .bottom-player .current-track-info {
    min-width: 120px; /* 确保有足够的空间显示封面和文字 */
    flex: 0 0 auto; /* 固定宽度，不压缩 */
    display: flex !important;
  }

  .bottom-player .current-track-info img {
    width: 40px !important;
    height: 40px !important;
    margin-right: 8px !important;
    flex: 0 0 auto; /* 固定尺寸 */
  }

  .bottom-player .current-track-info div {
    overflow: hidden;
    flex: 1; /* 占据剩余空间 */
  }

  .bottom-player .current-track-info h6 {
    font-size: 0.85rem !important;
    margin-bottom: 0 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .bottom-player .current-track-info small {
    font-size: 0.7rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .bottom-player .volume-control {
    display: none;
  }
  
  .bottom-player .progress-container {
    flex-grow: 1;
    margin: 0 !important;
  }
  
  body {
    padding-bottom: 70px !important;
    /* 在移动端也考虑滚动条位置 */
    margin-right: 0 !important;
  }
}

@media (max-width: 480px) {
  .bottom-player .current-track-info {
    min-width: 100px; /* 在极小屏幕上稍微减少封面区域宽度 */
  }
  
  .bottom-player .current-track-info img {
    width: 35px !important;
    height: 35px !important;
  }
  
  .bottom-player .player-controls {
    margin-right: 10px !important;
  }
  
  .bottom-player #play-btn {
    width: 35px !important;
    height: 35px !important;
    font-size: 0.8rem;
  }
}

/* 音乐符号样式 */
.card-body .fa-music {
  font-size: 0.8rem !important;
  align-self: flex-end !important;
  margin-bottom: 5px !important;
  margin-left: 8px !important;
}

/* 底部播放器进度条样式 */
.bottom-player #progress-container {
  height: 6px !important;
  background: rgba(255, 255, 255, 0.3) !important;
  border-radius: 3px !important;
  cursor: pointer !important;
}

.bottom-player #progress-bar {
  background: linear-gradient(90deg, #ffffff 0%, #4CAF50 100%) !important;
  transition: width 0.1s linear !important;
  height: 100% !important;
  min-width: 2px !important;
}

/* 视频卡片样式 - 封面在上，标题在下 */
.video-card {
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border-radius: 10px;
  overflow: hidden;
  border: none;
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* 视频卡片的 card-body 使用块级布局，而不是 flex */
.video-card .card-body {
  display: block !important;
  padding: 0 !important;
}

.video-card .card-img-top {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.video-card .card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-card .card-text {
  font-size: 0.85rem;
  color: #6c757d;
  margin-bottom: 0;
}
