/* Labubu Wallpaper - 样式表 */

/* 全局样式 */
:root {
  --primary-color: #8B5A2B; /* 棕色主色调 */
  --secondary-color: #A67C52; /* 浅棕色 */
  --accent-color: #D2B48C; /* 棕褐色强调色 */
  --text-color: #3E2723; /* 深棕色文本 */
  --light-text: #6D4C41; /* 浅棕色文本 */
  --white: #ffffff;
  --light-bg: #F5F5DC; /* 米色背景 */
  --border-color: #D7CCC8; /* 浅棕色边框 */
  --box-shadow: 0 2px 10px rgba(62, 39, 35, 0.1);
  --border-radius: 12px;
  --font-main: 'Quicksand', 'Arial', sans-serif;
  --font-heading: 'Poppins', 'Arial', sans-serif;
}

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

body {
  font-family: var(--font-main);
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--white);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  margin-bottom: 1rem;
  color: var(--primary-color);
}

a {
  text-decoration: none;
  color: var(--primary-color);
}

a:hover {
  color: var(--accent-color);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.btn {
  padding: 10px 20px;
  border-radius: 30px;
  border: none;
  display: inline-block;
  text-align: center;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn.primary {
  background-color: var(--primary-color);
  color: var(--white);
}

.btn.secondary {
  background-color: var(--secondary-color);
  color: var(--white);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--box-shadow);
}

/* 布局容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 角色图片容器 */
.character-image-container {
  width: 535px;
  margin: 0 auto;
}

/* 下载部分 */
.download-section {
  text-align: center;
}

.download-section h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.download-section img {
  width: 400px;
  height: 400px;
  margin: 0 auto;
}

/* 头部样式 */
header {
  background-color: var(--white);
  box-shadow: var(--box-shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

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

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

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

.logo .logo-text {
  margin: 0;
  font-size: 1.5rem;
  color: var(--primary-color);
  font-weight: 700;
}

/* 导航菜单 */
nav {
  position: relative;
}

nav ul {
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

nav ul li {
  /* position: relative; */ /* Changed: Li items are static by default, dropdown will be relative to nav */
  list-style: none;
}

nav ul li a {
  font-weight: bold;
  text-decoration: none;
  color: var(--primary-color);
  padding: 5px 0;
}

/* The following dropdown menu styles are no longer needed. */
/*
nav ul li:hover .dropdown-menu {
  display: block;
}

.dropdown-menu {
  position: absolute;
  top: 100%; 
  left: 0;
  right: 0;
  width: auto; 
  transform: none; 
  background-color: var(--white);
  box-shadow: var(--box-shadow);
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  padding: 0; 
  display: none;
  z-index: 101;
  max-height: 80vh; 
  overflow-y: auto; 
}


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

.topics-submenu {
  display: flex; 
  flex-direction: row; 
  flex-wrap: wrap; 
  gap: 20px; 
  width: 100%; 
  padding: 10px 0; 
}

.topic-column {
  width: auto; 
  min-width: 200px; 
  flex: 1; 
  padding: 10px 15px; 
  border: 1px solid var(--border-color); 
  border-radius: var(--border-radius); 
  background-color: var(--light-bg); 
}

.topic-column:hover {
  background-color: rgba(139, 90, 43, 0.05); 
}

.topic-column h3 {
  color: var(--primary-color);
  margin-bottom: 10px; 
  font-size: 1rem; 
  font-weight: bold; 
  padding-bottom: 5px; 
  border-bottom: 2px solid var(--primary-color); 
}

.topic-column ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex; 
  flex-direction: column; 
  gap: 8px; 
}

.topic-column li {
  margin: 0; 
}

.topic-column li a {
  display: block; 
  padding: 5px 8px; 
  font-size: 0.9rem; 
  transition: all 0.2s ease;
  border-radius: 4px; 
}

.topic-column li a:hover {
  background-color: rgba(139, 90, 43, 0.1); 
  color: var(--primary-color); 
  padding-left: 12px; 
}
*/


/* 移动端适配 */
/* This media query section for dropdown can be removed or simplified */
/*
@media (max-width: 768px) {
  .topics-submenu {
    flex-direction: column; 
    gap: 15px; 
  }
  
  .topic-column {
    width: 100%; 
    min-width: auto; 
  }
}
*/

/* 移动菜单样式 */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary-color);
  padding: 5px;
}

@media (max-width: 992px) {
  /* This can be removed as .topics-submenu is gone */
  /*
  .topics-submenu {
    grid-template-columns: repeat(3, 1fr);
  }
  */
}

@media (max-width: 768px) {
  /* This single block now contains all mobile navigation styles */

  /* HEADER & TOGGLE BUTTON */
  header {
    position: relative;
  }
  .header-inner {
    padding: 10px 0;
  }
  .mobile-nav-toggle {
    display: block;
    position: relative;
    z-index: 1001; /* Above overlay */
  }
  
  /* NAVIGATION PANEL (was a dropdown, now a slide-in) */
  nav ul {
    position: fixed;
    top: 0;
    right: -300px; /* Start off-screen */
    width: 300px;
    max-width: 80vw;
    height: 100vh;
    padding: 60px 20px 20px;
    background: var(--white);
    box-shadow: -2px 0 10px rgba(62, 39, 35, 0.15);
    
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
  }
  
  nav.open ul {
    right: 0; /* Slide in */
  }

  /* MAIN NAV ITEMS */
  nav ul li {
    width: 100%;
    margin: 0;
  }
  
  nav ul li > a { /* Direct children 'a' of 'li' */
    display: block;
    padding: 12px 0;
    font-size: 1.1rem;
    font-weight: bold;
    border-bottom: 1px solid var(--border-color);
  }

  /* The following mobile-specific dropdown styles are no longer needed */
  /*
  nav ul li:has(.dropdown-menu) {
    border-bottom: none;
  }
  
  nav ul li:has(.dropdown-menu) > a {
    pointer-events: none;
    padding-bottom: 5px;
    color: var(--text-color);
  }
  
  .dropdown-menu {
    position: static;
    display: block !important; 
    width: 100%;
    box-shadow: none;
    padding: 0 0 0 15px; 
    background: transparent;
    max-height: none;
    overflow-y: visible;
    border-radius: 0;
  }
  
  .dropdown-content {
    padding: 0;
  }
  
  .topics-submenu {
    display: block; 
    width: 100%;
    gap: 10px;
  }
  
  .topic-column {
    padding: 0;
    border: none;
    background: none;
    width: 100%;
    min-width: unset;
  }

  .topic-column h3 {
    padding: 10px 0 5px;
    font-size: 1rem;
    color: var(--primary-color);
    border-bottom: none;
  }

  .topic-column ul {
    padding-left: 0;
    gap: 0;
  }
  
  .topic-column li a {
    font-size: 0.9rem;
    font-weight: normal;
    padding: 8px 0;
    border-bottom: 1px dotted #eee;
  }
  .topic-column li:last-child a {
    border-bottom: none;
  }
  */

  /* LANGUAGE SWITCHER IN NAV */
  .header-inner nav ul li.language-switcher {
    margin: 20px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    width: 100%;
  }
  #lang-selector {
    width: 100%;
    padding: 10px 8px;
  }
}

@media (max-width: 576px) {
  /* This can be removed as .topics-submenu is gone */
  /*
  .topics-submenu {
    grid-template-columns: 1fr;
  }
  
  .dropdown-content {
    padding: 0 10px;
  }
  */
}

/* Language Switcher Styles */
.language-switcher {
  margin-left: 15px; /* Adjust as needed */
  display: flex;
  align-items: center;
}

#lang-selector {
  padding: 5px 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background-color: #fff;
  cursor: pointer;
  font-size: 0.9em;
}

#lang-selector:hover {
  border-color: #888;
}

#lang-selector:focus {
  outline: none;
  border-color: #555;
  box-shadow: 0 0 0 2px rgba(139, 90, 43, 0.2); /* Optional focus style */
}

/* Adjustments for mobile if necessary */
@media (max-width: 768px) {
  .header-inner nav ul li.language-switcher {
    margin-left: 0;
    margin-top: 10px; /* Add some space in mobile menu */
    width: 100%; /* Make it full width in mobile dropdown */
  }

  #lang-selector {
    width: 100%;
    padding: 10px 8px;
  }
}

/* Hero 部分 */
.hero {
  background-color: var(--secondary-color);
  padding: 100px 0;
  text-align: center;
  color: var(--white);
  /* background-image: url('/images/hero-bg.jpg'); */
  background-size: cover;
  background-position: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.3);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.4rem;
  margin-bottom: 1rem;
  color: var(--white);
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* Logo样式 */
.hero-logo {
  max-width: 200px;
  height: auto;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* 角色网格 */
.character-grid, .topics-section {
  padding: 60px 0;
  background-color: var(--light-bg);
}

.character-grid h2, .topics-section h2 {
  text-align: center;
  margin-bottom: 40px;
}

.characters-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.character-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: transform 0.3s ease;
}

.character-card:hover {
  transform: translateY(-5px);
}

.character-image {
  height: 200px;
  overflow: hidden;
}

.character-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.character-card h3 {
  padding: 15px;
  margin: 0;
  text-align: center;
}

.character-card p {
  text-align: center;
  color: var(--light-text);
  padding-bottom: 15px;
}

/* 主题部分 */
.topics-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  max-width: 1200px;
  margin: 0 auto;
}

.topic-card {
  background-color: var(--primary-color);
  border-radius: var(--border-radius);
  padding: 20px;
  text-align: center;
  color: var(--white);
  box-shadow: var(--box-shadow);
  transition: transform 0.3s ease;
}

.topic-card:hover {
  transform: translateY(-5px);
}

.topic-card h3 {
  color: var(--white);
  margin-bottom: 10px;
}

.topic-card span {
  display: inline-block;
  margin-top: 10px;
  background-color: rgba(255, 255, 255, 0.2);
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
}

/* SEO 内容部分 */
.seo-section {
  padding: 50px 0;
  background-color: var(--light-bg);
}

.seo-content {
  max-width: 800px;
  margin: 0 auto;
}

.seo-section h2 {
  text-align: center;
  margin-bottom: 30px;
}

.seo-content p {
  margin-bottom: 20px;
}

.seo-content h3 {
  margin: 30px 0 15px;
}

.seo-content ul {
  margin-bottom: 20px;
  padding-left: 20px;
}

.seo-content ul li {
  list-style: disc;
  margin-bottom: 10px;
}

/* 页脚样式 */
footer {
  background-color: var(--light-bg);
  padding: 50px 0 20px;
}

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

.footer-column h3 {
  margin-bottom: 20px;
}

.footer-column ul li {
  margin-bottom: 10px;
}

.footer-column ul li a {
  color: var(--light-text);
  transition: color 0.3s ease;
}

.footer-column ul li a:hover {
  color: var(--primary-color);
}

.social-icons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--white);
  color: var(--primary-color);
  transition: all 0.3s ease;
}

.social-icons a:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

.copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  color: var(--light-text);
}

/* 角色页面样式 */
.character-header {
  display: flex;
  align-items: flex-start;
  max-width: 1600px;
  margin: 0 auto;
  padding: 40px 0;
}

.character-header .character-image {
  flex: 0 0 700px;
  height: 700px;
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-right: 40px;
}

.character-header .character-info {
  flex: 1;
  min-width: 400px;
}

.premium-download {
  background-color: var(--white);
  padding: 60px 0;
}

.premium-download h2 {
  text-align: center;
  margin-bottom: 40px;
}

.premium-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

.premium-image {
  flex: 0 0 300px;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.premium-info {
  flex: 1;
  min-width: 300px;
}

.premium-info ul {
  margin: 20px 0;
  padding-left: 20px;
}

.premium-info ul li {
  list-style: disc;
  margin-bottom: 10px;
}

.free-coloring-pages {
  background-color: var(--light-bg);
  padding: 60px 0;
}

.free-coloring-pages h2 {
  text-align: center;
  margin-bottom: 40px;
}

.coloring-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* 调整为每行显示4个 */
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.coloring-item {
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: transform 0.3s ease;
  background-color: var(--white);
  border: 1px solid var(--border-color);
  box-shadow: var(--box-shadow);
  margin-bottom: 0; /* 确保没有底部margin */
}

.coloring-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-color);
}

.coloring-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.coloring-item:hover img {
  transform: scale(1.05);
}

.coloring-item h3 {
  padding: 15px;
  margin: 0;
  text-align: center;
  font-size: 1rem;
}

.coloring-buttons {
  display: flex;
  border-top: 1px solid var(--border-color);
  margin: 0; /* 确保没有margin */
}

.coloring-buttons button {
  flex: 1;
  padding: 10px;
  border: none;
  background: none;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.9rem;
  color: var(--primary-color);
}

.coloring-buttons button:hover {
  background-color: rgba(255, 112, 166, 0.1);
}

.coloring-buttons button:first-child {
  border-right: 1px solid var(--border-color);
}

/* 分页 */
.pagination {
  margin-top: 40px;
  text-align: center;
}

.pagination-list {
  display: inline-flex;
  gap: 5px;
}

.pagination-list li {
  display: inline-block;
}

.pagination-list li a, .pagination-list li.active, .pagination-list li.disabled {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--border-radius);
}

.pagination-list li a {
  background-color: var(--white);
  color: var(--primary-color);
}

.pagination-list li.active {
  background-color: var(--primary-color);
  color: var(--white);
}

.pagination-list li.disabled {
  background-color: var(--light-bg);
  color: var(--light-text);
  cursor: not-allowed;
}

.pagination-list li a:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

/* 其他角色部分 */
.other-characters {
  padding: 60px 0;
  background-color: var(--white);
}

.other-characters h2 {
  text-align: center;
  margin-bottom: 40px;
}

.other-characters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

.other-character-card {
  text-align: center;
}

.other-character-card img {
  border-radius: var(--border-radius);
  width: 160px;
  height: 240px;
  object-fit: contain;
  margin: 0 auto 15px;
  transition: transform 0.3s ease;
}

.other-character-card:hover img {
  transform: scale(1.1);
}

/* 涂色技巧部分 */
.coloring-tips {
  padding: 60px 0;
  background-color: var(--light-bg);
}

.coloring-tips h2 {
  text-align: center;
  margin-bottom: 30px;
}

.tips-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 主题页面样式 */
.topic-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  margin-bottom: 30px;
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 25px;
}

.topic-title {
  flex: 0 0 30%;
  padding: 15px;
  background-color: var(--light-bg);
  border-radius: 8px;
  box-shadow: var(--box-shadow);
}

.topic-title h1 {
  color: var(--primary-color);
  margin: 0;
  font-size: 2.2rem;
  line-height: 1.2;
  position: relative;
  padding-bottom: 10px;
}

.topic-title h1:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: var(--primary-color);
}

.topic-meta {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.topic-meta span {
  display: inline-block;
  padding: 5px 10px;
  background-color: rgba(139, 90, 43, 0.1);
  border-radius: 4px;
  font-size: 0.9rem;
  color: var(--primary-color);
}

.topic-description-wrapper {
  flex: 0 0 70%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.topic-description {
  position: relative;
  max-height: 150px;
  overflow: hidden;
}

.topic-description.expanded {
  max-height: none;
  overflow: visible;
}

.topic-description:not(.expanded)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background: linear-gradient(transparent, white);
  pointer-events: none;
}

.show-more-btn {
  align-self: center;
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s ease, transform 0.2s ease;
  margin-top: 5px;
}

.show-more-btn:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

/* 壁纸网格样式 */
.wallpaper-grid {
  display: grid;
  gap: 25px;
  margin-top: 30px;
}

/* 手机壁纸网格 */
.phone-wallpaper-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* 桌面壁纸网格 */
.desktop-wallpaper-grid {
  grid-template-columns: repeat(2, 1fr);
}

/* 壁纸项目样式 */
.wallpaper-item {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  transition: transform 0.3s ease;
  position: relative; /* For overlay positioning */
}

.wallpaper-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(62, 39, 35, 0.15);
}

.wallpaper-item img, .wallpaper-item video {
  width: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

/* 手机壁纸比例 */
.phone-wallpaper-grid .wallpaper-item img,
.phone-wallpaper-grid .wallpaper-item video {
  aspect-ratio: 9 / 18;
}

/* 桌面壁纸比例 */
.desktop-wallpaper-grid .wallpaper-item img,
.desktop-wallpaper-grid .wallpaper-item video {
  aspect-ratio: 16 / 9;
}

.wallpaper-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 15px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none; /* Allow hover to pass through to the link */
}

.wallpaper-item:hover .wallpaper-info {
  opacity: 1;
}

.wallpaper-info h3 {
  color: white;
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.wallpaper-buttons {
  display: flex;
  gap: 10px;
}

.wallpaper-buttons a,
.wallpaper-buttons .btn.download {
  pointer-events: auto; /* Make buttons clickable */
}

.btn.download {
  background-color: var(--primary-color);
  color: white;
  padding: 8px 15px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn.download:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

/* 联系页面样式 */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.contact-form p {
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-family: var(--font-main);
}

.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* 友情链接页面样式 */
.links-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.link-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
  transition: transform 0.3s ease;
}

.link-card:hover {
  transform: translateY(-5px);
}

.link-card h2 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.link-card p {
  color: var(--light-text);
  margin-bottom: 20px;
}

.link-card a {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--white);
  padding: 8px 15px;
  border-radius: 5px;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.link-card a:hover {
  background-color: #4db0a0;
}

/* Styles for Markdown content */
.md-content {
  max-width: 800px; /* Or adjust to your preference */
  margin: 40px auto;
  line-height: 1.7;
}

.md-content h1,
.md-content h2,
.md-content h3 {
  margin-top: 1.5em;
  margin-bottom: 0.8em;
  line-height: 1.3;
}

.md-content p {
  margin-bottom: 1.2em;
}

.md-content ul,
.md-content ol {
  margin-bottom: 1.2em;
  padding-left: 2em;
}

.md-content li {
  margin-bottom: 0.5em;
}

.md-content a {
  color: var(--secondary-color);
  text-decoration: underline;
}

.md-content a:hover {
  color: var(--primary-color);
}

/* 站点地图样式 */
.sitemap-content {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 20px;
}

.sitemap-section {
  margin-bottom: 40px;
}

.sitemap-section h2 {
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
}

.sitemap-section ul li a {
  display: block;
  padding: 5px 0;
}

.sitemap-section ul li a:hover {
  color: var(--accent-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 1.76rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: 15px;
    max-width: 250px;
    margin: 0 auto;
  }
  
  .character-header {
    flex-direction: column;
    text-align: center;
  }
  
  .character-header .character-image {
    margin: 0 auto;
  }
  
  .character-header .character-info {
    flex-basis: 60%;
  }

  .premium-content {
    flex-direction: column;
    align-items: center;
  }
  .premium-image {
    width: 100%;
    margin-bottom: 20px;
  }
  .premium-info ul {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .characters-container,
  .coloring-grid,
  .topics-container,
  .other-characters-grid,
  .related-characters-grid,
  .wallpaper-images,
  .wallpaper-grid,
  .links-container,
  .sitemap-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .wallpaper-thumbnail span {
    font-size: 0.8rem;
  }
}

/* 涂色图片卡片上的Pinterest分享按钮 */
.coloring-item-wrapper {
  position: relative;
}

.pinterest-share {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  background-color: var(--white);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  padding: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pinterest-share:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.pinterest-icon {
  width: 22px;
  height: 22px;
}

/* 涂色图片部分 */
.coloring-item {
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: transform 0.3s ease;
  background-color: var(--white);
  border: 1px solid var(--border-color);
  box-shadow: var(--box-shadow);
  margin-bottom: 0;
  position: relative;
}

/* 分类部分样式 */
.category-section {
  margin-bottom: 40px;
  padding: 20px 0;
}

.category-title {
  font-size: 2.2rem;
  color: var(--primary-color);
  margin-bottom: 25px;
  text-align: center;
  position: relative;
  padding-bottom: 15px;
}

.category-title:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: var(--primary-color);
}

/* 响应式壁纸比例 */
.wallpaper-images.phone-ratio {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin: 0 auto;
}

.wallpaper-images.desktop-ratio {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin: 0 auto;
}

.wallpaper-thumbnail {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: transform 0.3s ease;
  background: white;
  width: 100%;
  margin: 0 auto;
}

.wallpaper-thumbnail:hover {
  transform: translateY(-5px);
}

.wallpaper-thumbnail img {
  width: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

/* 手机壁纸比例 */
.phone-ratio .wallpaper-thumbnail img {
  aspect-ratio: 9 / 18;
}

/* 桌面壁纸比例 */
.desktop-ratio .wallpaper-thumbnail img {
  aspect-ratio: 16 / 9;
}

.wallpaper-thumbnail a {
  display: block;
  text-decoration: none;
  color: var(--text-color);
}

/* 类别部分 */
.categories-section {
  padding: 40px 0;
  background-color: var(--white);
}

/* 主题容器布局 - 每行2个主题 */
.topics-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px; /* 主题之间的间距 */
}

/* 主题内部壁纸网格 */
/* 确保 .wallpaper-images 基础设置 */
.topic-section .wallpaper-images {
    display: grid; /* 确保是 grid 布局 */
    width: 100%; /* 确保它占据 topic-section 的全部宽度 */
    margin-top: 15px; /* 与 topic-header 的间距 */
}

/* 桌面壁纸: 每个主题内，壁纸每行2张 */
.topic-section .wallpaper-images.desktop-ratio {
  grid-template-columns: repeat(2, 1fr);
  gap: 20px; /* 图片间距 */
}

/* 手机壁纸: 每个主题内，壁纸每行3张 */
.topic-section .wallpaper-images.phone-ratio {
  grid-template-columns: repeat(3, 1fr);
  gap: 15px; /* 图片间距 */
}

/* 壁纸缩略图样式 - 确保 aspect-ratio 设置正确 */
.wallpaper-images.phone-ratio .wallpaper-thumbnail img {
  aspect-ratio: 9 / 18;
}

.wallpaper-images.desktop-ratio .wallpaper-thumbnail img {
  aspect-ratio: 16 / 9;
}

/* 媒体查询 */
@media (max-width: 1200px) {
  /* .topics-container 在此断点下可能仍然是2列，或根据设计调整 */
  /* .wallpaper-images.phone-ratio 和 .desktop-ratio 的列数可能也需要调整 */
}

@media (max-width: 992px) { 
  .topics-container {
    grid-template-columns: 1fr; /* 平板及以下每行1个主题 */
  }
  /* 在单列主题下，内部图片布局可能不需要改变，或者可以微调gap */
}

@media (max-width: 576px) {
  .topics-container {
      gap: 20px; /* 调整主题间距 */
  }
  .topic-section .wallpaper-images.desktop-ratio {
    grid-template-columns: 1fr; /* 小屏幕上，桌面壁纸每行1张 */
    gap: 10px;
  }
  .topic-section .wallpaper-images.phone-ratio {
    grid-template-columns: repeat(2, 1fr); /* 小屏幕上，手机壁纸保持2列或者调整为1列 */
    gap: 10px;
  }
  
  /* 针对 index-page.js 中 .topic-section 的内联样式调整 */
  .topic-section {
    padding: 15px; /* 调整内边距 */
  }
}

/* 原有的 .wallpaper-images.phone-ratio, .wallpaper-images.desktop-ratio 的媒体查询， */
/* 以及 .topics-container 的媒体查询如果与上面的新规则冲突，需要检查并移除或合并。*/
/* 例如，在 1303 行附近，有 @media (max-width: 768px) { .topics-container { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } } */
/* 这需要与新的 grid-template-columns: 1fr; 协调。新的规则更具体，应该优先。*/
/* 同样，在 1297 行附近，.wallpaper-images.phone-ratio, .wallpaper-images.desktop-ratio 的媒体查询也需要检查。*/

/* 清理：移除旧的、可能冲突的 .topics-container 媒体查询规则 */
/* @media (max-width: 1200px) { (旧的 .topics-container 规则) } */
/* @media (max-width: 768px) { (旧的 .topics-container 规则) } */
/* @media (max-width: 576px) { (旧的 .topics-container 规则) } */

/* 清理：移除旧的、可能冲突的 .wallpaper-images.phone-ratio 和 .wallpaper-images.desktop-ratio 在不同断点的 grid-template-columns 定义 */
/* @media (max-width: 1200px) { (旧的 .wallpaper-images.*-ratio 规则) } */
/* @media (max-width: 576px) { (旧的 .wallpaper-images.*-ratio 规则) } */

/* New Topic Card Styles for Homepage */
.topic-card-new {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.topic-card-new:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(62, 39, 35, 0.15);
}

.topic-card-link-new {
  display: block;
  text-decoration: none;
  color: var(--text-color);
}

.topic-card-images-new {
  display: grid;
  gap: 4px; /* Small gap between images */
  background-color: var(--border-color);
}

.topic-card-images-new .wallpaper-thumbnail {
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  background: var(--light-bg);
}

.topic-card-images-new .wallpaper-thumbnail img,
.topic-card-images-new .wallpaper-thumbnail video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Layout for 2 desktop images (1 column, 2 rows) */
.topic-card-images-new.desktop-ratio {
  grid-template-columns: 1fr;
}

.topic-card-images-new.desktop-ratio .wallpaper-thumbnail {
  aspect-ratio: 16 / 9;
}

/* Layout for 3 phone images (3 columns, 1 row) */
.topic-card-images-new.phone-ratio {
  grid-template-columns: repeat(3, 1fr);
}

.topic-card-images-new.phone-ratio .wallpaper-thumbnail {
  aspect-ratio: 9 / 18;
}

.topic-card-info-new {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background-color: #fff;
  border-top: 1px solid var(--border-color);
}

.topic-card-info-new h3 {
  margin: 0;
  font-size: 1.1rem;
  flex-grow: 1;
  color: var(--primary-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 10px;
}

.topic-card-info-new .btn.view-all {
  flex-shrink: 0;
  padding: 6px 12px;
  font-size: 0.9rem;
  background-color: var(--primary-color);
  color: white;
  border-radius: 4px;
}
.topic-card-info-new .btn.view-all:hover {
    background-color: var(--secondary-color);
}

/* OVERRIDE FOR MOBILE NAV FIX */
@media (max-width: 768px) {
  nav.open ul {
    display: flex !important;
    flex-direction: column !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    padding: 20px;
    box-shadow: var(--box-shadow);
  }

  nav.open ul .dropdown-menu {
    display: none !important;
  }
}