/* 全局样式 */
:root {
    --primary-color: #3498db;
    --primary-hover: #2980b9;
    --secondary-color: #2c3e50;
    --secondary-hover: #34495e;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #2c3e50;
    --text-light: #6c757d;
    --border-color: #dee2e6;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --transition: all 0.3s ease;
    --border-radius: 8px;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: Microsoft YaHei, Arial, sans-serif;
    color: var(--text-color);
    background-color: #f8f9fa;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

/* 主内容区域 */
.main-content {
    flex: 1 0 auto;
    width: 100%;
}

/* 导航栏样式 */
.nav-bar {
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
    padding: 15px 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.nav-bar:hover {
    box-shadow: var(--shadow-md);
}

.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.5px;
}

.nav-brand::before {
    content: "💻";
    font-size: 1.5rem;
}

.nav-toggle {
    background: none;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    padding: 8px 10px;
    display: none;
    transition: var(--transition);
}

.nav-toggle:hover {
    border-color: var(--primary-color);
    background-color: rgba(52, 152, 219, 0.1);
}

.nav-toggle-icon {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: var(--transition);
}

.nav-collapse {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 5px;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    padding: 8px 15px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 500;
    font-size: 15px;
}

.nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(52, 152, 219, 0.1);
    transform: translateY(-1px);
}

.nav-auth {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

/* 响应式导航栏 */
@media (max-width: 992px) {
    .nav-toggle {
        display: block;
    }
    
    .nav-collapse {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid var(--border-color);
        gap: 15px;
    }
    
    .nav-collapse.show {
        display: flex;
        animation: slideDown 0.3s ease;
    }
    
    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    
    .nav-item {
        margin-right: 0;
        margin-bottom: 0;
    }
    
    .nav-link {
        display: block;
        text-align: center;
        padding: 12px 15px;
    }
    
    .nav-auth {
        margin-left: 0;
        width: 100%;
        justify-content: center;
        gap: 15px;
    }
    
    .nav-auth button {
        flex: 1;
        max-width: 150px;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-weight: bold;
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.card-text {
    color: var(--text-light);
    margin-bottom: 20px;
}

/* 按钮样式 */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 4px;
    padding: 8px 16px;
    color: white;
    text-decoration: none;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
    text-decoration: none;
    color: white;
}

/* 按钮样式优化 */
.btn {
    border-radius: var(--border-radius) !important;
    font-weight: 500 !important;
    transition: var(--transition) !important;
    box-shadow: var(--shadow-sm) !important;
}

.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.btn-primary:hover {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    transform: translateY(-2px) !important;
    box-shadow: var(--shadow-md) !important;
}

.btn-secondary {
    background-color: white !important;
    border-color: var(--border-color) !important;
    color: var(--text-color) !important;
}

.btn-secondary:hover {
    background-color: var(--light-color) !important;
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
    transform: translateY(-2px) !important;
    box-shadow: var(--shadow-md) !important;
}

/* 页脚样式 */
.footer {
    background: linear-gradient(135deg, var(--light-color) 0%, #e9ecef 100%);
    padding: 50px 0 30px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
    margin-top: 50px;
}

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

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-section h3 {
    color: var(--secondary-color);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 5px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    width: fit-content;
}

.footer-section p {
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links li a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links li a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.social-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 0.9rem;
}

.footer-bottom p {
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .nav-brand {
        font-size: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-section {
        text-align: center;
        align-items: center;
    }
    
    .footer-section h3 {
        margin: 0 auto 15px;
    }
    
    .footer-links li a {
        justify-content: center;
    }
    
    .footer-links li a:hover {
        transform: translateX(0);
    }
}

/* 返回顶部按钮样式 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--primary-color);
    color: white;
    width: 48px;
    height: 48px;
    line-height: 48px;
    text-align: center;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    z-index: 999;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    font-size: 1.2rem;
}

.back-to-top:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}
    transition: all 0.3s ease;
}

.back-to-top:hover {
    background-color: #2980b9;
    transform: translateY(-5px);
}
