/* 评论区的浮层：大图查看器（#lightbox）、AI 审核中的提示（.ai-audit-toast）、审核结果弹窗（.audit-result-modal）、轻提示（.error-toast / .success-toast）。
   原来在云笺文章页（pinghsu-post-head.css）、云笺留言板（pinghsu-links-2.css）、新主题（components.css）里各有一份一模一样的拷贝，
   2026-10-08 合并到这里，在这三个文件各自的位置之前加载（三处剩下的规则都不碰这些选择器，层叠结果不变）。
   黑夜模式的覆盖仍在各主题自己的表里（选择器带 html[data-blog-theme="dark"]，优先级更高）。 */

#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#lightbox img {
    max-width: 90%;
    max-height: 90%;
}

#lightbox .zoomButton {
    position: fixed;
    bottom: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%; /* 圆形按钮 */
    font-size: 24px;
    line-height: 40px; /* 文字垂直居中 */
    text-align: center; /* 文字水平居中 */
    cursor: pointer;
    color: white;
    background-color: rgba(255, 255, 255, 0.5); /* 半透明白色背景 */
    border: none;
    transition: background-color 0.3s ease; /* 平滑过渡效果 */
    z-index: 10001;
}

@media (hover: hover) and (pointer: fine) {
    #lightbox .zoomButton:hover {
        background-color: rgba(255, 255, 255, 0.8); /* 鼠标悬停时加深背景色 */
    }
}

#lightbox .zoomButton {
    font-size: 30px; /* 调整图标大小 */
}

#prevButton, #nextButton {
    position: fixed;
    top: 50vh;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    border-radius: 50%;
    color: #333;
    font-size: 24px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    z-index: 10001;
    display: none; /* 默认隐藏 */
    transition: background-color 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    #prevButton:hover,
    #nextButton:hover {
        background-color: rgba(255, 255, 255, 0.8);
    }
}

#prevButton {
    left: 20px;
}

#nextButton {
    right: 20px;
}

#zoomIn {
    bottom: 20px;
    right: 80px; /* 为导航按钮腾出空间 */
}

#zoomOut {
    bottom: 20px;
    right: 20px;
}

.error-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(245, 101, 101, 0.9);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    min-width: 200px;
    max-width: 300px;
    word-break: break-word;
    white-space: normal;
}

.error-toast.show {
    opacity: 1;
}

.error-toast i {
    font-size: 16px;
    margin-right: 0;
}

.success-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(16, 185, 129, 0.9);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    min-width: 200px;
    max-width: 300px;
    word-break: break-word;
    white-space: normal;
}

.success-toast.show {
    opacity: 1;
}

.success-toast i {
    font-size: 16px;
    margin-right: 0;
}

.ai-audit-toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    color: white;
    padding: 20px 32px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 10003;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 15px;
    font-weight: 500;
    min-width: 260px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.ai-audit-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.ai-audit-toast .toast-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.ai-audit-toast .toast-title {
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.5px;
}

.ai-audit-toast .toast-subtitle {
    font-size: 12px;
    opacity: 0.85;
}

.ai-audit-toast.style-tech {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 0 30px rgba(118, 75, 162, 0.3);
}

.ai-audit-toast.style-tech .ai-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    position: relative;
}

.ai-audit-toast.style-tech .ai-icon::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: tech-pulse-ring 2s ease-out infinite;
}

.ai-audit-toast.style-tech .ai-icon::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.15);
    animation: tech-pulse-ring 2s ease-out infinite 0.5s;
}

@keyframes tech-pulse-ring {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.ai-audit-toast.style-tech .tech-animation {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ai-audit-toast.style-tech .tech-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: tech-bounce 1.4s ease-in-out infinite both;
}

.ai-audit-toast.style-tech .tech-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.ai-audit-toast.style-tech .tech-dot:nth-child(2) {
    animation-delay: -0.16s;
}

.ai-audit-toast.style-tech .tech-dot:nth-child(3) {
    animation-delay: 0s;
}

@keyframes tech-bounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    }
}

.ai-audit-toast.style-minimal {
    background: rgba(30, 30, 30, 0.9);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.ai-audit-toast.style-minimal .ai-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    animation: minimal-float 3s ease-in-out infinite;
}

@keyframes minimal-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

.ai-audit-toast.style-minimal .minimal-animation {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 24px;
}

.ai-audit-toast.style-minimal .wave-bar {
    width: 3px;
    background: linear-gradient(to top, #667eea, #764ba2);
    border-radius: 2px;
    animation: minimal-wave 1.2s ease-in-out infinite;
}

.ai-audit-toast.style-minimal .wave-bar:nth-child(1) {
    animation-delay: 0s;
    height: 6px;
}

.ai-audit-toast.style-minimal .wave-bar:nth-child(2) {
    animation-delay: 0.1s;
    height: 12px;
}

.ai-audit-toast.style-minimal .wave-bar:nth-child(3) {
    animation-delay: 0.2s;
    height: 18px;
}

.ai-audit-toast.style-minimal .wave-bar:nth-child(4) {
    animation-delay: 0.3s;
    height: 12px;
}

.ai-audit-toast.style-minimal .wave-bar:nth-child(5) {
    animation-delay: 0.4s;
    height: 6px;
}

@keyframes minimal-wave {
    0%, 100% {
        transform: scaleY(0.4);
        opacity: 0.4;
    }
    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

.ai-audit-toast.style-particle {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    box-shadow: 0 10px 40px rgba(15, 52, 96, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 0 60px rgba(102, 126, 234, 0.2);
}

.ai-audit-toast.style-particle .ai-icon {
    width: 48px;
    height: 48px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.ai-audit-toast.style-particle .particle-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: rgba(102, 126, 234, 0.8);
    border-right-color: rgba(118, 75, 162, 0.6);
    animation: particle-spin 2s linear infinite;
}

.ai-audit-toast.style-particle .particle-ring:nth-child(2) {
    inset: 4px;
    border-top-color: rgba(118, 75, 162, 0.8);
    border-right-color: rgba(102, 126, 234, 0.6);
    animation: particle-spin 1.5s linear infinite reverse;
}

@keyframes particle-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.ai-audit-toast.style-particle .particle-dots {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-audit-toast.style-particle .particle-dot {
    width: 6px;
    height: 6px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    animation: particle-pulse 1s ease-in-out infinite;
}

.ai-audit-toast.style-particle .particle-dot:nth-child(1) {
    animation-delay: 0s;
}

.ai-audit-toast.style-particle .particle-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.ai-audit-toast.style-particle .particle-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes particle-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
        box-shadow: 0 0 5px rgba(102, 126, 234, 0.5);
    }
    50% {
        transform: scale(1.5);
        opacity: 1;
        box-shadow: 0 0 15px rgba(102, 126, 234, 0.8), 0 0 25px rgba(118, 75, 162, 0.6);
    }
}

.ai-audit-toast .ai-icon,
.ai-audit-toast .tech-dot,
.ai-audit-toast .wave-bar,
.ai-audit-toast .particle-dot,
.ai-audit-toast .particle-ring {
    will-change: transform, opacity;
    transform: translateZ(0);
}

@media (prefers-reduced-motion: reduce) {
    .ai-audit-toast .ai-icon,
    .ai-audit-toast .tech-dot,
    .ai-audit-toast .wave-bar,
    .ai-audit-toast .particle-dot,
    .ai-audit-toast .particle-ring,
    .ai-audit-toast .ai-icon::before,
    .ai-audit-toast .ai-icon::after {
        animation: none !important;
    }
}

@media (max-width: 768px) {
    .ai-audit-toast {
        min-width: 200px;
        padding: 16px 24px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .ai-audit-toast .ai-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 18px !important;
    }
}

.audit-result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10004;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.audit-result-modal.show {
    opacity: 1;
    visibility: visible;
}

.audit-result-modal .modal-content {
    background: white;
    padding: 32px 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.audit-result-modal.show .modal-content {
    transform: scale(1);
}

.audit-result-modal .modal-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.audit-result-modal .modal-icon.reject {
    color: #ff4d4f;
}

.audit-result-modal .modal-title {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.audit-result-modal .modal-message {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 24px;
}

.audit-result-modal .modal-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 36px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .audit-result-modal .modal-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    }
}

.audit-result-modal.reject-modal .modal-btn {
    background: linear-gradient(135deg, #ff4d4f 0%, #ff7875 100%);
}

@media (hover: hover) and (pointer: fine) {
    .audit-result-modal.reject-modal .modal-btn:hover {
        box-shadow: 0 8px 20px rgba(255, 77, 79, 0.4);
    }
}

.ai-audit-toast,
.ai-audit-toast.style-tech,
.ai-audit-toast.style-minimal,
.ai-audit-toast.style-particle {
    min-width: 240px;
    padding: 14px 18px;
    color: #151e2f;
    border: 1px solid rgba(230, 234, 240, .95);
    border-radius: 18px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 18px 48px rgba(23, 32, 51, .12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.ai-audit-toast .ai-icon,
.ai-audit-toast.style-particle .ai-icon,
.ai-audit-toast.style-minimal .ai-icon,
.ai-audit-toast.style-tech .ai-icon {
    display: none !important;
}

.ai-audit-toast .ai-icon::before {
    content: 'AI';
    position: static;
    display: inline;
    border: 0;
    color: #4968f2;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0;
    animation: none;
}

.ai-audit-toast .ai-icon::after,
.ai-audit-toast .particle-ring {
    display: none !important;
}

.ai-audit-toast .toast-content {
    justify-content: center;
    gap: 10px;
}

.ai-audit-toast .toast-title {
    color: #151e2f;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0;
}

.ai-audit-toast .particle-dots,
.ai-audit-toast .tech-animation,
.ai-audit-toast .minimal-animation {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 14px;
}

.ai-audit-toast .particle-dot,
.ai-audit-toast .tech-dot,
.ai-audit-toast .wave-bar {
    width: 5px !important;
    height: 5px !important;
    border-radius: 999px;
    background: #4968f2 !important;
    box-shadow: none !important;
    animation: air-audit-dot 1.1s ease-in-out infinite !important;
}

.ai-audit-toast .particle-dot:nth-child(2),
.ai-audit-toast .tech-dot:nth-child(2),
.ai-audit-toast .wave-bar:nth-child(2) {
    animation-delay: .16s !important;
}

.ai-audit-toast .particle-dot:nth-child(3),
.ai-audit-toast .tech-dot:nth-child(3),
.ai-audit-toast .wave-bar:nth-child(3) {
    animation-delay: .32s !important;
}

@keyframes air-audit-dot {
    0%,
    100% {
        transform: translateY(0);
        opacity: .35;
    }
    45% {
        transform: translateY(-4px);
        opacity: 1;
    }
}
