/* 主样式文件 - 上海市分布式共识技术协会 */

/* 基础样式 */
body, html {
    font-family: 'Noto Sans SC', Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    min-height: 100vh;
    background: linear-gradient(135deg, #f0f8ff 0%, #e3f2fd 50%, #bbdefb 100%);
    position: relative;
    scroll-behavior: smooth;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(57, 73, 171, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(26, 35, 126, 0.05) 0%, transparent 50%),
        url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%233949ab" fill-opacity="0.05"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
    z-index: -1;
    pointer-events: none;
}

/* 头部样式 */
header {
    background-color: #1a237e;
    color: #fff;
    padding: 0.6rem 1rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.logo {
    font-size: 2em;
    font-weight: bold;
    margin-left: 30px;
    display: flex;
    align-items: center;
    align-self: flex-start;
    margin-top: 5px;
}

.logo-img {
    height: 80px;
    margin-right: 20px;
}

/* 导航样式 */
nav {
    margin-top: 10px;
    width: 100%;
    display: flex;
    justify-content: center;
}

nav ul {
    list-style-type: none;
    padding: 0;
    display: flex;
    justify-content: center;
    margin: 0;
}

nav ul li {
    margin: 0 25px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    position: relative;
    padding: 5px 2px;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: block;
}

nav ul li a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #fff;
    transition: width 0.3s ease;
}

nav ul li a:hover:after {
    width: 100%;
}

/* 主内容区域 */
main {
    padding-top: 160px;
    padding-bottom: 120px;
    min-height: calc(100vh - 160px - 120px);
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

/* 页脚样式 */
footer {
    background-color: #1a237e;
    color: #fff;
    text-align: center;
    padding: 1rem;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

/* 美化滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(240, 240, 240, 0.5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(26, 35, 126, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(26, 35, 126, 0.5);
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    /* 头部导航栏适配 */
    header {
        padding: 0.4rem 0.5rem;
    }

    .logo {
        font-size: 1.2em;
        margin-left: 5px;
        flex-direction: row;
        align-items: center;
        text-align: left;
    }

    .logo-img {
        height: 40px;
        margin-right: 10px;
        margin-bottom: 0;
    }

    nav {
        margin-top: 5px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px;
    }

    nav::-webkit-scrollbar {
        display: none; /* 隐藏滚动条 */
    }

    nav ul {
        flex-wrap: nowrap;
        justify-content: flex-start;
        width: max-content;
        padding: 0 5px;
    }

    nav ul li {
        margin: 0 10px;
        white-space: nowrap;
    }

    nav ul li a {
        font-size: 0.85em;
        padding: 3px 0;
        display: block;
        white-space: nowrap;
    }

    /* 主要内容区域适配 */
    main {
        padding-top: 100px;
        padding-bottom: 60px;
        padding-left: 10px;
        padding-right: 10px;
    }

    /* 页脚适配 */
    footer {
        position: relative;
        padding: 10px 5px;
        font-size: 0.9em;
    }

    .footer-content {
        flex-direction: column;
        gap: 5px;
    }

    .copyright, .icp-info {
        font-size: 0.8em;
        line-height: 1.4;
    }
}
