/* 
 * 公共样式文件
 * 包含网站所有页面共用的CSS样式
 */

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #10b981;
    --accent: #f97316;
    --dark: #1e293b;
    --gray: #64748b;
    --light: #f1f5f9;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
}

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

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

/* 导航栏样式 */
header {
    background-color: white;
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--dark);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.mobile-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.mobile-nav-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--dark);
    transition: var(--transition);
}

/* 页脚样式 */
footer {
    background-color: var(--dark);
    color: white;
    padding: 60px 0 20px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-col h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary);
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #cbd5e1;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: white;
    padding-left: 5px;
}

.footer-col ul li a i {
    margin-right: 8px;
    color: var(--primary);
}

.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;
    transition: var(--transition);
}

.social-icon:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-5px);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #94a3b8;
}

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

.copyright a {
    color: #94a3b8;
}

.copyright a:hover {
    color: white;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-5px);
}

/* 浮动分享按钮 */
.floating-share {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 99;
}

.floating-share-toggle {
    width: 50px;
    height: 50px;
    background-color: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.floating-share-toggle:hover {
    background-color: #ea580c;
    transform: translateY(-5px);
}

.floating-share-container {
    position: absolute;
    bottom: 60px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
}

.floating-share.active .floating-share-container {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.share-btn {
    width: 40px;
    height: 40px;
    background-color: white;
    color: var(--dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    position: relative;
    transition: var(--transition);
}

.share-btn:hover {
    transform: translateY(-3px);
}

.share-btn-tooltip {
    position: absolute;
    right: 50px;
    background-color: var(--dark);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.share-btn-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -5px;
    transform: translateY(-50%);
    border-width: 5px 0 5px 5px;
    border-style: solid;
    border-color: transparent transparent transparent var(--dark);
}

.share-btn:hover .share-btn-tooltip {
    opacity: 1;
    visibility: visible;
    right: 55px;
}

.share-wechat {
    color: #07c160;
}

.share-weibo {
    color: #e6162d;
}

.share-qq {
    color: #0085ff;
}

.share-copy {
    color: #64748b;
}

/* 微信分享二维码弹窗 */
.share-qrcode-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.share-qrcode-modal.show {
    opacity: 1;
    visibility: visible;
}

.qrcode-container {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    position: relative;
    max-width: 300px;
    width: 100%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.qrcode-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light);
    cursor: pointer;
    transition: var(--transition);
}

.qrcode-close:hover {
    background-color: #e2e8f0;
}

.qrcode-title {
    margin-bottom: 20px;
    color: var(--dark);
}

.qrcode-image {
    margin-bottom: 20px;
}

.qrcode-image img {
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    max-width: 200px;
}

/* 复制成功提示 */
.copy-success {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background-color: var(--dark);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    z-index: 1000;
}

.copy-success.show {
    transform: translateX(-50%) translateY(0);
}

/* 响应式样式 */
@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: flex;
    }
    
    .nav-links {
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        flex-direction: column;
        align-items: center;
        background-color: white;
        gap: 0;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: var(--transition);
        padding: 0;
    }
    
    .nav-container.mobile-active .nav-links {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        padding: 20px 0;
    }
    
    .nav-links li {
        width: 100%;
        text-align: center;
    }
    
    .nav-links a {
        display: block;
        padding: 15px 0;
        border-bottom: 1px solid var(--light);
    }
    
    .nav-links a::after {
        display: none;
    }
    
    .mobile-nav-toggle.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    
    .mobile-nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-nav-toggle.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
    
    .footer-container {
        grid-template-columns: 1fr;
    }
    
    .back-to-top, .floating-share {
        bottom: 20px;
        right: 20px;
    }
} 