/*
Theme Name: Juyke
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: A WordPress theme inspired by Zibll
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: juyke

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others.
*/

/* CSS Variables */
:root {
  --main-color: #3498db;
  --secondary-color: #9b59b6;
  --bg-color: #f5f5f5;
  --card-bg: #ffffff;
  --text-color: #333333;
  --text-light: #666666;
  --border-radius: 8px;
  --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #1a1a1a;
    --card-bg: #2d2d2d;
    --text-color: #e0e0e0;
    --text-light: #b0b0b0;
    --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }
  
  /* Show night logo in dark mode */
  .logo .logo-day {
    display: none !important;
  }
  
  .logo .logo-night {
    display: block !important;
  }
}

/* Global Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
header {
  background-color: var(--card-bg);
  box-shadow: var(--box-shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--main-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  max-height: 40px;
  width: auto;
  transition: var(--transition);
}

.logo .logo-night {
  display: none;
}

.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--main-color), var(--secondary-color));
  color: white;
  border-radius: 8px;
  font-size: 20px;
  font-weight: bold;
}

.logo-text {
  color: var(--text-color);
  font-size: 20px;
  font-weight: bold;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition);
  font-size: 16px;
}

.action-btn:hover {
  background-color: rgba(52, 152, 219, 0.1);
  color: var(--main-color);
  transform: translateY(-2px);
}

.action-btn.primary-btn {
  width: auto;
  height: auto;
  padding: 8px 16px;
  border-radius: 20px;
  background-color: var(--main-color);
  color: white;
  font-size: 14px;
  font-weight: 500;
}

.action-btn.primary-btn:hover {
  background-color: var(--secondary-color);
  color: white;
}

/* Navigation */
nav {
  display: flex;
  align-items: center;
  position: relative;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu li {
  margin-left: 20px;
  position: relative;
}

.nav-menu a {
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition);
  padding: 8px 12px;
  border-radius: var(--border-radius);
  display: block;
}

.nav-menu a:hover {
  color: var(--main-color);
  background-color: rgba(52, 152, 219, 0.1);
}

/* Submenu */
.nav-menu ul {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--card-bg);
  box-shadow: var(--box-shadow);
  border-radius: var(--border-radius);
  list-style: none;
  margin: 8px 0 0 0;
  padding: 8px 0;
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  z-index: 1000;
}

.nav-menu li:hover > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-menu ul li {
  margin: 0;
  width: 100%;
}

.nav-menu ul a {
  padding: 10px 15px;
  border-radius: 0;
  white-space: nowrap;
}

.nav-menu ul a:hover {
  background-color: rgba(52, 152, 219, 0.1);
  color: var(--main-color);
}

/* Menu item with submenu indicator */
.nav-menu li.menu-item-has-children > a:after {
  content: '▾';
  margin-left: 5px;
  font-size: 12px;
}

.nav-menu li.menu-item-has-children:hover > a:after {
  transform: rotate(180deg);
}

/* Mobile Menu Button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-color);
}

/* Main Content */
.main-content {
  margin-top: 30px;
}

.content-wrapper {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.content-area {
  flex: 1;
  min-width: 0;
}

/* Sidebar */
.sidebar {
  width: 300px;
  flex-shrink: 0;
}

/* Header Widget Area */
.header-widget-area {
  margin: 0 15px;
}

.header-widget {
  display: inline-block;
  vertical-align: middle;
}

/* Widget Styles */
.widget {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
  margin-bottom: 20px;
  transition: var(--transition);
}

.widget:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.widget-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--main-color);
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.widget ul li {
  margin-bottom: 10px;
  padding-left: 15px;
  position: relative;
}

.widget ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--main-color);
  font-size: 12px;
}

.widget ul li a {
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition);
}

.widget ul li a:hover {
  color: var(--main-color);
  padding-left: 5px;
}

/* Cards */
.card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
  margin-bottom: 20px;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* Banner Section */
.banner-section {
  margin: 20px 0;
}

.banner-content {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.banner-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Feature Modules */
.feature-modules {
  margin: 30px 0;
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.module-item {
  background: linear-gradient(135deg, var(--main-color), var(--secondary-color));
  color: white;
  padding: 24px;
  border-radius: 12px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.module-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.module-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.module-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.module-desc {
  font-size: 12px;
  opacity: 0.9;
}

/* Section Title */
.section-title {
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.section-title h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-color);
}

/* Post Grid */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.post-card {
  background-color: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.post-card-thumbnail {
  width: 100%;
  height: 140px;
  overflow: hidden;
}

.post-card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.post-card:hover .post-card-thumbnail img {
  transform: scale(1.05);
}

.post-card-content {
  padding: 12px;
}

.post-card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
}

.post-card-title a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-title a:hover {
  color: var(--main-color);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 30px;
  gap: 10px;
}

.pagination a, .pagination span {
  padding: 8px 12px;
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  text-decoration: none;
  color: var(--text-color);
  transition: var(--transition);
}

.pagination a:hover {
  background-color: var(--main-color);
  color: white;
}

/* Gutenberg Block Styles */
.wp-block {
  max-width: 800px;
  margin: 0 auto;
}

.wp-block-heading h1,
.wp-block-heading h2,
.wp-block-heading h3,
.wp-block-heading h4,
.wp-block-heading h5,
.wp-block-heading h6 {
  color: var(--text-color);
  font-weight: 600;
  margin-bottom: 16px;
}

.wp-block-paragraph {
  color: var(--text-color);
  margin-bottom: 16px;
}

.wp-block-image {
  margin-bottom: 24px;
}

.wp-block-image img {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
}

.wp-block-gallery {
  margin-bottom: 24px;
}

.wp-block-quote {
  border-left: 4px solid var(--main-color);
  padding-left: 20px;
  margin: 24px 0;
  font-style: italic;
}

.wp-block-quote cite {
  display: block;
  margin-top: 12px;
  font-style: normal;
  color: var(--text-light);
}

.wp-block-code {
  background-color: #f5f5f5;
  padding: 16px;
  border-radius: var(--border-radius);
  font-family: monospace;
  font-size: 14px;
  overflow-x: auto;
}

/* Block alignment */
.wp-block[data-align="wide"] {
  max-width: 1000px;
}

.wp-block[data-align="full"] {
  max-width: none;
}

/* Custom block styles */
.is-style-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
  margin-bottom: 24px;
}

.is-style-highlight {
  background-color: rgba(52, 152, 219, 0.1);
  border-left: 4px solid var(--main-color);
  padding: 16px;
  margin-bottom: 24px;
}

/* Custom block styles */
.is-style-fancy {
  font-size: 18px;
  line-height: 1.6;
  padding: 30px;
  background-color: rgba(52, 152, 219, 0.05);
  border-radius: var(--border-radius);
  text-align: center;
}

.is-style-rounded img {
  border-radius: 50%;
}

.is-style-shadow img {
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: var(--transition);
}

.is-style-shadow img:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Text color styles */
.is-style-text-primary {
  color: var(--main-color);
}

.is-style-text-secondary {
  color: var(--secondary-color);
}

.is-style-text-success {
  color: #28a745;
}

.is-style-text-warning {
  color: #ffc107;
}

.is-style-text-danger {
  color: #dc3545;
}

/* Heading styles */
.is-style-fancy {
  position: relative;
  display: inline-block;
  margin-bottom: 24px;
  font-weight: 700;
  color: var(--text-color);
}

.is-style-fancy::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(135deg, var(--main-color), var(--secondary-color));
  border-radius: 3px;
}

.is-style-underline {
  position: relative;
  display: inline-block;
  margin-bottom: 24px;
}

.is-style-underline::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--main-color);
  border-radius: 2px;
}

.is-style-elegant {
  font-weight: 600;
  color: var(--main-color);
  margin-bottom: 20px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.is-style-modern {
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 20px;
  letter-spacing: -0.5px;
  text-transform: uppercase;
  font-size: 1.2em !important;
}

/* Text beautification styles */
.is-style-beautified {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-color);
  text-align: justify;
  letter-spacing: 0.5px;
  word-spacing: 1px;
}

.is-style-beautified::first-letter {
  font-size: 2em;
  font-weight: bold;
  color: var(--main-color);
  float: left;
  margin-right: 8px;
  line-height: 1;
}

/* Auto formatting styles */
.is-style-well-formatted {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-color);
  margin-bottom: 24px;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
}

/* Styled list */
.is-style-styled {
  padding-left: 24px;
}

.is-style-styled li {
  margin-bottom: 10px;
  position: relative;
  list-style: none;
  padding-left: 20px;
}

.is-style-styled li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--main-color);
  font-size: 18px;
  font-weight: bold;
}

/* Post Styles */
.post-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.4;
  color: var(--text-color);
}

/* Author Card */
.author-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  margin-bottom: 20px;
}

.author-avatar {
  flex-shrink: 0;
}

.author-avatar img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.author-info {
  flex: 1;
  min-width: 0;
}

.author-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-color);
}

.author-bio {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.5;
}

/* Post Content */
.post-content {
  margin-bottom: 30px;
  line-height: 1.8;
  font-size: 16px;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  margin: 20px 0;
}

/* Post Meta */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  padding: 15px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  margin: 20px 0;
  font-size: 14px;
  color: var(--text-light);
}

.post-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Post Navigation */
.post-navigation {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 30px 0;
}

.prev-post,
.next-post {
  flex: 1;
  min-width: 0;
}

.prev-post a,
.next-post a {
  display: block;
  padding: 15px;
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  text-decoration: none;
  color: var(--text-color);
  transition: var(--transition);
  box-shadow: var(--box-shadow);
}

.prev-post a:hover,
.next-post a:hover {
  background-color: var(--main-color);
  color: white;
  transform: translateY(-2px);
}

.prev-post {
  text-align: left;
}

.next-post {
  text-align: right;
}

/* Footer */
footer {
  background-color: var(--card-bg);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
  padding: 30px 0;
  margin-top: 50px;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
}

.footer-column {
  flex: 1;
  min-width: 200px;
}

.footer-column h3 {
  margin-bottom: 15px;
  color: var(--main-color);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition);
  padding: 5px 0;
  display: inline-block;
  position: relative;
}

.footer-links a:hover {
  color: var(--main-color);
  padding-left: 8px;
}

.footer-links a:hover:before {
  content: '→';
  position: absolute;
  left: -8px;
  color: var(--main-color);
}

.footer-bottom {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--text-light);
  font-size: 14px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .modules-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }
  
  .post-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 10px 0;
  }
  
  .logo-text {
    font-size: 16px;
  }
  
  .header-right {
    gap: 10px;
  }
  
  .header-actions {
    gap: 10px;
  }
  
  .action-btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  
  .action-btn.primary-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--card-bg);
    flex-direction: column;
    align-items: center;
    padding: 80px 0 20px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 999;
  }
  
  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .nav-menu li {
    margin: 15px 0;
  }
  
  .nav-menu a {
    font-size: 18px;
    padding: 12px 20px;
  }
  
  /* Add menu close button for mobile */
  .menu-close {
    display: block;
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    color: var(--text-color);
    cursor: pointer;
    z-index: 1000;
  }
  
  .content-wrapper {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
  }
  
  .header-widget-area {
    margin: 10px 0;
  }
  
  .header-widget {
    display: block;
  }
  
  .banner-section {
    margin: 10px 0;
  }
  
  .modules-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  
  .module-item {
    padding: 16px;
  }
  
  .module-icon {
    font-size: 24px;
  }
  
  .module-title {
    font-size: 14px;
  }
  
  .module-desc {
    font-size: 11px;
  }
  
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .post-card-thumbnail {
    height: 120px;
  }
  
  .post-card-content {
    padding: 10px;
  }
  
  .post-card-title {
    font-size: 13px;
  }
  
  /* Post Styles Mobile */
  .post-title {
    font-size: 22px;
  }
  
  .author-card {
    flex-direction: column;
    text-align: center;
  }
  
  .post-meta {
    flex-direction: column;
    gap: 10px;
  }
  
  .post-navigation {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .header-actions .search-btn,
  .header-actions .cart-btn {
    display: none;
  }
  
  .action-btn.primary-btn {
    display: none;
  }
  
  .modules-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .post-grid {
    grid-template-columns: 1fr;
  }
  
  .post-card-thumbnail {
    height: 140px;
  }
}

/* Lazy Load Animation Styles */
img[data-src] {
  opacity: 0;
  transition: opacity 0.3s ease;
}

img.lazy-loaded {
  opacity: 1;
}

/* 高斯模糊效果 */
img[data-src].lazy-blur {
  filter: blur(10px);
  transition: filter 0.5s ease, opacity 0.5s ease;
}

img[data-src].lazy-blur.lazy-loaded {
  filter: blur(0);
}

/* 淡入效果 */
img[data-src].lazy-fade {
  opacity: 0;
  transition: opacity 0.5s ease;
}

img[data-src].lazy-fade.lazy-loaded {
  opacity: 1;
}

/* 缩放效果 */
img[data-src].lazy-scale {
  transform: scale(0.8);
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

img[data-src].lazy-scale.lazy-loaded {
  transform: scale(1);
  opacity: 1;
}

/* 旋转效果 */
img[data-src].lazy-rotate {
  transform: rotate(-5deg) scale(0.9);
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

img[data-src].lazy-rotate.lazy-loaded {
  transform: rotate(0) scale(1);
  opacity: 1;
}

/* 淡入缩放效果 */
img[data-src].lazy-fade-scale {
  transform: scale(0.9);
  opacity: 0;
  transition: transform 0.6s ease, opacity 0.6s ease;
}

img[data-src].lazy-fade-scale.lazy-loaded {
  transform: scale(1);
  opacity: 1;
}

/* 弹跳效果 */
img[data-src].lazy-bounce {
  transform: translateY(20px) scale(0.9);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.6s ease;
}

img[data-src].lazy-bounce.lazy-loaded {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* 滑入效果 */
img[data-src].lazy-slide {
  transform: translateX(-20px);
  opacity: 0;
  transition: transform 0.6s ease, opacity 0.6s ease;
}

img[data-src].lazy-slide.lazy-loaded {
  transform: translateX(0);
  opacity: 1;
}

/* 翻转效果 */
img[data-src].lazy-flip {
  transform: perspective(1000px) rotateY(90deg);
  opacity: 0;
  transition: transform 0.6s ease, opacity 0.6s ease;
}

img[data-src].lazy-flip.lazy-loaded {
  transform: perspective(1000px) rotateY(0);
  opacity: 1;
}

/* 布局样式 */
.lazy-load-container {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 20px;
}

.lazy-load-container:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transform: translateY(-5px);
  transition: all 0.3s ease;
}

.lazy-load-container img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.lazy-load-container:hover img {
  transform: scale(1.05);
}

/* Boxed layout */
body.boxed-layout {
  max-width: 1200px;
  margin: 0 auto;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  background-color: #f0f0f0;
}

/* Sidebar position */
.content-wrapper.sidebar-right {
  flex-direction: row-reverse;
}

.content-wrapper.sidebar-right .content-area {
  order: 2;
}

.content-wrapper.sidebar-right .sidebar {
  order: 1;
}

/* 不同布局样式 */
.lazy-layout-1 {
  border-radius: 12px;
}

.lazy-layout-2 {
  border-radius: 0;
  border: 2px solid var(--main-color);
}

.lazy-layout-3 {
  border-radius: 20px 0 20px 0;
}

.lazy-layout-4 {
  border-radius: 50%;
  overflow: hidden;
  width: 200px;
  height: 200px;
  margin: 0 auto;
}

.lazy-layout-5 {
  position: relative;
}

.lazy-layout-5::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 4px solid transparent;
  border-image: linear-gradient(135deg, var(--main-color), var(--secondary-color)) 1;
  pointer-events: none;
}

/* 加载动画 */
.loading-animation {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 3px solid rgba(52, 152, 219, 0.3);
  border-radius: 50%;
  border-top-color: var(--main-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* 响应式调整 */
@media (max-width: 768px) {
  .lazy-layout-4 {
    width: 150px;
    height: 150px;
  }
}

/* Popup Notification Styles */
.juyke-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
  overflow: hidden;
}

.juyke-popup.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Popup Sizes */
.popup-mini {
  width: 300px;
  max-width: 90vw;
}

.popup-small {
  width: 400px;
  max-width: 90vw;
}

.popup-medium {
  width: 500px;
  max-width: 90vw;
}

.popup-large {
  width: 600px;
  max-width: 90vw;
}

/* Popup Title */
.popup-title {
  padding: 16px 20px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.popup-icon {
  font-size: 20px;
  margin-right: 10px;
}

.popup-title h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  flex: 1;
}

.popup-close {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.popup-close:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Popup Body */
.popup-body {
  padding: 20px;
  color: var(--text-color);
  line-height: 1.6;
}

.popup-body p {
  margin: 0 0 10px 0;
}

.popup-body p:last-child {
  margin-bottom: 0;
}

/* Popup Buttons */
.popup-buttons {
  padding: 0 20px 20px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.popup-button {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  background-color: var(--main-color);
  color: white;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.popup-button:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

.popup-button.round {
  border-radius: 20px;
}

/* Popup Overlay */
.juyke-popup::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: -1;
}

/* Responsive Popup */
@media (max-width: 768px) {
  .juyke-popup {
    width: 90vw;
    max-width: 90vw;
  }
  
  .popup-title {
    padding: 12px 16px;
  }
  
  .popup-body {
    padding: 16px;
  }
  
  .popup-buttons {
    padding: 0 16px 16px;
    flex-direction: column;
  }
  
  .popup-button {
    width: 100%;
    text-align: center;
  }
}

/* Custom classes for popup content */
.c-yellow {
  color: #ffc107;
  font-weight: 600;
}

.c-green {
  color: #28a745;
  font-weight: 600;
}

.c-blue {
  color: #007bff;
  font-weight: 600;
}

.c-red {
  color: #dc3545;
  font-weight: 600;
}

/* Admin Settings Page Styles */
.juyke-admin-content {
  padding: 20px;
}

.juyke-admin-content h1 {
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--text-color);
}

.juyke-admin-content .header-description {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 30px;
}

/* SEO Settings Styles */
.seo-setting-block,
.setting-block {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.seo-setting-block:hover,
.setting-block:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.seo-setting-block label,
.setting-block label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-color);
  font-size: 14px;
}

.seo-setting-block input[type="text"],
.seo-setting-block input[type="number"],
.seo-setting-block textarea,
.seo-setting-block select,
.setting-block input[type="text"],
.setting-block input[type="number"],
.setting-block textarea,
.setting-block select {
  width: 100%;
  max-width: 600px;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  color: var(--text-color);
  background-color: white;
  transition: border-color 0.3s ease;
  word-break: break-all;
  overflow-wrap: break-word;
  box-sizing: border-box;
}

.seo-setting-block input[type="text"]:focus,
.seo-setting-block input[type="number"]:focus,
.seo-setting-block textarea:focus,
.seo-setting-block select:focus,
.setting-block input[type="text"]:focus,
.setting-block input[type="number"]:focus,
.setting-block textarea:focus,
.setting-block select:focus {
  outline: none;
  border-color: var(--main-color);
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.seo-setting-block textarea,
.setting-block textarea {
  resize: vertical;
  min-height: 100px;
  white-space: pre-wrap;
  overflow-x: auto;
}

.seo-setting-block .setting-description,
.setting-block .setting-description {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 8px;
  line-height: 1.4;
}

/* Toggle Switch Styles */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-label {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.toggle-label:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .toggle-label {
  background-color: var(--main-color);
}

input:focus + .toggle-label {
  box-shadow: 0 0 1px var(--main-color);
}

input:checked + .toggle-label:before {
  transform: translateX(26px);
}

/* Radio Group Styles */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 10px;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  cursor: pointer;
}

/* Number Input Styles */
.number-input {
  display: flex;
  align-items: center;
  gap: 10px;
}

.number-btn {
  width: 30px;
  height: 30px;
  border: 1px solid #ddd;
  background-color: #f5f5f5;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.number-btn:hover {
  background-color: #e0e0e0;
  border-color: var(--main-color);
}

.number-field {
  width: 100px;
  text-align: center;
}

.number-unit {
  font-size: 14px;
  color: var(--text-light);
}

/* Period Input Styles */
.period-input {
  display: flex;
  align-items: center;
  gap: 10px;
}

.period-btn {
  width: 30px;
  height: 30px;
  border: 1px solid #ddd;
  background-color: #f5f5f5;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.period-btn:hover {
  background-color: #e0e0e0;
  border-color: var(--main-color);
}

.period-field {
  width: 100px;
  text-align: center;
}

.period-unit {
  font-size: 14px;
  color: var(--text-light);
}

/* Color Picker Styles */
.color-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.color-option {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.color-preview {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #ddd;
  transition: all 0.3s ease;
}

.color-option input:checked + .color-preview {
  border-color: var(--main-color);
  transform: scale(1.1);
}

/* Popup Buttons Container */
.popup-buttons-container {
  margin-bottom: 10px;
}

.button-editor {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.button-editor input,
.button-editor select {
  flex: 1;
  min-width: 120px;
}

.buttons-list {
  margin-top: 15px;
}

/* Responsive Admin Styles */
@media (max-width: 768px) {
  .juyke-admin-content {
    padding: 10px;
  }
  
  .juyke-admin-content h1 {
    font-size: 20px;
  }
  
  .seo-setting-block {
    padding: 15px;
  }
  
  .radio-group {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .button-editor {
    flex-direction: column;
  }
  
  .button-editor input,
  .button-editor select {
    width: 100%;
  }
}

/* Admin Card Layout Styles */
@media screen and (min-width: 782px) {
  .wrap {
    margin: 20px 40px 0 20px;
  }
}

/* Card container for admin pages */
.card-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 800px;
}

/* Card styles for admin pages */
.card {
  background-color: #fff;
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Title row styles */
.title-row {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.main-title {
  font-size: 18px;
  font-weight: bold;
  margin-right: 15px;
}

/* Switch styles */
.switch {
  width: 50px;
  height: 24px;
  border-radius: 12px;
  cursor: pointer;
}

.switch.on {
  background-color: #13ce66;
  position: relative;
}

.switch.off {
  background-color: #ff4949;
  position: relative;
}

.switch::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #fff;
  top: 2px;
}

.switch.on::after {
  left: 28px;
}

.switch.off::after {
  left: 2px;
}

/* Tips text styles */
.tips-text {
  color: #ff6700;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Form group styles */
.form-group {
  margin-bottom: 25px;
}

/* Label row styles */
.label-row {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

/* Subtitle styles */
.sub-title-blue {
  color: #1e88e5;
  font-size: 15px;
  font-weight: bold;
  margin-right: 8px;
}

.sub-title-red {
  color: #dd4b39;
  font-size: 15px;
  font-weight: bold;
  margin-right: 8px;
}

/* Description text styles */
.desc-text {
  color: #666;
  font-size: 13px;
  margin-left: 5px;
}

/* Input text styles */
.input-text {
  width: 600px;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  outline: none;
}

.input-text:focus {
  border-color: #1e88e5;
}

/* Textarea styles */
.textarea-text {
  width: 600px;
  height: 80px;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  outline: none;
  resize: vertical;
  line-height: 1.5;
}

.textarea-text:focus {
  border-color: #1e88e5;
}

/* Required tag styles */
.required-tag {
  color: #ff4949;
  font-weight: bold;
  margin-left: 8px;
}

/* Upload area styles */
.upload-area {
  margin-top: 10px;
}

.preview-container {
  margin-bottom: 10px;
}

.logo-preview {
  display: inline-block;
  width: 80px;
  height: 80px;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}

.logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-preview.placeholder {
  background-color: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
}

.button-group {
  margin-top: 10px;
}

/* Color picker styles */
input[type="color"] {
  width: 50px;
  height: 30px;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
}

/* Radio group styles */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 10px;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

/* Color picker styles */
.color-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.color-picker label {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.color-picker input[type="radio"] {
  display: none;
}

.color-picker .color-option {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #ddd;
}

.color-picker input[type="radio"]:checked + .color-option {
  border-color: #333;
}

/* Icon selector styles */
.icon-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.icon-preview {
  font-size: 20px;
  padding: 10px;
  background: #e9ecef;
  border-radius: 4px;
  min-width: 40px;
  text-align: center;
}

/* Responsive admin styles */
@media (max-width: 768px) {
  .card-container {
    gap: 15px;
  }

  .card {
    padding: 20px;
  }

  .input-text,
  .textarea-text {
    width: 100%;
  }

  .radio-group {
    flex-direction: column;
    align-items: flex-start;
  }

  .color-picker {
    justify-content: flex-start;
  }

  .icon-selector {
    flex-wrap: wrap;
  }
}

/* 修复编辑器弹出层滚动条样式 */
/* WordPress Gutenberg 编辑器弹出框 */
.components-popover__content,
.components-popover,
.components-dropdown-menu__menu,
.components-select-control__options,
.components-menu-group__label,
.components-menu-items-wrapper,
.components-color-picker__popover-content {
  scrollbar-width: thin;
  scrollbar-color: #CBD5E1 #F1F5F9;
}

.components-popover__content::-webkit-scrollbar,
.components-popover::-webkit-scrollbar,
.components-dropdown-menu__menu::-webkit-scrollbar,
.components-select-control__options::-webkit-scrollbar,
.components-menu-group__label::-webkit-scrollbar,
.components-menu-items-wrapper::-webkit-scrollbar,
.components-color-picker__popover-content::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.components-popover__content::-webkit-scrollbar-thumb,
.components-popover::-webkit-scrollbar-thumb,
.components-dropdown-menu__menu::-webkit-scrollbar-thumb,
.components-select-control__options::-webkit-scrollbar-thumb,
.components-menu-group__label::-webkit-scrollbar-thumb,
.components-menu-items-wrapper::-webkit-scrollbar-thumb,
.components-color-picker__popover-content::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 3px;
}

.components-popover__content::-webkit-scrollbar-thumb:hover,
.components-popover::-webkit-scrollbar-thumb:hover,
.components-dropdown-menu__menu::-webkit-scrollbar-thumb:hover,
.components-select-control__options::-webkit-scrollbar-thumb:hover,
.components-menu-group__label::-webkit-scrollbar-thumb:hover,
.components-menu-items-wrapper::-webkit-scrollbar-thumb:hover,
.components-color-picker__popover-content::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

.components-popover__content::-webkit-scrollbar-track,
.components-popover::-webkit-scrollbar-track,
.components-dropdown-menu__menu::-webkit-scrollbar-track,
.components-select-control__options::-webkit-scrollbar-track,
.components-menu-group__label::-webkit-scrollbar-track,
.components-menu-items-wrapper::-webkit-scrollbar-track,
.components-color-picker__popover-content::-webkit-scrollbar-track {
  background: #F1F5F9;
}

/* 修复编辑器工具提示滚动条 */
.blocks-rich-text__toolbar,
.block-editor-block-contextual-toolbar,
.block-editor-block-toolbar,
.block-editor-block-list__block-popover {
  scrollbar-width: thin;
  scrollbar-color: #CBD5E1 #F1F5F9;
}

.blocks-rich-text__toolbar::-webkit-scrollbar,
.block-editor-block-contextual-toolbar::-webkit-scrollbar,
.block-editor-block-toolbar::-webkit-scrollbar,
.block-editor-block-list__block-popover::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.blocks-rich-text__toolbar::-webkit-scrollbar-thumb,
.block-editor-block-contextual-toolbar::-webkit-scrollbar-thumb,
.block-editor-block-toolbar::-webkit-scrollbar-thumb,
.block-editor-block-list__block-popover::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 3px;
}

.blocks-rich-text__toolbar::-webkit-scrollbar-track,
.block-editor-block-contextual-toolbar::-webkit-scrollbar-track,
.block-editor-block-toolbar::-webkit-scrollbar-track,
.block-editor-block-list__block-popover::-webkit-scrollbar-track {
  background: #F1F5F9;
}

/* 修复编辑器设置面板滚动条 */
.components-panel,
.components-panel__body,
.components-panel__body-toggle,
.components-base-control__field,
.components-textarea-control__input {
  scrollbar-width: thin;
  scrollbar-color: #CBD5E1 #F1F5F9;
}

.components-panel::-webkit-scrollbar,
.components-panel__body::-webkit-scrollbar,
.components-panel__body-toggle::-webkit-scrollbar,
.components-base-control__field::-webkit-scrollbar,
.components-textarea-control__input::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.components-panel::-webkit-scrollbar-thumb,
.components-panel__body::-webkit-scrollbar-thumb,
.components-panel__body-toggle::-webkit-scrollbar-thumb,
.components-base-control__field::-webkit-scrollbar-thumb,
.components-textarea-control__input::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 3px;
}

.components-panel::-webkit-scrollbar-thumb:hover,
.components-panel__body::-webkit-scrollbar-thumb:hover,
.components-panel__body-toggle::-webkit-scrollbar-thumb:hover,
.components-base-control__field::-webkit-scrollbar-thumb:hover,
.components-textarea-control__input::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

.components-panel::-webkit-scrollbar-track,
.components-panel__body::-webkit-scrollbar-track,
.components-panel__body-toggle::-webkit-scrollbar-track,
.components-base-control__field::-webkit-scrollbar-track,
.components-textarea-control__input::-webkit-scrollbar-track {
  background: #F1F5F9;
}

/* 修复编辑器模态框滚动条 */
.components-modal__frame,
.components-modal__content,
.components-modal__header,
.components-modal__body {
  scrollbar-width: thin;
  scrollbar-color: #CBD5E1 #F1F5F9;
}

.components-modal__frame::-webkit-scrollbar,
.components-modal__content::-webkit-scrollbar,
.components-modal__header::-webkit-scrollbar,
.components-modal__body::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.components-modal__frame::-webkit-scrollbar-thumb,
.components-modal__content::-webkit-scrollbar-thumb,
.components-modal__header::-webkit-scrollbar-thumb,
.components-modal__body::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 3px;
}

.components-modal__frame::-webkit-scrollbar-track,
.components-modal__content::-webkit-scrollbar-track,
.components-modal__header::-webkit-scrollbar-track,
.components-modal__body::-webkit-scrollbar-track {
  background: #F1F5F9;
}
