/* 衍星软件工作室 PatchStar - 前台自定义样式 */

/* 玻璃拟态效果 */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-light {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ===== Hero Carousel ===== */

#hero-carousel .hero-slide {
    will-change: opacity;
}

#hero-carousel .hero-slide.active {
    position: relative;
}

/* ===== 浅色系 Hero — 白底 + 柔和彩色光晕 ===== */

.gradient-hero {
    background:
        radial-gradient(ellipse 70% 60% at 15% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 70%),
        radial-gradient(ellipse 60% 70% at 80% 50%, rgba(139, 92, 246, 0.12) 0%, transparent 70%),
        radial-gradient(ellipse 50% 50% at 50% 95%, rgba(6, 182, 212, 0.08) 0%, transparent 70%),
        linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.gradient-hero-warm {
    background:
        radial-gradient(ellipse 65% 60% at 20% 25%, rgba(139, 92, 246, 0.14) 0%, transparent 70%),
        radial-gradient(ellipse 55% 55% at 75% 45%, rgba(244, 114, 182, 0.10) 0%, transparent 70%),
        radial-gradient(ellipse 50% 50% at 40% 90%, rgba(59, 130, 246, 0.08) 0%, transparent 70%),
        linear-gradient(180deg, #faf5ff 0%, #ffffff 100%);
}

.gradient-hero-tech {
    background:
        radial-gradient(ellipse 70% 60% at 25% 20%, rgba(99, 102, 241, 0.16) 0%, transparent 70%),
        radial-gradient(ellipse 55% 55% at 80% 45%, rgba(168, 85, 247, 0.10) 0%, transparent 70%),
        radial-gradient(ellipse 50% 50% at 45% 85%, rgba(59, 130, 246, 0.08) 0%, transparent 70%),
        linear-gradient(180deg, #eef2ff 0%, #ffffff 100%);
}

.gradient-hero-cooperation {
    background:
        radial-gradient(ellipse 65% 60% at 15% 25%, rgba(20, 184, 166, 0.14) 0%, transparent 70%),
        radial-gradient(ellipse 55% 60% at 80% 40%, rgba(59, 130, 246, 0.10) 0%, transparent 70%),
        radial-gradient(ellipse 50% 50% at 50% 90%, rgba(16, 185, 129, 0.08) 0%, transparent 70%),
        linear-gradient(180deg, #f0fdfa 0%, #ffffff 100%);
}

/* 更新日志折叠面板 */
.changelog-details summary {
    list-style: none;
}
.changelog-details summary::-webkit-details-marker {
    display: none;
}
.changelog-details[open] .changelog-chevron {
    transform: rotate(90deg);
}

.gradient-blue {
    background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
}

.gradient-text {
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 动画 */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-delay-100 { animation-delay: 0.1s; }
.animate-delay-200 { animation-delay: 0.2s; }
.animate-delay-300 { animation-delay: 0.3s; }
.animate-delay-400 { animation-delay: 0.4s; }

@keyframes studio-spin {
    to { transform: rotate(360deg); }
}
.studio-icon-spin {
    animation: studio-spin 1s linear infinite;
}

/* 文章详情 API 注入的 HTML */
.article-html-content {
    color: #334155;
    line-height: 1.75;
    font-size: 0.9375rem;
}
.article-html-content h1 { font-size: 1.5rem; font-weight: 800; margin: 1.5rem 0 0.75rem; color: #0f172a; }
.article-html-content h2 { font-size: 1.25rem; font-weight: 700; margin: 1.25rem 0 0.5rem; color: #0f172a; }
.article-html-content h3 { font-size: 1.05rem; font-weight: 600; margin: 1rem 0 0.5rem; }
.article-html-content p { margin-bottom: 1rem; }
.article-html-content ul, .article-html-content ol { margin: 0.5rem 0 1rem 1.25rem; }
.article-html-content a { color: #2563eb; text-decoration: underline; text-underline-offset: 2px; }
.article-html-content img { max-width: 100%; height: auto; border-radius: 0.75rem; margin: 1rem 0; }
.article-html-content pre, .article-html-content code { font-size: 0.875rem; }
.article-html-content pre { overflow-x: auto; padding: 1rem; border-radius: 0.75rem; background: #f1f5f9; margin: 1rem 0; }

/* 列表卡片摘要截断（本地 Tailwind 未必含 line-clamp） */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 卡片悬浮效果 */
.card-hover {
    transition: all 0.3s ease;
}
.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* 隐藏滚动条 */
html { overflow-y: auto; }
html::-webkit-scrollbar { display: none; }
html { -ms-overflow-style: none; scrollbar-width: none; }


/* 可滚动区域隐藏滚动条（如横向表格） */
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

/* 定价表推荐列高亮 */
.pricing-col-recommended {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.85), 0 25px 50px -12px rgba(30, 64, 175, 0.35);
    border-radius: 1rem;
    position: relative;
    z-index: 1;
}

/* FileArk 预览舞台 */
.fileark-preview-stage {
    width: 100%;
    max-width: 54rem;
    margin: 0 auto;
}

.fileark-preview-stack {
    position: relative;
    aspect-ratio: 16 / 10;
    min-height: 19rem;
    isolation: isolate;
}

.fileark-preview-card {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0;
    border-radius: 1.75rem;
    overflow: hidden;
    text-align: left;
    font: inherit;
    appearance: none;
    -webkit-appearance: none;
    transition:
        transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.6s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.45s ease,
        clip-path 0.6s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.35s ease;
    will-change: transform;
}

.fileark-preview-card:focus-visible {
    outline: 3px solid rgba(59, 130, 246, 0.45);
    outline-offset: 4px;
}

.fileark-preview-card.theme-light {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 28px 60px rgba(148, 163, 184, 0.22);
}

.fileark-preview-card.theme-dark {
    background: #020617;
    border: 1px solid rgba(51, 65, 85, 0.95);
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.32);
}

.fileark-preview-stack[data-active="white"] .fileark-preview-card[data-shot="white"],
.fileark-preview-stack[data-active="black"] .fileark-preview-card[data-shot="black"] {
    z-index: 2;
    transform: translate3d(0, 0, 0) rotate(-1.2deg) scale(1);
    clip-path: inset(0 round 1.75rem);
    cursor: zoom-in;
}

.fileark-preview-stack[data-active="black"] .fileark-preview-card[data-shot="black"] {
    transform: translate3d(0, 0, 0) rotate(1.1deg) scale(1);
}

.fileark-preview-stack[data-active="white"] .fileark-preview-card[data-shot="black"] {
    z-index: 1;
    transform: translate3d(13%, 7%, 0) rotate(5deg) scale(0.93);
    clip-path: inset(8% 0 0 24% round 1.75rem);
    filter: saturate(0.92);
    cursor: pointer;
}

.fileark-preview-stack[data-active="black"] .fileark-preview-card[data-shot="white"] {
    z-index: 1;
    transform: translate3d(-13%, 7%, 0) rotate(-5deg) scale(0.93);
    clip-path: inset(8% 24% 0 0 round 1.75rem);
    filter: saturate(0.92);
    cursor: pointer;
}

.fileark-preview-stack[data-active="white"] .fileark-preview-card[data-shot="black"]::after,
.fileark-preview-stack[data-active="black"] .fileark-preview-card[data-shot="white"]::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.02) 0%, rgba(15, 23, 42, 0.18) 100%);
    pointer-events: none;
}

.fileark-preview-topbar {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-height: 2.5rem;
    padding: 0 1rem;
    border-bottom: 1px solid transparent;
}

.fileark-preview-card.theme-light .fileark-preview-topbar {
    background: rgba(248, 250, 252, 0.98);
    border-bottom-color: rgba(226, 232, 240, 0.95);
}

.fileark-preview-card.theme-dark .fileark-preview-topbar {
    background: rgba(15, 23, 42, 0.96);
    border-bottom-color: rgba(51, 65, 85, 0.95);
}

.fileark-preview-dots {
    display: inline-flex;
    gap: 0.25rem;
}

.fileark-preview-dots span {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
}

.fileark-preview-window-title {
    font-size: 0.78rem;
    line-height: 1;
}

.fileark-preview-card.theme-light .fileark-preview-window-title {
    color: #64748b;
}

.fileark-preview-card.theme-dark .fileark-preview-window-title {
    color: #94a3b8;
}

.fileark-preview-image-wrap {
    position: relative;
    flex: 1;
    overflow: hidden;
}

.fileark-preview-card.theme-light .fileark-preview-image-wrap {
    background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
}

.fileark-preview-card.theme-dark .fileark-preview-image-wrap {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
}

.fileark-preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.fileark-preview-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1rem 1rem;
    position: relative;
    z-index: 1;
}

.fileark-preview-card.theme-light .fileark-preview-footer {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.98));
    color: #0f172a;
}

.fileark-preview-card.theme-dark .fileark-preview-footer {
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.98));
    color: #f8fafc;
}

.fileark-preview-footer strong,
.fileark-preview-footer em,
.fileark-preview-action span {
    display: block;
}

.fileark-preview-footer strong {
    font-size: 0.95rem;
    font-weight: 700;
    font-style: normal;
}

.fileark-preview-footer em {
    margin-top: 0.2rem;
    font-size: 0.76rem;
    font-style: normal;
    opacity: 0.68;
}

.fileark-preview-action {
    flex-shrink: 0;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.fileark-preview-card.theme-light .fileark-preview-action {
    background: rgba(59, 130, 246, 0.09);
    color: #2563eb;
}

.fileark-preview-card.theme-dark .fileark-preview-action {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

.fileark-preview-action-active {
    display: none;
}

.fileark-preview-action-inactive {
    display: none;
}

.fileark-preview-stack[data-active="white"] .fileark-preview-card[data-shot="white"] .fileark-preview-action-active,
.fileark-preview-stack[data-active="black"] .fileark-preview-card[data-shot="black"] .fileark-preview-action-active,
.fileark-preview-stack[data-active="white"] .fileark-preview-card[data-shot="black"] .fileark-preview-action-inactive,
.fileark-preview-stack[data-active="black"] .fileark-preview-card[data-shot="white"] .fileark-preview-action-inactive {
    display: block;
}

@media (max-width: 1023px) {
    .fileark-preview-stack {
        min-height: 16rem;
    }

    .fileark-preview-stack[data-active="white"] .fileark-preview-card[data-shot="black"] {
        transform: translate3d(10%, 7%, 0) rotate(4deg) scale(0.92);
        clip-path: inset(12% 0 0 20% round 1.5rem);
    }

    .fileark-preview-stack[data-active="black"] .fileark-preview-card[data-shot="white"] {
        transform: translate3d(-10%, 7%, 0) rotate(-4deg) scale(0.92);
        clip-path: inset(12% 20% 0 0 round 1.5rem);
    }
}

@media (max-width: 640px) {
    .fileark-preview-stack {
        min-height: 13rem;
    }

    .fileark-preview-card {
        border-radius: 1.2rem;
    }

    .fileark-preview-stack[data-active="white"] .fileark-preview-card[data-shot="white"],
    .fileark-preview-stack[data-active="black"] .fileark-preview-card[data-shot="black"] {
        clip-path: inset(0 round 1.2rem);
    }

    .fileark-preview-stack[data-active="white"] .fileark-preview-card[data-shot="black"] {
        transform: translate3d(8%, 7%, 0) rotate(3deg) scale(0.9);
        clip-path: inset(16% 0 0 18% round 1.2rem);
    }

    .fileark-preview-stack[data-active="black"] .fileark-preview-card[data-shot="white"] {
        transform: translate3d(-8%, 7%, 0) rotate(-3deg) scale(0.9);
        clip-path: inset(16% 18% 0 0 round 1.2rem);
    }

    .fileark-preview-topbar {
        min-height: 2.15rem;
        padding: 0 0.8rem;
    }

    .fileark-preview-footer {
        padding: 0.75rem 0.8rem 0.8rem;
    }

    .fileark-preview-footer strong {
        font-size: 0.85rem;
    }

    .fileark-preview-footer em,
    .fileark-preview-action {
        font-size: 0.68rem;
    }
}

/* 图标内联 */
.icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
}

/* 字体栈 */
body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
body::-webkit-scrollbar {
    display: none;
}
