/* 文章页面通用样式 */

body {
    padding: 100px 20px 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.article-container {
    width: 100%;
    max-width: 896px;
    background: var(--glass-bg);
    backdrop-filter: var(--element-blur);
    -webkit-backdrop-filter: var(--element-blur);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 48px;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.article-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--glass-highlight);
    opacity: 0.6;
}

/* 返回按钮 */
.back-btn {
    position: absolute;
    top: 24px;
    left: 24px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s var(--ease-liquid);
    z-index: 10;
}

.back-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--primary-color);
    transform: translateX(-4px);
}

.back-icon {
    font-size: 16px;
    transition: transform 0.3s var(--ease-liquid);
}

.back-btn:hover .back-icon {
    transform: translateX(-2px);
}

.back-text {
    white-space: nowrap;
}

/* 文章头部 */
.article-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--glass-border);
}

.article-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.article-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 16px 0;
    line-height: 1.4;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 24px;
    font-size: 14px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

/* 知乎风格目录样式 */
.table-of-contents {
    position: fixed;
    left: max(calc((100vw - 800px) / 2 - 240px), 20px);
    top: 140px;
    width: 200px;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    padding: 0;
    background: transparent;
    z-index: 100;
}

.table-of-contents::-webkit-scrollbar {
    width: 4px;
}

.table-of-contents::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 2px;
}

.toc-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 16px 0;
    padding-left: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}

/* 左侧竖线 */
.toc-list::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--glass-border);
    border-radius: 1px;
}

.toc-item {
    margin: 0;
    position: relative;
}

.toc-link {
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
    padding: 6px 12px 6px 16px;
    transition: all 0.2s ease;
    font-size: 13px;
    line-height: 1.6;
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 圆点指示器 */
.toc-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--glass-border);
    border: 2px solid var(--glass-bg);
    transition: all 0.3s var(--ease-liquid);
    z-index: 1;
}

.toc-link:hover {
    color: var(--primary-color);
}

.toc-link:hover::before {
    background: var(--primary-color);
    transform: translateY(-50%) scale(1.2);
}

.toc-link.active {
    color: var(--primary-color);
    font-weight: 500;
}

.toc-link.active::before {
    background: var(--primary-color);
    transform: translateY(-50%) scale(1.3);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.2);
}

/* 子目录缩进 */
.toc-item.toc-h3 .toc-link {
    padding-left: 32px;
    font-size: 12px;
}

.toc-item.toc-h3 .toc-link::before {
    left: 16px;
    width: 6px;
    height: 6px;
}

/* 移动端目录按钮 */
.toc-toggle {
    display: none;
    position: fixed;
    right: 20px;
    bottom: 80px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: var(--element-blur);
    -webkit-backdrop-filter: var(--element-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-soft);
    color: var(--primary-color);
    font-size: 20px;
    cursor: pointer;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease-liquid);
}

.toc-toggle:hover {
    transform: scale(1.1);
    border-color: var(--primary-color);
}

.toc-toggle.active {
    background: var(--primary-color);
    color: white;
}

/* 文章内容 */
.article-content {
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 16px;
}

.article-content h2 {
    color: var(--primary-color);
    font-size: 24px;
    margin: 32px 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--glass-border);
    scroll-margin-top: 100px;
}

.article-content h3 {
    color: var(--secondary-color);
    font-size: 20px;
    margin: 24px 0 12px 0;
    scroll-margin-top: 100px;
}

.article-content p {
    margin: 16px 0;
    text-indent: 2em;
}

.article-content ul,
.article-content ol {
    margin: 16px 0;
    padding-left: 2em;
}

.article-content li {
    margin: 8px 0;
}

.article-content blockquote {
    margin: 24px 0;
    padding: 16px 24px;
    background: rgba(212, 175, 55, 0.05);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    color: var(--text-secondary);
}

/* 八字示例样式（可选，仅八字文章使用） */
.bazi-example {
    margin: 24px 0;
    padding: 20px;
    background: rgba(184, 134, 11, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    text-align: center;
}

.bazi-pillars {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.pillar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.pillar-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.pillar-chars {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pillar-char {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
}

/* 文章标签 */
.article-tags {
    display: flex;
    gap: 8px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--glass-border);
    flex-wrap: wrap;
}

.article-tag {
    font-size: 13px;
    padding: 6px 14px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    color: var(--primary-color);
}

/* 相关文章推荐 */
.related-articles {
    margin-top: 48px;
    padding-top: 40px;
    border-top: 2px solid var(--glass-border);
}

.related-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 24px;
    text-align: center;
}

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

.related-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s var(--ease-liquid);
}

.related-item:hover {
    border-color: var(--glass-highlight);
    transform: translateX(8px);
    background: rgba(212, 175, 55, 0.1);
}

.related-item-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.related-item-content {
    flex: 1;
}

.related-item-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.related-item-excerpt {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .table-of-contents {
        position: fixed;
        left: 50%;
        transform: translateX(-50%) translateY(calc(100% + 80px));
        top: auto;
        bottom: 140px;
        width: calc(100vw - 40px);
        max-width: 400px;
        max-height: 60vh;
        padding: 20px;
        background: var(--glass-bg);
        backdrop-filter: var(--element-blur);
        -webkit-backdrop-filter: var(--element-blur);
        border: 1px solid var(--glass-border);
        border-radius: 16px;
        box-shadow: var(--shadow-soft);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s var(--ease-liquid);
    }

    .table-of-contents.show {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .toc-toggle {
        display: flex;
    }

    .toc-title {
        padding-left: 0;
    }

    .toc-list::before {
        display: none;
    }

    .toc-link::before {
        display: none;
    }

    .toc-link {
        padding: 8px 12px;
        border-radius: 8px;
        white-space: normal;
    }

    .toc-link:hover,
    .toc-link.active {
        background: rgba(212, 175, 55, 0.1);
    }

    .toc-item.toc-h3 .toc-link {
        padding-left: 24px;
    }
}

@media (max-width: 768px) {
    .article-container {
        padding: 32px 24px;
        border-radius: 20px;
    }

    .back-btn {
        top: 16px;
        left: 16px;
        padding: 6px 12px;
        font-size: 13px;
    }

    .back-icon {
        font-size: 14px;
    }

    .article-title {
        font-size: 26px;
    }

    .article-content {
        font-size: 15px;
    }

    .article-content h2 {
        font-size: 22px;
    }

    .article-content h3 {
        font-size: 18px;
    }

    .pillar-char {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 80px 16px 40px;
    }

    .article-container {
        padding: 24px 20px;
        border-radius: 16px;
    }

    .back-btn {
        top: 12px;
        left: 12px;
        padding: 5px 10px;
        font-size: 12px;
    }

    .back-icon {
        font-size: 13px;
    }

    .back-text {
        display: none;
    }

    .article-icon {
        font-size: 48px;
    }

    .article-title {
        font-size: 22px;
    }

    .article-meta {
        font-size: 13px;
        gap: 16px;
    }

    .article-content {
        font-size: 14px;
    }

    .article-content h2 {
        font-size: 20px;
    }

    .article-content h3 {
        font-size: 17px;
    }

    .table-of-contents {
        padding: 16px;
    }

    .toc-title {
        font-size: 16px;
    }

    .toc-link {
        font-size: 14px;
    }

    .toc-item.toc-h3 .toc-link {
        font-size: 13px;
    }

    .bazi-pillars {
        gap: 12px;
    }

    .pillar-char {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

/* 文章中的图片样式 */
.article-content img {
    display: block;
    margin: 24px auto;
    max-width: 100%;
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s var(--ease-liquid);
}

.article-content img:hover {
    transform: scale(1.02);
}

/* 八段锦 GIF 容器 */
.baduanjin-gif {
    display: flex;
    justify-content: center;
    margin: 32px 0;
    width: 100%;
}

/* 九宫飞星网格样式 */
.jiugong-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 40px auto;
    max-width: 500px;
}

.grid-cell {
    aspect-ratio: 1 / 1;
    background: var(--glass-bg);
    backdrop-filter: var(--element-blur);
    -webkit-backdrop-filter: var(--element-blur);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s var(--ease-liquid);
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
    padding: 10px;
}

.grid-cell::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--glass-highlight);
    opacity: 0.5;
}

.grid-cell:hover {
    transform: translateY(-5px);
    background: var(--glass-bg-hover);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-medium);
}

.star-number {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 1px;
}

.direction {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* 针对不同星性的视觉引导（增加传统色彩暗示） */
/* 凶位：五黄(西)、二黑(东北) - 红色系提示 */
.jiugong-grid .grid-cell:nth-child(6),
.jiugong-grid .grid-cell:nth-child(7) {
    border-color: rgba(239, 68, 68, 0.2);
}

.jiugong-grid .grid-cell:nth-child(6) .star-number,
.jiugong-grid .grid-cell:nth-child(7) .star-number {
    color: #ef4444;
}

/* 喜庆/财位：八白(东南)、九紫(北) - 金黄色系提示 */
.jiugong-grid .grid-cell:nth-child(1),
.jiugong-grid .grid-cell:nth-child(8) {
    border-color: rgba(245, 158, 11, 0.4);
}

.jiugong-grid .grid-cell:nth-child(1) .star-number,
.jiugong-grid .grid-cell:nth-child(8) .star-number {
    color: var(--accent-color);
}

@media (max-width: 480px) {
    .jiugong-grid {
        gap: 8px;
        margin: 24px auto;
        padding: 0 10px;
    }

    .grid-cell {
        border-radius: 12px;
        gap: 4px;
        padding: 5px;
    }

    .star-number {
        font-size: 16px;
    }

    .direction {
        font-size: 11px;
    }
}
/* --- MERGED: comment-system.css --- */
/* 评论系统样式 */
:root {
    --author-color: #f59e0b;
    --author-bg: rgba(245, 158, 11, 0.12);
    --author-border: rgba(245, 158, 11, 0.4);
    --author-glow: rgba(245, 158, 11, 0.2);
}

.comment-section {
    max-width: 850px;
    margin: 60px auto 0;
    padding: 0 24px;
}

.comment-title {
    font-size: 26px;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* 评论表单 */
.comment-form-wrapper {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 36px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

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

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 15px;
    box-sizing: border-box;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.comment-form textarea {
    min-height: 120px;
    resize: vertical;
}

.char-count {
    text-align: right;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
    font-weight: 500;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color), #2563eb);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 评论列表 */
.comment-list {
    margin-top: 40px;
}

.comment-item {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.comment-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    border-color: rgba(59, 130, 246, 0.2);
}

/* 作者专属样式 */
.comment-item-author {
    border: 1px solid var(--author-border);
    border-left: 5px solid var(--author-color);
    background: var(--author-bg);
    box-shadow: 0 4px 15px var(--author-glow);
}

.comment-item-author .comment-author {
    color: var(--author-color);
}

.author-badge {
    background: var(--author-color);
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
    font-weight: 700;
    text-transform: uppercase;
    vertical-align: middle;
}

.comment-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 16px;
}

.comment-author {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 16px;
    display: flex;
    align-items: center;
}

.comment-time {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: right;
    line-height: 1.5;
    flex-shrink: 0;
}

.comment-content {
    color: var(--text-primary);
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: 18px;
    font-size: 15px;
}

/* 长评论折叠 */
.comment-content.collapsed {
    max-height: 200px;
    overflow: hidden;
    position: relative;
}

.comment-content.collapsed::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(transparent, var(--glass-bg));
}

.comment-item-author .comment-content.collapsed::after {
    background: linear-gradient(transparent, var(--author-bg));
}

.expand-btn {
    display: block;
    width: 100%;
    padding: 10px;
    text-align: center;
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    border: none;
    margin-top: -10px;
    margin-bottom: 10px;
    transition: color 0.2s;
}

.expand-btn:hover {
    color: #2563eb;
    text-decoration: underline;
}

.comment-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.08);
}

.action-btn.liked {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.12);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

/* 回复区域 */
.reply-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

.reply-form {
    display: none;
    margin-top: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.reply-form.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.reply-form input,
.reply-form textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    box-sizing: border-box;
    margin-bottom: 12px;
    font-family: inherit;
    transition: all 0.2s;
}

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

.reply-form textarea {
    min-height: 80px;
    resize: vertical;
}

.reply-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.reply-form-actions button {
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.reply-submit {
    background: var(--primary-color);
    color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.reply-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.reply-cancel {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

.reply-cancel:hover {
    background: rgba(255, 255, 255, 0.05);
}

.reply-list {
    margin-top: 16px;
    padding-left: 12px;
    border-left: 2px solid var(--primary-color);
}

.reply-item {
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 14px;
    margin-bottom: 12px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.reply-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--glass-border);
}

.reply-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 14px;
}

.reply-author {
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.reply-to {
    color: var(--text-secondary);
    font-size: 12px;
}

.reply-time {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.5;
}

.reply-content {
    color: var(--text-primary);
    font-size: 14.5px;
    line-height: 1.6;
}

/* 隐藏的密码框提示 */
.admin-password-field {
    display: none;
    margin-bottom: 12px;
}

.admin-password-field.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 100px; }
}

/* 加载和空状态 */
.loading-state,
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--glass-border);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    margin: 0 auto 20px;
}

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

.empty-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.status-message {
    padding: 14px 24px;
    border-radius: 14px;
    margin-bottom: 24px;
    font-size: 15px;
    font-weight: 500;
    animation: slideIn 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    display: flex;
    align-items: center;
    gap: 10px;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.status-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #16a34a;
}

.status-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

@media (max-width: 768px) {
    .comment-section {
        padding: 0 16px;
    }
    
    .comment-form-wrapper {
        padding: 20px;
        border-radius: 16px;
    }

    .comment-item {
        padding: 20px;
        border-radius: 16px;
    }

    .comment-author {
        font-size: 15px;
    }

    .reply-list {
        padding-left: 8px;
    }

    .comment-header {
        flex-direction: column;
        gap: 4px;
    }

    .comment-time {
        text-align: left;
    }
}


/* --- MERGED: like-widget.css (Astro Theme) --- */
.xb-like-btn-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0 20px 0;
    position: relative;
    z-index: 10;
}

.xb-like-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    outline: none;
    position: relative;
    padding: 10px;
}

.xb-like-icon-wrapper {
    position: relative;
    width: 54px;
    height: 54px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--glass-bg, rgba(255, 255, 255, 0.05));
    backdrop-filter: var(--element-blur, blur(10px));
    -webkit-backdrop-filter: var(--element-blur, blur(10px));
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), inset 0 2px 5px rgba(255, 215, 0, 0.1);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.day-theme .xb-like-icon-wrapper {
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1), inset 0 2px 0 rgba(255, 255, 255, 0.8);
}

.xb-like-btn:hover .xb-like-icon-wrapper {
    transform: translateY(-4px) scale(1.05);
    border-color: #d4af37;
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3), inset 0 2px 10px rgba(212, 175, 55, 0.2);
}

.xb-like-emoji {
    font-size: 24px;
    line-height: 1;
    filter: grayscale(100%) opacity(0.4);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    user-select: none;
}

.xb-like-btn:hover .xb-like-emoji,
.xb-like-btn.liked .xb-like-emoji {
    filter: grayscale(0%) saturate(150%) opacity(1);
    transform: scale(1.1) rotate(5deg);
}

.xb-like-btn.liked .xb-like-icon-wrapper {
    border-color: #d4af37;
}

.xb-like-btn.liked .xb-like-emoji {
    animation: mysticGlow 2s infinite alternate;
}

.xb-like-count {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #333333); /* Fixed visibility issue */
    transition: color 0.3s ease;
    min-height: 20px;
}

.xb-like-btn:hover .xb-like-count,
.xb-like-btn.liked .xb-like-count {
    color: #d4af37;
}

.xb-like-combo {
    position: absolute;
    top: -5px;
    right: -10px;
    background: linear-gradient(135deg, #d4af37, #b8860b);
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 12px;
    pointer-events: none;
    opacity: 0;
    transform: scale(0.5) translateY(10px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.xb-like-combo.show {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.xb-like-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #d4af37;
    opacity: 0;
    pointer-events: none;
}

.xb-like-btn.animating .xb-like-ripple {
    animation: rippleEffect 0.8s ease-out forwards;
}

.xb-like-particle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background-color: #d4af37;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    box-shadow: 0 0 4px #ffdf00;
}

@keyframes mysticGlow {
    0% { filter: drop-shadow(0 0 2px rgba(212,175,55,0.4)) grayscale(0%); transform: scale(1.1); }
    100% { filter: drop-shadow(0 0 10px rgba(212,175,55,0.8)) grayscale(0%); transform: scale(1.15); }
}

@keyframes rippleEffect {
    0% { width: 100%; height: 100%; opacity: 0.8; border-width: 4px; }
    100% { width: 250%; height: 250%; opacity: 0; border-width: 0px; filter: blur(2px); }
}

@keyframes flyOut {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}
