/* 共用样式文件 */

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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

/* 导航栏样式 */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background-color: rgba(255, 255, 255, 0.98);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.navbar .logo {
    display: flex;
    align-items: center;
}

.navbar .logo img {
    max-height: 40px;
}

.navbar .nav-links ul {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar .nav-links ul li {
    list-style: none;
}

.navbar .nav-links ul li a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 12px 16px;
    border-radius: 6px;
    position: relative;
}

.navbar .nav-links ul li a:hover {
    color: #1a73e8;
    background-color: #f5f5f5;
}

.navbar .nav-links ul li a.active {
    color: #1a73e8;
    background-color: #e8f0fe;
    font-weight: 600;
}

.navbar .nav-links ul li a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 25%;
    width: 50%;
    height: 3px;
    background-color: #1a73e8;
    border-radius: 3px;
}

/* 移动端菜单按钮 */
.navbar .menu-toggle {
    display: none;
    cursor: pointer;
}

.navbar .menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease;
    background-color: #333;
}

/* 移动端菜单按钮激活状态 */
.navbar .menu-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.navbar .menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.navbar .menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* 页脚样式 */
.footer {
    background-color: #333;
    color: #fff;
    padding: 40px 0;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.footer-column {
    flex: 1;
    min-width: 250px;
    margin-bottom: 30px;
}

.footer-column h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #fff;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
    display: inline-block;
}

.footer-column p {
    margin-bottom: 10px;
    font-size: 14px;
    color: #ccc;
}

.footer-column ul {
    list-style: none;
}

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

.footer-column ul li a {
    text-decoration: none;
    color: #ccc;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: #007bff;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #555;
    margin-top: 20px;
}

.footer-bottom p {
    font-size: 14px;
    color: #ccc;
}

/* 返回顶部按钮 */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.3s, background-color 0.3s;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

#backToTop.show {
    opacity: 1;
}

#backToTop:hover {
    background-color: #0056b3;
}

/* 通用按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-align: center;
}

.btn:hover {
    background-color: #0056b3;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid #007bff;
    color: #007bff;
}

.btn-outline:hover {
    background-color: #007bff;
    color: white;
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-danger {
    background-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* 加载动画 */
.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading.active {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 通知提示框 */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 15px 20px;
    background-color: #333;
    color: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s, transform 0.3s;
    z-index: 9999;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background-color: #28a745;
}

.toast-error {
    background-color: #dc3545;
}

.toast-info {
    background-color: #17a2b8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar .menu-toggle {
        display: block;
    }
    
    .navbar .nav-links {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: #fff;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
    }
    
    .navbar .nav-links.active {
        left: 0;
    }
    
    .navbar .nav-links ul {
        flex-direction: column;
        width: 100%;
        padding: 20px 0;
    }
    
    .navbar .nav-links ul li {
        margin: 15px 0;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-column {
        margin-bottom: 30px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .logo img {
        max-height: 40px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}