/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", "Segoe UI", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: #f8fafc;
    color: #333;
    line-height: 1.6;
    padding-top: 80px; /* 为顶部固定导航栏留出空间 */
}

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

/* 顶部导航栏 - 随动效果 */
#top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid #eaeaea;
    z-index: 1000;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

/* Logo样式 - 可点击 */
.logo {
    margin-left: 30px; /* 将Logo向右移动 */
}

.logo-text {
    font-size: 28px;
    font-weight: 800;
    text-decoration: none;
    display: flex;
    align-items: center;
    letter-spacing: 1px;
}

.logo-dnf {
    color: #ff6b35; /* DNF使用橙色 */
    text-shadow: 0 2px 4px rgba(255, 107, 53, 0.2);
}

.logo-version {
    color: #2a5fd8; /* 版本库使用蓝色 */
    text-shadow: 0 2px 4px rgba(42, 95, 216, 0.2);
}

.logo-text:hover .logo-dnf {
    color: #ff8c5a;
}

.logo-text:hover .logo-version {
    color: #4a7fff;
}

/* 导航按钮 */
.nav-buttons {
    display: flex;
    gap: 15px;
}

.nav-btn {
    background-color: transparent;
    color: #555;
    border: 1px solid #ddd;
    padding: 10px 22px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background-color: #2a5fd8;
    color: white;
    border-color: #2a5fd8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(42, 95, 216, 0.2);
}

/* 页面标题区域 */
.page-header {
    text-align: center;
    padding: 80px 0;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
    border-bottom: 1px solid #eaeaea;
}

.page-title {
    font-size: 42px;
    color: #1a1a1a;
    margin-bottom: 20px;
    font-weight: 700;
}

.page-subtitle {
    font-size: 18px;
    color: #666;
    max-width: 800px;
    margin: 0 auto 30px;
    line-height: 1.8;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.cta-btn {
    padding: 14px 32px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.primary-btn {
    background-color: #2a5fd8;
    color: white;
    box-shadow: 0 4px 12px rgba(42, 95, 216, 0.2);
}

.primary-btn:hover {
    background-color: #1a4fc8;
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(42, 95, 216, 0.3);
}

.secondary-btn {
    background-color: white;
    color: #2a5fd8;
    border: 1px solid #2a5fd8;
}

.secondary-btn:hover {
    background-color: #f0f5ff;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* 套餐区域 - 修改为一行显示四个套餐 */
.packages-section {
    margin-bottom: 80px;
}

.section-title {
    font-size: 36px;
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 15px;
    font-weight: 700;
}

.section-subtitle {
    font-size: 18px;
    color: #666;
    text-align: center;
    margin-bottom: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* 修改套餐网格布局为一行四列 */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 四个等宽列 */
    gap: 25px;
}

.package-card {
    background-color: white;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    padding: 30px 25px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* 使所有卡片高度一致 */
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.package-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: #2a5fd8;
}

.package-card.recommended {
    border-color: #ffaa00;
    position: relative;
}

.recommended-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ffaa00, #ff8c00);
    color: white;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(255, 170, 0, 0.3);
}

.package-title {
    font-size: 22px;
    color: #1a1a1a;
    margin-bottom: 10px;
    text-align: center;
    min-height: 60px; /* 确保标题高度一致 */
    font-weight: 600;
}

.package-price {
    font-size: 32px;
    color: #2a5fd8;
    text-align: center;
    margin-bottom: 5px;
    font-weight: 700;
}

.package-subtitle {
    font-size: 16px;
    color: #888;
    text-align: center;
    margin-bottom: 25px;
}

.package-features {
    list-style-type: none;
    flex-grow: 1; /* 使特性列表填充可用空间 */
    margin-bottom: 25px;
}

.package-features li {
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
    color: #555;
    font-size: 15px;
    display: flex;
    align-items: flex-start;
}

.package-features li i {
    color: #2a5fd8;
    margin-right: 10px;
    margin-top: 3px;
    font-size: 14px;
}

.package-features li:last-child {
    border-bottom: none;
}

/* 立即搭建按钮 */
.build-btn {
    background: linear-gradient(to right, #ff6b35, #ff8c5a);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    margin-top: auto; /* 将按钮推到底部 */
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
}

.build-btn:hover {
    background: linear-gradient(to right, #ff8c5a, #ff6b35);
    box-shadow: 0 6px 18px rgba(255, 107, 53, 0.3);
    transform: translateY(-2px);
}

/* 为什么选择我们区域 - 优化为自适应四列，各占25% */
.why-choose-section {
    margin-bottom: 80px;
    padding: 60px 0;
    background-color: #f9fbfe;
    border-radius: 0;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 四个等宽列，各占25% */
    gap: 30px;
}

.why-card {
    background-color: white;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    padding: 35px 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.why-card:hover {
    border-color: #2a5fd8;
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}

.why-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #2a5fd8, #4a7fff);
    color: white;
    border-radius: 50%;
    line-height: 70px;
    font-weight: bold;
    margin-bottom: 25px;
    font-size: 28px;
    box-shadow: 0 8px 20px rgba(42, 95, 216, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.why-title {
    font-size: 20px;
    color: #1a1a1a;
    margin-bottom: 15px;
    min-height: 60px; /* 确保标题高度一致 */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.why-card p {
    color: #666;
    line-height: 1.7;
    flex-grow: 1; /* 使段落填充可用空间 */
}

/* 营收区域 */
.revenue-section {
    margin-bottom: 80px;
}

.revenue-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.revenue-card {
    background-color: white;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    padding: 30px 25px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.revenue-card:hover {
    border-color: #2a5fd8;
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}

.revenue-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ff6b35, #ff8c5a);
    color: white;
    border-radius: 50%;
    line-height: 60px;
    margin: 0 auto 20px;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.revenue-title {
    font-size: 20px;
    color: #1a1a1a;
    margin-bottom: 15px;
    font-weight: 600;
}

.revenue-card p {
    color: #666;
    line-height: 1.6;
}

.highlight-text {
    color: #ff6b35;
    font-weight: 600;
}

/* 客户见证区域 */
.testimonials-section {
    margin-bottom: 80px;
    padding: 60px 0;
    background-color: #f9fbfe;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.testimonial-card {
    background-color: white;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    padding: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.testimonial-card:hover {
    border-color: #2a5fd8;
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}

.testimonial-content {
    flex-grow: 1;
    margin-bottom: 25px;
}

.testimonial-content p {
    color: #555;
    font-style: italic;
    line-height: 1.7;
    font-size: 16px;
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.author-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #2a5fd8, #4a7fff);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    margin-right: 15px;
}

.author-info h4 {
    color: #1a1a1a;
    margin-bottom: 5px;
    font-weight: 600;
}

.author-info p {
    color: #888;
    font-size: 14px;
}

/* 联系客服悬浮窗 - 直接显示 */
#contact-widget {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 200px;
    background-color: white;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    padding: 20px;
    z-index: 999;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.contact-title {
    font-size: 18px;
    color: #2a5fd8;
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    font-weight: 600;
}

.qq-info {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: #555;
    font-weight: 500;
}

.qq-icon {
    margin-right: 8px;
    color: #ff6b35;
    font-size: 18px;
}

.qrcode-container {
    text-align: center;
    margin-top: 15px;
}

.qrcode-img {
    width: 150px;
    height: 150px;
    border: 1px solid #eee;
    border-radius: 8px;
}

.qrcode-label {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    color: #888;
}

/* 返回顶部按钮 - 下拉时显示 */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #2a5fd8;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 998;
    display: none;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(42, 95, 216, 0.3);
}

#back-to-top:hover {
    background-color: #1a4fc8;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(42, 95, 216, 0.4);
}

/* 模态窗口样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    padding: 40px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.modal-title {
    font-size: 24px;
    color: #1a1a1a;
    margin-bottom: 15px;
    font-weight: 700;
}

.modal-message {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.modal-qq {
    font-size: 22px;
    color: #ff6b35;
    font-weight: 700;
    margin: 15px 0;
    padding: 12px;
    background-color: #fff5f0;
    border-radius: 8px;
}

.selected-package {
    font-size: 20px;
    color: #2a5fd8;
    font-weight: 600;
    margin: 15px 0;
    padding: 12px;
    background-color: #f0f5ff;
    border-radius: 8px;
}

.modal-note {
    font-size: 16px;
    color: #ff6b35;
    font-weight: 600;
    margin-top: 20px;
}

.modal-close {
    background-color: #2a5fd8;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    margin-top: 25px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background-color: #1a4fc8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(42, 95, 216, 0.2);
}

/* 底部优化 - 更加充实 */
footer {
    background-color: #1a1a2e;
    color: #ddd;
    padding: 60px 0 30px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 50px;
}

.footer-column h3 {
    font-size: 20px;
    color: white;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 1px solid #2a2a5a;
    font-weight: 600;
}

.footer-logo {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 20px;
    display: flex;
}

.footer-logo-dnf {
    color: #ff8c5a;
}

.footer-logo-version {
    color: #4a7fff;
}

.footer-description {
    color: #aaa;
    line-height: 1.6;
    margin-bottom: 25px;
}

.contact-info p {
    color: #aaa;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    font-size: 15px;
}

.contact-info i {
    margin-right: 10px;
    color: #4a7fff;
    width: 20px;
}

.footer-links {
    list-style-type: none;
}

.footer-links li {
    margin-bottom: 15px;
}

.footer-links a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    font-size: 15px;
}

.footer-links a:hover {
    color: #4a7fff;
}

.footer-links a:before {
    content: "›";
    margin-right: 10px;
    color: #ff6b35;
    font-size: 18px;
}

.contact-details {
    color: #aaa;
    line-height: 1.8;
}

.contact-details p {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.contact-details i {
    margin-right: 10px;
    color: #ff6b35;
    width: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: #4a7fff;
    color: white;
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #2a2a5a;
    color: #888;
    font-size: 14px;
}

.copyright p {
    margin-bottom: 10px;
}

.disclaimer {
    font-size: 13px;
    color: #777;
    max-width: 800px;
    margin: 20px auto 0;
    line-height: 1.6;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .packages-grid {
        grid-template-columns: repeat(2, 1fr); /* 中等屏幕显示两列 */
    }
    
    .why-grid {
        grid-template-columns: repeat(2, 1fr); /* 中等屏幕显示两列 */
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    #top-nav {
        padding: 0;
    }
    
    .nav-container {
        flex-direction: column;
        padding: 15px 0;
    }
    
    .logo {
        margin: 0 0 15px 0;
    }
    
    .logo-text {
        font-size: 24px;
    }
    
    .nav-buttons {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .nav-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    #contact-widget {
        display: none; /* 在移动端隐藏悬浮窗 */
    }
    
    body {
        padding-top: 120px;
    }
    
    .packages-grid {
        grid-template-columns: 1fr; /* 移动端显示一列 */
    }
    
    .why-grid {
        grid-template-columns: 1fr; /* 移动端显示一列 */
    }
    
    .revenue-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .page-title {
        font-size: 32px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-btn {
        width: 100%;
        max-width: 300px;
    }
}

/* SEO优化：提高可访问性 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 打印样式优化 */
@media print {
    #top-nav, #contact-widget, #back-to-top,
    .nav-buttons, .cta-buttons, .build-btn {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    .page-header, .packages-section, .why-choose-section,
    .revenue-section, .testimonials-section {
        break-inside: avoid;
        margin-bottom: 20pt;
    }
    
    .package-card, .why-card, .revenue-card, .testimonial-card {
        border: 1pt solid #ccc;
        break-inside: avoid;
        margin-bottom: 10pt;
    }
    
    footer {
        border-top: 1pt solid #ccc;
        margin-top: 20pt;
        padding-top: 10pt;
    }
}

/* 焦点状态优化 - 提高可访问性 */
:focus {
    outline: 2px solid #2a5fd8;
    outline-offset: 2px;
}

button:focus, a:focus, input:focus {
    outline: 2px solid #ff6b35;
    outline-offset: 2px;
}

/* 屏幕阅读器专用类 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 页面加载进度条 */
#page-load-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(to right, #2a5fd8, #ff6b35);
    z-index: 9999;
    transition: width 0.3s ease;
}

/* 新增：外部链接按钮样式 */
.nav-buttons .external-link {
    background-color: #28a745; /* 绿色突出显示 */
    color: white;
    border: 1px solid #28a745;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-buttons .external-link:hover {
    background-color: #218838;
    color: white;
    border-color: #1e7e34;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

.nav-buttons .external-link i {
    margin-right: 8px;
}

/* 响应式设计：导航栏外部链接按钮 */
@media (max-width: 768px) {
    .nav-buttons .external-link {
        padding: 8px 16px;
        font-size: 14px;
        width: 100%;
        margin-top: 5px;
    }
}

/* 底部链接样式调整 */
.footer-links li a[href*="4on.cn"] {
    color: #28a745;
    font-weight: 600;
}

.footer-links li a[href*="4on.cn"]:hover {
    color: #20c997;
}

.footer-links li a[href*="4on.cn"]:before {
    color: #28a745;
}

/* 社交图标中的忆游源码网图标特殊样式 */
.social-links a[href*="4on.cn"] {
    background-color: #28a745;
}

.social-links a[href*="4on.cn"]:hover {
    background-color: #20c997;
}