:root {
  --primary-color: #1976d2;
  --secondary-color: #dc004e;
  --text-color: #333;
  --text-light: #666;
  --bg-color: #fff;
  --bg-light: #f5f5f5;
  --border-color: #e0e0e0;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  color: var(--text-color);
  background-color: var(--bg-color);
  background-image: url('../images/background-img.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  line-height: 1.6;
  min-height: 100vh;
}

h2 {
  text-shadow: -1px -1px 0 white, 1px -1px 0 white, -1px 1px 0 white,
    1px 1px 0 white, 0 -1px 0 white, 0 1px 0 white, -1px 0 0 white,
    1px 0 0 white;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
}

.nav-logo {
  flex-shrink: 0;
}

.nav-logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 50px;
  width: auto;
  object-fit: contain;
}

.nav-menu {
  flex: 1;
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 1rem;
  align-items: center;
  margin: 0;
}

.nav-spacer {
  flex-shrink: 0;
  width: 50px;
}

.member-menu-container {
  position: relative;
}

.member-management {
  position: relative;
  display: inline-block;
}

.member-management .user-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  z-index: 1000;
  overflow: hidden;
  margin-top: 8px;
  display: none;
}

.member-management .user-dropdown.show {
  display: block !important;
}

.category-tabs {
  display: flex;
  justify-content: left;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.search-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  border-radius: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 2px solid var(--border-color);
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  margin-left: auto;
}

.search-input {
  border: none;
  outline: none;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  width: 160px;
  background: transparent;
  flex-shrink: 1;
  min-width: 120px;
}

.search-input::placeholder {
  color: var(--text-light);
}

.search-btn {
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.2rem;
  color: white;
  flex-shrink: 0;
  position: relative;
  z-index: 11;
}

.search-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.no-results {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-light);
  font-size: 1.1rem;
  background: white;
  border-radius: 8px;
  margin: 1rem 0;
  box-shadow: var(--shadow-sm);
}

/* 手機版選單按鈕 */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1003;
  position: relative;
}

.mobile-menu-btn span {
  width: 100%;
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

/* 手機版選單容器 */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.mobile-menu-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 320px;
  height: 100vh;
  background: white;
  box-shadow: 2px 0 30px rgba(0, 0, 0, 0.5);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.mobile-menu.active .mobile-menu-content {
  transform: translateX(0);
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #eee;
  background: #f8f9fa;
}

.mobile-menu-header h3 {
  margin: 0;
  color: #333;
  font-size: 1.1rem;
}

.mobile-menu-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav {
  padding: 1rem 0;
  background: white;
  flex: 1;
  overflow-y: auto;
}

.mobile-nav a {
  display: block;
  padding: 1.2rem 2rem;
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #eee;
  transition: all 0.3s ease;
  font-size: 1.1rem;
  font-weight: 500;
}

.mobile-nav a:hover {
  background-color: #f8f9fa;
  color: var(--primary-color);
  padding-left: 2.5rem;
}

.mobile-member-section {
  margin-top: auto;
  padding: 1.5rem 2rem;
  border-top: 1px solid #eee;
  background: white;
  flex-shrink: 0;
}

.mobile-member-section button {
  width: 100%;
  padding: 1rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
}

.mobile-member-section button:hover {
  background: #1565c0;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.4);
}

/* 響應式設計 */
@media (max-width: 768px) {
  /* 導航響應式 */
  .nav-container {
    padding: 1rem 2rem;
  }
  
  /* 隱藏桌面版選單，顯示手機版按鈕 */
  .desktop-nav {
    display: none !important;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .mobile-menu {
    display: block;
  }
  
  .nav-spacer {
    display: none;
  }
  
  /* 重設手機版選單樣式 */
  .nav-menu {
    position: fixed !important;
    top: 0 !important;
    left: -100% !important;
    width: 280px !important;
    max-width: 80vw !important;
    height: 100vh !important;
    background: white !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    padding: 80px 0 20px 0 !important;
    transition: left 0.3s ease !important;
    z-index: 1002 !important;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3) !important;
    gap: 0 !important;
    overflow-y: auto !important;
    list-style: none !important;
    margin: 0 !important;
    flex: none !important;
  }
  
  .nav-menu.active {
    left: 0 !important;
  }
  
  .nav-menu li {
    display: block !important;
    width: 100% !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
  }
  
  .nav-menu a {
    display: block !important;
    width: 100% !important;
    padding: 1rem 1.5rem !important;
    border-radius: 0 !important;
    text-align: left !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    color: #333 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
    line-height: 1.5 !important;
    min-height: 44px !important;
  }
  
  .nav-menu a:hover {
    background: rgba(25, 118, 210, 0.1) !important;
    color: var(--primary-color) !important;
  }
  
  .nav-menu a.active {
    background: rgba(25, 118, 210, 0.1) !important;
    color: var(--primary-color) !important;
    font-weight: 700 !important;
  }
  
  .nav-member-btn {
    display: block !important;
    background: transparent !important;
    color: #333 !important;
    box-shadow: none !important;
    text-align: left !important;
    border: none !important;
    width: 100% !important;
    padding: 1rem 1.5rem !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    border-radius: 0 !important;
    line-height: 1.5 !important;
    min-height: 44px !important;
  }
  
  .nav-member-btn:hover {
    background: rgba(25, 118, 210, 0.1) !important;
    color: var(--primary-color) !important;
  }
  
  .member-menu-container {
    width: 100% !important;
  }
  
  .user-dropdown {
    position: static !important;
    box-shadow: none !important;
    border: none !important;
    margin: 0 !important;
    background: rgba(0, 0, 0, 0.05) !important;
  }
  
  /* 分類標籤響應式 */
  .category-tabs {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .search-container {
    margin-left: auto;
    align-self: center;
    margin-top: 0.5rem;
  }

  .search-input {
    width: 140px;
    min-width: 100px;
  }
}

.logo {
  display: flex;
  align-items: center;
}

.logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--primary-color);
  font-weight: bold;
  font-size: 1.25rem;
}

.logo img {
  height: 60px;
  width: auto;
  margin-right: 15px;
  object-fit: contain;
}

.nav-menu a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  color: white;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

/* Individual button colors */
.nav-menu li:nth-child(1) a {
  background: linear-gradient(135deg, #ff6b9d, #e74c3c);
}

.nav-menu li:nth-child(2) a {
  background: linear-gradient(135deg, #ffa726, #ff9800);
}

.nav-menu li:nth-child(3) a {
  background: linear-gradient(135deg, #42a5f5, #1976d2);
}

.nav-menu li:nth-child(4) a {
  background: linear-gradient(135deg, #ab47bc, #8e24aa);
}

.nav-member-btn {
  background: linear-gradient(135deg, #4caf50, #388e3c);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.nav-member-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
  background: linear-gradient(135deg, #388e3c, #2e7d32);
}

.nav-menu a:hover {
  transform: translateY(-2px);
}

.nav-menu a.active {
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.2);
}

/* Add emoji icons before text */
.nav-menu li:nth-child(1) a::before {
  content: '💫';
  font-size: 1.1rem;
}

.nav-menu li:nth-child(2) a::before {
  content: '🎭';
  font-size: 1.1rem;
}

.nav-menu li:nth-child(3) a::before {
  content: '🎉';
  font-size: 1.1rem;
}

.nav-menu li:nth-child(4) a::before {
  content: '💎';
  font-size: 1.1rem;
}

.user-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-search-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  text-decoration: none;
}

.nav-search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #5a67d8 0%, #667eea 100%);
}

.login-btn {
  background: linear-gradient(135deg, #ff6b9d, #e74c3c);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.login-btn::before {
  content: '👤';
  font-size: 1.1rem;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.search-bar {
  background: var(--bg-light);
  padding: 1rem 2rem;
  display: flex;
  gap: 1rem;
}

.search-bar input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.search-bar button {
  padding: 0.75rem 2rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.content-section {
  padding: 4rem 0;
}

.bg-light {
  background: var(--bg-light);
}

h1,
h2,
h3 {
  margin-bottom: 1rem;
}

h2 {
  font-size: 2rem;
  color: var(--text-color);
  margin-bottom: 2rem;
  position: relative;
  text-align: center;
  padding-bottom: 1rem;
  z-index: 1;
}

h2:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 50px;
  background-image: url('../images/title-line.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: -1;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
}

.content-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  aspect-ratio: 3/4;
  border: 1px solid var(--border-color);
}

.content-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.content-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.content-card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 1rem 1rem;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.6) 50%,
    rgba(0, 0, 0, 0.2) 80%,
    transparent 100%
  );
  z-index: 2;
  color: white;
}

.content-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: white;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.content-author {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.content-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.content-type {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-size: 0.7rem;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.content-stats {
  display: flex;
  gap: 0.5rem;
}

.stat {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.stat svg {
  fill: currentColor;
}

/* Loading styles */
.loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-light);
}

.loading-spinner {
  display: inline-block;
  width: 50px;
  height: 50px;
  background-image: url('../images/loading.gif');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin: 0 auto 1rem;
}

.page-loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.page-loading.hide {
  opacity: 0;
  pointer-events: none;
}

.page-loading .loading-spinner {
  width: 80px;
  height: 80px;
  margin-bottom: 1rem;
}

.page-loading .loading-text {
  font-size: 1.1rem;
  color: var(--text-color);
}

.tab-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  background: white;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s;
}

.tab-btn.active,
.tab-btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.site-footer {
  background: #263238;
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section a {
  color: #b0bec5;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: white;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #37474f;
  color: #b0bec5;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background: white;
  margin: 10% auto;
  padding: 2rem;
  width: 90%;
  max-width: 400px;
  border-radius: 8px;
  position: relative;
}

.close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-light);
  z-index: 1001;
  pointer-events: auto;
  background: transparent;
  border: none;
  user-select: none;
}

.modal-content h2 {
  margin-bottom: 1.5rem;
}

.modal-content form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-content input {
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.modal-content button {
  padding: 0.75rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
}

.loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-light);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  background: linear-gradient(135deg, #42a5f5, #1976d2);
  color: white;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  background: rgba(255, 255, 255, 0.9);
  color: #1976d2;
  text-decoration: none;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* 精選內容布局 */
.featured-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.weekly-featured {
  position: relative;
  height: 480px;
  border-radius: 16px;
  overflow: hidden;
}

/* 本週最新輪播樣式 */
.weekly-carousel-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 16px;
}

.weekly-carousel-wrapper {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.weekly-carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease;
}

.weekly-carousel-track .weekly-featured-card {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.weekly-carousel-track .weekly-featured-card:hover {
  transform: scale(1.02);
}

.weekly-carousel-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 10;
}

.weekly-carousel-btn {
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  color: var(--primary-color);
  pointer-events: auto;
  margin: 0 1rem;
}

.weekly-carousel-btn:hover {
  background: white;
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.weekly-carousel-indicators {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.weekly-carousel-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.weekly-carousel-indicator.active {
  background: white;
  border-color: white;
}

.weekly-carousel-indicator:hover {
  border-color: white;
  background: rgba(255, 255, 255, 0.7);
}

.weekly-featured-card {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.weekly-featured-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.weekly-featured-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.5) 50%,
    rgba(0, 0, 0, 0.8) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem;
}

.weekly-featured-badge {
  align-self: flex-start;
  background: linear-gradient(135deg, #ff6b9d, #e74c3c);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.weekly-featured-content {
  color: white;
}

.weekly-featured-title {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.weekly-featured-author {
  font-size: 1rem;
  opacity: 0.9;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.daily-recommendations {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.daily-recommendation-card {
  position: relative;
  height: 230px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.daily-recommendation-card:hover {
  transform: translateX(5px);
}

.daily-recommendation-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.daily-recommendation-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    rgba(0, 0, 0, 0.7) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
}

.daily-recommendation-badge {
  align-self: flex-start;
  background: linear-gradient(135deg, #ffa726, #ff9800);
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.daily-recommendation-content {
  color: white;
}

.daily-recommendation-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  line-height: 1.3;
}

.daily-recommendation-author {
  font-size: 0.85rem;
  opacity: 0.9;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* 輪播樣式 */
.carousel-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.carousel-wrapper {
  overflow: hidden;
  width: 100%;
}

.carousel-track {
  display: flex;
  gap: 1.5rem;
  transition: transform 0.5s ease;
  width: max-content;
}

.carousel-track .content-card {
  flex: 0 0 180px;
  width: 180px;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  z-index: 10;
  color: var(--primary-color);
}

.carousel-btn:hover {
  background: white;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.carousel-btn-prev {
  left: -25px;
}

.carousel-btn-next {
  right: -25px;
}

.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.carousel-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(25, 118, 210, 0.3);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-indicator.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.carousel-indicator:hover {
  border-color: var(--primary-color);
  background: rgba(25, 118, 210, 0.5);
}

@media (max-width: 768px) {
  .nav-container {
    padding: 1rem 1rem;
  }

  .logo img {
    height: 45px;
    margin-right: 10px;
  }

  .nav-menu {
    display: none;
  }

  .user-actions {
    gap: 0.5rem;
  }

  .login-btn {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
  }

  .search-btn {
    padding: 0.8rem;
    width: 48px;
    height: 48px;
  }

  .favorites-btn-main {
    padding: 0.8rem;
    width: 48px;
    height: 48px;
  }

  .content-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .carousel-track .content-card {
    flex: 0 0 150px;
    width: 150px;
  }

  .carousel-btn {
    width: 40px;
    height: 40px;
  }

  .carousel-btn-prev {
    left: -20px;
  }

  .carousel-btn-next {
    right: -20px;
  }

  /* 精選內容響應式 */
  .featured-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .weekly-featured {
    height: 350px;
  }

  .weekly-featured-title {
    font-size: 1.5rem;
  }

  .weekly-featured-overlay,
  .daily-recommendation-overlay {
    padding: 1.5rem;
  }

  .daily-recommendation-card {
    height: 200px;
  }

  .nav-search-btn {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
  }
}

/* 顯示更多按鈕樣式 */
.show-more-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2rem 0;
  width: 100%;
}

.show-more-btn {
  color: #333;
  border: none;
  padding: 1rem 2rem;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(25, 118, 210, 0.3);
}

.show-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(25, 118, 210, 0.4);
  background: linear-gradient(135deg, #1565c0, #1976d2);
  color: #fff;
}

.show-more-btn:active {
  transform: translateY(0);
}

/* 內容詳情模態框樣式 - 直式布局 */
.content-modal {
  max-width: 500px;
  border-radius: 12px;
  overflow: hidden;
  background: white;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
}

.content-modal .close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  font-size: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

.content-modal .close:hover {
  background: rgba(0, 0, 0, 0.7);
}

.content-modal-header {
  height: 65%;
  position: relative;
  overflow: hidden;
}

.content-modal-image {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  display: block;
  background: #f8f9fa;
}

.content-modal-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    transparent,
    rgba(0, 0, 0, 0.3),
    rgba(0, 0, 0, 0.8)
  );
  color: white;
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  text-align: center;
}

.content-type-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.content-modal-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.3rem;
  line-height: 1.3;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.content-modal-author {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  padding-top: 0.8rem;
}

.content-modal-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.content-views,
.content-likes {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.content-modal-body {
  padding: 1rem;
  background: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.content-modal-description {
  flex: 1;
  margin-bottom: 0.8rem;
  min-height: 0;
}

.content-modal-description h3 {
  font-size: 1rem;
  color: var(--text-dark);
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.content-modal-description p {
  color: var(--text-light);
  line-height: 1.4;
  font-size: 0.85rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.content-modal-actions {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-shrink: 0;
}

.content-modal .btn-primary,
.content-modal .btn-secondary {
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  flex: 1;
  min-height: 50px;
}

.content-modal .btn-primary {
  background: linear-gradient(135deg, var(--primary-color), #42a5f5);
  color: white;
}

.content-modal .btn-primary:hover {
  background: linear-gradient(135deg, #1565c0, var(--primary-color));
  transform: translateY(-2px);
}

.content-modal .btn-secondary {
  background: #f5f5f5;
  color: var(--text-dark);
  border: 2px solid var(--border-color);
}

.content-modal .btn-secondary:hover {
  background: var(--bg-light);
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
}

.btn-primary,
.btn-secondary {
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), #42a5f5);
  color: white;
  box-shadow: 0 4px 15px rgba(25, 118, 210, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1565c0, #1976d2);
  box-shadow: 0 6px 20px rgba(25, 118, 210, 0.4);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-color);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-light);
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
}

.btn-secondary.favorited {
  background: linear-gradient(135deg, var(--secondary-color), #e91e63);
  color: white;
  border-color: var(--secondary-color);
}

.btn-secondary.favorited:hover {
  background: linear-gradient(135deg, #c51162, var(--secondary-color));
}

/* 響應式設計 - content modal */
@media (max-width: 768px) {
  .content-modal {
    width: 85vw;
    max-width: 85vw;
    border-radius: 8px;
  }

  .content-modal .close {
    top: 10px;
    right: 15px;
    width: 35px;
    height: 35px;
    font-size: 20px;
  }

  .content-modal-header {
    height: 70%;
  }

  .content-modal-info {
    padding: 1.5rem 1rem 1rem 1rem;
  }

  .content-modal-title {
    font-size: 1.2rem;
    line-height: 1.2;
    margin-bottom: 0.2rem;
  }

  .content-modal-author {
    font-size: 0.8rem;
    margin-bottom: 0.6rem;
    padding-top: 0.6rem;
  }

  .content-modal-meta {
    gap: 0.6rem;
  }

  .content-type-badge {
    font-size: 0.7rem;
    padding: 0.3rem 0.7rem;
    top: 10px;
    left: 10px;
  }

  .content-views,
  .content-likes {
    font-size: 0.75rem;
  }

  .content-modal-body {
    padding: 0.8rem;
  }

  .content-modal-description h3 {
    font-size: 1rem;
    margin-bottom: 0.4rem;
  }

  .content-modal-description p {
    font-size: 0.85rem;
    line-height: 1.4;
  }

  .content-modal-actions {
    gap: 0.6rem;
  }

  .content-modal .btn-primary,
  .content-modal .btn-secondary {
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    min-height: 45px;
  }

  .show-more-btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* 影片播放模態框樣式 */
.video-modal {
  background-color: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
}

.video-modal-content {
  background: #000;
  margin: 2% auto;
  padding: 0;
  width: 95%;
  max-width: 1200px;
  height: 90vh;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.video-modal .video-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  font-weight: bold;
  color: white;
  cursor: pointer;
  line-height: 1;
  z-index: 1000;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.video-modal .video-close:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.1);
}

.video-container {
  width: 100%;
  height: 100%;
  position: relative;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
}

.video-container .loading {
  color: white;
  font-size: 1.2rem;
  text-align: center;
}

/* 全螢幕模式優化 */
.video-modal:-webkit-full-screen {
  background: #000;
}

.video-modal:-moz-full-screen {
  background: #000;
}

.video-modal:fullscreen {
  background: #000;
}

.video-modal-content:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  margin: 0;
  border-radius: 0;
}

.video-modal-content:-moz-full-screen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  margin: 0;
  border-radius: 0;
}

.video-modal-content:fullscreen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  margin: 0;
  border-radius: 0;
}

/* 響應式設計 */
@media (max-width: 768px) {
  .video-modal-content {
    width: 98%;
    height: 85vh;
    margin: 5% auto;
  }

  .video-modal .video-close {
    top: 0.5rem;
    right: 0.5rem;
    width: 35px;
    height: 35px;
    font-size: 1.5rem;
  }
}

/* 繪本閱讀器樣式 */
.book-modal {
  z-index: 1100;
}

.book-modal-content {
  width: 90vw;
  max-width: 600px;
  height: 95vh;
  max-height: 95vh;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  margin: auto;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
}

.book-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  font-size: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-close:hover {
  background: rgba(0, 0, 0, 0.7);
}

.book-reader {
  width: 100%;
  height: 100%;
  position: relative;
}

.book-reader-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* 繪本封面樣式 - 全屏布局 */
.book-cover {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.book-cover-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    transparent,
    rgba(0, 0, 0, 0.4),
    rgba(0, 0, 0, 0.85)
  );
  color: white;
  text-align: center;
  padding: 4rem 2rem 2rem 2rem;
  min-height: 30%;
}

.book-cover-info h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  font-weight: 600;
  color: #fff;
}

.book-cover-info h2::after {
  display: none !important;
}

.book-author {
  font-size: 1.2rem;
  opacity: 0.95;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* 繪本內頁樣式 - 直式布局 */
.book-page {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.page-image {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.page-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    transparent,
    rgba(0, 0, 0, 0.4),
    rgba(0, 0, 0, 0.85)
  );
  color: white;
  padding: 4rem 2rem 2rem 2rem;
  pointer-events: none;
  min-height: 30%;
}

.page-text {
  font-size: 1.2rem;
  line-height: 1.6;
  color: white;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  font-weight: 500;
}

.page-text-secondary {
  font-size: 1rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
  font-style: italic;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* 結束頁樣式 */
.book-end {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #000;
  text-align: center;
  padding: 3rem;
}

.book-end h3 {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.book-end p {
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 2rem;
}

.restart-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.restart-btn:hover {
  background: #1565c0;
}

/* 控制按鈕樣式 */
.book-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid rgba(224, 224, 224, 0.5);
  backdrop-filter: blur(10px);
  min-height: 60px;
}

.nav-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
  min-width: 120px;
}

.nav-btn:hover:not(:disabled) {
  background: #1565c0;
}

.nav-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.page-indicator {
  font-size: 1.1rem;
  color: var(--text-dark);
  font-weight: 500;
}

/* 響應式設計 - 繪本閱讀器 */
@media (max-width: 768px) {
  .book-modal-content {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }

  .page-content {
    padding: 2.5rem 1.5rem 1.5rem 1.5rem;
    background: linear-gradient(
      transparent,
      rgba(0, 0, 0, 0.6),
      rgba(0, 0, 0, 0.9)
    );
    min-height: 35%;
  }

  .page-text {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 0.8rem;
  }

  .page-text-secondary {
    font-size: 0.9rem;
    line-height: 1.4;
  }

  .book-cover-info {
    padding: 2.5rem 1.5rem 1.5rem 1.5rem;
    background: linear-gradient(
      transparent,
      rgba(0, 0, 0, 0.6),
      rgba(0, 0, 0, 0.9)
    );
    min-height: 35%;
  }

  .book-cover-info h2 {
    font-size: 1.8rem;
    line-height: 1.3;
  }

  .book-author {
    font-size: 1.1rem;
  }

  .book-controls {
    padding: 1rem;
  }

  .nav-btn {
    min-width: 80px;
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
  }
}
