/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.loaded {
    opacity: 1;
}

/* 冻结导航栏样式 */
.top-nav {
    width: 100%;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 40px;
    width: auto;
}

.logo-text {
    font-size: 24px;
    font-weight: bold;
    color: white;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* 语言切换按钮 */
.language-switch {
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    padding: 8px 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    color: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.lang-btn:hover,
.lang-btn.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.8);
}

/* 导航链接样式 */
.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background-color: #fff;
    flex-wrap: wrap;
    gap: 20px;
    border-top: 1px solid rgba(220, 53, 69, 0.1);
}

.nav-links a {
    color: #333;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-links a:hover {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* 二维码弹窗样式 */
.nav-link-container {
    position: relative;
    display: inline-block;
}

.qr-popup {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    background-color: white;
    padding: 15px;
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    text-align: center;
    z-index: 1100;
    white-space: nowrap;
}

.qr-popup img {
    display: block;
    max-width: 100px;
    height: auto;
    margin-bottom: 8px;
    border-radius: 4px;
}

.qr-popup span {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.nav-link-container:hover .qr-popup {
    display: block;
}

/* 主要内容区域 */
.main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.contact-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.contact-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #dc3545;
    display: inline-block;
    width: 100%;
}

/* 联系方式卡片网格 */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.contact-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.contact-card:nth-child(1) { animation-delay: 0.1s; }
.contact-card:nth-child(2) { animation-delay: 0.2s; }
.contact-card:nth-child(3) { animation-delay: 0.3s; }
.contact-card:nth-child(4) { animation-delay: 0.4s; }
.contact-card:nth-child(5) { animation-delay: 0.5s; }
.contact-card:nth-child(6) { animation-delay: 0.6s; }
.contact-card:nth-child(7) { animation-delay: 0.7s; }
.contact-card:nth-child(8) { animation-delay: 0.8s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.contact-card img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    margin-bottom: 1rem;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.contact-card:hover img {
    transform: scale(1.05);
}

.contact-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.contact-card p {
    font-size: 0.9rem;
    color: #666;
    margin: 0.25rem 0;
    line-height: 1.5;
}

.contact-link {
    color: #dc3545;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
}

.contact-link:hover {
    color: #c82333;
    text-decoration: underline;
}

/* 二维码放大弹窗 */
.qr-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 1rem;
}

.qr-modal.active {
    display: flex;
}

.qr-modal img {
    max-width: 90%;
    max-height: 70vh;
    border-radius: 12px;
}

.save-button {
    padding: 12px 30px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

.save-button:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.5);
}

/* 页脚样式 */
.footer {
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    padding: 2rem 0 1.5rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-text {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.footer-separator {
    margin: 0 0.5rem;
    color: #ccc;
}

.footer-beian {
    margin: 0;
}

.footer-beian a {
    color: #888;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.footer-beian a:hover {
    color: #dc3545;
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .logo-bar {
        padding: 10px 15px;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .logo-text {
        font-size: 20px;
    }

    .logo-img {
        height: 30px;
    }

    .nav-links {
        padding: 8px 10px;
        gap: 15px;
        font-size: 14px;
    }

    .nav-links a {
        padding: 6px 10px;
        font-size: 14px;
    }

    .qr-popup {
        margin-top: 5px;
        padding: 10px;
    }

    .qr-popup img {
        max-width: 80px;
    }

    .contact-title {
        font-size: 1.5rem;
    }

    .contact-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }

    .contact-card {
        padding: 1.5rem;
    }

    .contact-card img {
        width: 120px;
        height: 120px;
    }

    .contact-card h3 {
        font-size: 1.1rem;
    }

    .contact-card p {
        font-size: 0.85rem;
    }

    .footer {
        padding: 1.5rem 0 1rem;
        margin-top: 2rem;
    }

    .footer-text {
        font-size: 0.8rem;
        line-height: 1.8;
    }

    .footer-beian a {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .contact-card {
        padding: 1.2rem;
    }

    .contact-card img {
        width: 100px;
        height: 100px;
    }
}
