/* 简洁博客风格 - 受Hexo Butterfly启发但独立实现 */

:root {
    --main-color: #49b1f5;
    --text-color: #4c4948;
    --text-light: #858585;
    --bg-color: #f7f9fe;
    --card-bg: #ffffff;
    --border-color: #e3e8f7;
}

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

html {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

html body {
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    color: var(--text-color);
    background: var(--bg-color);
    line-height: 1.8;
    font-size: 14px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* 有背景图时的样式 */
body.has-background {
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
}

/* 为内容区域添加半透明背景以提高可读性 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0);
    z-index: -1;
    pointer-events: none;
}

/* 导航栏 */
#nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: none;
    z-index: 1000;
    height: 64px;
    transition: all 0.3s ease;
}

/* 滚动后的导航栏样式 */
#nav.scrolled {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: none;
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
    box-sizing: border-box;
}

/* 当没有网站名称时，菜单保持在右侧 */
.nav-inner.nav-center {
    justify-content: flex-end;
}

.site-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
    letter-spacing: 0.5px;
}

.menus {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.menus a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s;
}

.menus a:hover,
.menus a.active {
    color: var(--main-color);
}

/* 主容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    margin-top: 80px;
    padding: 2rem;
    flex: 1 0 auto;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    margin-top: 80px;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    flex: 1 0 auto;
    width: 100%;
    position: relative;
}

/* 文章列表 */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.post-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.post-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.post-cover {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.post-content {
    padding: 1.5rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.post-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.5;
    letter-spacing: 0.3px;
}

.post-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.post-title a:hover {
    color: var(--main-color);
}

.post-meta {
    display: flex;
    gap: 1rem;
    color: var(--text-light);
    font-size: 13px;
    margin-bottom: 0.8rem;
}

.post-meta i {
    color: var(--main-color);
}

.post-excerpt {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 14px;
    margin-bottom: 1rem;
    /* 限制显示2行，超出部分显示省略号 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    padding: 0.3rem 0.8rem;
    background: rgba(73, 177, 245, 0.1);
    border-radius: 4px;
    color: var(--main-color);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.tag:hover {
    background: var(--main-color);
    color: #fff;
}

/* 侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.widget,
.card-widget {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.widget-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    letter-spacing: 0.3px;
}

.widget-title i {
    color: var(--main-color);
    margin-right: 0.5rem;
}

/* 作者信息 */
.author-widget {
    text-align: center;
}

.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    border: 3px solid var(--border-color);
}

.author-name {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 0.3px;
}

.author-desc {
    color: var(--text-light);
    font-size: 13px;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.author-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    text-align: center;
}

.stat-item {
    padding: 0.5rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--main-color);
    display: block;
}

.stat-label {
    font-size: 13px;
    color: var(--text-light);
}

/* 列表 */
.list-widget {
    list-style: none;
}

.list-widget li {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
}

.list-widget li:last-child {
    border-bottom: none;
}

.list-widget a {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s;
    font-size: 14px;
}

.list-widget a:hover {
    color: var(--main-color);
}

.list-count {
    background: var(--border-color);
    color: var(--text-color);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 12px;
}

/* 产品卡片样式优化 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.2rem;
}

.product-card .post-cover {
    height: 150px;
    object-fit: cover;
}

.product-card .product-placeholder {
    width: 100%;
    height: 150px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px 8px 0 0;
}

.product-card .product-placeholder i {
    font-size: 2.8rem;
}

.product-card .product-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ff6b6b;
}

.product-card .product-original-price {
    font-size: 11px;
    color: var(--text-light);
    text-decoration: line-through;
    margin-left: 0.4rem;
}

.product-card .product-version {
    color: var(--text-light);
    font-size: 11px;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 10px;
}

.product-card .product-badge {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    background: #ff6b6b;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.product-card .product-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border-color);
}

.product-card .product-stats {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 0.6rem;
    font-size: 11px;
    color: var(--text-light);
}

.product-card .product-stats i {
    font-size: 12px;
}

.product-card .product-btn {
    display: block;
    text-align: center;
    padding: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
    font-size: 13px;
}

.product-card .product-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.product-card .post-content {
    padding: 0.9rem;
}

.product-card .post-title {
    font-size: 15px;
    margin-bottom: 0.6rem;
}

.product-card .post-excerpt {
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 0.8rem;
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* 页脚 */
#footer {
    background: rgba(255, 255, 255, 0.05);
    border-top: 1px solid transparent;
    margin-top: auto;
    padding: 2rem;
    text-align: center;
    color: #ffffff;
    flex: 0 0 auto;
    width: 100%;
}

#footer p {
    margin: 0.5rem 0;
    font-size: 14px;
    color: #ffffff;
}

#footer a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 14px;
}

#footer a:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* 文章详情页 */
.article-detail {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 2.5rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    line-height: 2;
}

.article-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.article-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.article-content h2,
.article-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.article-content p {
    margin-bottom: 1rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    display: block;
}

/* 通用图片限制 - 防止图片撑开布局 */
.widget img,
.card-widget img,
.modern-card img,
article img {
    max-width: 100%;
    height: auto;
}

/* 响应式图片类 */
.img-responsive {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 居中图片类 */
.img-center {
    max-width: 100%;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.article-content pre {
    background: #f6f8fa;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1rem 0;
}

.article-content code {
    background: #f6f8fa;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.article-content blockquote {
    border-left: 4px solid var(--main-color);
    padding-left: 1rem;
    margin: 1rem 0;
    color: var(--text-light);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.pagination a,
.pagination span {
    padding: 0.6rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s;
}

.pagination a:hover,
.pagination .current {
    background: var(--main-color);
    color: #fff;
    border-color: var(--main-color);
}

/* 响应式 */
@media (max-width: 768px) {
    .main-container {
        grid-template-columns: 1fr;
        padding: 1rem;
        margin-top: 80px;
    }
    
    .menus {
        gap: 1rem;
    }
    
    .nav-inner {
        padding: 1rem;
    }
    
    #hero {
        padding-top: 6rem !important;
    }
    
    /* 产品网格响应式 */
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.8rem;
    }
    
    .product-card .post-cover,
    .product-card .product-placeholder {
        height: 120px;
    }
    
    .product-card .post-content {
        padding: 0.7rem;
    }
    
    .product-card .post-title {
        font-size: 14px;
    }
    
    .product-card .post-excerpt {
        font-size: 11px;
    }
    
    .product-card .product-price {
        font-size: 1rem;
    }
    
    .product-card .product-btn {
        font-size: 12px;
        padding: 0.4rem;
    }
    
    /* 产品详情页响应式 */
    .product-container {
        padding: 1rem !important;
    }
    
    .product-layout,
    .content-wrapper {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    
    #aside-content {
        position: static !important;
        top: auto !important;
        margin: 1.5rem auto 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* 产品信息卡片在小屏幕上堆叠 */
    .product-main > .card-widget:first-child > div[style*="grid-template-columns"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .version-item {
        padding-left: 1.5rem !important;
    }
    
    #buyModal > div {
        margin: 1rem auto !important;
    }
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.post-card {
    animation: fadeIn 0.5s ease;
}

/* ==================== 产品详情页样式 ==================== */
/* 产品详情页主容器 */
.product-page-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Hero区域 */
#hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6rem 2rem 4rem;
    text-align: center;
    position: relative;
    margin-top: 0;
    padding-top: 8rem;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.hero-content p {
    font-size: 1.2rem;
    opacity: 0.95;
}

.scroll-indicator {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* 产品详情页容器 */
.product-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 1rem 2rem 2rem !important;
    width: 100% !important;
}

/* 产品详情页布局 - 确保大屏幕显示两栏 */
.product-layout {
    display: grid !important;
    grid-template-columns: 1fr 350px !important;
    gap: 2rem !important;
    align-items: start !important;
    width: 100% !important;
}

/* 在大屏幕上强制两栏布局 */
@media (min-width: 901px) {
    .product-layout {
        display: grid !important;
        grid-template-columns: 1fr 350px !important;
        grid-template-rows: auto !important;
    }
    
    .product-main {
        grid-column: 1 !important;
        grid-row: 1 !important;
    }
    
    #aside-content {
        grid-column: 2 !important;
        grid-row: 1 !important;
        position: sticky !important;
        top: 80px !important;
        width: 350px !important;
    }
}

/* 内容区域布局（旧的，保留兼容性） */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.product-main,
#content-outer {
    min-width: 0; /* 防止overflow */
    width: 100% !important;
    grid-column: 1 !important;
}

#aside-content {
    min-width: 0;
    width: 350px !important;
    grid-column: 2 !important;
}

.product-detail {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 8px 6px rgba(7, 17, 27, .06);
    margin-bottom: 2rem;
}

.product-price {
    font-size: 2rem;
    font-weight: 800;
    color: #f5576c;
}

.version-timeline {
    position: relative;
}

.version-item {
    position: relative;
    transition: all 0.3s ease;
}

.version-item:hover {
    transform: translateX(5px);
}

.version-item:last-child {
    border-left: none !important;
    padding-bottom: 0 !important;
}

/* 购买模态框动画 */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Markdown内容样式 */
.markdown-content {
    line-height: 2;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: #363636;
}

.markdown-content p {
    margin-bottom: 1rem;
}

.markdown-content ul,
.markdown-content ol {
    padding-left: 2rem;
    margin-bottom: 1rem;
}

.markdown-content li {
    margin-bottom: 0.5rem;
}

.markdown-content code {
    background: #f5f7fa;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    color: #f5576c;
}

.markdown-content pre {
    background: #f5f7fa;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.markdown-content blockquote {
    border-left: 4px solid #49b1f5;
    padding-left: 1rem;
    margin: 1rem 0;
    color: #666;
    font-style: italic;
}

.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.markdown-content a {
    color: var(--main-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s;
}

.markdown-content a:hover {
    border-bottom-color: var(--main-color);
}

/* 面包屑导航 - 固定在导航栏下方 */
.breadcrumb-wrapper {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 80px 2rem 0 !important;  /* 顶部留出导航栏空间 */
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #858585;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

/* 产品页面标题区域 */
.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ==================== 中等屏幕优化 (900px及以下) ==================== */
@media (max-width: 900px) {
    .product-layout {
        grid-template-columns: 1fr !important;
    }
    
    #aside-content {
        position: static !important;
        top: auto !important;
        width: 100% !important;
        max-width: 600px;
        margin: 1.5rem auto 0;
    }
}

/* ==================== 小屏幕额外优化 (480px及以下) ==================== */
@media (max-width: 480px) {
    /* 面包屑导航 */
    .breadcrumb-wrapper {
        padding: 70px 0.5rem 0 !important;  /* 小屏幕减小顶部空间 */
    }
    
    .breadcrumb-nav {
        font-size: 0.8rem !important;
    }
    
    /* 产品容器 */
    .product-container {
        padding: 0.5rem !important;
    }
    
    /* 产品信息卡片单列显示 */
    .product-main > .card-widget:first-child > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    
    /* 按钮文字调整 */
    button, .article-card-more {
        font-size: 0.9rem !important;
        padding: 0.6rem 1rem !important;
    }
    
    .product-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    /* 价格显示 */
    div[style*="font-size: 2rem"] {
        font-size: 1.5rem !important;
    }
    
    /* 产品特性网格 */
    div[style*="minmax(280px"] {
        grid-template-columns: 1fr !important;
    }
    
    /* 标题字体调整 */
    h3 {
        font-size: 1.1rem !important;
    }
    
    /* 卡片内边距 */
    .card-widget {
        padding: 1rem !important;
    }
    
    /* 产品头部调整 */
    .product-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ==================== 代码高亮样式 ==================== */

/* 代码块容器 */
pre {
    position: relative;
    margin: 1.5rem 0;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #282c34 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 代码内容 */
pre code {
    display: block;
    padding: 1.2rem 1.5rem;
    padding-top: 3rem;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.6;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* 代码工具栏 */
.code-toolbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #21252b;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
}

/* 语言标签 */
.code-language {
    font-size: 12px;
    font-weight: 600;
    color: #61afef;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* 复制按钮 */
.code-copy-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    background: rgba(97, 175, 239, 0.1);
    border: 1px solid rgba(97, 175, 239, 0.3);
    border-radius: 4px;
    color: #61afef;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.code-copy-btn:hover {
    background: rgba(97, 175, 239, 0.2);
    border-color: #61afef;
    transform: translateY(-1px);
}

.code-copy-btn.copied {
    background: rgba(152, 195, 121, 0.2);
    border-color: #98c379;
    color: #98c379;
}

.code-copy-btn i {
    font-size: 13px;
}

/* 行内代码 */
code {
    padding: 2px 6px;
    background: rgba(73, 177, 245, 0.1);
    border: 1px solid rgba(73, 177, 245, 0.2);
    border-radius: 3px;
    color: #e06c75;
    font-size: 0.9em;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

pre code {
    padding: 1.2rem 1.5rem;
    padding-top: 3rem;
    background: transparent;
    border: none;
    color: inherit;
}

/* 滚动条样式（代码块） */
pre code::-webkit-scrollbar {
    height: 8px;
}

pre code::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

pre code::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

pre code::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 代码块在文章中的样式 */
.article-content pre {
    margin: 1.5rem 0;
}

.article-content pre code {
    font-size: 13px;
}

/* TinyMCE codesample 样式兼容 */
.mce-content-body pre {
    margin: 1.5rem 0;
}

.mce-content-body pre code {
    display: block;
    padding: 1.2rem 1.5rem;
    padding-top: 3rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    pre code {
        font-size: 12px;
        padding: 1rem;
        padding-top: 2.5rem;
    }
    
    .code-toolbar {
        padding: 0.4rem 0.8rem;
    }
    
    .code-language {
        font-size: 11px;
    }
    
    .code-copy-btn {
        font-size: 11px;
        padding: 3px 8px;
    }
}

/* ==================== 文章内产品推荐卡片样式 ==================== */

/* 产品推荐卡片容器 */
.article-product-recommend {
    margin: 3rem 0;
    padding: 0;
}

/* 产品卡片主体 */
.product-recommend-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-recommend-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

/* 装饰背景圆 */
.product-recommend-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.product-recommend-card::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

/* 产品徽章 */
.product-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 20px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

/* 产品标题 */
.product-recommend-title {
    color: white;
    font-size: 24px;
    margin-bottom: 1rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

/* 产品描述 */
.product-recommend-desc {
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

/* 产品特性标签容器 */
.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.product-features span {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 15px;
    border-radius: 15px;
    font-size: 13px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.product-features span:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* 产品底部区域 */
.product-recommend-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

/* 价格区域 */
.product-price-area {
    display: flex;
    flex-direction: column;
}

.product-price-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin-bottom: 5px;
}

.product-price-value {
    color: white;
    font-size: 42px;
    font-weight: 700;
    line-height: 1;
}

.product-price-value small {
    font-size: 24px;
}

.product-price-original {
    font-size: 16px;
    text-decoration: line-through;
    opacity: 0.6;
    margin-left: 10px;
    font-weight: 400;
}

/* 购买按钮 */
.product-buy-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: #667eea;
    text-decoration: none;
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.product-buy-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.product-buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    color: #667eea;
}

.product-buy-btn:hover::before {
    left: 100%;
}

.product-buy-btn:active {
    transform: translateY(0);
}

/* 简约版产品卡片（可选） */
.product-card-simple {
    background: white;
    border: 2px solid var(--main-color);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.product-card-simple h3 {
    color: var(--main-color);
    font-size: 20px;
    margin-bottom: 1rem;
}

.product-card-simple p {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.product-card-simple .price {
    color: #e74c3c;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 1rem;
}

.product-card-simple .btn {
    display: inline-block;
    background: var(--main-color);
    color: white;
    padding: 10px 30px;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s;
}

.product-card-simple .btn:hover {
    background: #3a9de0;
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .product-recommend-card {
        padding: 1.5rem;
    }
    
    .product-recommend-title {
        font-size: 20px;
    }
    
    .product-recommend-desc {
        font-size: 14px;
    }
    
    .product-features {
        gap: 8px;
    }
    
    .product-features span {
        font-size: 12px;
        padding: 5px 12px;
    }
    
    .product-recommend-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .product-price-value {
        font-size: 32px;
    }
    
    .product-price-value small {
        font-size: 20px;
    }
    
    .product-buy-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 30px;
        font-size: 15px;
    }
    
    .product-card-simple {
        padding: 1rem;
    }
    
    .product-card-simple h3 {
        font-size: 18px;
    }
    
    .product-card-simple .price {
        font-size: 20px;
    }
}


/* ==================== 浮动返回按钮 ==================== */
.floating-back-btn {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    z-index: 999;
    cursor: pointer;
}

.floating-back-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    color: white;
}

.floating-back-btn:active {
    transform: translateY(-2px) scale(1.05);
}

.floating-back-btn i {
    font-size: 22px;
    line-height: 1;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .floating-back-btn {
        bottom: 80px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .floating-back-btn i {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .floating-back-btn {
        bottom: 70px;
        right: 15px;
        width: 42px;
        height: 42px;
    }
}


/* ==================== 自定义音乐播放器样式 ==================== */
.custom-music-player {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999;
}

.music-player-mini {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #49b1f5 0%, #667eea 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(73, 177, 245, 0.4);
    transition: all 0.3s ease;
    color: white;
    font-size: 24px;
}

.music-player-mini:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(73, 177, 245, 0.6);
}

.music-player-mini.playing {
    animation: musicPulse 2s infinite;
}

/* 图标切换逻辑 */
.music-player-mini .music-icon-play,
.music-player-mini .music-icon-pause {
    position: absolute;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* 默认状态：显示播放图标 */
.music-player-mini .music-icon-play {
    opacity: 1;
    transform: scale(1);
}

.music-player-mini .music-icon-pause {
    opacity: 0;
    transform: scale(0.5);
}

/* 播放状态：显示暂停图标 */
.music-player-mini.playing .music-icon-play {
    opacity: 0;
    transform: scale(0.5);
}

.music-player-mini.playing .music-icon-pause {
    opacity: 1;
    transform: scale(1);
}

@keyframes musicPulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(73, 177, 245, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 4px 25px rgba(73, 177, 245, 0.7);
        transform: scale(1.05);
    }
}

.music-player-mini.playing i {
    animation: musicSpin 3s linear infinite;
}

@keyframes musicSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 响应式 */
@media (max-width: 768px) {
    .custom-music-player {
        bottom: 10px;
        left: 10px;
    }
    
    .music-player-mini {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}
