* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}
:focus {
    outline: none !important;
}
:root {
    --bg: #f5f7fa;
    --card: #ffffff;
    --text: #333333;
    --muted: #666666;
    --btn-bg: linear-gradient(135deg, #6a11cb 0%, #4f46e5 100%);
    --btn-bg-hover: linear-gradient(135deg, #5a0db3 0%, #4338ca 100%);
    --btn-history: linear-gradient(135deg, #00c853 0%, #00a844 100%);
    --shadow: 0 5px 15px rgba(0,0,0,0.08);
    --radius-lg: 14px;
    --light-blue-text: #1e88e5;
    --accent-color: #6a11cb;
    --accent-glow: rgba(106, 17, 203, 0.10);
}
@media(prefers-color-scheme:dark){
    :root {
        --bg: #0f1720;
        --card: #111216;
        --text: #e6eef8;
        --muted: #aab3c6;
        --btn-bg: linear-gradient(135deg, #3a3fc8 0%, #2a2fb8 100%);
        --btn-bg-hover: linear-gradient(135deg, #2f34b0 0%, #1f24a0 100%);
        --btn-history: linear-gradient(135deg, #00b84a 0%, #00963a 100%);
        --light-blue-text: #64b5f6;
        --accent-color: #8b5cf6;
        --accent-glow: rgba(139, 92, 246, 0.10);
    }
}

body {
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-family: -apple-system,sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background 0.35s ease, color 0.35s ease;
}

body.locked {
    height: 100vh;
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: url("/img/bj.jpg") center/cover no-repeat;
    color: #fff;
    padding: 1.2rem 0;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.08);
    -webkit-user-select: none;
    user-select: none;
}
header h1 {
    font-size: 1.6rem;
    margin-bottom: 4px;
    color: var(--light-blue-text);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    -webkit-user-select: text;
    user-select: text;
}
header .subtitle {
    font-size: 0.85rem;
    opacity: 0.9;
    color: var(--light-blue-text);
    -webkit-user-select: text;
    user-select: text;
}

.search-container {
    margin: 1rem auto;
    max-width: 450px;
    padding: 0 15px;
    position: relative;
}
.search-box {
    width: 100%;
    padding: 10px 20px;
    border: none;
    border-radius: 50px;
    background: rgba(255,255,255,0.95);
    box-shadow: var(--shadow);
    transition: all 0.35s ease;
    -webkit-user-select: text;
    user-select: text;
    font-size: 0.9rem;
    text-align: center;
    color: var(--text);
}
.search-box:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.10);
}
@media (prefers-color-scheme: dark) {
    .search-box {
        background: rgba(255,255,255,0.06);
        color: var(--text);
    }
    .search-box::placeholder {
        color: rgba(255,255,255,0.25);
    }
}

.content-area {
    flex: 1;
}

/* ===== 软件列表 ===== */
.software-list {
    background: var(--card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    overflow: hidden;
    min-height: 300px;
    transition: box-shadow 0.35s ease, background 0.35s ease;
    animation: listFadeIn 0.5s ease;
}
.software-list:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.list-header {
    background: rgba(0,0,0,0.03);
    padding: 12px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    font-weight: 600;
    color: var(--muted);
    font-size: 0.9rem;
    -webkit-user-select: none;
    user-select: none;
    transition: background 0.35s ease, border 0.35s ease, color 0.35s ease;
}
@media (prefers-color-scheme: dark) {
    .list-header {
        background: rgba(255,255,255,0.02);
        border-bottom: 1px solid rgba(255,255,255,0.04);
    }
}

.software-item {
    display: flex;
    align-items: flex-start;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    position: relative;
    overflow: visible;
    animation: fadeInUp 0.4s ease backwards;
    -webkit-user-select: none;
    user-select: none;
    transform: translateZ(0);
    backface-visibility: hidden;
    transition: background 0.3s ease, transform 0.25s ease;
    cursor: pointer;
}
.software-item:hover {
    background: rgba(106, 17, 203, 0.03);
    transform: translateX(4px);
}
@media (prefers-color-scheme: dark) {
    .software-item {
        border-bottom: 1px solid rgba(255,255,255,0.04);
    }
    .software-item:hover {
        background: rgba(139, 92, 246, 0.04);
    }
}

/* ===== 左侧光条 紫→蓝→青 ===== */
.software-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 3.5px;
    background: linear-gradient(180deg, #6a11cb, #3b82f6, #06b6d4);
    border-radius: 0 4px 4px 0;
    transform: scaleY(0);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center;
}
.software-item:hover::before {
    transform: scaleY(1);
}

/* ===== 点击涟漪效果 - 只围绕单个应用 ===== */
.software-item .ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(106, 17, 203, 0.15);
    transform: scale(0);
    animation: rippleItem 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    pointer-events: none;
    will-change: transform, opacity;
}
@media (prefers-color-scheme: dark) {
    .software-item .ripple-effect {
        background: rgba(139, 92, 246, 0.20);
    }
}

@keyframes rippleItem {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* ===== 选中状态 - 边框圈一圈 ===== */
.software-item.active {
    background: var(--accent-glow);
}
.software-item.active::before {
    transform: scaleY(1);
}
.software-item.active .software-details .software-name {
    color: var(--accent-color);
}
/* 圈一圈边框 - 更精致 */
.software-item.active::after {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 12px;
    border: 2px solid transparent;
    background: linear-gradient(135deg, #6a11cb, #3b82f6, #06b6d4, #6a11cb) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderRotate 2.5s linear infinite;
    pointer-events: none;
}
@keyframes borderRotate {
    0% { background: linear-gradient(0deg, #6a11cb, #3b82f6, #06b6d4, #6a11cb) border-box; }
    25% { background: linear-gradient(90deg, #6a11cb, #3b82f6, #06b6d4, #6a11cb) border-box; }
    50% { background: linear-gradient(180deg, #6a11cb, #3b82f6, #06b6d4, #6a11cb) border-box; }
    75% { background: linear-gradient(270deg, #6a11cb, #3b82f6, #06b6d4, #6a11cb) border-box; }
    100% { background: linear-gradient(360deg, #6a11cb, #3b82f6, #06b6d4, #6a11cb) border-box; }
}

/* 选中时图标脉动 */
.software-item.active .software-icon {
    animation: iconPulse 2.5s ease-in-out infinite;
}
@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06) rotate(-2deg); }
}

/* ===== 图标 ===== */
.software-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    margin-right: 14px;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-user-select: none;
    user-select: none;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.4s ease,
                border-radius 0.4s ease;
    will-change: transform;
}
.software-item:hover .software-icon {
    transform: scale(1.06) rotate(-4deg) translateY(-2px);
    box-shadow: 0 8px 28px rgba(106, 17, 203, 0.12);
    border-radius: 16px;
}
.software-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.software-item:hover .software-icon img {
    transform: scale(1.08);
}

.software-details {
    flex: 1;
    min-width: 0;
    padding-top: 2px;
}
.software-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    -webkit-user-select: text;
    user-select: text;
    transition: color 0.3s ease;
}
.software-item:hover .software-name {
    color: var(--accent-color);
}
.software-description {
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.5;
    white-space: normal;
    word-break: break-all;
    overflow: visible;
    -webkit-user-select: text;
    user-select: text;
    transition: color 0.35s ease, opacity 0.35s ease;
    opacity: 0.75;
}
.software-item:hover .software-description {
    opacity: 1;
}

.btn-group {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: 10px;
    flex-shrink: 0;
    align-self: center;
}

.download-btn,
.history-btn {
    color: #fff !important;
    padding: 7px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease,
                filter 0.3s ease;
    position: relative;
    z-index: 2;
    -webkit-user-select: none;
    user-select: none;
    cursor: pointer;
    will-change: transform;
    backface-visibility: hidden;
    letter-spacing: 0.2px;
}
.download-btn {
    background: var(--btn-bg);
    box-shadow: 0 4px 16px rgba(106, 17, 203, 0.18);
}
.history-btn {
    background: var(--btn-history);
    box-shadow: 0 4px 16px rgba(0, 200, 83, 0.18);
}
.download-btn:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 8px 32px rgba(106, 17, 203, 0.28);
    filter: brightness(1.08);
}
.history-btn:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 8px 32px rgba(0, 200, 83, 0.28);
    filter: brightness(1.08);
}
.download-btn:active,
.history-btn:active {
    transform: scale(0.92);
    transition-duration: 0.05s;
}

/* 广告样式 */
.ad-title-label {
    color: red;
    font-weight: 800;
    text-align: center;
    font-size: 0.9rem;
    margin-bottom: 6px;
}
.ad-box {
    background: var(--card);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 8px;
    margin-bottom: 10px;
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: transform 0.35s ease, box-shadow 0.4s ease, background 0.35s ease;
}
.ad-box:hover {
    transform: translateY(-4px) scale(1.005);
    box-shadow: 0 12px 40px rgba(0,0,0,0.10);
}
.ad-img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 6px;
    max-height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.ad-box:hover .ad-img {
    transform: scale(1.01);
}
.ad-title {
    font-weight: 700;
    font-size: 0.85rem;
}
.ad-badge {
    font-size: 0.72rem;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(0,0,0,0.06);
    color: var(--muted);
    display: inline-block;
    margin-top: 4px;
}
.ad-meta {
    font-size: 0.75rem;
    color: var(--muted);
}

/* 历史版本弹窗 */
.h-list {
    max-height: 280px;
    overflow-y: auto;
    padding: 10px 0;
    margin-bottom: 10px;
    scroll-behavior: smooth;
}
.h-list::-webkit-scrollbar {
    width: 4px;
}
.h-list::-webkit-scrollbar-track {
    background: transparent;
}
.h-list::-webkit-scrollbar-thumb {
    background: var(--muted);
    border-radius: 10px;
    opacity: 0.3;
}
.h-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(0,0,0,0.03);
    border-radius: 12px;
    margin-bottom: 8px;
    text-align: left;
    transition: background 0.25s ease, transform 0.2s ease;
}
.h-item:hover {
    background: rgba(106, 17, 203, 0.06);
    transform: translateX(4px);
}
@media (prefers-color-scheme: dark) {
    .h-item {
        background: rgba(255,255,255,0.02);
    }
    .h-item:hover {
        background: rgba(139, 92, 246, 0.06);
    }
}
.h-icon-img {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    flex-shrink: 0;
    object-fit: cover;
}
.h-ver-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.h-v-name {
    font-weight: 700;
    font-size: 0.9rem;
}
.h-v-desc {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 2px;
}
.h-v-date {
    font-size: 0.65rem;
    color: #999;
}
.h-v-btn {
    background: var(--btn-history);
    color: #fff;
    text-decoration: none;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
    transition: transform 0.25s ease, box-shadow 0.3s ease;
}
.h-v-btn:hover {
    transform: scale(1.04) translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 200, 83, 0.20);
}

footer {
    color: #333;
    text-align: center;
    padding: 1.2rem 0;
    font-size: 0.85rem;
    -webkit-user-select: text;
    user-select: text;
    margin-top: auto;
    transition: color 0.35s ease;
}
@media (prefers-color-scheme: dark) {
    footer {
        color: var(--muted);
    }
}

#icp-number a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s;
}
#icp-number a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* 公告弹窗 */
.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-box {
    background: var(--card);
    width: 90%;
    max-width: 360px;
    border-radius: 24px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    animation: scaleIn 0.3s;
    max-height: 80vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: manipulation;
    transition: background 0.35s ease;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: #ff6ab9;
}

.modal-btn {
    display: block;
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    border-radius: 12px;
    background: var(--btn-bg);
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    -webkit-user-select: none;
    user-select: none;
    box-shadow: 0 4px 16px rgba(106,17,203,0.12);
}
.modal-btn:hover {
    transform: scale(1.03) translateY(-2px);
    box-shadow: 0 8px 32px rgba(106,17,203,0.18);
}
.modal-btn:active {
    transform: scale(0.97);
}
.modal-small-btn {
    background: #ff82c7 !important;
    margin-top: 12px !important;
    box-shadow: 0 4px 16px rgba(255,130,199,0.15) !important;
}
.modal-small-btn:hover {
    box-shadow: 0 8px 32px rgba(255,130,199,0.22) !important;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    background: rgba(0,0,0,0.06);
    pointer-events: none;
}
@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ===== 动画 ===== */
@keyframes listFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes scaleIn {
    from { transform: scale(.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.software-item:nth-child(1) { animation-delay: 0.03s; }
.software-item:nth-child(2) { animation-delay: 0.06s; }
.software-item:nth-child(3) { animation-delay: 0.09s; }
.software-item:nth-child(4) { animation-delay: 0.12s; }
.software-item:nth-child(5) { animation-delay: 0.15s; }
.software-item:nth-child(6) { animation-delay: 0.18s; }
.software-item:nth-child(7) { animation-delay: 0.21s; }
.software-item:nth-child(8) { animation-delay: 0.24s; }
.software-item:nth-child(9) { animation-delay: 0.27s; }
.software-item:nth-child(10) { animation-delay: 0.30s; }

@media(max-width:480px) {
    .software-item {
        flex-wrap: wrap;
        padding: 16px 16px;
    }
    .btn-group {
        width: 100%;
        justify-content: flex-end;
        margin-top: 10px;
        margin-left: 0;
    }
    .software-item::before {
        top: 15%;
        bottom: 15%;
        width: 3px;
    }
}

.no-results {
    padding: 60px 20px;
    text-align: center;
    color: var(--muted);
    font-size: 1rem;
}