/* 全局样式（优化版） */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 性能优化：启用硬件加速 */
.hero, .header, .modal, .card {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* 优化动画性能 */
* {
    animation-duration: 0.3s;
    animation-fill-mode: both;
}

/* 优化字体渲染 */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    font-display: swap; /* 字体加载优化 */
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 文本样式 */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 20px;
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-size: 2.8rem;
}

h2 {
    font-size: 2.2rem;
}

h3 {
    font-size: 1.8rem;
}

h4 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 20px;
}

a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0052a3;
}

img {
    max-width: 100%;
    height: auto;
    /* 图片加载优化 */
    loading: lazy;
    decoding: async;
}

ul, ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

li {
    margin-bottom: 10px;
}

/* 按钮样式（优化版） */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    /* 优化交互性能 */
    will-change: transform;
    transform: translateZ(0);
}

.btn-primary {
    background-color: #ff6b00;
    color: white;
}

.btn-primary:hover {
    background-color: #e55a00;
}

.btn-outline {
    background-color: transparent;
    color: #ff6b00;
    border: 2px solid #ff6b00;
}

.btn-outline:hover {
    background-color: #ff6b00;
    color: white;
}

.text-center {
    text-align: center;
}

/* 顶部导航栏 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo h2 {
    margin-bottom: 0;
    color: #ff6b00;
}

.nav ul {
    display: flex;
    list-style: none;
    margin-bottom: 0;
    padding-left: 0;
}

.nav ul li {
    margin-left: 30px;
    margin-bottom: 0;
}

.nav ul li a {
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav ul li a:hover {
    color: #ff6b00;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* 移动端菜单动画 */
.mobile-menu-toggle.toggle span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.toggle span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.toggle span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* 主横幅区域 */
.hero {
    padding: 140px 0 80px;
    background-color: #f8f9fa;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text h1 {
    color: #1a1a1a;
    margin-bottom: 15px;
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 500;
    color: #ff6b00;
    margin-bottom: 20px;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.hero-image img {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 文章区域 */
.articles {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto 60px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.article-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.article-image {
    height: 200px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-content {
    padding: 25px;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.category {
    background-color: #ff6b00;
    color: white;
    font-size: 0.8rem;
    padding: 3px 10px;
    border-radius: 15px;
}

.date {
    color: #666;
    font-size: 0.9rem;
}

.article-content h3 {
    margin-bottom: 15px;
}

.article-content h3 a {
    color: #1a1a1a;
    transition: color 0.3s ease;
}

.article-content h3 a:hover {
    color: #ff6b00;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 0.9rem;
    margin-top: 15px;
}

/* 产品区域 */
.products {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.product-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 30px;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.product-card.featured {
    border: 2px solid #ff6b00;
    transform: scale(1.03);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #ff6b00;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.product-header h3 {
    margin-bottom: 0;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ff6b00;
}

.product-price span {
    font-size: 0.9rem;
    font-weight: 400;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    color: #666;
}

.product-features {
    margin-bottom: 30px;
}

.product-features li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 25px;
}

.product-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #ff6b00;
    font-weight: bold;
}

.product-footer {
    text-align: center;
}

.product-footer .btn {
    width: 100%;
}

/* 关于军哥区域 */
.about {
    padding: 80px 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image img {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.achievements {
    display: flex;
    margin: 40px 0;
}

.achievement-item {
    flex: 1;
    text-align: center;
}

.achievement-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ff6b00;
    margin-bottom: 10px;
}

.achievement-label {
    color: #666;
}

.certifications h4 {
    margin-bottom: 15px;
}

.certifications ul {
    list-style-type: none;
    padding-left: 0;
}

.certifications ul li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
}

.certifications ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #ff6b00;
    font-weight: bold;
}

/* 联系合作区域 */
.contact {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 40px;
    padding: 25px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background-color: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
}

.contact-icon img {
    width: 30px;
    height: 30px;
}

.contact-text {
    flex-grow: 1;
}

.contact-text h4 {
    margin-bottom: 10px;
    color: #1a1a1a;
}

.contact-text p {
    margin-bottom: 15px;
    color: #666;
}

.phone-number {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.phone-number a {
    color: #ff6b00;
    text-decoration: none;
    transition: all 0.3s ease;
}

.phone-number a:hover {
    color: #e55a00;
    text-decoration: underline;
}

.work-hours {
    font-size: 0.9rem;
}

.qr-display {
    margin-top: 15px;
    display: flex;
    justify-content: center;
}

.contact-qr-image {
    max-width: 150px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.contact-qr-image:hover {
    transform: scale(1.05);
}

.contact-form {
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #ff6b00;
    outline: none;
}

/* 订阅区域 */
.subscribe {
    padding: 80px 0;
    background-color: #1a1a1a;
    color: white;
    text-align: center;
}

.subscribe h2 {
    color: white;
}

.subscribe-form {
    display: flex;
    max-width: 500px;
    margin: 30px auto 0;
}

.subscribe-note {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 25px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    max-width: 600px;
    margin: 0 auto 25px;
}

.subscribe-form input {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 6px 0 0 6px;
}

.subscribe-form .btn {
    border-radius: 0 6px 6px 0;
}

/* 页脚 */
.footer {
    padding: 60px 0 30px;
    background-color: #111;
    color: #ddd;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo h3 {
    color: #ff6b00;
    margin-bottom: 10px;
}

.footer-column h4 {
    color: white;
    margin-bottom: 20px;
}

.footer-column ul {
    list-style-type: none;
    padding-left: 0;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #ddd;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: #ff6b00;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 30px;
    text-align: center;
    position: relative;
}

.admin-login-btn {
    position: absolute;
    right: 20px;
    bottom: 10px;
    background: none;
    border: 1px solid #444;
    color: #666;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-login-btn:hover {
    color: #ff6b00;
    border-color: #ff6b00;
}

/* 可编辑字段样式 */
.edit-input {
    padding: 5px;
    border: 1px solid #ff6b00;
    border-radius: 3px;
    background-color: #fff;
    font-family: inherit;
    font-size: inherit;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .hero-content,
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-image,
    .about-image {
        order: -1;
    }
    
    .articles-grid,
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: #fff;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 50px;
        transition: 0.3s;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .nav.nav-active {
        right: 0;
    }
    
    .nav ul {
        flex-direction: column;
        width: 100%;
        text-align: center;
        padding: 0;
    }
    
    .nav ul li {
        margin: 15px 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .hero {
        padding: 120px 0 60px;
    }
    
    .articles,
    .products,
    .about,
    .contact {
        padding: 60px 0;
    }
    
    .subscribe {
        padding: 60px 0;
    }
    
    .subscribe-note {
        padding: 12px;
        margin: 0 auto 20px;
        font-size: 0.9rem;
    }
    
    .footer {
        padding: 40px 0 20px;
    }
    
    .articles-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .subscribe-form {
        flex-direction: column;
        gap: 15px;
    }
    
    .subscribe-form input {
        border-radius: 6px;
    }
    
    .subscribe-form .btn {
        border-radius: 6px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    .achievements {
        flex-direction: column;
        gap: 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        padding: 30px 20px;
    }
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    overflow-y: auto;
    padding: 20px 0;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    width: 90%;
    max-width: 800px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-title {
    margin: 0;
    color: #1a1a1a;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-qr {
    max-width: 200px;
    margin: 0 auto;
    display: block;
}

.qr-code-container {
    text-align: center;
    margin: 20px 0;
}

.qr-code-container p {
    margin-top: 15px;
    color: #666;
}

/* 文章弹窗样式 */
.article-title {
    margin-bottom: 15px;
    color: #1a1a1a;
}

.article-meta {
    display: flex;
    margin-bottom: 20px;
    color: #666;
    font-size: 0.9rem;
}

.article-meta span {
    margin-right: 15px;
}

.article-full-content {
    line-height: 1.8;
    margin-bottom: 30px;
}

.article-share {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.article-share h4 {
    margin-bottom: 15px;
}

.share-buttons {
    display: flex;
    gap: 15px;
}

.share-btn {
    padding: 10px 15px;
    border: 1px solid #ddd;
    background-color: #fff;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-btn:hover {
    background-color: #f5f5f5;
}

/* 支付弹窗样式 */
.payment-info {
    text-align: center;
}

.product-name {
    margin-bottom: 15px;
    color: #1a1a1a;
}

.product-price-display {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ff6b00;
    margin-bottom: 30px;
}

.payment-methods {
    text-align: left;
    margin-bottom: 30px;
}

.payment-methods h4 {
    margin-bottom: 20px;
    text-align: center;
}

.payment-option {
    margin-bottom: 30px;
}

.payment-option h5 {
    text-align: center;
    margin-bottom: 15px;
}

.qr-code {
    text-align: center;
}

.qr-code img {
    max-width: 200px;
    margin: 0 auto 15px;
}

.contact-info h4 {
    text-align: center;
    margin: 30px 0 20px;
}

.contact-qr {
    text-align: center;
    margin-bottom: 20px;
}

.contact-qr img {
    max-width: 150px;
    margin: 0 auto 10px;
}

.phone-contact {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
}

.phone-contact a {
    color: #ff6b00;
    font-weight: 600;
}

/* 头部控制区域 */
.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 日夜模式切换 */
.theme-toggle {
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background-color: #e0e0e0;
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

/* 中英文切换 */
.lang-toggle {
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 20px;
    background-color: #f0f0f0;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.lang-toggle:hover {
    background-color: #e0e0e0;
}

.admin-status {
    display: none;
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    background-color: #ff6b00;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(255, 107, 0, 0.3);
    z-index: 100;
}

.lang-current {
    display: block;
    line-height: 1;
}

/* 深色模式 */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-mode .header {
    background-color: #1e1e1e;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

body.dark-mode .hero {
    background-color: #1e1e1e;
}

body.dark-mode .products {
    background-color: #1e1e1e;
}

body.dark-mode .contact {
    background-color: #1e1e1e;
}

body.dark-mode .subscribe {
    background-color: #0a0a0a;
}

body.dark-mode .footer {
    background-color: #0a0a0a;
}

body.dark-mode .modal-content {
    background-color: #1e1e1e;
    color: #e0e0e0;
}

body.dark-mode .modal-header {
    border-bottom-color: #333;
}

body.dark-mode .article-share {
    border-top-color: #333;
}

body.dark-mode .article-full-content {
    color: #e0e0e0;
}

body.dark-mode .share-btn {
    background-color: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
}

body.dark-mode .share-btn:hover {
    background-color: #333;
}

body.dark-mode .theme-toggle {
    background-color: #2a2a2a;
}

body.dark-mode .theme-toggle:hover {
    background-color: #333;
}

body.dark-mode .lang-toggle {
    background-color: #2a2a2a;
    color: #e0e0e0;
}

body.dark-mode .lang-toggle:hover {
    background-color: #333;
}

body.dark-mode .article-card,
body.dark-mode .product-card,
body.dark-mode .contact-form {
    background-color: #2a2a2a;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode .article-card:hover,
body.dark-mode .product-card:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

body.dark-mode .nav.nav-active {
    background-color: #1e1e1e;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.5);
}

body.dark-mode .contact-icon {
    background-color: #2a2a2a;
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background-color: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
}

body.dark-mode .article-meta,
body.dark-mode .product-meta,
body.dark-mode .article-footer,
body.dark-mode .phone-contact,
body.dark-mode .article-meta span,
body.dark-mode .qr-code-container p {
    color: #bbb;
}

body.dark-mode .contact-item {
    background-color: #2a2a2a;
}

body.dark-mode .contact-icon {
    background-color: #333;
}

body.dark-mode .contact-text p {
    color: #bbb;
}

body.dark-mode .subscribe-note {
    color: rgba(255, 255, 255, 0.8);
    background-color: rgba(255, 255, 255, 0.1);
}