/**
 * 一个简洁而优雅的三栏布局WordPress主题，支持日/夜模式、音乐播放器、PJAX、触底加载等特性。 - 刻画kehua.me
 *
 * @package Simple Elegant - 简洁而优雅主题
 * @author 刻画kehua.me
 * @version 1.0.0
 * @link https://kehua.me
 */

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

:root {
    --primary-color: #5a8f5a;
    --primary-light: #7ab87a;
    --bg-color: #d0dada;
    --card-bg: #ffffff;
    --text-color: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --border-color: #e5e5e5;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --sidebar-bg: #ebf2ed;
    --tag-bg: #f5f5f5;
}

/* 夜间模式 */
[data-theme="dark"] {
    --primary-color: #6fa86f;
    --primary-light: #8fc98f;
    --bg-color: #1a1a1a;
    --card-bg: #242424;
    --text-color: #e0e0e0;
    --text-light: #a0a0a0;
    --text-muted: #707070;
    --border-color: #383838;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    --sidebar-bg: #1e1e1e;
    --tag-bg: #333333;
}

[data-theme="dark"] .kehua-article-tag,
[data-theme="dark"] .kehua-category-tabs a,
[data-theme="dark"] .kehua-stat-item {
    background: var(--tag-bg);
}

[data-theme="dark"] .kehua-article-card {
    background: var(--card-bg);
}

[data-theme="dark"] .kehua-sidebar-right {
    background: var(--card-bg);
}

[data-theme="dark"] .kehua-main-content {
    background: var(--card-bg);
}

[data-theme="dark"] .kehua-page-wrapper {
    background: var(--card-bg);
}

[data-theme="dark"] .kehua-hot-item {
    border-color: var(--border-color);
}

[data-theme="dark"] img {
    opacity: 0.9;
}

[data-theme="dark"] .kehua-nav-icon {
    filter: brightness(0) invert(0.85);
}

[data-theme="dark"] .kehua-nav-item:hover .kehua-nav-icon {
    filter: brightness(0) saturate(100%) invert(55%) sepia(15%) saturate(900%) hue-rotate(80deg);
}

[data-theme="dark"] .kehua-nav-item i {
    color: var(--text-color);
}

[data-theme="dark"] .kehua-top-icons {
    color: var(--text-color);
}

[data-theme="dark"] .kehua-article-card:hover {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

[data-theme="dark"] .kehua-top-bar-wrapper {
    background-color: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

[data-theme="dark"] .kehua-top-bar-wrapper.scrolled {
    background-color: rgba(30, 30, 30, 0.9);
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .kehua-sidebar-left {
    background-color: var(--sidebar-bg);
}

@media (max-width: 992px) {
    [data-theme="dark"] .kehua-sidebar-left {
        background: rgba(30, 30, 30, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
}

[data-theme="dark"] .kehua-back-to-top {
    background: rgba(50, 50, 50, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* 夜间模式 - 阅读页面 */
[data-theme="dark"] .kehua-article-tags a {
    background: var(--tag-bg);
    color: var(--text-light);
}

[data-theme="dark"] .kehua-action-btn {
    background: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-light);
}

[data-theme="dark"] .kehua-action-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

[data-theme="dark"] .kehua-action-btn.kehua-liked {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

[data-theme="dark"] .kehua-action-btn.kehua-liked:hover {
    color: white;
}

[data-theme="dark"] .kehua-article-body blockquote {
    background: var(--tag-bg);
}

[data-theme="dark"] .kehua-article-body code {
    background: var(--tag-bg);
    color: var(--text-color);
}

[data-theme="dark"] .kehua-related-item {
    background: var(--tag-bg);
}

[data-theme="dark"] .kehua-related-item:hover {
    background: var(--border-color);
}

/* 夜间模式 - 评论区 */
[data-theme="dark"] .kehua-comment-respond {
    background: transparent;
}

[data-theme="dark"] .kehua-comment-form input,
[data-theme="dark"] .kehua-comment-form textarea {
    background: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] .kehua-comment-form input::placeholder,
[data-theme="dark"] .kehua-comment-form textarea::placeholder {
    color: var(--text-muted);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
    font-size: 15px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

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

.kehua-page-wrapper {
    max-width: 1180px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.kehua-container {
    display: flex;
    min-height: calc(100vh - 40px);
}

/* 左侧边栏 */
.kehua-sidebar-left {
    width: 295px;
    flex-shrink: 0;
    padding: 25px 20px;
    background-color: var(--sidebar-bg);
    border-radius: 16px 0 0 16px;
    min-height: 100%;
}

.kehua-sidebar-left-inner {
    position: sticky;
    top: 20px;
}

.kehua-logo {
    font-size: 26px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 40px;
    letter-spacing: 2px;
}

.kehua-logo span {
    color: var(--text-color);
}

.kehua-nav-menu {
    margin-top: 20px;
    margin-bottom: 25px;
}

.kehua-nav-item {
    display: flex;
    align-items: center;
    height: 48px;
    padding: 0 12px;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 8px;
    margin-bottom: 4px;
    font-size: 15px;
}

.kehua-nav-item:last-child {
    margin-bottom: 0;
}

.kehua-nav-item:hover {
    background: rgba(90, 143, 90, 0.1);
}

.kehua-nav-item.active {
    background: var(--primary-color);
    color: white;
}

.kehua-nav-item i {
    margin-right: 10px;
    font-size: 19px;
}

.kehua-nav-icon {
    width: 20px;
    height: 20px;
    max-width: 20px;
    max-height: 20px;
    margin-right: 10px;
    object-fit: contain;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.kehua-nav-item:hover .kehua-nav-icon {
    opacity: 1;
    filter: brightness(0) saturate(100%) invert(40%) sepia(15%) saturate(900%) hue-rotate(80deg);
}

.kehua-nav-item.active .kehua-nav-icon {
    opacity: 1;
    filter: brightness(0) invert(1);
}

/* 专题推荐 */
.kehua-topic-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.kehua-topic-title {
    font-size: 15px;
    font-weight: bold;
    color: var(--text-muted);
    margin-bottom: 12px;
    padding: 0 5px;
}

.kehua-topic-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kehua-topic-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 66px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.kehua-topic-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.35);
    transition: background 0.3s ease;
}

.kehua-topic-item:hover::before {
    background: rgba(0, 0, 0, 0.25);
}

.kehua-topic-item:hover {
    transform: scale(1.02);
}

.kehua-topic-name {
    position: relative;
    z-index: 1;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 导航栏版权信息 */
.kehua-sidebar-copyright {
    margin-top: 35px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.8;
}

.kehua-sidebar-copyright a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.kehua-sidebar-copyright a:hover {
    color: var(--text-color);
}

.kehua-sidebar-section {
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
}

.kehua-section-title {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 主内容区 */
.kehua-main-content {
    width: 590px;
    flex-shrink: 0;
    padding: 0;
    background-color: #f6faf8;
}

.kehua-main-inner {
    padding: 20px 25px;
}

/* 分类横幅文字 */
.kehua-category-banner-text {
    position: absolute;
    bottom: 20px;
    left: 37px;
    text-align: left;
    color: #fff;
    max-width: 80%;
}

.kehua-category-banner-text h1 {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 6px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.kehua-category-banner-text .kehua-desc {
    font-size: 14px;
    opacity: 0.95;
    margin-bottom: 6px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.kehua-category-banner-text .kehua-count {
    font-size: 13px;
    opacity: 0.8;
}

.kehua-top-bar-wrapper {
    position: sticky;
    top: 0;
    background-color: #f6faf8;
    padding: 0 25px;
    z-index: 100;
    transition: all 0.3s ease;
}

.kehua-top-bar-wrapper.scrolled {
    background-color: rgba(246, 250, 248, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.05);
}

.kehua-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.kehua-top-icons {
    display: flex;
    gap: 15px;
    color: var(--text-light);
    font-size: 18px;
}

.kehua-top-icons i {
    cursor: pointer;
    transition: color 0.3s;
}

.kehua-top-icons i:hover {
    color: var(--primary-color);
}

#kehua-topMenuBtn {
    display: none;
}

@media (max-width: 768px) {
    #kehua-topMenuBtn {
        display: inline-block;
    }
}

/* 幻灯片 */
.kehua-slider {
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
}

.kehua-slider-wrapper {
    display: flex;
    transition: transform 0.5s ease;
}

.kehua-slide {
    min-width: 100%;
    position: relative;
}

.kehua-slide img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}

.kehua-slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.kehua-slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.kehua-slider-dot.active {
    background: white;
    width: 24px;
    border-radius: 4px;
}

/* 分类标签 */
.kehua-category-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.kehua-category-tab {
    padding: 6px 14px;
    border-radius: 4px;
    background: var(--tag-bg);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

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

/* 文章列表 */
.kehua-article-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.kehua-article-card {
    display: flex;
    border-radius: 12px;
    overflow: hidden;
    background: transparent;
    transition: all 0.3s ease;
}

.kehua-article-card:hover {
    background: rgba(255,255,255,0.5);
}

.kehua-sticky-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 11px;
    color: #fff;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 500;
    z-index: 1;
    letter-spacing: 1px;
}

.kehua-article-thumb {
    position: relative;
    width: 150px;
    height: 180px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 8px;
    margin: 12px;
    margin-right: 0;
}

.kehua-article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 8px;
}

.kehua-article-card:hover .kehua-article-thumb img {
    transform: scale(1.05);
}

.kehua-article-content {
    flex: 1;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.kehua-article-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.5;
    color: var(--text-color);
    transition: color 0.3s;
}

.kehua-article-card:hover .kehua-article-title {
    color: var(--primary-color);
}

.kehua-article-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.kehua-article-meta .kehua-author {
    color: var(--primary-color);
    font-weight: 500;
}

.kehua-article-meta .kehua-divider {
    color: #ddd;
}

.kehua-article-excerpt {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.7;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 12px;
}

.kehua-article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kehua-article-stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.kehua-article-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.kehua-article-stats i {
    font-size: 15px;
}

.kehua-article-tag {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.kehua-article-tag a {
    color: white !important;
    text-decoration: none;
}

.kehua-article-tag a:hover {
    color: #ffffff !important;
}

/* 右侧边栏 */
.kehua-sidebar-right {
    width: 295px;
    flex-shrink: 0;
    padding: 25px 20px;
    background-color: #ebf2ed;
    border-radius: 0 16px 16px 0;
    min-height: 100%;
}

.kehua-sidebar-right-inner {
    position: sticky;
    top: 20px;
}

.kehua-right-section {
    margin-bottom: 25px;
}

.kehua-right-section:last-child {
    margin-bottom: 0;
}

.kehua-right-section-title {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.kehua-hot-list {
    list-style: none;
}

.kehua-hot-item {
    display: flex;
    gap: 10px;
    padding: 8px 0;
}

.kehua-hot-item:first-child {
    padding-top: 0;
}

.kehua-hot-item:last-child {
    padding-bottom: 0;
}

.kehua-hot-thumb {
    width: 55px;
    height: 40px;
    border-radius: 5px;
    overflow: hidden;
    flex-shrink: 0;
}

.kehua-hot-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kehua-hot-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.kehua-hot-info h4 {
    font-size: 13px;
    font-weight: normal;
    margin-bottom: 3px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kehua-hot-info span {
    font-size: 11px;
    color: var(--text-muted);
}

.kehua-comment-list {
    list-style: none;
}

.kehua-comment-list > .kehua-comment-item {
    padding: 28px 0;
    border-bottom: 1px solid var(--border-color);
}

.kehua-comment-list > .kehua-comment-item > .kehua-comment-children {
    margin-top: 20px;
    padding-left: 55px;
}

.kehua-comment-children .kehua-comment-children {
    padding-left: 0;
}

.kehua-comment-children .kehua-comment-item {
    padding: 15px 0;
    border-bottom: none;
}

.kehua-comment-item:first-child {
    padding-top: 0;
}

.kehua-comment-list > .kehua-comment-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.kehua-comment-avatar {
    width: 42px;
    height: 42px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.kehua-comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.kehua-comment-info {
    flex: 1;
    min-width: 0;
}

.kehua-comment-info .kehua-name {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 2px;
}

.kehua-comment-info .kehua-text {
    font-size: 12px;
    color: var(--text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 侧边栏最新评论 */
.kehua-sidebar-recent-comments {
    margin: 0;
    padding: 0;
}

a.kehua-sidebar-comment-link,
.kehua-sidebar-recent-comments .kehua-sidebar-comment-link {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    text-decoration: none;
    color: inherit;
}

.kehua-sidebar-comment-link:hover {
    opacity: 0.8;
}

.kehua-sidebar-comment-link:first-child {
    padding-top: 0;
}

.kehua-sidebar-comment-link:last-child {
    padding-bottom: 0;
}

img.kehua-sidebar-comment-avatar,
.kehua-sidebar-comment-link .kehua-sidebar-comment-avatar {
    width: 36px;
    height: 36px;
    max-width: 36px;
    max-height: 36px;
    min-width: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

.kehua-sidebar-comment-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.kehua-sidebar-comment-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.kehua-sidebar-comment-author {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.kehua-sidebar-comment-time {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.kehua-sidebar-comment-text {
    font-size: 12px;
    color: var(--text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kehua-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.kehua-stat-item {
    text-align: center;
    padding: 10px 6px;
    background: #f8f9f8;
    border-radius: 6px;
}

.kehua-stat-item .kehua-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.kehua-stat-item .kehua-value {
    font-size: 16px;
    font-weight: bold;
    color: var(--primary-color);
}

.kehua-stat-item.kehua-highlight {
    grid-column: span 2;
    background: var(--primary-color);
    color: white;
}

.kehua-stat-item.kehua-highlight .kehua-label,
.kehua-stat-item.kehua-highlight .kehua-value {
    color: white;
}

/* 遮罩层 */
.kehua-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
}

/* 返回顶部按钮 */
.kehua-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-color);
    font-size: 20px;
    cursor: pointer;
    z-index: 997;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.kehua-back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.kehua-back-to-top:hover {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(90, 143, 90, 0.4);
}

/* 分页 */
.kehua-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    padding: 20px 0;
}

.kehua-pagination a,
.kehua-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 6px;
    background: var(--tag-bg);
    color: var(--text-color);
    font-size: 14px;
    transition: all 0.3s;
}

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

.kehua-pagination .kehua-current {
    background: var(--primary-color);
    color: white;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .kehua-sidebar-right {
        width: 250px;
    }

    .kehua-main-content {
        width: auto;
        flex: 1;
    }
}

@media (max-width: 1024px) {
    .kehua-sidebar-right {
        display: none;
    }
}

@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .kehua-page-wrapper {
        border-radius: 0;
    }

    .kehua-sidebar-left {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        width: 260px;
        background: rgba(255, 255, 255, 0.8);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        z-index: 999;
        padding: 20px;
        overflow-y: auto;
        transition: left 0.3s;
        border-right: 1px solid rgba(0, 0, 0, 0.1);
        border-radius: 0;
    }

    .kehua-sidebar-left.active {
        left: 0;
    }

    .kehua-overlay.active {
        display: block;
    }

    .kehua-main-content {
        width: 100%;
    }

    .kehua-article-thumb {
        width: 120px;
        height: 140px;
        margin: 10px;
        margin-right: 0;
    }

    .kehua-article-content {
        padding: 10px 12px;
    }

    .kehua-article-title {
        font-size: 15px;
        -webkit-line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .kehua-article-excerpt {
        -webkit-line-clamp: 2;
    }

    .kehua-article-tag {
        display: none;
    }

    .kehua-main-inner {
        padding: 15px;
    }

    .kehua-category-banner-text {
        left: 25px;
        bottom: 15px;
    }

    .kehua-category-banner-text h1 {
        font-size: 20px;
    }

    .kehua-category-banner-text .kehua-desc {
        font-size: 13px;
    }

    .kehua-category-banner-text .kehua-count {
        font-size: 12px;
    }

    .kehua-top-bar-wrapper {
        padding: 0 15px;
    }

    .kehua-category-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .kehua-category-tabs::-webkit-scrollbar {
        display: none;
    }

    .kehua-category-tab {
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .kehua-article-content {
        padding: 10px 12px;
    }

    .kehua-article-title {
        font-size: 14px;
    }
}

/* 搜索弹出框样式 */
.kehua-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: flex-start;
    padding-top: 15vh;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.kehua-search-overlay.active {
    display: flex;
    opacity: 1;
}

/* 夜间模式搜索弹出框 */
[data-theme="dark"] .kehua-search-overlay {
    background: rgba(30, 30, 30, 0.9);
}

.kehua-search-container {
    width: 90%;
    max-width: 600px;
    text-align: center;
}

.kehua-search-form {
    width: 100%;
}

.kehua-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.kehua-search-icon {
    position: absolute;
    left: 24px;
    font-size: 22px;
    color: var(--text-muted);
    pointer-events: none;
}

.kehua-search-input {
    width: 100%;
    padding: 20px 60px;
    font-size: 18px;
    border: none;
    background: transparent;
    color: var(--text-color);
    outline: none;
}

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

.kehua-search-close {
    position: absolute;
    right: 24px;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.kehua-search-close:hover {
    color: var(--text-color);
}

.kehua-search-tip {
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-muted);
}

#kehua-searchToggle {
    cursor: pointer;
}

/* ========== 首页样式 (index.php) ========== */

/* 加载动画 */
.kehua-load-more {
    text-align: center;
    padding: 30px 0;
}

.kehua-articles-loading {
    text-align: center;
    padding: 10px 0;
}

.kehua-loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 14px;
}

.kehua-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #f0f0f0;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.kehua-no-more {
    color: var(--text-muted);
    font-size: 14px;
}

/* 文章卡片淡入动画 */
.kehua-article-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.kehua-article-card.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* 懒加载图片 */
.kehua-lazy-img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.kehua-lazy-img.loaded {
    opacity: 1;
}

/* 图片占位背景 */
.kehua-article-thumb {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.kehua-slide {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.kehua-hot-thumb, .kehua-comment-avatar, .kehua-article-cover {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

/* ========== 文章页样式 (post.php) ========== */

.kehua-article-cover {
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.kehua-article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kehua-article-wrapper {
    padding: 25px;
}

.kehua-article-wrapper .kehua-article-title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 20px;
    color: var(--text-color);
}

.kehua-article-wrapper .kehua-article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 25px;
}

.kehua-author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.kehua-author-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.kehua-author-detail {
    display: flex;
    flex-direction: column;
}

.kehua-author-name {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 15px;
}

.kehua-publish-date {
    font-size: 13px;
    color: var(--text-muted);
}

.kehua-article-body {
    font-size: 16px;
    line-height: 1.9;
    color: var(--text-color);
}

.kehua-article-body h2,
.kehua-article-body h3,
.kehua-article-body h4 {
    margin: 25px 0 15px;
    font-weight: 600;
    color: var(--text-color);
    position: relative;
    padding-left: 15px;
}

.kehua-article-body h2::before,
.kehua-article-body h3::before,
.kehua-article-body h4::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background: var(--primary-color);
    border-radius: 2px;
}

.kehua-article-body p {
    margin-bottom: 18px;
}

.kehua-article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
}

.kehua-article-body blockquote {
    background: #f8f9f8;
    border-left: 4px solid var(--primary-color);
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
    color: var(--text-light);
    font-style: italic;
}

.kehua-article-body a {
    color: var(--primary-color);
    text-decoration: underline;
}

.kehua-article-body code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
}

.kehua-article-body pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

.kehua-article-body pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.kehua-article-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 25px 0;
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-light);
}

.kehua-article-tags i {
    color: var(--primary-color);
    font-size: 16px;
}

.kehua-article-tags a {
    display: inline-block;
    padding: 4px 12px;
    background: #f5f5f5;
    border-radius: 15px;
    color: var(--text-light);
    font-size: 13px;
    transition: all 0.3s;
}

.kehua-article-tags a:hover {
    background: var(--primary-color);
    color: white;
}

.kehua-article-actions {
    display: flex;
    gap: 15px;
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.kehua-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-light);
    transition: all 0.3s;
}

.kehua-action-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.kehua-action-btn.kehua-liked {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.kehua-related-posts {
    margin-top: 30px;
}

.kehua-related-title {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.kehua-related-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kehua-related-item {
    display: flex;
    gap: 12px;
    padding: 10px;
    background: #f8f9f8;
    border-radius: 8px;
    transition: all 0.3s;
}

.kehua-related-item:hover {
    background: #f0f4f0;
}

.kehua-related-thumb {
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.kehua-related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kehua-related-info h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
    line-height: 1.4;
}

.kehua-related-info span {
    font-size: 12px;
    color: var(--text-muted);
}

.kehua-comments-section {
    margin-top: 30px;
}

.kehua-comments-title {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text-color);
}

@media (max-width: 768px) {
    .kehua-article-cover {
        height: 200px;
    }

    .kehua-article-wrapper {
        padding: 15px;
    }

    .kehua-article-wrapper .kehua-article-title {
        font-size: 20px;
    }

    .kehua-article-wrapper .kehua-article-meta {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .kehua-article-wrapper .kehua-article-stats {
        margin-left: auto;
    }
}

/* ========== 评论样式 (comments.php) ========== */

.kehua-comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.kehua-comment-item {
    padding: 20px 0;
}

.kehua-comment-list > .kehua-comment-item {
    border-bottom: 1px solid var(--border-color);
}

.kehua-comment-list > .kehua-comment-item:last-child {
    border-bottom: none;
}

.kehua-comment-list > .kehua-comment-item:first-child {
    padding-top: 0;
}

.kehua-comment-children {
    list-style: none;
    margin-top: 15px;
    padding-left: 55px;
}

.kehua-comment-children .kehua-comment-item {
    padding: 15px 0 0 0;
    border-bottom: none;
}

.kehua-comment-children .kehua-comment-children {
    padding-left: 0;
}

.kehua-comment-body {
    display: flex;
    gap: 15px;
}

.kehua-comment-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.kehua-comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kehua-comment-main {
    flex: 1;
    min-width: 0;
}

.kehua-comment-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.kehua-comment-author {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-color);
    text-decoration: none;
}

a.kehua-comment-author:hover {
    color: var(--primary-color);
}

.kehua-comment-reply-to {
    font-size: 13px;
    color: var(--text-muted);
}

.kehua-comment-reply-to a {
    color: var(--primary-color);
}

.kehua-comment-time {
    font-size: 12px;
    color: var(--text-muted);
}

.kehua-comment-content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-light);
    word-break: break-word;
}

.kehua-comment-content p {
    margin: 0;
}

.kehua-reply-btn {
    color: var(--text-muted);
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s;
    margin-left: auto;
}

.kehua-reply-btn:hover {
    color: var(--primary-color);
}

.kehua-comment-footer a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text-muted);
    transition: color 0.3s;
}

.kehua-comment-footer a:hover {
    color: var(--primary-color);
}

.kehua-comment-footer a i {
    font-size: 14px;
}

/* 评论表单 */
.kehua-comment-respond {
    margin-bottom: 30px;
    padding: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-sizing: border-box;
}

.kehua-comment-form {
    max-width: 100%;
}

.kehua-comment-respond-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.kehua-comment-respond-title i {
    color: var(--primary-color);
}

#kehua-cancelReplyBtn {
    font-size: 12px;
    color: var(--text-muted);
    padding: 4px 12px;
    border-radius: 12px;
    background: var(--border-color);
    margin-left: auto;
}

#kehua-cancelReplyBtn:hover {
    background: #e74c3c;
    color: white;
}

.kehua-comment-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.kehua-comment-form-fields {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.kehua-comment-form-fields input {
    flex: 1;
    min-width: 150px;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: var(--card-bg);
    color: var(--text-color);
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.kehua-comment-form-fields input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.kehua-comment-form-fields input::placeholder {
    color: var(--text-muted);
}

.kehua-comment-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: var(--card-bg);
    color: var(--text-color);
    min-height: 100px;
    resize: vertical;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.kehua-comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.kehua-comment-form textarea::placeholder {
    color: var(--text-muted);
}

.kehua-comment-form-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
}

#kehua-cancelReplyBtn {
    color: var(--text-color);
    font-size: 13px;
    text-decoration: none;
    padding: 10px 20px;
    background: var(--border-color);
    border-radius: 8px;
    transition: all 0.3s;
}

#kehua-cancelReplyBtn:hover {
    background: var(--text-muted);
    color: white;
}

.kehua-comment-form-user {
    font-size: 13px;
    color: var(--text-light);
}

.kehua-comment-form-user a {
    color: var(--primary-color);
}

.kehua-comment-form button {
    padding: 10px 25px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.kehua-comment-form button:hover {
    background: var(--primary-light);
}

.kehua-no-comments {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 14px;
}

.kehua-no-comments i {
    font-size: 40px;
    margin-bottom: 10px;
    display: block;
    opacity: 0.5;
}

.kehua-load-more-comments,
.kehua-no-more-comments {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 13px;
}

.kehua-comments-loading-text {
    font-size: 14px;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .kehua-comment-form-fields {
        flex-direction: column;
    }

    .kehua-comment-avatar {
        width: 40px;
        height: 40px;
    }

    .kehua-comment-header {
        flex-wrap: wrap;
        gap: 6px;
    }

    .kehua-comment-author {
        font-size: 13px;
    }

    .kehua-comment-time {
        font-size: 11px;
    }

    .kehua-reply-btn {
        font-size: 11px;
    }
}

/* ========== 音乐播放器样式 ========== */

.kehua-music-player {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    display: none;
    width: 590px;
}

.kehua-music-player.show {
    display: block;
}

.kehua-music-player.kehua-autoplay-waiting #kehua-musicPlayBtn {
    animation: autoplayPulse 1.5s ease-in-out infinite;
}

@keyframes autoplayPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.kehua-main-content.kehua-music-player-visible {
    padding-bottom: 75px;
}

[data-theme="dark"] .kehua-music-player {
    background: rgba(40, 40, 40, 0.9);
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.25);
}

.kehua-music-player-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    position: relative;
}

.kehua-music-cover {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.kehua-music-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kehua-music-info-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.kehua-music-info {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.kehua-music-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.kehua-music-artist {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kehua-music-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.kehua-music-progress-bar {
    flex: 1;
    height: 3px;
    background: #e0e0e0;
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    max-width: 300px;
}

[data-theme="dark"] .kehua-music-progress-bar {
    background: #444;
}

.kehua-music-progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.kehua-music-progress-bar:hover .kehua-music-progress-fill {
    background: var(--primary-light);
}

.kehua-music-time {
    font-size: 11px;
    color: var(--primary-color);
    min-width: 70px;
}

.kehua-music-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.kehua-music-controls i {
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
    padding: 4px;
}

.kehua-music-controls i:hover {
    color: var(--primary-color);
}

#kehua-musicPlayBtn {
    font-size: 34px;
    color: var(--primary-color);
}

#kehua-musicPlayBtn:hover {
    color: var(--primary-light);
}

.kehua-music-close {
    font-size: 18px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    margin-left: 5px;
    transition: color 0.2s;
}

.kehua-music-close:hover {
    color: var(--text-color);
}

/* 音量控制 */
.kehua-music-volume-wrapper {
    position: relative;
}

.kehua-music-volume-slider {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 100px;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    padding: 10px 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.kehua-music-volume-slider.show {
    display: flex;
}

[data-theme="dark"] .kehua-music-volume-slider {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.kehua-music-volume-slider input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    transform: rotate(-90deg);
    cursor: pointer;
}

.kehua-music-volume-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

.kehua-music-volume-slider input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* 播放列表弹窗 */
.kehua-music-playlist {
    position: fixed;
    bottom: 86px;
    left: 50%;
    transform: translateX(-50%);
    width: 590px;
    max-height: 30vh;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 0;
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.08);
    z-index: 1001;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.kehua-music-playlist.show {
    display: flex;
}

[data-theme="dark"] .kehua-music-playlist {
    background: rgba(40, 40, 40, 0.9);
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.25);
}

.kehua-playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-color);
    flex-shrink: 0;
}

.kehua-playlist-header i {
    cursor: pointer;
    font-size: 18px;
    color: var(--text-muted);
}

.kehua-playlist-header i:hover {
    color: var(--text-color);
}

/* 播放列表滚动条容器 */
.kehua-playlist-list-wrapper {
    flex: 1 1 auto;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

/* 原生滚动条美化 */
.kehua-playlist-list-wrapper::-webkit-scrollbar {
    width: 6px;
}

.kehua-playlist-list-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.kehua-playlist-list-wrapper::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.kehua-playlist-list-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

.kehua-playlist-list-wrapper {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.kehua-playlist-list {
    list-style: none;
    margin: 0;
    padding: 0 10px 0 0;
}

.kehua-playlist-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.kehua-playlist-item:hover {
    background: var(--tag-bg);
}

.kehua-playlist-item.active {
    background: rgba(90, 143, 90, 0.1);
}

.kehua-playlist-item.active .kehua-playlist-name {
    color: var(--primary-color);
}

.kehua-playlist-name {
    font-size: 14px;
    color: var(--text-color);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kehua-playlist-artist {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 10px;
}

/* 音乐图标动画 */
#kehua-musicToggle.playing {
    animation: musicPulse 1s ease-in-out infinite;
}

@keyframes musicPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 响应式 */
@media (max-width: 768px) {
    .kehua-music-player {
        left: 0 !important;
        right: 0;
        bottom: 0;
        width: 100% !important;
        transform: none !important;
    }

    body.kehua-music-player-visible .kehua-back-to-top {
        bottom: 80px;
    }

    .kehua-music-playlist {
        left: 0 !important;
        right: 0;
        bottom: 66px !important;
        width: 100% !important;
        transform: none !important;
        max-width: 100% !important;
        max-height: 50vh !important;
    }

    .kehua-music-player-inner {
        gap: 10px;
        padding: 10px 12px;
    }

    .kehua-music-cover {
        width: 36px;
        height: 36px;
    }

    .kehua-music-info-wrapper {
        flex: 1;
        min-width: 0;
    }

    .kehua-music-name {
        font-size: 12px;
        max-width: 80px;
    }

    .kehua-music-artist {
        font-size: 10px;
    }

    .kehua-music-progress-bar {
        max-width: 120px;
    }

    .kehua-music-time {
        font-size: 10px;
        min-width: 60px;
    }

    .kehua-music-controls {
        gap: 4px;
    }

    .kehua-music-controls i {
        font-size: 16px;
        padding: 2px;
    }

    #kehua-musicPlayBtn {
        font-size: 26px;
    }

    .kehua-music-close {
        font-size: 16px;
        margin-left: 2px;
    }

    .kehua-music-playlist {
        width: 590px;
        max-width: calc(100% - 40px);
    }
}

/* ==================== 友情链接页面 ==================== */
.kehua-links-page {
    padding: 25px;
}

.kehua-links-page.kehua-has-banner,
.kehua-single-page.kehua-has-banner {
    padding-top: 20px;
}

/* 独立页面样式 */
.kehua-single-page .kehua-article-title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 25px;
    color: var(--text-color);
}

.kehua-single-page .kehua-article-body {
    font-size: 16px;
    line-height: 1.9;
    color: var(--text-color);
}

.kehua-single-page .kehua-comments-section {
    margin-top: 30px;
}

.kehua-single-page .kehua-comments-title {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text-color);
}

.kehua-links-page .kehua-article-title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 25px;
    color: var(--text-color);
}

.kehua-links-page .kehua-links-intro {
    font-size: 16px;
    line-height: 1.9;
    color: var(--text-color);
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.kehua-links-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 30px;
}

.kehua-link-card {
    display: flex;
    align-items: center;
    padding: 12px;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

.kehua-link-card:hover {
    background: var(--hover-bg, #f5f5f5);
    border-color: var(--primary-color);
}

[data-theme="dark"] .kehua-link-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

.kehua-link-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    margin-right: 10px;
    border-radius: 8px;
    overflow: hidden;
}

.kehua-link-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.kehua-link-icon-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

.kehua-link-info {
    flex: 1;
    min-width: 0;
}

.kehua-link-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kehua-link-desc {
    font-size: 12px;
    color: var(--text-light);
    margin: 0;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kehua-links-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.kehua-links-empty .kehua-links-format {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-lighter);
}

.kehua-links-page .kehua-comments-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.kehua-links-page .kehua-comments-title {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text-color);
}

/* 友情链接移动端适配 */
@media (max-width: 768px) {
    .kehua-links-page {
        padding: 15px;
    }

    .kehua-links-page .kehua-article-title {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .kehua-links-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .kehua-link-card {
        padding: 10px;
    }

    .kehua-link-icon {
        width: 36px;
        height: 36px;
        margin-right: 8px;
    }

    .kehua-link-icon-fallback {
        font-size: 14px;
    }

    .kehua-link-name {
        font-size: 13px;
    }

    .kehua-link-desc {
        font-size: 11px;
    }
}

/* 无缩略图占位样式 */
.kehua-article-thumb {
    background-color: #e8e8e8;
}
[data-theme="dark"] .kehua-article-thumb {
    background-color: #3a3a3a;
}
.kehua-lazy-img.kehua-no-image,
.kehua-lazy-img[src=""] {
    visibility: hidden;
}
.kehua-article-cover {
    background-color: #e8e8e8;
}
[data-theme="dark"] .kehua-article-cover {
    background-color: #3a3a3a;
}
.kehua-hot-thumb {
    background-color: #e8e8e8;
}
[data-theme="dark"] .kehua-hot-thumb {
    background-color: #3a3a3a;
}
