/* ==================== 下载页面独立样式 ==================== */
* {
    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;
    animation: iconPulse 3s infinite ease-in-out;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.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);
    transition: transform 0.3s ease;
}

.software-icon img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.software-card:hover .software-icon {
    transform: scale(1.08) rotate(2deg);
}

.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: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.download-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 100%;
    padding: 12px 15px;
    text-decoration: none;
    color: #2c3e50;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.25s ease;
}

.download-item:hover {
    background: #3498db;
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.2);
}

.download-item:hover a {
    color: #fff;
}

.download-item i {
    font-size: 18px;
    color: #3498db;
    transition: color 0.25s ease;
}

.download-item:hover i {
    color: #fff;
}

.download-item.qr-hover {
    overflow: visible !important;
    cursor: default !important;
}

.download-item.qr-hover > i,
.download-item.qr-hover > span {
    position: relative;
    z-index: 1;
    padding: 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #2c3e50;
    font-size: 14px;
    font-weight: 500;
}

.download-item.qr-hover:hover {
    background: #fff !important;
    border-color: #e9ecef !important;
    transform: none !important;
    box-shadow: none !important;
}
.download-item.qr-hover:hover > i {
    color: #3498db !important;
}
.download-item.qr-hover:hover > span {
    color: #2c3e50 !important;
}

.download-item.qr-hover .qr-popup {
    position: absolute !important;
    bottom: calc(100% + 15px) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: #ffffff !important;
    padding: 15px !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    z-index: 99999 !important;
    min-width: 180px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.download-item.qr-hover:hover .qr-popup {
    opacity: 1 !important;
    visibility: visible !important;
    bottom: calc(100% + 10px) !important;
}

.download-item.qr-hover .qr-popup img {
    width: 140px !important;
    height: 140px !important;
    border-radius: 8px !important;
    margin-bottom: 8px !important;
    display: block !important;
}
.download-item.qr-hover .qr-popup p {
    font-size: 12px !important;
    color: #666 !important;
    margin: 0 !important;
    text-align: center !important;
}

.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;
}

/* 竞赛工具板块样式 */
.competition-card {
    background: linear-gradient(135deg, #fff8e7 0%, #ffffff 100%);
    border-left: 4px solid #f39c12;
}
.competition-card .software-icon {
    background: #fef5e7;
}
.competition-buttons {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}
.competition-buttons .download-item {
    flex: 1;
    background: #f8f9fa;
}
.competition-buttons .download-item:first-child:hover {
    background: #27ae60;
    border-color: #27ae60;
}
.competition-buttons .download-item:last-child:hover {
    background: #3498db;
    border-color: #3498db;
}
.competition-buttons .download-item i {
    color: #f39c12;
}
.competition-buttons .download-item:hover i {
    color: #fff !important;
}

/* 响应式适配 */
@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; }
    .competition-buttons {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 576px) {
    .download-section { padding: 120px 15px 80px; }
    .download-category { padding: 20px; }
    .software-card { padding: 20px; }
}
.footer {
    padding-bottom: 35px !important;
}
/* ==================== 竞赛工具卡片样式 ==================== */
.competition-card {
    background: linear-gradient(135deg, #fff8e7 0%, #ffffff 100%);
    border-left: 4px solid #f39c12;
}
.competition-card .software-icon {
    background: #fef5e7;
}
.competition-buttons {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}
.competition-buttons .download-item {
    flex: 1;
    background: #f8f9fa;
}
.competition-buttons .download-item:first-child:hover {
    background: #27ae60;
    border-color: #27ae60;
}
.competition-buttons .download-item:last-child:hover {
    background: #3498db;
    border-color: #3498db;
}
.competition-buttons .download-item i {
    color: #f39c12;
}
.competition-buttons .download-item:hover i {
    color: #fff !important;
}

/* ==================== 常用工具卡片样式 ==================== */
.download-category:last-of-type .software-card {
    border-left: 4px solid #9b59b6; /* 紫色边框，区分竞赛工具 */
}
.download-category:last-of-type .software-card:hover {
    border-left-color: #8e44ad;
}