/* ============================================
   UI/UX 增强样式 - 丽江音悦台
   整合所有内联样式 + 新增视觉效果
   ============================================ */

/* === 1. 全局背景 === */
body {
  background: none !important;
  background-color: #ffffff !important;
  min-height: 100vh !important;
  position: relative !important;
}

body::before {
  content: '' !important;
  position: fixed !important;
  inset: 0 !important;
  background: url('./images/yyt.png') no-repeat center center !important;
  background-size: cover !important;
  opacity: 0.15 !important;
  z-index: -1 !important;
}

/* === 2. 导航栏 === */
.navbar-brand {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.navbar-brand .d-flex.flex-column {
  align-items: flex-start !important;
}

.brand-name {
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  color: white !important;
}

.brand-slogan {
  font-size: 0.7rem !important;
  color: rgba(255, 255, 255, 0.8) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 200px !important;
}

.navbar .form-control {
  transition: all 0.3s ease !important;
}

.navbar .form-control:focus {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1) !important;
}

/* === 3. 标语区域 === */
.slogan-container {
  margin-top: 56px !important;
  height: 45px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  z-index: 5 !important;
  overflow: hidden !important;
}

.slogan-wrapper {
  display: flex !important;
  align-items: center !important;
  gap: 15px !important;
  max-width: 100% !important;
  padding: 0 10px !important;
}

.slogan-line {
  width: 60px !important;
  height: 2px !important;
  background: linear-gradient(90deg, transparent, #d35400, transparent) !important;
  opacity: 0.6 !important;
  flex-shrink: 1 !important;
}

.slogan-text {
  font-size: 2rem !important;
  font-weight: 800 !important;
  letter-spacing: 6px !important;
  font-family: "Noto Sans SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif !important;
  background: linear-gradient(135deg, #f39c12, #d35400, #e67e22) !important;
  background-size: 200% 200% !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  animation: slogan-glow 4s ease infinite !important;
  white-space: nowrap !important;
  line-height: 1 !important;
}

@keyframes slogan-glow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* === 4. 内容区域 === */
.content-section {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(10px) !important;
  border-radius: 15px !important;
  padding: 20px !important;
  margin: 10px auto 20px auto !important;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1) !important;
  max-width: 1300px !important;
}

/* === 5. Tab 标签样式 === */
.nav-tabs .nav-link {
  color: #495057 !important;
  font-weight: 500 !important;
  padding: 12px 24px !important;
  border: none !important;
  border-bottom: 3px solid transparent !important;
  border-radius: 0 !important;
  transition: all 0.3s ease !important;
}

.nav-tabs .nav-link:hover {
  color: #667eea !important;
  border-bottom-color: rgba(102, 126, 234, 0.3) !important;
}

.nav-tabs .nav-link.active {
  color: #667eea !important;
  background-color: transparent !important;
  font-weight: 600 !important;
  border-bottom: 3px solid #667eea !important;
}

/* === 6. 卡片基础样式 === */
.music-card, .video-card {
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === 7. 音乐卡片增强 === */
.music-card {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: white;
  border: none;
}

.music-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.04), rgba(118, 75, 162, 0.04));
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.music-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 12px 30px rgba(102, 126, 234, 0.12),
              0 4px 8px rgba(0, 0, 0, 0.05);
}

.music-card:hover::after {
  opacity: 1;
}

.music-card.active {
  border-left: 4px solid #667eea;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.06), #fff);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

/* 音乐封面旋转 */
.album-cover {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50% !important;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s ease;
}

.music-card:hover .album-cover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.music-card.active.playing .album-cover {
  animation: spin-cover 6s linear infinite;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3),
              0 6px 20px rgba(0, 0, 0, 0.12);
}

@keyframes spin-cover {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.music-card.active .album-cover.paused {
  animation-play-state: paused;
}

/* === 8. 视频卡片增强 === */
.video-card {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: none;
}

.video-card .card-img-top {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              filter 0.3s ease;
}

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

.video-card:hover .card-img-top {
  transform: scale(1.06);
  filter: brightness(1.05);
}

.video-card .card-body {
  display: block !important;
  padding: 12px 14px !important;
  position: relative;
}

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

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

/* 视频播放图标叠加 */
.video-card .play-overlay {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  width: 44px;
  height: 44px;
  background: rgba(102, 126, 234, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease;
  opacity: 0;
  z-index: 5;
  pointer-events: none;
}

.video-card:hover .play-overlay {
  transform: translateX(-50%) scale(1);
  opacity: 1;
}

/* === 9. 底部播放器增强 === */
.bottom-player {
  background: linear-gradient(180deg, rgba(102, 126, 234, 0.98) 0%, rgba(118, 75, 162, 0.98) 100%);
  backdrop-filter: blur(10px);
  padding: 10px 0;
  z-index: 1000;
}

/* 播放按钮 */
.bottom-player #play-btn {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s ease !important;
}

.bottom-player #play-btn:hover {
  transform: scale(1.08) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.bottom-player #play-btn:active {
  transform: scale(0.95) !important;
}

.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.08);
}

/* 播放时封面旋转 */
.bottom-player .current-track-info img.playing {
  animation: spin-cover 5s linear infinite;
  border-radius: 50% !important;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4);
}

/* 进度条发光 */
.bottom-player #progress-container {
  position: relative;
}

.bottom-player #progress-bar {
  background: linear-gradient(90deg, #fff, #4CAF50) !important;
  box-shadow: 0 0 6px rgba(76, 175, 80, 0.4);
}

/* === 10. 分页按钮增强 === */
.page-btn {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  border-radius: 8px !important;
  font-weight: 500;
}

.page-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.page-btn:active:not(:disabled) {
  transform: translateY(0);
}

/* === 11. 关于我们区域 === */
.about-section {
  background: rgba(255, 255, 255, 0.7) !important;
  backdrop-filter: blur(5px) !important;
  margin-bottom: 20px !important;
  border-radius: 15px !important;
}

.about-section h3 {
  position: relative;
  display: inline-block;
}

.about-section h3::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 2px;
}

/* === 12. 联系表单 === */
.contact-section {
  background: transparent !important;
  backdrop-filter: none !important;
}

.contact-card-minimal {
  background: rgba(255, 255, 255, 0.95) !important;
  border-radius: 4px !important;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.05) !important;
  overflow: hidden;
  border: 1px solid #f0f0f0 !important;
}

.minimal-input {
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid #e0e0e0 !important;
  border-radius: 0 !important;
  padding: 10px 0 !important;
  font-size: 0.95rem !important;
  box-shadow: none !important;
  transition: all 0.4s ease !important;
}

.minimal-input:focus {
  border-bottom-color: #d35400 !important;
}

.btn-minimal {
  background: #333 !important;
  color: #fff !important;
  border-radius: 0 !important;
  padding: 12px 35px !important;
  font-size: 0.9rem !important;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.3s ease !important;
  position: relative;
  overflow: hidden;
}

.btn-minimal::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease;
}

.btn-minimal:hover {
  background: #d35400 !important;
  color: #fff !important;
  transform: translateX(5px);
}

.btn-minimal:active::after {
  width: 300px;
  height: 300px;
}

/* === 13. Toast 通知 === */
.contact-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 16px 24px;
  border-radius: 12px;
  color: white;
  font-size: 15px;
  font-weight: 500;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(20px);
}

.contact-toast.show {
  opacity: 1;
  transform: translateX(0);
}

.contact-toast.toast-success {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.contact-toast.toast-error {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* === 14. 火箭按钮增强 === */
.scroll-to-top {
  position: fixed !important;
  bottom: 100px !important;
  right: 25px !important;
  width: 50px !important;
  height: 50px !important;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  border: none !important;
  border-radius: 50% !important;
  font-size: 1.3rem !important;
  cursor: pointer !important;
  z-index: 2147483647 !important;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.scroll-to-top.show {
  opacity: 1 !important;
  visibility: visible !important;
}

.scroll-to-top:hover {
  transform: translateY(-4px) scale(1.08) !important;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5) !important;
}

.scroll-to-top:active {
  transform: translateY(-2px) scale(1.02) !important;
}

/* 火箭发射动画 */
.scroll-to-top.launching {
  animation: rocket-bounce 0.4s ease;
}

@keyframes rocket-bounce {
  0% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0); }
}

/* === 15. 滚动条美化 === */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.03);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(102, 126, 234, 0.35), rgba(118, 75, 162, 0.35));
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(102, 126, 234, 0.6), rgba(118, 75, 162, 0.6));
}

html {
  scrollbar-width: thin;
  scrollbar-color: rgba(102, 126, 234, 0.35) rgba(0, 0, 0, 0.03);
}

/* 播放器不遮挡滚动条 */
.bottom-player {
  right: 8px;
  width: calc(100% - 8px);
}

/* === 向上火箭按钮（合并自 scroll_to_top.css） === */

/* === 16. 页脚增强 === */
footer {
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.4), transparent);
}

/* === 17. Tab 内容过渡 === */
.tab-content {
  min-height: 400px;
}

/* === 18. 防止选中文本（交互元素）=== */
.navbar, .bottom-player, .scroll-to-top, .slogan-container {
  user-select: none;
}

/* === 19. 滚动渐入动画 === */
.scroll-reveal {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* 卡片进入动画 */
@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-enter {
  opacity: 0;
  animation: cardFadeIn 0.45s ease forwards;
}

/* === 20. 卡片内元素样式 === */
.track-duration {
  font-size: 0.75rem;
}

.card-music-icon {
  font-size: 0.9rem;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.music-card:hover .card-music-icon {
  opacity: 1;
}

/* 音乐卡片标题 */
.music-card .card-title {
  font-size: 0.9rem;
}

.music-card .card-text {
  max-width: 80px;
}

/* 视频播放图标增强 */
.video-card .position-absolute .fa-play-circle {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.video-card:hover .position-absolute .fa-play-circle {
  transform: scale(1.15);
  opacity: 1 !important;
}

.scroll-reveal.reveal-delay-1 { transition-delay: 0.1s; }
.scroll-reveal.reveal-delay-2 { transition-delay: 0.15s; }
.scroll-reveal.reveal-delay-3 { transition-delay: 0.2s; }
.scroll-reveal.reveal-delay-4 { transition-delay: 0.25s; }

/* === 响应式适配 === */

@media (max-width: 768px) {
  .navbar-brand {
    gap: 8px !important;
  }
  .brand-name {
    font-size: 1rem !important;
  }
  .brand-slogan {
    font-size: 0.6rem !important;
    max-width: 150px !important;
  }
  .slogan-text {
    font-size: 1.3rem !important;
    letter-spacing: 2px !important;
  }
  .slogan-line {
    width: 30px !important;
  }
  .scroll-to-top {
    bottom: 85px !important;
    right: 15px !important;
    width: 42px !important;
    height: 42px !important;
    font-size: 1rem !important;
  }
}

@media (max-width: 576px) {
  .slogan-container {
    height: 35px !important;
  }
  .slogan-text {
    font-size: 1rem !important;
    letter-spacing: 1px !important;
  }
  .slogan-line {
    width: 20px !important;
  }
  .slogan-wrapper {
    gap: 5px !important;
  }
  .video-card:hover .card-img-top {
    transform: scale(1.03);
  }
  .album-cover {
    width: 48px;
    height: 48px;
  }
}
