/* ==================== 全局基础样式 ==================== */
:root {
    --bg-color: #f0f2f5;
    --panel-bg: #ffffff;
    --primary-blue: #007AFF;
}

body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* ==================== 导航栏样式 ==================== */
.navbar {
    background: linear-gradient(135deg, #3682e0 0%, #2c6cb0 100%);
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 2000;
    height: 70px;
    box-sizing: border-box;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    font-size: 1rem;
    opacity: 0.9;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background: rgba(255,255,255,0.1);
}

.nav-links a.active {
    background: rgba(255,255,255,0.2);
}

/* ==================== 公共页面容器样式 ==================== */
body:not(.home-page) .main-container {
    flex: 1;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.page-header {
    background: white;
    padding: 3rem 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.page-header h1 {
    color: #3682e0;
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
}

.page-header p {
    color: #666;
    font-size: 1.2rem;
}

.content-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.content-section h2 {
    color: #333;
    margin-bottom: 1rem;
    border-bottom: 3px solid #3682e0;
    padding-bottom: 0.5rem;
    display: inline-block;
}

/* ==================== 页脚样式 ==================== */
body:not(.home-page) .footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 1.5rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content p {
    margin: 0;
}

.footer-sub {
    margin-top: 8px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-logo .logo {
    font-size: 1.8rem;
    color: white;
    margin-bottom: 15px;
    display: inline-block;
}


.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.link-group h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.link-group a {
    display: block;
    color: #bdc3c7;
    text-decoration: none;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.link-group a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: none;
    color: #bdc3c7;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #3682e0;
    transform: translateY(-3px);
}


/* ==================== 公共卡片样式 ==================== */
.content-section > div:has(.tech-stack-card) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.tech-stack-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    height: 100%;
    box-sizing: border-box;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.tech-stack-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #3682e0;
}

.tech-stack-card h3 {
    color: #3682e0;
    margin-top: 0;
    margin-bottom: 1rem;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 0.5rem;
    font-size: 1.3rem;
}

.tech-stack-card p {
    margin: 0;
    line-height: 1.6;
    color: #495057;
}

.content-section > div:has(.cooperation-card) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.cooperation-card {
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
    height: 100%;
    box-sizing: border-box;
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cooperation-card:hover {
    background: #e9ecef;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.cooperation-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.cooperation-card h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.2rem;
}

.cooperation-card p {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ==================== 公共按钮样式 ==================== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-family: inherit;
    font-size: 1rem;
}

.btn-blue {
    background: #3682e0;
    color: white;
}

.btn-blue:hover {
    background: #2c6cb0;
    color: white;
}

.btn-gray {
    background: #6c757d;
    color: white;
}

.btn-gray:hover {
    background: #5a6268;
    color: white;
}

.btn-green {
    background: #20c997;
    color: white;
}

.btn-green:hover {
    background: #1aae83;
    color: white;
}

.btn-orange {
    background: #ff9500;
    color: white;
}

.btn-orange:hover {
    background: #e68900;
    color: white;
}

/* ==================== 公共响应式设计 ==================== */
@media (max-width: 768px) {
    .navbar {
        padding: 0.8rem 1rem;
        height: 60px;
    }
    
    .nav-links {
        gap: 0.5rem;
    }
    
    .nav-links a {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .logo span {
        display: none;
    }
    
    .page-header {
        padding: 2rem 1rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .content-section {
        padding: 1.5rem;
    }
    
    .content-section > div:has(.tech-stack-card),
    .content-section > div:has(.cooperation-card) {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .tech-stack-card,
    .cooperation-card {
        padding: 1.2rem;
    }
    
    .cooperation-icon {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .content-section h2 {
        font-size: 1.3rem;
    }
}

@media print {
    .left-panel, #cover-section, .btn:not(.btn-print) {
        display: none !important;
    }

    .poster-container {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}