﻿/* 现代化母版页样式 - 响应式卡片设计 */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    overflow-x: hidden;
}

/* 容器样式 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo img {
    height: auto;
    max-height: 60px;
    width: auto;
    transition: var(--transition);
}

/* 用户菜单 */
.user-menu {
    display: flex;
    list-style: none;
}

    .user-menu li {
        margin-left: 20px;
    }

    .user-menu a {
        color: var(--dark-color);
        text-decoration: none;
        font-weight: 500;
        padding: 8px 15px;
        border-radius: var(--border-radius);
        transition: var(--transition);
        display: flex;
        align-items: center;
    }

        .user-menu a:hover {
            color: var(--primary-color);
        }

    .user-menu .on {
        background-color: var(--primary-color);
        color: white;
    }

        .user-menu .on:hover {
            background-color: #2980b9;
        }

.offIcon {
    background-color: var(--warning-color);
    color: white;
    font-size: 0.8rem;
    padding: 2px 5px;
    border-radius: 10px;
    margin-left: 5px;
}

/* 主导航 */
.main-nav {
    background-color: var(--dark-color);
}

.nav-menu {
    display: flex;
    list-style: none;
}

    .nav-menu li {
        position: relative;
    }

    .nav-menu a {
        color: white;
        text-decoration: none;
        display: block;
        padding: 15px 20px;
        transition: var(--transition);
    }

        .nav-menu a:hover {
            background-color: rgba(255, 255, 255, 0.1);
        }

/* 主要内容区域 */
main {
    padding: 30px 0;
    min-height: calc(100vh - 400px);
}

/* 页脚样式 */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 40px 0 20px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-widget {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: var(--border-radius);
}

    .footer-widget h3 {
        color: white;
        margin-bottom: 15px;
        font-size: 1.2rem;
    }

    .footer-widget p {
        margin-bottom: 15px;
        font-size: 0.9rem;
        opacity: 0.8;
    }

.footer-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 8px 15px;
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

    .footer-btn:hover {
        background-color: #2980b9;
        color: white;
    }

.footer-nav .nav-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
}

    .footer-nav .nav-menu li {
        margin: 0 10px;
    }

    .footer-nav .nav-menu a {
        color: rgba(255, 255, 255, 0.7);
        padding: 5px 0;
    }

        .footer-nav .nav-menu a:hover {
            color: white;
        }

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

    .footer-bottom p {
        margin-bottom: 10px;
        font-size: 0.8rem;
        opacity: 0.7;
    }

    .footer-bottom a {
        color: var(--primary-color);
        text-decoration: none;
    }

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 500px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 15px 20px;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 500;
}

.modal-close {
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

    .modal-close:hover {
        color: var(--danger-color);
    }

.modal-body {
    padding: 20px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

    .form-control:focus {
        border-color: var(--primary-color);
        outline: none;
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    }

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
    text-align: center;
}

    .btn:hover {
        background-color: #2980b9;
    }

.btn-block {
    display: block;
    width: 100%;
}

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

/* 客服按钮 */
.customer-service {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1000;
}

.service-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .service-btn:hover {
        background-color: #2980b9;
        transform: translateY(-3px);
    }

/* 响应式设计 */
@media (max-width: 992px) {
    .header-container {
        flex-direction: column;
    }

    .logo {
        margin-bottom: 15px;
    }

    .user-menu {
        margin-top: 15px;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }

        .nav-menu li {
            flex: 1 0 auto;
            text-align: center;
        }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .footer-widgets {
        grid-template-columns: 1fr;
    }

    .nav-menu {
        flex-direction: column;
    }

        .nav-menu li {
            width: 100%;
        }

    .modal-content {
        width: 95%;
    }
}

@media (max-width: 576px) {
    .user-menu {
        flex-direction: column;
        width: 100%;
    }

        .user-menu li {
            margin: 5px 0;
            width: 100%;
        }

        .user-menu a {
            justify-content: center;
        }

    .footer-nav .nav-menu {
        flex-direction: column;
        align-items: center;
    }

        .footer-nav .nav-menu li {
            margin: 5px 0;
        }
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
    margin-bottom: 20px;
}

    .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }

.card-header {
    padding: 15px 20px;
    background-color: var(--light-color);
    border-bottom: 1px solid #eee;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    background-color: var(--light-color);
    border-top: 1px solid #eee;
}

/* 网格系统 */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

/* 实用类 */
.flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center;
}

.hidden {
    display: none;
}

.text-muted {
    color: #6c757d;
}

.pull-right {
    float: right;
}

/* 遮罩层 */
#backlayer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    display: none;
}
