/* ============================================
   精致 Apple 风格 - 远程协助软件下载页
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.4);
}

/* 基础样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f8f9fc;
    min-height: 100vh;
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
}

/* 背景装饰 - 柔和光晕 */
body::before {
    content: '';
    position: fixed;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: drift 15s ease-in-out infinite;
}

body::after {
    content: '';
    position: fixed;
    bottom: -15%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: drift 18s ease-in-out infinite reverse;
}

@keyframes drift {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-30px, 20px); }
}

.container {
    max-width: 1060px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 36px 28px 0;
    position: relative;
    z-index: 1;
}

/* ============================================
   卡片区域 - 上下结构
   ============================================ */
.cards-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.software-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid #e8ecf2;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    position: relative;
    opacity: 0;
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.software-card:nth-child(1) { animation-delay: 0.06s; }
.software-card:nth-child(2) { animation-delay: 0.12s; }
.software-card:nth-child(3) { animation-delay: 0.18s; }
.software-card:nth-child(4) { animation-delay: 0.24s; }

@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.software-card::before {
    display: none;
}

.software-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.software-card:nth-child(1):hover { border-color: rgba(99, 102, 241, 0.25); }
.software-card:nth-child(2):hover { border-color: rgba(245, 158, 11, 0.25); }
.software-card:nth-child(3):hover { border-color: rgba(16, 185, 129, 0.25); }
.software-card:nth-child(4):hover { border-color: rgba(236, 72, 153, 0.25); }

/* 卡片封面 - 顶部通栏 */
.card-image {
    width: 100%;
    height: 110px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    transition: background 0.3s ease;
}

.software-card:nth-child(1) .card-image { background: #f0f1fe; }
.software-card:nth-child(2) .card-image { background: #fef9ec; }
.software-card:nth-child(3) .card-image { background: #eefbf4; }
.software-card:nth-child(4) .card-image { background: #fef0f7; }

.software-card:nth-child(1):hover .card-image { background: #e8e9fd; }
.software-card:nth-child(2):hover .card-image { background: #fdf4d8; }
.software-card:nth-child(3):hover .card-image { background: #dff5e9; }
.software-card:nth-child(4):hover .card-image { background: #fde4f0; }

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.06));
}

.software-card:hover .card-image img {
    transform: scale(1.08);
}

/* 卡片文字 - 居中 */
.card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    flex: 1;
    padding: 18px 20px 20px;
}

.card-content::before {
    display: none;
}

.card-content h3 {
    display: none;
}

.card-content p {
    font-size: 0.78rem;
    color: #64748b;
    margin-bottom: 10px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
}

/* 标签 - 右上角浮动徽章 */
.user-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-block;
    padding: 5px 14px;
    border-radius: 100px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
    z-index: 2;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.software-card:nth-child(1) .user-tag.domestic {
    background: rgba(238, 242, 255, 0.85);
    color: #6366f1;
}
.software-card:nth-child(2) .user-tag.domestic {
    background: rgba(255, 251, 235, 0.85);
    color: #d97706;
}
.software-card:nth-child(3) .user-tag.both {
    background: rgba(236, 253, 245, 0.85);
    color: #059669;
}
.software-card:nth-child(4) .user-tag.both {
    background: rgba(253, 242, 248, 0.85);
    color: #db2777;
}

.user-tag.international {
    background: rgba(254, 242, 242, 0.85);
    color: #ef4444;
}

/* 下载按钮 */
.download-btn {
    display: block;
    width: 100%;
    padding: 10px 0;
    color: white;
    text-align: center;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.3px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
    cursor: pointer;
}

.software-card:nth-child(1) .download-btn {
    background: #6366f1;
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.3);
}
.software-card:nth-child(2) .download-btn {
    background: #f59e0b;
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.3);
}
.software-card:nth-child(3) .download-btn {
    background: #10b981;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.3);
}
.software-card:nth-child(4) .download-btn {
    background: #ec4899;
    box-shadow: 0 3px 10px rgba(236, 72, 153, 0.3);
}

.software-card:nth-child(1):hover .download-btn {
    background: #4f46e5;
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.4);
}
.software-card:nth-child(2):hover .download-btn {
    background: #d97706;
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.4);
}
.software-card:nth-child(3):hover .download-btn {
    background: #059669;
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}
.software-card:nth-child(4):hover .download-btn {
    background: #db2777;
    box-shadow: 0 6px 18px rgba(236, 72, 153, 0.4);
}

/* 官网链接 */
.official-link {
    display: block;
    width: 100%;
    padding: 7px 0;
    text-align: center;
    font-size: 0.72rem;
    color: #64748b;
    text-decoration: none;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: #f8fafc;
    position: relative;
    overflow: hidden;
}

.software-card:nth-child(1) .official-link {
    border-color: #c7d2fe;
    color: #6366f1;
}
.software-card:nth-child(2) .official-link {
    border-color: #fde68a;
    color: #d97706;
}
.software-card:nth-child(3) .official-link {
    border-color: #a7f3d0;
    color: #059669;
}
.software-card:nth-child(4) .official-link {
    border-color: #fbcfe8;
    color: #db2777;
}

.software-card:nth-child(1) .official-link:hover {
    background: #eef2ff;
    border-color: #a5b4fc;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.12);
}
.software-card:nth-child(2) .official-link:hover {
    background: #fffbeb;
    border-color: #fcd34d;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.12);
}
.software-card:nth-child(3) .official-link:hover {
    background: #ecfdf5;
    border-color: #6ee7b7;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.12);
}
.software-card:nth-child(4) .official-link:hover {
    background: #fdf2f8;
    border-color: #f9a8d4;
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.12);
}

/* 按钮并排 */
.card-actions {
    display: flex;
    flex-direction: row-reverse;
    gap: 8px;
    width: 100%;
    margin-top: 14px;
}

.card-actions .download-btn,
.card-actions .official-link {
    flex: 1;
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 6px;
    font-size: 0.8rem;
    border-radius: 10px;
}

.card-actions .download-btn:hover {
    transform: translateY(-1px);
}

.card-actions .official-link:hover {
    transform: translateY(-1px);
}

/* 按钮图标 */
.btn-icon {
    width: 1em;
    height: 1em;
    vertical-align: middle;
    display: inline-block;
    transition: transform 0.2s ease;
}

.download-btn .btn-icon {
    margin-right: 4px;
}

.official-link .btn-icon {
    margin-left: 3px;
}

.official-link:hover .btn-icon {
    transform: translate(1px, -1px);
}

/* ============================================
   常用链接区域
   ============================================ */
.other-links {
    background: #ffffff;
    border-radius: 16px;
    padding: 22px 26px;
    border: 1px solid #e8ecf2;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
    opacity: 0;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

.other-links h2 {
    text-align: center;
    font-size: 0.92rem;
    color: #475569;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.link-item {
    text-align: center;
}

.link-item a {
    display: block;
    padding: 11px 4px;
    background: #f5f6f8;
    color: #475569;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.78rem;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.link-item a:hover {
    background: #6366f1;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
    transform: translateY(-2px);
}

.link-item .special-link {
    color: #ef4444;
    font-weight: 600;
}

.link-item .special-link:hover {
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

/* ============================================
   页脚
   ============================================ */
.footer {
    text-align: center;
    padding: 18px 0 14px;
    margin-top: auto;
    flex-shrink: 0;
    opacity: 0;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

.footer p {
    font-size: 0.72rem;
    color: #94a3b8;
    letter-spacing: 0.3px;
}

/* ============================================
   响应式设计
   ============================================ */
@media (max-width: 768px) {
    body {
        overflow: auto;
    }

    body::before,
    body::after {
        display: none;
    }

    .container {
        height: auto;
        overflow: visible;
        padding: 24px 16px 0;
    }

    .cards-container {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .card-image {
        height: 100px;
        padding: 20px;
    }

    .card-content {
        padding: 16px 18px 18px;
    }

    .links-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .link-item a {
        padding: 10px 2px;
        font-size: 0.75rem;
    }

    .other-links {
        padding: 18px 16px;
    }
}

@media (max-width: 480px) {
    .card-image {
        height: 88px;
        padding: 16px;
    }

    .card-content p {
        font-size: 0.76rem;
    }

    .download-btn {
        padding: 9px 0;
        font-size: 0.78rem;
    }

    .official-link {
        padding: 6px 0;
        font-size: 0.68rem;
    }

    .links-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .link-item a {
        padding: 9px 2px;
        font-size: 0.73rem;
    }

    .other-links h2 {
        font-size: 0.85rem;
    }
}