/* PWA检测工具样式 */

/* Tailwind 自定义工具类 */
@layer utilities {
    .content-auto {
        content-visibility: auto;
    }
    .text-shadow {
        text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    .card-hover {
        @apply transition-all duration-300 hover:shadow-lg hover:-translate-y-1;
    }

    .progress-ring-circle {
        transition: stroke-dashoffset 0.35s;
        transform: rotate(-90deg);
        transform-origin: 50% 50%;
    }
}

/* 模态窗口样式增强 */
dialog::backdrop {
    backdrop-filter: blur(4px);
    background: rgba(0, 0, 0, 0.5);
}

dialog[open] {
    animation: dialogFadeIn 0.3s ease-out;
}

@keyframes dialogFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

#screenshot-preview {
    animation: imageSlideIn 0.4s ease-out;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

@keyframes imageSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 截图时优化样式 */
.screenshot-optimization {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif !important;
    letter-spacing: normal !important;
    line-height: 1.5 !important;
    text-rendering: optimizeLegibility !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* 骨架屏样式 */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
    border-radius: 4px;
}

.skeleton-title {
    height: 1.5em;
    width: 60%;
    margin-bottom: 1em;
    border-radius: 4px;
}

.skeleton-card {
    height: 120px;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* 渐进式显示动画 */
.progressive-show {
    animation: progressiveFadeIn 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes progressiveFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 分阶段延迟 */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* 隐私相关样式 */
.prose {
    color: #374151;
    line-height: 1.75;
}

.prose h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #111827;
}

.prose h5 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
}

.prose ul {
    margin-bottom: 1rem;
    padding-left: 1.25rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

/* 切换开关样式优化 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 隐藏滚动条 */
::-webkit-scrollbar {
    display: none;
}
