/* =========================================================
   CodePup 官网首页专属样式 (cp-* 类名)
   与 fig-page / fig-home-page 体系共存，仅覆盖首页新区域
   ========================================================= */

/* 重置现有 fig-home-page 对 main 的窄版约束，让 Hero 可以全宽 */
.fig-home-page .fig-home-main {
    width: 100%;
    max-width: 100%;
    padding-top: 0;
}

.fig-home-page .fig-home-footer {
    width: 100%;
    max-width: 100%;
    margin-top: 0;
    height: auto;
    border-top: 1px solid #E0E8F2;
    background: #FFFFFF;
}

/* ---------- 通用按钮 ---------- */
.cp-btn-primary,
.cp-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 28px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.cp-btn-primary {
    background: #2563EB;
    color: #FFFFFF;
    box-shadow: 0 12px 28px -10px rgba(37, 99, 235, 0.45);
}

.cp-btn-primary:hover {
    background: #1D4ED8;
    transform: translateY(-1px);
}

.cp-btn-secondary {
    background: #FFFFFF;
    color: #2563EB;
    border: 1px solid #BFDBFE;
    box-shadow: 0 4px 14px -8px rgba(37, 99, 235, 0.25);
}

.cp-btn-secondary:hover {
    background: #EFF6FF;
    transform: translateY(-1px);
}

/* ---------- 区块标题 ---------- */
.cp-section-head {
    text-align: center;
    margin-bottom: 48px;
}

.cp-section-head-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    text-align: left;
}

.cp-section-head-row > div {
    text-align: left;
}

.cp-section-label {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 14px;
    border-radius: 14px;
    background: #EFF6FF;
    color: #2563EB;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
}

.cp-section-head h2 {
    margin: 0;
    color: #111827;
    font-size: 34px;
    font-weight: 800;
    line-height: 44px;
    letter-spacing: -0.02em;
}

.cp-section-head p {
    margin: 10px 0 0;
    color: #6B7280;
    font-size: 16px;
    line-height: 26px;
}

.cp-link-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 20px;
    border-radius: 10px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    color: #2563EB;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: background .12s ease;
}

.cp-link-more:hover {
    background: #F8FAFC;
}

/* ---------- Hero ---------- */
.cp-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #FFFFFF 0%, #F0F6FF 100%);
    border-bottom: 1px solid #E0E8F2;
}

.cp-hero::before {
    content: "";
    position: absolute;
    right: -10%;
    top: -20%;
    width: 70%;
    height: 140%;
    background: radial-gradient(circle at 70% 30%, rgba(37, 99, 235, 0.10) 0%, transparent 60%);
    pointer-events: none;
}

.cp-hero-inner {
    position: relative;
    width: min(1200px, calc(100% - 64px));
    margin: 0 auto;
    padding: 92px 0 100px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 56px;
    align-items: center;
}

.cp-hero-left {
    max-width: 620px;
}

.cp-hero-badge {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 16px;
    border-radius: 16px;
    background: #FFFFFF;
    border: 1px solid #BFDBFE;
    color: #2563EB;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 22px;
}

.cp-hero-left h1 {
    margin: 0;
    color: #111827;
    font-size: 56px;
    font-weight: 800;
    line-height: 68px;
    letter-spacing: -0.03em;
}

.cp-hero-subtitle {
    margin: 20px 0 0;
    color: #4B5563;
    font-size: 18px;
    line-height: 30px;
}

.cp-hero-actions {
    display: flex;
    gap: 16px;
    margin-top: 34px;
    flex-wrap: wrap;
}

.cp-hero-stats {
    display: flex;
    gap: 36px;
    margin-top: 44px;
    flex-wrap: wrap;
}

.cp-stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cp-stat-item strong {
    color: #111827;
    font-size: 30px;
    font-weight: 800;
    line-height: 38px;
    letter-spacing: -0.02em;
}

.cp-stat-item span {
    color: #6B7280;
    font-size: 14px;
    font-weight: 500;
}

/* Hero 右侧推荐卡片 */
.cp-hero-right {
    display: flex;
    justify-content: flex-end;
}

.cp-hero-card {
    width: 100%;
    max-width: 440px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 18px;
    box-shadow: var(--cf-white-surface-shadow);
    padding: 22px;
}

.cp-hero-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.cp-hero-card-head strong {
    color: #111827;
    font-size: 17px;
    font-weight: 800;
}

.cp-hero-card-head span {
    color: #2563EB;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    background: #EFF6FF;
    border-radius: 12px;
}

.cp-hero-card-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cp-hero-card-row {
    display: grid;
    grid-template-columns: 26px 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    background: #FFFFFF;
    transition: border-color .12s ease, box-shadow .12s ease;
}

.cp-hero-card-row:hover {
    border-color: #BFDBFE;
    box-shadow: var(--cf-white-surface-shadow-hover);
}

.cp-hero-rank {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #F3F4F6;
    color: #4B5563;
    font-size: 13px;
    font-weight: 700;
}

.cp-hero-card-row:nth-child(1) .cp-hero-rank {
    background: #EFF6FF;
    color: #2563EB;
}

.cp-hero-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #EFF6FF;
    border: 1px solid #DBEAFE;
    color: #2563EB;
    font-size: 12px;
    font-weight: 800;
}

.cp-hero-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cp-hero-info strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #111827;
    font-size: 14px;
    font-weight: 700;
}

.cp-hero-info em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #6B7280;
    font-size: 12px;
    font-style: normal;
}

.cp-hero-card-row b {
    color: #111827;
    font-size: 12px;
    font-weight: 600;
}

/* ---------- 功能特性 ---------- */
.cp-features {
    width: min(1200px, calc(100% - 64px));
    margin: 96px auto 0;
}

.cp-feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.cp-feature-card {
    background: var(--cf-white-surface-bg);
    border: 1px solid var(--cf-white-surface-border);
    border-radius: 16px;
    padding: 28px;
    box-shadow: var(--cf-white-surface-shadow);
    transition: transform .12s ease, box-shadow .12s ease;
}

.cp-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--cf-white-surface-shadow-hover);
}

.cp-feature-icon {
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    margin-bottom: 20px;
}

.cp-feature-icon svg {
    width: 26px;
    height: 26px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cp-icon-blue  { background: #EFF6FF; color: #2563EB; }
.cp-icon-green { background: #ECFDF5; color: #059669; }
.cp-icon-purple{ background: #F5F3FF; color: #7C3AED; }
.cp-icon-orange{ background: #FFF7ED; color: #EA580C; }

.cp-feature-card h3 {
    margin: 0;
    color: #111827;
    font-size: 18px;
    font-weight: 800;
    line-height: 26px;
}

.cp-feature-card p {
    margin: 10px 0 0;
    color: #6B7280;
    font-size: 14px;
    line-height: 23px;
}

/* ---------- 热门脚本 ---------- */
.cp-hot-scripts {
    width: min(1200px, calc(100% - 64px));
    margin: 110px auto 0;
}

/* 复用 fig-home-card-grid 但适配新容器宽度 */
.cp-hot-scripts .fig-home-card-grid {
    width: 100%;
    margin: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.cp-hot-scripts .fig-home-script-card {
    width: 100%;
    max-width: none;
    height: 188px;
}

/* ---------- 使用步骤 ---------- */
.cp-steps {
    width: min(1200px, calc(100% - 64px));
    margin: 110px auto 0;
}

.cp-step-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.cp-step-card {
    position: relative;
    background: var(--cf-white-surface-bg);
    border: 1px solid var(--cf-white-surface-border);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--cf-white-surface-shadow);
}

.cp-step-num {
    position: absolute;
    right: 24px;
    top: 24px;
    color: #E5E7EB;
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
}

.cp-step-card h3 {
    margin: 0;
    color: #111827;
    font-size: 20px;
    font-weight: 800;
    line-height: 28px;
}

.cp-step-card p {
    margin: 12px 0 0;
    color: #6B7280;
    font-size: 15px;
    line-height: 25px;
}

.cp-step-card a {
    display: inline-flex;
    margin-top: 20px;
    color: #2563EB;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

.cp-step-card a:hover {
    text-decoration: underline;
}

/* ---------- CTA ---------- */
.cp-cta {
    width: min(1200px, calc(100% - 64px));
    margin: 110px auto 96px;
}

.cp-cta-inner {
    background: linear-gradient(135deg, #1E40AF 0%, #2563EB 100%);
    border-radius: 24px;
    padding: 72px 48px;
    text-align: center;
    color: #FFFFFF;
    box-shadow: 0 28px 70px -28px rgba(37, 99, 235, 0.45);
}

.cp-cta-inner h2 {
    margin: 0;
    font-size: 34px;
    font-weight: 800;
    line-height: 44px;
    letter-spacing: -0.02em;
}

.cp-cta-inner p {
    margin: 14px auto 0;
    max-width: 560px;
    font-size: 17px;
    line-height: 28px;
    opacity: 0.92;
}

.cp-cta-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.cp-cta-actions .cp-btn-secondary {
    border-color: rgba(255, 255, 255, 0.5);
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.12);
}

.cp-cta-actions .cp-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* ---------- Footer（官网风格增强） ---------- */
.fig-home-footer-inner {
    width: min(1200px, calc(100% - 64px));
    margin: 0 auto;
    padding: 48px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.fig-home-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fig-home-footer-brand strong {
    color: #111827;
    font-size: 18px;
    font-weight: 800;
}

.fig-home-footer-brand span {
    color: #6B7280;
    font-size: 14px;
}

.fig-home-footer-links {
    display: flex;
    gap: 28px;
}

.fig-home-footer-links a {
    color: #4B5563;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color .12s ease;
}

.fig-home-footer-links a:hover {
    color: #2563EB;
}

.fig-home-footer-copy {
    width: 100%;
    margin: 24px 0 0;
    padding-top: 24px;
    border-top: 1px solid #E5E7EB;
    color: #9CA3AF;
    font-size: 13px;
    text-align: center;
}

/* =========================================================
   脚本列表页 Tab 与单行列表样式
   ========================================================= */

.cf-tabs {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    background: #F1F5F9;
    border-radius: 10px;
    margin-top: 12px;
}

.cf-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 16px;
    border-radius: 8px;
    color: #64748B;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all .12s ease;
    position: relative;
}

.cf-tab:hover {
    color: #0F172A;
    background: #FFFFFF;
}

.cf-tab-active {
    color: #FFFFFF;
    background: #2563EB;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25);
}

.cf-tab-active::after {
    display: none;
}

.cf-tab-active:hover {
    color: #FFFFFF;
    background: #1D4ED8;
}

.cf-script-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.cf-script-line {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    transition: all .12s ease;
}

.cf-script-line:hover {
    border-color: #BFDBFE;
    box-shadow: 0 4px 12px -4px rgba(37, 99, 235, 0.12);
}

.cf-line-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 56px;
    flex-shrink: 0;
}

.cf-line-left:has(.cf-line-category-left) {
    gap: 6px;
}

.cf-line-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #EFF6FF;
    border: 1px solid #DBEAFE;
    color: #2563EB;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.cf-line-category-left {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 56px;
    height: 20px;
    padding: 0 7px;
    border-radius: 10px;
    background: #F1F5F9;
    color: #475569;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cf-line-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cf-line-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    line-height: 20px;
}

.cf-line-title {
    color: #0F172A;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: color .12s ease;
}

.cf-line-title:hover {
    color: #2563EB;
}

.cf-line-author {
    color: #64748B;
    font-size: 12px;
    font-weight: 500;
}


.cf-line-tag {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    background: #EFF6FF;
    color: #2563EB;
    font-size: 12px;
    line-height: 22px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.cf-line-tag + .cf-line-tag {
    margin-left: 0;
}

.cf-line-tags {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
    overflow: hidden;
    flex-wrap: wrap;
}

.cf-line-desc {
    margin: 0;
    color: #64748B;
    font-size: 13px;
    line-height: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cf-line-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.cf-line-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #64748B;
    font-size: 12px;
    font-weight: 500;
}

.cf-line-stat svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cf-line-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    gap: 8px;
    border: 0;
    border-radius: 0;
    overflow: visible;
    background: transparent;
}

.cf-line-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 34px;
    padding: 0;
    border: 1px solid #D7E2F2;
    border-radius: 9px;
    background: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .12s ease;
    white-space: nowrap;
}

.cf-line-btn:last-child {
    border-right: 1px solid #D7E2F2;
}

.cf-line-btn-primary {
    border-color: #2563EB;
    background: #2563EB;
    color: #FFFFFF;
}

.cf-line-btn-primary:hover {
    background: #1D4ED8;
}

.cf-line-btn-secondary {
    background: #FFFFFF;
    color: #475569;
}

.cf-line-btn-secondary:hover:not(:disabled) {
    background: #F8FAFC;
    color: #0F172A;
}

.cf-line-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.cf-line-actions .cf-line-btn.cf-line-btn-secondary.uninstall-btn:hover:not(:disabled) {
    background: #FEF2F2;
    color: #DC2626;
}

.cf-scripts-page .cf-empty-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 48px 24px;
    margin-top: 24px;
    background: #FFFFFF;
    border: 1px dashed #E2E8F0;
    border-radius: 14px;
    box-shadow: var(--cf-white-surface-shadow);
    text-align: center;
}

.cf-scripts-page .cf-empty-icon {
    font-size: 36px;
    line-height: 1;
    margin-bottom: 4px;
}

.cf-scripts-page .cf-empty-card strong {
    color: #0F172A;
    font-size: 16px;
    font-weight: 700;
}

.cf-scripts-page .cf-empty-card p {
    margin: 0;
    color: #64748B;
    font-size: 13px;
    line-height: 20px;
}

.cf-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 16px;
    border-radius: 8px;
    background: #2563EB;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background .12s ease;
    margin-top: 8px;
}

.cf-btn-primary:hover {
    background: #1D4ED8;
}

.cf-search-result {
    margin-top: 16px;
    color: #64748B;
    font-size: 13px;
}

.cf-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
    color: #64748B;
    font-size: 13px;
}

.cf-shell .cf-pagination {
    display: flex;
}

.cf-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 14px;
    border-radius: 8px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    color: #475569;
    text-decoration: none;
    font-weight: 600;
    transition: all .12s ease;
}

.cf-pagination a:hover {
    border-color: #BFDBFE;
    color: #2563EB;
}

.cf-pagination .cf-page-disabled {
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    background: #F8FAFC;
    color: #A1AEC0;
    font-weight: 600;
    cursor: not-allowed;
}

.cf-page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 28px;
}

.cf-page-number,
.cf-page-current,
.cf-page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

.cf-page-number {
    border: 1px solid #E2E8F0;
    background: #FFFFFF;
    color: #475569;
    text-decoration: none;
    transition: all .12s ease;
}

.cf-page-number:hover {
    border-color: #BFDBFE;
    background: #EFF6FF;
    color: #2563EB;
}

.cf-page-current {
    border: 1px solid #2563EB;
    background: #2563EB;
    color: #FFFFFF;
}

.cf-page-ellipsis {
    color: #94A3B8;
}

.cf-scripts-page .cf-content {
    width: 100%;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 24px;
}

.cf-scripts-page .cf-main {
    width: 100%;
    margin-left: 0;
}

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 1180px) {
    .cp-hero-inner {
        grid-template-columns: 1fr;
        padding: 64px 0 72px;
        gap: 40px;
    }

    .cp-hero-right {
        justify-content: flex-start;
    }

    .cp-hero-card {
        max-width: 100%;
    }

    .cp-feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cp-hot-scripts .fig-home-card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .cp-step-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 860px) {
    .cp-hero-left h1 {
        font-size: 40px;
        line-height: 52px;
    }

    .cp-hero-subtitle {
        font-size: 16px;
        line-height: 26px;
    }

    .cp-hero-stats {
        gap: 24px;
    }

    .cp-stat-item strong {
        font-size: 24px;
        line-height: 32px;
    }

    .cp-feature-grid {
        grid-template-columns: 1fr;
    }

    .cp-hot-scripts .fig-home-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .cp-hot-scripts .fig-home-script-card {
        height: 200px;
    }

    .cp-step-grid {
        grid-template-columns: 1fr;
    }

    .cp-section-head h2,
    .cp-cta-inner h2 {
        font-size: 28px;
        line-height: 38px;
    }

    .cp-section-head-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }

    .cp-cta-inner {
        padding: 48px 28px;
    }

    .fig-home-footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 720px) {
    .cf-script-line {
        align-items: flex-start;
        gap: 12px;
        padding: 12px;
    }

    .cf-line-actions {
        flex-direction: column;
        border: 0;
        border-radius: 8px;
        gap: 4px;
        width: auto;
        min-width: 64px;
        background: transparent;
    }

    .cf-line-actions .cf-line-btn {
        width: 64px;
        height: 28px;
        padding: 0;
        font-size: 12px;
        border: 1px solid #E2E8F0;
        border-radius: 6px;
    }

    .cf-tabs {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        justify-content: flex-start;
    }

    .cf-tab {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 0 14px;
    }
}

@media (max-width: 600px) {
    .cp-hero-inner,
    .cp-features,
    .cp-hot-scripts,
    .cp-steps,
    .cp-cta {
        width: calc(100% - 32px);
    }

    .cp-hero-actions {
        flex-direction: column;
    }

    .cp-btn-primary,
    .cp-btn-secondary {
        width: 100%;
    }

    .cp-hot-scripts .fig-home-card-grid {
        grid-template-columns: 1fr;
    }

    .cp-hot-scripts .fig-home-script-card {
        height: auto;
        min-height: 180px;
    }

    .fig-home-footer-inner {
        padding: 32px 0;
    }

    .fig-home-footer-links {
        flex-wrap: wrap;
        gap: 16px;
    }
}

/* =========================================================
   Scripts page compact polish
   ========================================================= */
.cf-scripts-page {
    background: #FFFFFF;
}

body:has(.cf-scripts-page) {
    background: #FFFFFF;
}

.cf-scripts-page::before {
    display: none;
}

.cf-scripts-page .cf-content {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 78px 24px 48px;
}

.cf-scripts-page .cf-main {
    width: 100%;
    margin-left: 0;
}

.cf-scripts-page .cf-page-header {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    box-sizing: border-box;
    margin-bottom: 0;
    border: 1px solid rgba(226, 232, 240, 0.74);
    border-radius: 18px;
    position: fixed;
    top: 12px;
    left: 50%;
    z-index: 1000;
    width: min(calc(100% - 64px), 1200px);
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(12px);
    box-shadow: 0 16px 34px -28px rgba(15, 23, 42, 0.42);
}

.cf-scripts-page .cf-hero-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
    text-decoration: none;
    color: inherit;
    grid-column: 1;
    grid-row: 1;
}

.cf-scripts-page .cf-hero-mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 13px;
    box-shadow: 0 8px 18px -12px rgba(15, 23, 42, 0.55);
}

.cf-scripts-page .cf-hero-brand strong {
    font-size: 17px;
    font-weight: 700;
    color: #0F172A;
}

.cf-scripts-page .cf-command-center {
    position: sticky;
    top: 73px;
    z-index: 90;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0 10px;
    margin: 0 0 10px;
    background: transparent;
    backdrop-filter: none;
    flex-wrap: wrap;
}

.cf-tab-publish-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 34px;
    padding: 0 16px;
    border-radius: 999px;
    background: linear-gradient(180deg, #2F6DF3 0%, #2563EB 100%);
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 20px -14px rgba(37, 99, 235, 0.85);
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
    flex-shrink: 0;
    margin-left: auto;
}

.cf-tab-publish-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.cf-tab-publish-btn:hover {
    background: linear-gradient(180deg, #2563EB 0%, #1D4ED8 100%);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px -12px rgba(37, 99, 235, 0.9);
}

.cf-scripts-page .cf-header-search {
    position: relative;
    width: 100%;
    max-width: 360px;
    height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 5px 0 42px;
    margin: 0 auto;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 999px;
    box-shadow: 0 8px 20px -10px rgba(37, 99, 235, 0.12),
                0 3px 6px -3px rgba(15, 23, 42, 0.06);
    transition: box-shadow 0.2s, border-color 0.2s;
    grid-column: 2;
    grid-row: 1;
}

.cf-scripts-page .cf-header-search:hover {
    border-color: #BFDBFE;
    box-shadow: 0 10px 24px -10px rgba(37, 99, 235, 0.16),
                0 4px 8px -3px rgba(15, 23, 42, 0.08);
}

.cf-scripts-page .cf-header-search:focus-within {
    border-color: #93C5FD;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08),
                0 10px 24px -10px rgba(37, 99, 235, 0.14);
}

.cf-scripts-page .cf-header-search .cf-search-icon {
    position: absolute;
    left: 16px;
    width: 18px;
    height: 18px;
    color: #94A3B8;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    flex-shrink: 0;
}

.cf-scripts-page .cf-header-search input {
    flex: 1;
    min-width: 0;
    height: 34px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #0F172A;
    font-size: 14px;
    line-height: 20px;
}

.cf-scripts-page .cf-header-search input::placeholder {
    color: #94A3B8;
}

.cf-scripts-page .cf-header-search button {
    height: 34px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: #2563EB;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 10px -4px rgba(37, 99, 235, 0.45);
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
}

.cf-scripts-page .cf-header-search button:hover {
    background: #1D4ED8;
    box-shadow: 0 6px 14px -4px rgba(37, 99, 235, 0.55);
}

.cf-scripts-page .cf-top-nav {
    display: inline-flex;
    grid-column: 3;
    grid-row: 1;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.cf-scripts-page .cf-top-nav-item {
    position: relative;
    height: auto;
    padding: 6px 12px;
    border-radius: 6px;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    background: transparent;
    transition: color 0.2s ease, background 0.2s ease;
}

.cf-scripts-page .cf-top-nav-item:hover {
    color: #0F172A;
    background: #F1F5F9;
}

.cf-scripts-page .cf-top-nav-item-active,
.cf-scripts-page .cf-top-nav-item-active:hover {
    color: #2563EB;
    background: transparent;
    box-shadow: none;
}

.cf-scripts-page .cf-top-nav-item-active::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 12px;
    right: 12px;
    height: 2px;
    border-radius: 2px;
    background: #2563EB;
}

.cf-scripts-page .cf-auth-entry {
    grid-column: 4;
    grid-row: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    justify-self: end;
}

.cf-scripts-page .cf-login-button {
    height: 34px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: #0F172A;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.cf-scripts-page .cf-user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cf-scripts-page .cf-user-button {
    max-width: 150px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px 0 4px;
    border: 1px solid #E2E8F0;
    border-radius: 999px;
    background: #FFFFFF;
    color: #0F172A;
    cursor: default;
    font: inherit;
}

.cf-scripts-page .cf-user-avatar {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
    background: #EFF6FF;
    color: #2563EB;
    font-size: 13px;
    font-weight: 800;
    flex: 0 0 auto;
}

.cf-scripts-page .cf-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cf-scripts-page .cf-user-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
}

.cf-scripts-page .cf-logout-button {
    height: 30px;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    background: #F1F5F9;
    color: #64748B;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.cf-scripts-page .cf-tabs {
    width: auto;
    max-width: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 2px 0 0;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    backdrop-filter: blur(14px);
}

.cf-scripts-page .cf-tab {
    min-width: 104px;
    height: 34px;
    padding: 0 16px;
    border-radius: 999px;
    color: #52627A;
    font-size: 14px;
    font-weight: 700;
}

.cf-scripts-page .cf-tab:hover {
    color: #1E40AF;
    background: #EFF6FF;
}

.cf-scripts-page .cf-tab-active,
.cf-scripts-page .cf-tab-active:hover {
    color: #FFFFFF;
    background: linear-gradient(180deg, #2F6DF3 0%, #2563EB 100%);
    box-shadow: 0 10px 20px -14px rgba(37, 99, 235, 0.85);
}

.cf-scripts-page .cf-list-layout {
    display: grid;
    grid-template-columns: 158px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.cf-scripts-page .cf-category-panel {
    position: sticky;
    top: 132px;
    z-index: 60;
}

.cf-scripts-page .cf-category-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 7px;
    border: 1px solid #DDE7F3;
    border-radius: 14px;
    background: #FFFFFF;
    box-shadow: var(--cf-white-surface-shadow);
}

.cf-scripts-page .cf-category-item {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 9px;
    border-radius: 10px;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.cf-scripts-page .cf-category-item:hover {
    color: #1D4ED8;
    background: #EFF6FF;
}

.cf-scripts-page .cf-category-item-active,
.cf-scripts-page .cf-category-item-active:hover {
    color: #FFFFFF;
    background: #2563EB;
}

.cf-scripts-page .cf-category-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 8px;
    background: #F1F5F9;
    color: #2563EB;
    font-size: 12px;
    font-weight: 800;
}

.cf-scripts-page .cf-category-item-active .cf-category-icon {
    background: rgba(255, 255, 255, 0.18);
    color: #FFFFFF;
}

.cf-scripts-page .cf-scripts-pane {
    min-width: 0;
}

.cf-scripts-page .cf-script-carousel {
    position: relative;
    height: 340px;
    margin: 12px 0 10px;
    overflow: visible;
    background: transparent;
    border: 0;
    box-shadow: none;
    perspective: 1200px;
    padding: 24px 58px 36px;
    box-sizing: border-box;
}

.cf-scripts-page .cf-carousel-stage {
    position: relative;
    width: 100%;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 20px;
    transform-style: preserve-3d;
}

.cf-scripts-page .cf-carousel-track {
    position: relative;
    width: min(100%, 1040px);
    height: 280px;
    display: flex;
    flex-direction: row;
    align-items: center;
    transition: transform .5s cubic-bezier(.22, .61, .36, 1);
    animation: none;
}

.cf-scripts-page .cf-carousel-slide {
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding: 46px 260px 46px 44px;
    overflow: hidden;
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 20px;
    background:
        linear-gradient(110deg, rgba(15, 23, 42, 0.92) 0%, rgba(37, 99, 235, 0.88) 56%, rgba(14, 165, 233, 0.82) 100%);
    box-shadow:
        0 25px 60px -20px rgba(37, 99, 235, 0.35),
        0 10px 24px -12px rgba(15, 23, 42, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transform: scale(0.86) translateZ(-40px);
    opacity: 0.45;
    transition: transform .5s cubic-bezier(.22, .61, .36, 1), opacity .5s ease;
}

.cf-scripts-page .cf-carousel-slide.active {
    transform: scale(1) translateZ(0);
    opacity: 1;
    z-index: 2;
}

.cf-scripts-page .cf-carousel-slide:not(.active) {
    pointer-events: none;
}

.cf-scripts-page .cf-carousel-slide:nth-child(2) {
    background:
        linear-gradient(110deg, rgba(30, 64, 175, 0.94) 0%, rgba(5, 150, 105, 0.86) 100%);
}

.cf-scripts-page .cf-carousel-slide:nth-child(3) {
    background:
        linear-gradient(110deg, rgba(15, 23, 42, 0.92) 0%, rgba(124, 58, 237, 0.82) 56%, rgba(236, 72, 153, 0.78) 100%);
}

.cf-scripts-page .cf-carousel-slide::after {
    content: "";
    position: absolute;
    right: 54px;
    top: 54px;
    width: 180px;
    height: 138px;
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.32));
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.4),
        0 22px 36px -24px rgba(15, 23, 42, 0.45);
    transform: rotate(-5deg);
}

.cf-scripts-page .cf-carousel-kicker {
    width: fit-content;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.88);
    font-size: 12px;
    font-weight: 800;
    line-height: 18px;
}

.cf-scripts-page .cf-carousel-slide strong {
    max-width: 620px;
    color: #FFFFFF;
    font-size: 28px;
    font-weight: 800;
    line-height: 38px;
}

.cf-scripts-page .cf-carousel-slide em {
    max-width: 620px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 15px;
    font-style: normal;
    font-weight: 600;
    line-height: 24px;
}

.cf-scripts-page .cf-carousel-dots {
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    display: flex;
    gap: 7px;
}

.cf-scripts-page .cf-carousel-dots span {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.25);
    cursor: pointer;
    transition: width .2s ease, background .2s ease;
}

.cf-scripts-page .cf-carousel-dots span.active {
    width: 22px;
    background: #2563EB;
}

.cf-scripts-page .cf-carousel-arrow {
    position: absolute;
    top: calc(24px + 140px);
    transform: translateY(-50%);
    z-index: 5;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: #FFFFFF;
    color: #2563EB;
    box-shadow: 0 8px 22px -8px rgba(15, 23, 42, 0.28);
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease, opacity .12s ease;
}

.cf-scripts-page .cf-carousel-arrow:hover {
    transform: translateY(-50%) scale(1.06);
    box-shadow: 0 12px 28px -8px rgba(37, 99, 235, 0.28);
    background: #F8FAFF;
}

.cf-scripts-page .cf-carousel-arrow.prev {
    left: 8px;
}

.cf-scripts-page .cf-carousel-arrow.next {
    right: 8px;
}

.cf-scripts-page .cf-carousel-arrow:active {
    transform: translateY(-50%) scale(0.96);
}

.cf-scripts-page .cf-carousel-arrow svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2.2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- 轮播图第一张：平台数据概览 ---------- */
.cf-scripts-page .cf-carousel-overview {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 46px 54px 46px 44px;
    background:
        radial-gradient(circle at 78% 30%, rgba(59, 130, 246, 0.35) 0%, transparent 45%),
        linear-gradient(110deg, rgba(15, 23, 42, 0.94) 0%, rgba(37, 99, 235, 0.90) 56%, rgba(14, 165, 233, 0.84) 100%);
}

.cf-scripts-page .cf-carousel-overview::after {
    display: none;
}

.cf-overview-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 12% 84%, rgba(99, 102, 241, 0.25) 0%, transparent 35%),
        radial-gradient(circle at 92% 80%, rgba(56, 189, 248, 0.22) 0%, transparent 32%);
}

.cf-overview-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 26px;
    max-width: 520px;
}

.cf-overview-head {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cf-overview-head .cf-carousel-kicker {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.cf-overview-head strong {
    font-size: 30px;
    line-height: 40px;
}

.cf-overview-head em {
    max-width: 420px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 15px;
    font-style: normal;
    line-height: 24px;
}

.cf-overview-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.cf-overview-stat {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(6px);
    transition: transform .12s ease, background .12s ease;
}

.cf-overview-stat:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-2px);
}

.cf-overview-stat strong {
    color: #FFFFFF;
    font-size: 26px;
    font-weight: 800;
    line-height: 34px;
    letter-spacing: -0.02em;
}

.cf-overview-stat span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    font-weight: 600;
}

.cf-overview-chart {
    position: relative;
    z-index: 1;
    width: 240px;
    height: 140px;
    flex-shrink: 0;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.cf-chart-line {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.9;
}

.cf-chart-dot {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
    animation: cfChartDot 2.4s ease-in-out infinite;
    animation-delay: calc(var(--d) * 0.18s);
}

@keyframes cfChartDot {
    0%, 100% {
        transform: scale(1);
        opacity: 0.85;
    }
    50% {
        transform: scale(1.45);
        opacity: 1;
    }
}

.cf-scripts-page .cf-script-list {
    gap: 12px;
    margin-top: 0;
}

.cf-scripts-page .cf-script-line {
    min-height: 128px;
    align-items: center;
    gap: 18px;
    padding: 18px 18px 18px 16px;
    border-color: #DDE7F3;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--cf-white-surface-shadow);
}

.cf-scripts-page .cf-script-line:hover {
    transform: translateY(-1px);
    border-color: #B9D3FF;
    box-shadow: var(--cf-white-surface-shadow-hover);
}

.cf-scripts-page .cf-line-left {
    width: 64px;
}

.cf-scripts-page .cf-line-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(180deg, #EFF6FF 0%, #E4F0FF 100%);
    border-color: #CFE0FF;
    font-size: 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.cf-scripts-page .cf-line-category-left {
    display: none;
}

.cf-scripts-page .cf-line-title-row {
    gap: 9px;
}

.cf-scripts-page .cf-line-title {
    font-size: 16px;
    line-height: 22px;
}

.cf-scripts-page .cf-line-desc {
    max-width: 760px;
    color: #52627A;
    font-size: 14px;
    line-height: 22px;
}

.cf-scripts-page .cf-line-main {
    gap: 6px;
}

.cf-scripts-page .cf-line-tags {
    max-width: 760px;
}

.cf-scripts-page .cf-line-tag:hover {
    background: #DBEAFE;
    color: #1D4ED8;
}

.cf-scripts-page .cf-line-meta {
    gap: 14px;
}

.cf-scripts-page .cf-line-stat {
    color: #52627A;
    font-size: 13px;
}

.cf-scripts-page .cf-line-actions {
    width: 76px;
    box-shadow: none;
}

.cf-scripts-page .cf-line-btn {
    width: 76px;
    height: 36px;
    padding: 0;
    font-size: 14px;
}

.cf-scripts-page .cf-line-btn-primary {
    background: #2563EB;
}

.cf-scripts-page .cf-line-btn-primary:hover {
    background: #1D4ED8;
}

.cf-scripts-page .cf-search-result {
    margin: 6px 0 12px;
    text-align: center;
}

.cf-scripts-page .cf-page-footer {
    margin-top: 28px;
}

@media (max-width: 900px) {
    .cf-scripts-page .cf-content {
        width: 100%;
        padding: 132px 16px 36px;
    }

    .cf-scripts-page .cf-page-header {
        grid-template-columns: 1fr auto;
        gap: 12px;
        padding: 14px 16px;
        top: 12px;
        width: calc(100% - 32px);
    }

    .cf-scripts-page .cf-header-search {
        grid-column: 1 / -1;
        max-width: none;
        height: 46px;
    }

    .cf-scripts-page .cf-auth-entry {
        grid-column: 2;
        grid-row: 1;
    }

    .cf-scripts-page .cf-user-name,
    .cf-scripts-page .cf-logout-button {
        display: none;
    }

    .cf-scripts-page .cf-hero-brand strong {
        font-size: 16px;
    }

    .cf-scripts-page .cf-top-nav {
        justify-content: flex-end;
        flex: 0 1 auto;
        min-width: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .cf-scripts-page .cf-command-center {
        gap: 10px;
        padding-top: 12px;
        top: auto;
        position: relative;
        background: transparent;
        backdrop-filter: none;
    }

    .cf-scripts-page .cf-top-nav,
    .cf-scripts-page .cf-tabs {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .cf-scripts-page .cf-top-nav-item,
    .cf-scripts-page .cf-tab {
        white-space: nowrap;
        flex: 0 0 auto;
    }

    .cf-scripts-page .cf-list-layout {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .cf-scripts-page .cf-category-panel {
        position: relative;
        top: auto;
        z-index: 1;
    }

    .cf-scripts-page .cf-category-nav {
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .cf-scripts-page .cf-category-item {
        white-space: nowrap;
        flex: 0 0 auto;
    }

    .cf-scripts-page .cf-script-carousel {
        height: 300px;
        padding: 24px 44px 34px;
    }

    .cf-scripts-page .cf-carousel-stage {
        height: 220px;
    }

    .cf-scripts-page .cf-carousel-track {
        width: 96%;
        height: 220px;
    }

    .cf-scripts-page .cf-carousel-slide {
        padding: 20px 24px;
    }

    .cf-scripts-page .cf-carousel-slide::after {
        display: none;
    }

    .cf-scripts-page .cf-carousel-slide strong {
        max-width: none;
        font-size: 20px;
        line-height: 28px;
    }

    .cf-scripts-page .cf-carousel-slide em {
        max-width: none;
    }

    .cf-scripts-page .cf-carousel-overview {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
        padding: 24px;
    }

    .cf-overview-content {
        max-width: none;
        width: 100%;
        gap: 14px;
    }

    .cf-overview-head strong {
        font-size: 20px;
        line-height: 28px;
    }

    .cf-overview-head em {
        font-size: 13px;
        line-height: 20px;
    }

    .cf-overview-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .cf-overview-stat {
        padding: 12px 10px;
    }

    .cf-overview-stat strong {
        font-size: 18px;
        line-height: 26px;
    }

    .cf-overview-chart {
        display: none;
    }

    .cf-scripts-page .cf-carousel-arrow {
        width: 38px;
        height: 38px;
        top: calc(24px + 110px);
    }

    .cf-scripts-page .cf-carousel-arrow svg {
        width: 16px;
        height: 16px;
    }

    .cf-scripts-page .cf-carousel-arrow.prev {
        left: 4px;
    }

    .cf-scripts-page .cf-carousel-arrow.next {
        right: 4px;
    }
}

@media (max-width: 720px) {
    .cf-scripts-page .cf-script-carousel {
        height: 292px;
        padding: 24px 38px 34px;
    }

    .cf-scripts-page .cf-carousel-stage {
        height: 210px;
    }

    .cf-scripts-page .cf-carousel-track {
        width: 96%;
        height: 210px;
    }

    .cf-scripts-page .cf-carousel-slide {
        padding: 22px 20px;
        border-radius: 16px;
    }

    .cf-scripts-page .cf-carousel-slide strong {
        font-size: 18px;
        line-height: 26px;
    }

    .cf-scripts-page .cf-carousel-slide em {
        font-size: 13px;
        line-height: 20px;
    }

    .cf-scripts-page .cf-carousel-dots {
        bottom: 8px;
    }

    .cf-scripts-page .cf-carousel-arrow {
        width: 34px;
        height: 34px;
        top: calc(24px + 105px);
    }

    .cf-scripts-page .cf-carousel-arrow svg {
        width: 15px;
        height: 15px;
    }

    .cf-scripts-page .cf-carousel-arrow.prev {
        left: 2px;
    }

    .cf-scripts-page .cf-carousel-arrow.next {
        right: 2px;
    }

    .cf-scripts-page .cf-carousel-overview {
        padding: 22px 20px;
        gap: 14px;
    }

    .cf-overview-head strong {
        font-size: 18px;
        line-height: 26px;
    }

    .cf-overview-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .cf-overview-stat {
        padding: 10px 8px;
        gap: 4px;
    }

    .cf-overview-stat strong {
        font-size: 16px;
        line-height: 22px;
    }

    .cf-overview-stat span {
        font-size: 11px;
    }
}

@keyframes cfCarousel {
    0%, 28% {
        transform: translateX(0);
    }
    33%, 61% {
        transform: translateX(-33.3333%);
    }
    66%, 94% {
        transform: translateX(-66.6666%);
    }
    100% {
        transform: translateX(0);
    }
}

@media (max-width: 720px) {
    .cf-scripts-page .cf-script-line {
        min-height: 142px;
        align-items: flex-start;
        gap: 12px;
        padding: 14px;
    }

    .cf-scripts-page .cf-line-left {
        width: 54px;
    }

    .cf-scripts-page .cf-line-icon {
        width: 46px;
        height: 46px;
    }

    .cf-scripts-page .cf-line-actions {
        width: 66px;
        gap: 6px;
        box-shadow: none;
    }

    .cf-scripts-page .cf-line-actions .cf-line-btn {
        width: 66px;
        height: 30px;
        padding: 0;
        font-size: 12px;
    }
}

/* Scripts pagination polish */
.cf-scripts-page .cf-pagination {
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-top: 18px;
    padding: 16px 18px;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.9), rgba(255, 255, 255, 0.98));
    box-shadow: var(--cf-white-surface-shadow);
}

.cf-scripts-page .cf-page-header {
    background: var(--cf-white-surface-bg);
    border-color: var(--cf-white-surface-border);
    box-shadow: var(--cf-white-surface-shadow);
}

.cf-scripts-page .cf-pagination-meta,
.cf-scripts-page .cf-pagination-size,
.cf-scripts-page .cf-pagination-pages {
    display: flex;
    align-items: center;
}

.cf-scripts-page .cf-pagination-meta {
    flex-wrap: wrap;
    gap: 14px;
    min-width: 0;
    color: #64748B;
    font-size: 13px;
}

.cf-scripts-page .cf-pagination-total strong {
    color: #2563EB;
    font-weight: 800;
}

.cf-scripts-page .cf-pagination-size {
    gap: 8px;
}

.cf-scripts-page .cf-pagination-size label {
    white-space: nowrap;
}

.cf-scripts-page .cf-pagination-size select {
    height: 34px;
    width: 68px;
    min-width: 68px;
    flex: 0 0 68px;
    padding: 0 28px 0 10px;
    border: 1px solid #D8E1EE;
    border-radius: 8px;
    background-color: #FFFFFF;
    color: #0F172A;
    font-size: 13px;
    font-weight: 700;
    line-height: 32px;
    text-align: left;
}

.cf-scripts-page .cf-pagination-size select option {
    color: #0F172A;
    background: #FFFFFF;
}

.cf-scripts-page .cf-pagination-pages {
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
}

.cf-scripts-page .cf-pagination-pages a,
.cf-scripts-page .cf-pagination-pages span {
    width: 36px;
    min-width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1;
}

.cf-scripts-page .cf-pagination-pages a {
    border: 1px solid #D8E1EE;
    background: #FFFFFF;
    color: #334155;
}

.cf-scripts-page .cf-pagination-pages a:hover:not(.cf-page-disabled) {
    border-color: #93C5FD;
    background: #EFF6FF;
    color: #2563EB;
}

.cf-scripts-page .cf-pagination-pages .cf-page-current {
    border: 1px solid #2563EB;
    background: #2563EB;
    color: #FFFFFF;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
}

.cf-scripts-page .cf-pagination-pages .cf-page-ellipsis {
    border: 0;
    background: transparent;
    color: #64748B;
}

.cf-scripts-page .cf-pagination-pages .cf-page-step,
.cf-scripts-page .cf-pagination-pages .cf-page-edge {
    color: #475569;
}

.cf-scripts-page .cf-pagination-pages .cf-page-step svg,
.cf-scripts-page .cf-pagination-pages .cf-page-edge svg {
    width: 17px;
    height: 17px;
}

.cf-scripts-page .cf-pagination-pages .cf-page-disabled {
    border-color: #E2E8F0;
    background: #F8FAFC;
    color: #CBD5E1;
    box-shadow: none;
}

@media (max-width: 820px) {
    .cf-scripts-page .cf-pagination {
        align-items: stretch;
        flex-direction: column;
        padding: 14px;
    }

    .cf-scripts-page .cf-pagination-meta {
        justify-content: space-between;
    }

    .cf-scripts-page .cf-pagination-pages {
        justify-content: center;
    }
}
