/**
 * 评论区样式
 */

.comments-area {
    margin-top: 0;
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.97), rgba(246, 248, 255, 0.97));
    border-radius: 26px;
    padding: 48px 52px;
    box-shadow: 0 24px 80px rgba(15, 22, 58, 0.08);
    position: relative;
    overflow: hidden;
}

.comments-area::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(102, 126, 234, 0.12), transparent 55%),
                radial-gradient(circle at bottom left, rgba(240, 147, 251, 0.12), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.comments-area > * {
    position: relative;
    z-index: 1;
}

.comments-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 36px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.comments-title::before {
    content: '';
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6f7dff, #60c7ff);
    opacity: 0.22;
}

.comment-submit-loading {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
}

.comment-submit-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(0, 136, 204, 0.2);
    border-top-color: var(--primary-color, #0088cc);
    animation: comment-submit-spin 0.6s linear infinite;
}

.comment-submit-text {
    font-size: 0.9rem;
}

@keyframes comment-submit-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 24px;
}

.comment-list .comment {
    margin: 0;
}

.comment-body {
    background: rgba(255, 255, 255, 0.82);
    border-radius: 18px;
    padding: 24px 28px;
    box-shadow: 0 16px 45px rgba(11, 13, 25, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.comment-body:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 60px rgba(15, 22, 58, 0.1);
}

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

.comment-author {
    display: flex;
    align-items: center;
    gap: 14px;
}

.comment-author img {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    box-shadow: 0 10px 20px rgba(15, 22, 58, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.comment-author .fn {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    font-style: normal;
}

.comment-author .says {
    display: none;
}

.comment-metadata {
    font-size: 13px;
    color: var(--text-secondary);
}

.comment-metadata a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.comment-content {
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 0.95rem;
}

.comment-content p {
    margin: 0 0 12px;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

.comment-awaiting-moderation {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 999px;
    background: rgba(255, 165, 0, 0.12);
    color: #a15c00;
}

.reply {
    margin-top: 18px;
}

.comment-reply-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(0, 136, 204, 0.12), rgba(102, 126, 234, 0.12));
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.comment-reply-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 136, 204, 0.18);
}

.comment-list .children {
    list-style: none;
    margin: 24px 0 0 38px;
    padding: 0;
    display: grid;
    gap: 18px;
}

.comment-list .children .comment-toggle-item {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-toggle-replies {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 6px 14px;
    font-size: 13px;
    border: none;
    border-radius: 999px;
    background: rgba(0, 136, 204, 0.14);
    color: var(--primary-color);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.comment-toggle-replies:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(0, 136, 204, 0.2);
}

.comment-reply-hidden {
    display: none;
}

.comment-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 42px 0 32px;
}

.comment-navigation a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--text-primary);
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(15, 22, 58, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.comment-navigation a:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(15, 22, 58, 0.12);
}

.comment-pagination {
    margin: 36px 0;
    display: flex;
    justify-content: center;
}

.comment-pagination ul {
    display: inline-flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 999px;
    padding: 6px 12px;
    box-shadow: 0 18px 40px rgba(15, 22, 58, 0.08);
}

.comment-pagination li {
    display: inline-flex;
}

.comment-pagination a,
.comment-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.comment-pagination a:hover {
    background: rgba(0, 136, 204, 0.16);
    color: var(--primary-color);
}

.comment-pagination .current {
    background: linear-gradient(135deg, #6f7dff, #60c7ff);
    color: #fff;
    box-shadow: 0 12px 28px rgba(95, 123, 255, 0.22);
}

.no-comments {
    margin-top: 30px;
    padding: 32px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--text-secondary);
    text-align: center;
    font-style: italic;
    box-shadow: 0 16px 45px rgba(15, 22, 58, 0.08);
}

.comment-respond {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid rgba(15, 22, 58, 0.08);
}

.comment-reply-title {
    font-size: 22px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 28px;
}

.comment-reply-title::before {
    content: '';
    width: 8px;
    height: 28px;
    border-radius: 999px;
    background: linear-gradient(135deg, #6f7dff, #60c7ff);
}

.comment-reply-title small {
    font-size: 13px;
    font-weight: 400;
}

.comment-reply-title small a {
    color: var(--primary-color);
    text-decoration: none;
}

.comment-reply-title small a:hover {
    text-decoration: underline;
}

.comment-form {
    display: grid;
    gap: 22px;
}

.comment-form .comment-notes {
    font-size: 13px;
    color: var(--text-secondary);
}

.comment-form-author,
.comment-form-email,
.comment-form-url {
    display: grid;
    gap: 8px;
}

.comment-form label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(15, 22, 58, 0.12);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: rgba(255, 255, 255, 0.94);
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: rgba(0, 136, 204, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.12);
}

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

.comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
}

.comment-form-cookies-consent input[type="checkbox"] {
    width: auto;
}

.form-submit {
    margin: 0;
    display: flex;
    justify-content: flex-end;
}

.form-submit .comment-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 34px;
    border-radius: 18px;
    border: none;
    background: linear-gradient(135deg, #6f7dff, #60c7ff);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 20px 45px rgba(95, 123, 255, 0.25);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.form-submit .comment-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 52px rgba(95, 123, 255, 0.32);
}

.form-submit .comment-submit-btn:disabled {
    opacity: 0.65;
    cursor: wait;
    box-shadow: none;
}

@media (max-width: 992px) {
    .comments-area {
        border-radius: 22px;
        padding: 36px;
    }
}

@media (max-width: 768px) {
    .comments-area {
        padding: 28px 24px;
    }

    .comment-author img {
        width: 44px;
        height: 44px;
    }

    .comment-list .children {
        margin-left: 24px;
    }

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

    .comment-form {
        gap: 18px;
    }
}

@media (max-width: 560px) {
    .comments-area {
        padding: 24px 18px;
    }

    .comments-title {
        font-size: 20px;
    }

    .comment-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .comment-list .children {
        margin-left: 16px;
    }

    .comment-reply-link {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   Dark Theme Overrides
   ============================================ */
html[data-theme="dark"] .comments-area {
    background: rgba(15, 23, 42, 0.94);
    box-shadow: 0 28px 70px rgba(2, 6, 23, 0.55);
    color: #e2e8f0;
}

html[data-theme="dark"] .comments-area::before {
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.28), transparent 55%),
                radial-gradient(circle at bottom left, rgba(56, 189, 248, 0.22), transparent 60%);
    opacity: 0.7;
}

html[data-theme="dark"] .comments-title {
    color: #f8fafc;
}

html[data-theme="dark"] .comment-body {
    background: rgba(30, 41, 59, 0.92);
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: 0 24px 65px rgba(2, 6, 23, 0.45);
}

html[data-theme="dark"] .comment-author img {
    border-color: rgba(148, 163, 184, 0.35);
    box-shadow: 0 12px 28px rgba(2, 6, 23, 0.45);
}

html[data-theme="dark"] .comment-metadata a,
html[data-theme="dark"] .comment-metadata time {
    color: #94a3b8;
}

html[data-theme="dark"] .comment-content {
    color: #cbd5f5;
}

html[data-theme="dark"] .comment-reply-link {
    background: rgba(99, 102, 241, 0.25);
    color: #dbeafe;
}

html[data-theme="dark"] .comment-reply-link:hover {
    background: linear-gradient(135deg, #6366f1, #3b82f6);
    color: #fff;
    box-shadow: 0 12px 26px rgba(99, 102, 241, 0.32);
}

html[data-theme="dark"] .comment-toggle-replies {
    background: rgba(99, 102, 241, 0.2);
    color: #dbeafe;
}

html[data-theme="dark"] .comment-toggle-replies:hover {
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.3);
}

html[data-theme="dark"] .comment-form input[type="text"],
html[data-theme="dark"] .comment-form input[type="email"],
html[data-theme="dark"] .comment-form input[type="url"],
html[data-theme="dark"] .comment-form textarea {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(148, 163, 184, 0.25);
    color: #e2e8f0;
}

html[data-theme="dark"] .comment-form input::placeholder,
html[data-theme="dark"] .comment-form textarea::placeholder {
    color: #94a3b8;
}

html[data-theme="dark"] .comment-pagination ul {
    background: rgba(30, 41, 59, 0.9);
    box-shadow: none;
}

html[data-theme="dark"] .comment-pagination a,
html[data-theme="dark"] .comment-pagination span {
    color: #cbd5f5;
}

html[data-theme="dark"] .comment-pagination a:hover {
    color: #fff;
    background: rgba(99, 102, 241, 0.22);
}

html[data-theme="dark"] .comment-pagination .current {
    background: linear-gradient(135deg, #6366f1, #3b82f6);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.35);
}


html[data-theme="dark"] .comment-reply-title {
    color: #f8fafc;
}

html[data-theme="dark"] .comment-reply-title small a {
    color: #60a5fa;
}

html[data-theme="dark"] .comment-respond {
    border-top-color: rgba(148, 163, 184, 0.15);
}

html[data-theme="dark"] .comment-form label {
    color: #e2e8f0;
}

html[data-theme="dark"] .comment-form .comment-notes,
html[data-theme="dark"] .comment-form-cookies-consent {
    color: #94a3b8;
}

html[data-theme="dark"] .comment-awaiting-moderation {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

html[data-theme="dark"] .no-comments {
    background: rgba(30, 41, 59, 0.9);
    color: #94a3b8;
}

html[data-theme="dark"] .comment-author .fn {
    color: #f1f5f9;
}

html[data-theme="dark"] .comment-navigation a {
    background: rgba(30, 41, 59, 0.9);