/* ==================== 下载页面独立样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", "PingFang SC", sans-serif;
}
html { scroll-behavior: smooth; }
body {
    color: #333;
    background-color: #f5f7fa;
    overflow-x: hidden;
}

/* 导航栏复用主页风格 */
.header-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    background-color: rgba(44, 62, 80, 0.95);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}
.logo img { height: 50px; }
.nav-menu {
    display: flex;
    list-style: none;
}
.nav-menu li { margin-left: 30px; }
.nav-menu li a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s ease;
}
.nav-menu li a:hover,
.nav-menu li a.active {
    color: #3498db;
}
.mobile-nav-btn {
    display: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

/* 滚动动画 */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* 下载页面主内容区 */
.download-section {
    padding: 150px 20px 100px;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}
.section-title h2 {
    font-size: 36px;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 700;
}
.section-title p {
    font-size: 16px;
    color: #7f8c8d;
    line-height: 1.6;
}

.download-container {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.download-category {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 35px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.category-header i {
    font-size: 36px;
    color: #3498db;
}

.category-header h3 {
    font-size: 28px;
    color: #2c3e50;
    font-weight: 700;
    margin: 0;
}

.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 30px;
}

.software-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border: 1px solid #e9ecef;
    border-radius: 16px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.software-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #3498db 0%, #2980b9 100%);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.software-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(52, 152, 219, 0.15);
    border-color: #3498db;
}

.software-card:hover::before {
    transform: scaleX(1);
}

.software-icon {
    width: 80px;
    height: 80px;
    background: #fff;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.software-icon img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.software-info h4 {
    font-size: 20px;
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 10px;
}

.software-desc {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    margin: 0;
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    border-left: 3px solid #3498db;
}

.software-downloads {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.download-item {
    flex: 1;
    min-width: 100px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.download-item:hover {
    background: #3498db;
    border-color: #3498db;
}

.download-item i {
    font-size: 18px;
    color: #3498db;
    transition: color 0.3s ease;
}

.download-item a,
.download-item span {
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.download-item:hover i,
.download-item:hover a,
.download-item:hover span {
    color: #fff;
}

/* 二维码悬浮弹窗 */
.qr-hover {
    position: relative;
}

.qr-popup {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    min-width: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qr-hover:hover .qr-popup {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-10px);
}

.qr-popup img {
    width: 130px;
    height: 130px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.qr-popup p {
    font-size: 12px;
    color: #7f8c8d;
    margin: 0;
}

.software-tutorial {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px dashed #e9ecef;
}

.software-tutorial a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #e74c3c;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.software-tutorial a:hover {
    color: #c0392b;
}

.software-tutorial a i {
    font-size: 18px;
}

/* 在线编程卡片特殊样式 */
.online-card {
    background: linear-gradient(135deg, #e3f2fd 0%, #fff 100%);
}

.online-card::before {
    background: linear-gradient(90deg, #27ae60 0%, #2ecc71 100%);
}

.online-card .download-item:hover {
    background: #27ae60;
    border-color: #27ae60;
}

.online-card .download-item i {
    color: #27ae60;
}

/* 页脚复用主页风格 */
.footer {
    background-color: #2c3e50;
    color: #fff;
    padding: 80px 20px 20px;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}
.footer-logo img {
    height: 60px;
    margin-bottom: 15px;
}
.footer-logo p {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.8;
}
.footer-links h4 {
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
}
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}
.footer-links a:hover { opacity: 1; }
.footer-contact p {
    font-size: 15px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    opacity: 0.8;
}
.footer-contact i {
    margin-right: 10px;
    font-size: 16px;
}
.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    opacity: 0.7;
}

/* ==================== 响应式适配 ==================== */
@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 250px;
        height: 100vh;
        background-color: #2c3e50;
        flex-direction: column;
        padding: 80px 20px;
        transition: right 0.3s ease;
    }
    .nav-menu.active { right: 0; }
    .nav-menu li { margin: 15px 0; }
    .mobile-nav-btn { display: block; }
    .software-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

@media (max-width: 768px) {
    .section-title h2 { font-size: 28px; }
    .download-category { padding: 25px; }
    .software-grid { grid-template-columns: 1fr; }
    .category-header h3 { font-size: 24px; }
}

@media (max-width: 576px) {
    .download-section { padding: 120px 15px 80px; }
    .download-category { padding: 20px; }
    .software-card { padding: 20px; }
}