.app-cat-archive-wrapper {
    --primary-color: #4f46e5;
    --primary-light: #818cf8;
    --primary-dark: #3730a3;
    --secondary-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --border-radius: 16px;
    --border-radius-lg: 24px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    padding: 0 0 4rem;
    background: linear-gradient(135deg, var(--gray-50) 0%, #ffffff 100%);
    min-height: 100vh;
    margin-top: -16px;
}

.app-cat-archive-header {
    position: relative;
    margin-bottom: 3rem;
    padding: 3rem 0;
    overflow: hidden;
}

.header-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    opacity: 0.08;
    z-index: 1;
}

.header-background::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0.3;
}

.header-background::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, var(--secondary-color) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0.2;
}

.header-content {
    position: relative;
    z-index: 2;
}

.title-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.title-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.title-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
}

.title-icon:hover::before {
    animation: shimmer 1.5s ease-in-out;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.title-icon i {
    font-size: 28px;
    color: white;
    z-index: 1;
    position: relative;
}

.title-content {
    flex: 1;
}

.page-title {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.title-decoration {
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    animation: expandWidth 1s ease-out 0.5s forwards;
}

@keyframes expandWidth {
    to {
        transform: scaleX(1);
    }
}

.page-description {
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-bottom: 0;
    line-height: 1.6;
}

.highlight-text {
    color: var(--primary-color);
    font-weight: 600;
}

.archive-stats {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 120px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(79, 70, 229, 0.05), transparent);
    transition: all 0.6s ease;
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.stat-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon i {
    font-size: 18px;
    color: white;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
    font-family: 'TCloudNumber';
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 2px;
}

.category-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    position: relative;
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.category-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.category-icon-wrapper {
    position: relative;
    margin-right: 1.25rem;
    flex-shrink: 0;
}

.category-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.category-icon-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    opacity: 0.1;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    z-index: 1;
}

.category-card:hover .category-icon {
    transform: rotate(5deg) scale(1.1);
}

.category-card:hover .category-icon-bg {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.2;
}

.category-icon img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.category-icon i {
    font-size: 26px;
    color: white;
}

.category-info {
    flex: 1;
    min-width: 0;
}

.category-title {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.category-title a {
    color: var(--gray-900);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.title-arrow {
    font-size: 16px;
    color: var(--gray-400);
    transition: all 0.2s ease;
    opacity: 0;
    transform: translateX(-8px);
}

.category-title a:hover {
    color: var(--primary-color);
}

.category-title a:hover .title-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--primary-color);
}

.category-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.meta-item i {
    font-size: 14px;
    color: var(--primary-color);
    width: 14px;
}

.category-description {
    margin-bottom: 1.25rem;
    color: var(--gray-600);
    font-size: 0.9rem;
    line-height: 1.6;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    border-left: 3px solid var(--primary-color);
}

.sub-categories {
    margin-bottom: 1.75rem;
}

.sub-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sub-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.sub-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.sub-item {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    border-radius: 20px;
    text-decoration: none;
    color: var(--gray-700);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.sub-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(79, 70, 229, 0.1), transparent);
    transition: all 0.4s ease;
}

.sub-item:hover::before {
    left: 100%;
}

.sub-item:hover {
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.sub-count {
    margin-left: 0.5rem;
    color: var(--gray-500);
    font-size: 0.8rem;
    font-weight: 600;
}

.popular-apps {
    margin-bottom: 1.75rem;
}

.popular-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.popular-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: linear-gradient(135deg, var(--warning-color), var(--danger-color));
    border-radius: 2px;
}

.app-preview-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.app-preview-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.app-preview-item:hover {
    background: white;
    border-color: var(--primary-color);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.app-thumb,
.app-thumb-placeholder {
    width: 36px;
    height: 36px;
    border-radius: var(--border-radius);
    margin-right: 1rem;
    flex-shrink: 0;
}

.app-thumb-placeholder {
    background: var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-thumb-placeholder i {
    font-size: 18px;
    color: var(--gray-500);
}

.app-info {
    flex: 1;
    min-width: 0;
}

.app-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-700);
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.2s ease;
}

.app-title:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.category-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-stats {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.update-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.update-time i {
    font-size: 12px;
}

.btn-explore {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.btn-explore::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.5s ease;
}

.btn-explore:hover::before {
    left: 100%;
}

.btn-explore:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
    color: white;
}

.btn-explore i {
    transition: transform 0.3s ease;
}

.btn-explore:hover i {
    transform: translateX(4px);
}

.empty-state {
    text-align: center;
    padding: 6rem 2rem;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

.empty-icon {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--gray-200), var(--gray-300));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
}

.empty-icon i {
    font-size: 3rem;
    color: var(--gray-400);
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 1rem;
    color: var(--gray-500);
    margin-bottom: 0;
}

/* 加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.category-card {
    animation: fadeInUp 0.6s ease-out backwards;
}

.category-card:nth-child(1) {
    animation-delay: 0.1s;
}

.category-card:nth-child(2) {
    animation-delay: 0.2s;
}

.category-card:nth-child(3) {
    animation-delay: 0.3s;
}

.category-card:nth-child(4) {
    animation-delay: 0.4s;
}

.category-card:nth-child(5) {
    animation-delay: 0.5s;
}

.category-card:nth-child(6) {
    animation-delay: 0.6s;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .title-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .title-icon {
        align-self: center;
    }

    .archive-stats {
        justify-content: center;
        margin-top: 1.5rem;
    }
}

@media (max-width: 768px) {
    .app-cat-archive-wrapper {
        padding: 1rem 0 2rem;
    }

    .app-cat-archive-header {
        padding: 2rem 0;
        text-align: center;
        margin-bottom: 2rem;
    }

    .title-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .page-title {
        font-size: 2.25rem;
    }

    .archive-stats {
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1.5rem;
        align-items: center;
    }

    .stat-card {
        min-width: 140px;
    }

    .category-card {
        padding: 1.5rem;
    }

    .category-header {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .category-icon-wrapper {
        margin-right: 0;
        margin-bottom: 1rem;
    }

    .category-meta {
        align-items: center;
    }

    .category-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        text-align: center;
    }

    .sub-list {
        justify-content: center;
    }

    .title-decoration {
        display: none;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.875rem;
    }

    .category-card {
        padding: 1.25rem;
    }

    .archive-stats {
        flex-direction: column;
        width: 100%;
    }

    .stat-card {
        width: 100%;
        justify-content: center;
    }

    .app-preview-item {
        padding: 0.5rem;
    }

    .app-thumb,
    .app-thumb-placeholder {
        width: 32px;
        height: 32px;
        margin-right: 0.75rem;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --gray-50: #18181b;
        --gray-100: #27272a;
        --gray-200: #3f3f46;
        --gray-300: #52525b;
        --gray-400: #71717a;
        --gray-500: #a1a1aa;
        --gray-600: #d4d4d8;
        --gray-700: #e4e4e7;
        --gray-800: #f4f4f5;
        --gray-900: #fafafa;
    }

    .app-cat-archive-wrapper {
        background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-50) 100%);
    }
}