/* CSS 變數定義 */
:root {
  /* 主要顏色 */
  --color-primary: #00a199;
  --color-white: #fbf9f3;
  --color-gray-light: #f5f5f5;
  --color-gray-medium: #f0f0f0;
  --color-gray-border: #e0e0e0;
  --color-gray-border-light: #d0d0d0;
  --color-gray-text: #666666;
  --color-gray-placeholder: #999999;
  --color-gray-bg: #f8f8f8;
  --color-gray-bg-light: #f8f9fa;

  /* 過渡效果 */
  --transition-fast: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: all 0.3s ease;

  /* 陰影 */
  --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-heavy: 0 4px 16px rgba(0, 0, 0, 0.15);

  /* 圓角 */
  --radius-xs: 4px;
  --radius-small: 6px;
  --radius-medium: 8px;
  --radius-large: 12px;
  --radius-xl: 16px;
  --radius-xxl: 20px;
  --radius-round: 25px;
  --radius-full: 50%;

  /* 常用過渡 */
  --transition-color: color 0.3s ease;
  --transition-background: background 0.3s ease;
  --transition-transform: transform 0.3s ease;
  --transition-opacity: opacity 0.3s ease;
  --transition-all: all 0.3s ease;
}

/* 基本重置和全域設定 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scrollbar-width: none;
}

/* 隱藏所有滾動條 */
::-webkit-scrollbar {
  display: none;
}

/* 對於Firefox */
* {
  scrollbar-width: none;
}

/* 對於IE和Edge */
body {
  -ms-overflow-style: none;
}

body {
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  background: var(--color-white);
  color: var(--color-primary);
  min-height: 100vh;
  line-height: 1.6;
}

/* Header 樣式 */
.header {
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: static;
  height: 80px;
  min-height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo img {
  height: 60px;
  width: auto;
  object-fit: contain;
  margin-top: 1rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--color-gray-text);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-xs);
  transition: var(--transition-normal);
  font-weight: 400;
}

.nav-links a:hover {
  color: var(--color-primary);
  background: var(--color-gray-light);
}

.user-section {
  display: flex;
  align-items: center;
  gap: 2rem;
  position: relative;
}

/* 新的搜尋框動畫 */
.search-container {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--color-white);
  border: 2px solid transparent;
  border-radius: var(--radius-round);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 40px;
  height: 40px;
}

.search-button {
  background: var(--color-gray-light);
  border: 1px solid var(--color-gray-border);
  color: var(--color-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  z-index: 10;
  flex-shrink: 0;
}

.search-button:hover {
  background: var(--color-primary);
  color: var(--color-white);
  transform: scale(1.05);
  box-shadow: var(--shadow-medium);
}

.search-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s ease;
}

.search-input {
  background: transparent;
  border: none;
  padding: 0 1rem;
  color: var(--color-primary);
  outline: none;
  width: 0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  height: 40px;
  font-size: 14px;
  font-weight: 500;
}

.search-input::placeholder {
  color: var(--color-gray-placeholder);
  font-weight: 400;
}

/* 展開狀態 - 新動畫 */
.search-container.expanded {
  width: 280px;
  background: var(--color-white);
  border: 2px solid transparent;
  box-shadow: 0 8px 32px rgba(26, 26, 26, 0.1);
  transform: translateY(-2px);
}

.search-container.expanded .search-button {
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  transform: scale(0.9);
}

.search-container.expanded .search-icon {
  transform: rotate(90deg);
}

.search-container.expanded .search-input {
  width: 220px;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

/* 搜尋狀態指示 - 新動畫 */
.search-container.searching {
  position: relative;
}

.search-container.searching .search-icon {
  animation: searchPulse 1.5s ease-in-out infinite;
}

@keyframes searchPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
}

/* 焦點狀態 */
.search-container.expanded .search-input:focus {
  background: transparent;
  border: none;
  outline: none;
}

/* 關閉動畫 */
.search-container.closing {
  animation: searchClose 0.3s ease-out forwards;
}

@keyframes searchClose {
  0% {
    width: 280px;
    transform: translateY(-2px);
  }
  100% {
    width: 40px;
    transform: translateY(0);
  }
}

/* 圖示樣式統一 */
.user-section > i {
  color: rgba(255, 255, 255, 0.8);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-all);
  background: rgba(255, 255, 255, 0.1);
}

.user-section > i:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* 用戶選單樣式 */
.user-menu {
  color: var(--color-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-normal);
  background: var(--color-gray-light);
  border: 1px solid var(--color-gray-border);
}

.user-menu:hover {
  background: var(--color-gray-medium);
  color: var(--color-primary);
}

.user-menu i {
  font-size: 1.2rem;
}

/* 控制按鈕區域 */
/* Controls區域樣式 */
.controls {
  display: none;
  position: fixed;
  right: 20px;
  top: calc(50% - 120px);
  transform: translateY(-50%);
  z-index: 1000;
  gap: 10px;
  flex-direction: column;
}

.controls.show {
  display: flex;
}

.control-btn {
  background: var(--color-primary);
  border: none;
  color: var(--color-white);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-round);
  cursor: pointer;
  transition: var(--transition-normal);
  font-weight: 500;
  box-shadow: var(--shadow-medium);
}

.control-btn:hover {
  background: #f3ab72;
  transform: translateY(-2px);
}

/* Header中的編輯模式按鈕樣式 */
.edit-mode-btn {
  color: var(--color-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-normal);
  background: var(--color-gray-light);
  border: 1px solid var(--color-gray-border);
}

.edit-mode-btn:hover {
  background: var(--color-gray-medium);
  color: var(--color-primary);
}

.edit-mode-btn i {
  font-size: 1.2rem;
}

/* 主佈局 */
.main-layout {
  display: flex;
  max-width: calc(100vw - 30px);
  margin: 0 auto;
  min-height: calc(100vh - 120px);
  position: relative;
  gap: 20px;
  padding: 15px;
  align-items: flex-start;
}

/* 左側邊欄 */
.sidebar {
  width: 280px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-medium);
  margin: 0;
  padding: 1.5rem;
  border: 1px solid var(--color-gray-border);
  transition: var(--transition-all);
  flex-shrink: 0;
  height: calc(100vh - 80px);
  overflow-y: auto;
  scrollbar-color: var(--color-gray-border) transparent;
  scrollbar-width: thin;
  box-shadow: var(--shadow-medium);
  backdrop-filter: blur(10px);
}

.sidebar-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-header h2 {
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-section {
  margin-bottom: 1rem;
  transition: var(--transition-all);
}

.sidebar-section-header {
  display: flex;
  align-items: center;
  padding: 0.8rem 0.8rem 0.8rem 1.5rem;
  background: #00a199;
  border-radius: 25px;
  cursor: pointer;
  transition: var(--transition-all);
  margin-bottom: 0.5rem;
  color: #ffffff;
}

.sidebar-section-header:hover {
  background: #f3ab72;
}

.sidebar-section-header i {
  margin-right: 0.8rem;
}

.sidebar-section-header .toggle-icon {
  margin-left: auto;
  transition: transform 0.3s ease;
}

.sidebar-section.collapsed .toggle-icon {
  transform: rotate(-90deg);
}

.sidebar-section-content {
  padding: 0.5rem 0.5rem 0.5rem 2rem;
  max-height: 200px;
  overflow-y: auto;
  transition: max-height 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
  opacity: 1;
  transform: translateY(0);
  border-radius: 8px;
  margin-right: 4px;
}

.sidebar-section.collapsed .sidebar-section-content {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
}

.sidebar-item {
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-small);
  margin-bottom: 0.3rem;
  cursor: pointer;
  transition: var(--transition-normal);
  color: var(--color-gray-text);
  display: flex;
  align-items: center;
}

.sidebar-item:hover {
  background: #ffffff;
  color: var(--color-primary);
}

.sidebar-item:active {
  transform: scale(0.98);
}

.artist-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  color: white;
  margin-right: 8px;
  flex-shrink: 0;
  overflow: hidden;
}

.artist-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* 主容器 */
.container {
  padding: 0;
  flex-grow: 1;
  backdrop-filter: blur(10px);
}

/* 主要內容區域 */
.main-content {
  flex: 1;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.5);
  overflow-y: auto;
  height: calc(100vh - 80px);
  backdrop-filter: blur(10px);
}

.content-section {
  margin-bottom: 2rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--color-gray-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(10px);
}

/* 模組網格 */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
  min-height: 70vh;
}

/* 模組 */
.module {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  padding: 1.5rem;
  border: 1px solid var(--color-gray-border);
  transition: all 0.3s ease;
  height: auto;
  min-height: 250px;
  max-height: 400px;
  overflow-y: auto;
  scrollbar-color: var(--color-gray-border) transparent;
  scrollbar-width: thin;
  position: relative;
  user-select: none;
  box-shadow: var(--shadow-medium);
  backdrop-filter: blur(10px);
}

/* 推薦歌曲和推薦歌單模組佔據整行 */
.module[data-module="recommended-songs"],
.module[data-module="recommendations"] {
  grid-column: 1 / -1;
  height: auto;
  min-height: 300px;
  max-height: none;
  overflow: visible;
}

/* 每日抽卡和娛樂新聞模組特殊高度設定 */
.module[data-module="daily-card"],
.module[data-module="news"] {
  height: auto;
  min-height: 280px;
  max-height: 320px;
}

.notification {
  position: relative;
  cursor: pointer;
  width: 40px;
  height: 40px;
  background: #f5f5f5;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  border: 1px solid #e0e0e0;
}

.notification:hover {
  background: #f0f0f0;
}

.notification i {
  font-size: 1.2rem;
  color: var(--color-primary);
  cursor: pointer;
  transition: color 0.3s ease;
}

.notification i:hover {
  color: #1a1a1a;
}

.notification-popup {
  position: fixed;
  top: 60px;
  right: 80px;
  width: 350px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  overflow: hidden;
  display: none;
  border: 1px solid #e0e0e0;
  transform: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  opacity: 0;
  visibility: hidden;
}

.notification-popup.show {
  display: block;
  opacity: 1;
  visibility: visible;
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid #e0e0e0;
}

.notification-header h3 {
  margin: 0;
  font-size: 1rem;
  color: #1a1a1a;
  font-weight: 500;
}

.notification-header button {
  background: none;
  border: none;
  color: #666666;
  cursor: pointer;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.notification-header button:hover {
  color: #1a1a1a;
}

.notification-content {
  max-height: 400px;
  overflow-y: auto;
  padding: 15px;
  scrollbar-width: thin;
  scrollbar-color: #e0e0e0 transparent;
}

.concert-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}

.concert-item:last-child {
  border-bottom: none;
}

.concert-info h4 {
  margin: 0 0 5px 0;
  font-size: 0.9rem;
  color: #1a1a1a;
  font-weight: 500;
}

.concert-info p {
  margin: 0;
  font-size: 0.8rem;
  color: #666666;
}

.btn-small {
  background: var(--color-primary);
  color: #ffffff;
  border: none;
  border-radius: 16px;
  padding: 5px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.3s ease;
  font-weight: 500;
}

.btn-small:hover {
  background: #333333;
}

/* 恢復面板 */
.restore-panel {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  gap: 10px;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border: 1px solid #e0e0e0;
}

.restore-btn {
  background: #f5f5f5;
  color: #1a1a1a;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  padding: 5px 15px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
}

.restore-btn:hover {
  background: #f0f0f0;
  border-color: #d0d0d0;
}

/* 推薦歌曲模組 */
.song-carousel {
  display: flex;
  align-items: center;
  width: 100%;
  position: relative;
  overflow: visible;
}

.song-container {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  gap: 15px;
  padding: 10px 0;
  width: 100%;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.song-container::-webkit-scrollbar {
  display: none;
}

.song-item {
  min-width: 150px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
}

.song-cover {
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
}

.song-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.play-overlay i {
  font-size: 3rem;
  color: #ffffff;
}

.song-cover:hover img {
  transform: scale(1.1);
}

.song-cover:hover .play-overlay {
  opacity: 1;
}

.song-info {
  text-align: center;
  width: 150px;
  max-width: 150px;
}

.song-info h4 {
  margin: 0;
  font-size: 1rem;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.song-info p {
  margin: 5px 0 0 0;
  font-size: 0.8rem;
  color: #666666;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  /* 设置文本行数限制,实现跨浏览器兼容 */
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -moz-line-clamp: 2;
  -ms-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.3;
  max-height: 2.6em;
  width: 150px;
  max-width: 150px;
}

.artist-link {
  color: #666666;
  text-decoration: none;
  transition: color 0.3s ease;
}

.artist-link:hover {
  color: #1a1a1a;
  text-decoration: underline;
}

.song-action {
  background: none;
  border: none;
  color: #666666;
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.3s ease;
  padding: 5px;
}

.song-action:hover {
  color: #1a1a1a;
}

.carousel-nav {
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  color: #666666;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: absolute;
  z-index: 10;
}

.carousel-nav.prev {
  left: 10px;
}

.carousel-nav.next {
  right: 10px;
}

.carousel-nav:hover {
  background: #f0f0f0;
  border-color: #d0d0d0;
  color: #1a1a1a;
}

/* 播放通知樣式 */
.playing-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #ffffff;
  color: #1a1a1a;
  padding: 15px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  transition: opacity 0.5s ease;
  max-width: 300px;
  border: 1px solid #e0e0e0;
}

.playing-icon {
  background: #f5f5f5;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid #e0e0e0;
}

.playing-icon i {
  font-size: 1.2rem;
}

.playing-info {
  flex: 1;
}

.playing-info p {
  margin: 0;
  font-size: 0.8rem;
  color: #666666;
}

.playing-info h4 {
  margin: 5px 0;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #1a1a1a;
  font-weight: 500;
}

.module:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.module.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.module-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 0.5rem;
}

.module-title {
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #7b7b7b;
}

.module-actions {
  display: flex;
  gap: 0.5rem;
}

.action-btn {
  background: none;
  border: none;
  color: #666666;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: none; /* 預設隱藏 */
}

.action-btn:hover {
  color: #1a1a1a;
  background: #f5f5f5;
}

.module-content {
  line-height: 1.6;
}

/* 播放清單、排行榜、新聞項目 */
.playlist-item,
.chart-item,
.news-item {
  background: #f8f8f8;
  margin: 0.5rem 0;
  padding: 0.75rem;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #f0f0f0;
}

.playlist-item:hover,
.chart-item:hover,
.news-item:hover {
  background: #f0f0f0;
  border-color: #e0e0e0;
}

/* 每日抽卡樣式 */
.daily-card {
  text-align: center;
  padding: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 500px;
  min-height: 500px;
}

/* 每日抽卡模組容器 */
.module[data-module="daily-card"] {
  min-height: 580px;
  min-width: 400px;
  flex-shrink: 0;
  overflow: hidden;
}

.module[data-module="daily-card"] .module-content {
  min-height: 520px;
  min-width: 360px;
  overflow: hidden;
}

.card-container {
  perspective: 1000px;
  width: 320px;
  height: 450px;
  margin: 0 auto;
}

.card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
}

.card.flipped {
  transform: rotateY(180deg);
  cursor: default;
}

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.card-front {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
}

.card-back {
  background: white;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
}

.front-content {
  text-align: center;
  padding: 40px;
}

.date {
  font-size: 14px;
  opacity: 0.8;
  margin-bottom: 20px;
  letter-spacing: 2px;
}

.title {
  font-size: 24px;
  font-weight: 300;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.subtitle {
  font-size: 14px;
  opacity: 0.9;
  font-weight: 200;
}

.ornament {
  width: 60px;
  height: 2px;
  background: rgba(255, 255, 255, 0.6);
  margin: 30px auto;
  position: relative;
}

.ornament::before,
.ornament::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  top: -3px;
}

.ornament::before {
  left: -10px;
}

.ornament::after {
  right: -10px;
}

.card-content {
  flex: 1;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.card-image {
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
  border-radius: 16px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

.card-title {
  font-size: 20px;
  font-weight: 300;
  margin-bottom: 15px;
  color: #333;
  letter-spacing: 0.5px;
}

.card-description {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 30px;
}

.action-feedback {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  background: rgba(76, 175, 80, 0.9);
  color: white;
  border-radius: 25px;
  font-size: 14px;
  transform: translateY(-100px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
}

.action-feedback.show {
  transform: translateY(0);
  opacity: 1;
}

/* 卡片操作按鈕 */
.card-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  padding: 20px;
  background: #f8f9fa;
}

.action-btn {
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background: white;
  color: #666;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.action-btn.play {
  background: #00a199;
  color: white;
}

.action-btn.play:hover {
  background: #f3ab72;
}

.action-btn.favorite {
  background: #00a199;
  color: white;
}

.action-btn.favorite:hover {
  background: #f3ab72;
}

.action-btn.block {
  background: #00a199;
  color: white;
}

.action-btn.block:hover {
  background: #f3ab72;
}

.action-btn.pass {
  background: #00a199;
  color: white;
}

.action-btn.pass:hover {
  background: #f3ab72;
}

.action-btn:active {
  transform: translateY(0);
}

/* 隱藏模組面板 */
.hidden-modules {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: #ffffff;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  max-width: 200px;
  display: none; /* 預設隱藏 */
}

.hidden-modules h3 {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: #1a1a1a;
  font-weight: 500;
}

.hidden-module-item {
  background: #f8f8f8;
  padding: 0.5rem;
  margin: 0.25rem 0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.8rem;
  color: #666666;
  border: 1px solid #f0f0f0;
}

.hidden-module-item:hover {
  background: #f0f0f0;
  border-color: #e0e0e0;
  color: #1a1a1a;
}

.module.hidden,
#sidebar.hidden {
  display: none;
}

/* 拖拉相關樣式 */
.drag-mode .module {
  cursor: grab;
}

.dragging {
  opacity: 0.5;
  cursor: grabbing !important;
  z-index: 100;
  position: relative;
}

.drag-ghost {
  opacity: 0.3;
  transform: scale(0.95);
}

.drag-over {
  border: 2px dashed #d0d0d0 !important;
  background: #f8f8f8;
  transform: scale(1.02);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

@keyframes pulse {
  0% {
    background: #f8f8f8;
    border-color: #e0e0e0;
  }
  50% {
    background: #f0f0f0;
    border-color: #d0d0d0;
  }
  100% {
    background: #f8f8f8;
    border-color: #e0e0e0;
  }
}

.modules-grid.drag-mode {
  gap: 2rem;
}

.modules-grid.drag-mode .module:not(.dragging) {
  transition: all 0.3s ease;
}

.drag-ghost {
  opacity: 0.3;
  transform: scale(0.95);
  pointer-events: none;
}

/* 排行榜模組樣式 */
.ranking-section {
  margin-bottom: 1rem;
}

.ranking-section-header {
  display: flex;
  align-items: center;
  padding: 0.8rem 1rem;
  background: #f8f8f8;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid #f0f0f0;
  user-select: none;
}

.ranking-section-header:hover {
  background: #f0f0f0;
  border-color: #e0e0e0;
}

.ranking-section-header i {
  margin-right: 0.8rem;
  color: #666666;
}

.ranking-section-header span {
  flex: 1;
  font-weight: 500;
  color: #1a1a1a;
}

.ranking-section-header .toggle-icon {
  margin-left: auto;
  transition: transform 0.3s ease;
  color: #666666;
}

.ranking-section.collapsed .toggle-icon {
  transform: rotate(-90deg);
}

.ranking-section:not(.collapsed) .toggle-icon {
  transform: rotate(180deg);
}

.ranking-section-content {
  padding: 0.5rem 0;
  max-height: 300px;
  overflow-y: auto;
  transition: max-height 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
  opacity: 1;
  transform: translateY(0);
}

.ranking-section.collapsed .ranking-section-content {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  padding: 0;
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.ranking-item {
  display: flex;
  align-items: center;
  padding: 0.6rem 1rem;
  background: #ffffff;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #f0f0f0;
}

.ranking-item:hover {
  background: #f8f8f8;
  border-color: #e0e0e0;
  transform: translateX(2px);
}

.ranking-number.top-3 {
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 600;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.ranking-number {
  font-weight: bold;
  color: #1a1a1a;
  min-width: 24px;
  text-align: center;
  margin-right: 0.8rem;
  font-size: 0.9rem;
}

.ranking-song-info {
  flex: 1;
  min-width: 0;
}

.ranking-song-title {
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.9rem;
}

.ranking-song-artist {
  color: #666666;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranking-play-count {
  color: #999999;
  font-size: 0.75rem;
  margin-left: 0.5rem;
  white-space: nowrap;
}

/* 手機版選單樣式 */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-primary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-small);
  transition: var(--transition-normal);
}

.mobile-menu-toggle:hover {
  background: var(--color-gray-light);
}

.mobile-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-white);
  border: 1px solid var(--color-gray-border);
  border-radius: 0 0 var(--radius-medium) var(--radius-medium);
  box-shadow: var(--shadow-heavy);
  z-index: 1000;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.mobile-dropdown.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.mobile-search-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border-bottom: 1px solid var(--color-gray-border);
}

.mobile-search-container .search-icon {
  width: 1.25rem;
  height: 1.25rem;
  stroke: var(--color-gray-text);
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}

.mobile-search-container .search-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-gray-border);
  border-radius: var(--radius-medium);
  background: var(--color-white);
  color: var(--color-gray-text);
  font-size: 1rem;
  transition: var(--transition-normal);
  pointer-events: auto;
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
}

.mobile-search-container .search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
}

.mobile-search-container:focus-within .search-icon {
  stroke: var(--color-primary);
}

.mobile-menu-items {
  padding: 0.5rem 0;
}

.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  cursor: pointer;
  transition: var(--transition-normal);
  color: var(--color-gray-text);
}

.mobile-menu-item:hover {
  background: var(--color-gray-light);
  color: var(--color-primary);
}

.mobile-menu-item i {
  font-size: 1.2rem;
  width: 20px;
  text-align: center;
}

.desktop-only {
  display: flex;
}

/* 響應式設計 */
@media (max-width: 768px) {
  .modules-grid {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 1rem;
  }

  .hidden-modules {
    position: fixed;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    margin-top: 0;
    max-width: 180px;
    z-index: 1001;
  }

  .header {
    position: relative;
    padding: 1rem;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .desktop-only {
    display: none;
  }

  /* 手機版側邊欄調整 */
  .main-layout {
    flex-direction: column;
    gap: 15px;
    padding: 10px;
  }

  .sidebar {
    width: 95% !important;
    min-width: unset !important;
    max-width: 94% !important;
    height: auto !important;
    max-height: 300px !important;
    margin: 0 auto !important;
    padding: 1.5rem !important;
    border: 1px solid var(--color-gray-border) !important;
    box-sizing: border-box !important;
    flex-shrink: 1 !important;
  }

  /* 手機版模組占滿寬度 */
  .modules-grid {
    width: 100%;
  }

  .module {
    width: 100%;
    box-sizing: border-box;
  }

  .mobile-menu-toggle {
    display: block;
  }

  /* 手機版控制按鈕區域 */
  .controls {
    position: static;
    transform: none;
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    margin: 10px;
    z-index: auto;
  }

  .controls.show {
    display: flex;
  }

  .control-btn {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 120px;
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
    text-align: center;
  }
}

/* 浮動音樂播放器 */
.floating-player {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  font-family: inherit;
}

/* 簡約模式 */
.player-compact {
  background: #ffffff;
  border-radius: 20px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  min-width: 280px;
}

.player-compact:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.play-btn {
  background: #1a1a1a;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
}

.play-btn:hover {
  background: #333333;
  transform: scale(1.05);
}

.play-btn i {
  font-size: 16px;
}

.song-details {
  flex: 1;
  min-width: 0;
}

.song-title {
  color: #1a1a1a;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-artist {
  color: #666666;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.expand-btn {
  background: none;
  border: none;
  color: #666666;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.expand-btn:hover {
  color: #1a1a1a;
  background: #f5f5f5;
}

/* 展開模式 */
.player-expanded {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  width: 350px;
  max-height: 500px;
  overflow: hidden;
  display: none;
  animation: slideUp 0.3s ease;
}

.player-expanded.show {
  display: block;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e0e0e0;
}

.player-header h3 {
  color: #1a1a1a;
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.collapse-btn {
  background: none;
  border: none;
  color: #666666;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.collapse-btn:hover {
  color: #1a1a1a;
  background: #f5f5f5;
}

.current-playing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.current-song-info {
  flex: 1;
}

.current-title {
  color: #1a1a1a;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 4px;
}

.current-artist {
  color: #666666;
  font-size: 14px;
}

.play-btn-large {
  background: #1a1a1a;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
  margin-left: 16px;
}

.play-btn-large:hover {
  background: #333333;
  transform: scale(1.05);
}

.play-btn-large i {
  font-size: 20px;
}

.player-sections {
  max-height: 300px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.player-sections::-webkit-scrollbar {
  display: none;
}

.section {
  padding: 16px 20px;
}

.section h4 {
  color: #1a1a1a;
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section h4 i {
  color: #666666;
}

.section-divider {
  height: 1px;
  background: #e0e0e0;
  margin: 0 20px;
}

.song-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.song-item-mini {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f8f8f8;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid #f0f0f0;
}

.song-item-mini:hover {
  background: #f0f0f0;
  border-color: #e0e0e0;
  transform: translateX(2px);
}

.mini-title {
  color: #1a1a1a;
  font-size: 13px;
  font-weight: 500;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-artist {
  color: #666666;
  font-size: 12px;
  margin-left: 8px;
  white-space: nowrap;
}

/* 播放狀態動畫 */
.playing .play-btn,
.playing .play-btn-large {
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(26, 26, 26, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(26, 26, 26, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(26, 26, 26, 0);
  }
}

/* Footer 樣式 */
.footer {
  background: #fdfbef;
  padding: 3rem 0;
  text-align: center;
  margin-top: 2rem;
  backdrop-filter: blur(10px);
}

.footer p {
  margin: 0;
  color: var(--color-gray-text);
  font-size: 0.9rem;
  font-weight: 400;
}

/* 播放通知樣式 */
.playing-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #ffffff;
  color: #1a1a1a;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 10001;
  animation: slideInNotification 0.5s ease-out;
  border: 1px solid #e0e0e0;
  max-width: 300px;
  transition: opacity 0.5s ease;
}

.playing-icon {
  width: 40px;
  height: 40px;
  background: #f5f5f5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  animation: pulse 2s infinite;
  border: 1px solid #e0e0e0;
  color: #666666;
}

.playing-info p {
  margin: 0;
  font-size: 12px;
  color: #666666;
}

.playing-info h4 {
  margin: 5px 0;
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
}

@keyframes slideInNotification {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* 響應式設計 */
@media (max-width: 768px) {
  .floating-player {
    bottom: 10px;
    right: 10px;
    left: 10px;
  }

  .player-compact {
    min-width: auto;
    width: 100%;
  }

  .player-expanded {
    width: 100%;
  }

  .playing-notification {
    right: 10px;
    top: 10px;
    max-width: 250px;
  }
}

/* 排行榜和娛樂新聞模組特殊設定 */
.module[data-module="ranking"],
.module[data-module="news"] {
  min-width: 350px;
  flex-shrink: 0;
}

@media (max-width: 1200px) {
  .modules-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }
}

@media (max-width: 1024px) {
  .modules-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }

  /* 排行榜和娛樂新聞模組在中等螢幕保持最小寬度 */
  .module[data-module="ranking"],
  .module[data-module="news"] {
    min-width: 320px;
  }

  /* 調整推薦歌曲和推薦歌單模組高度 */
  .module[data-module="recommended-songs"],
  .module[data-module="recommendations"] {
    height: auto;
    min-height: 250px;
    max-height: 350px;
  }

  /* 調整歌曲項目尺寸 */
  .song-item {
    min-width: 120px;
  }

  .song-cover {
    width: 120px;
    height: 120px;
  }

  .song-info h4 {
    font-size: 0.9rem;
  }

  .song-info p {
    font-size: 0.8rem;
  }
}

@media (max-width: 800px) {
  .modules-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }

  /* 排行榜和娛樂新聞模組在小螢幕保持最小寬度 */
  .module[data-module="ranking"],
  .module[data-module="news"] {
    min-width: 300px;
  }
}
