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

/* 基础样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 头部样式 */
header {
    background-color: #231c1a;
    color: white;
    height: 80px;
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

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

header h1 {
    font-size: 24px;
    background-image: url(images/yrklogo.png);
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 50px;
    padding-left: 70px;
    white-space: nowrap;
}

header ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

header li {
    display: inline;
}

header a {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

header a:hover {
    border-bottom: 1px white solid;
    padding-bottom: 5px;
}

/* 用户信息样式 */
.user-info {
    display: flex;
    align-items: center;
    margin-left: 20px;
    padding: 5px 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

#currentUser {
    color: #fff;
    font-size: 14px;
    margin-right: 10px;
}

#logoutBtn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    padding: 2px 5px;
    transition: all 0.2s ease;
}

#logoutBtn:hover {
    color: #ff6b6b;
}

/* 移动端菜单按钮 */
.mobile-menu-button {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
}

/* 主要内容区域 */
main {
    background-color: white;
    padding-top: 80px;
    min-height: calc(100vh - 60px);
}

.news{
    padding: 20px;
    height: 50px;
}

.news p{
    color: red;
    line-height: 50px;
    font-size: 16px;
}

/* 新的左右布局 */
.main-container {
    display: flex;
    min-height: calc(100vh - 160px);
    margin-top: 50px; /* 为新闻区域留出空间 */
}

/* 左侧边栏样式 */
.sidebar {
    width: 280px;
    background-color: #f5f5f5;
    border-right: 1px solid #ddd;
    padding: 20px 0;
    overflow-y: auto;
    flex-shrink: 0;
    max-height: calc(100vh - 130px);
    transition: transform 0.3s ease, width 0.3s ease;
}

/* 侧边栏隐藏状态 */
.sidebar.collapsed {
    transform: translateX(-280px);
    width: 0;
}

/* 侧边栏切换按钮 */
.sidebar-toggle {
    position: fixed;
    left: 280px;
    top: 150px; /* 调整按钮位置，避开新闻区域 */
    background-color: #485652;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    padding: 10px;
    cursor: pointer;
    z-index: 100;
    transition: left 0.3s ease;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.sidebar-toggle.collapsed {
    left: 0;
}

/* 自定义滚动条样式 */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.sidebar-section {
    margin-bottom: 20px;
}

.sidebar-section h3 {
    padding: 10px 20px;
    margin: 0;
    font-size: 1.1rem;
    color: #333;
    border-bottom: 1px solid #ddd;
}

.sidebar-group {
    margin: 10px 0;
}

.sidebar-group h4 {
    padding: 5px 20px;
    margin: 0;
    font-size: 1rem;
    color: #555;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar li {
    padding: 8px 20px 8px 30px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.sidebar li:hover {
    background-color: #e9e9e9;
    border-left-color: #485652;
}

.sidebar a {
    text-decoration: none;
    color: #333;
    display: block;
    font-size: 0.95rem;
}

.sidebar .customer {
    font-weight: bold;
    color: #555;
    padding: 8px 20px 8px 30px;
}

/* 右侧内容区域样式 */
.content-area {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    transition: margin-left 0.3s ease;
}

/* 侧边栏隐藏时的内容区域样式 */
.sidebar.collapsed + .content-area {
    margin-left: 0;
}

.welcome-message {
    text-align: center;
    padding: 40px 20px;
}

.content-placeholder {
    margin-top: 50px;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 8px;
    text-align: center;
}

.content-logo {
    width: 100px;
    margin-bottom: 20px;
}

/* 历史记录页面样式 */
.history-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.version-item {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.version-item:last-child {
    border-bottom: none;
}

.version-item.highlight {
    background-color: #f0f7ff;
    padding: 10px;
    border-radius: 5px;
    border-left: 3px solid #485652;
}

.none{
    color: gray;
}

.cost {
    color: red;
}

/* 活动链接样式 */
.sidebar a.active {
    font-weight: bold;
    color: #485652;
}

.sidebar li:has(a.active) {
    background-color: #e9e9e9;
    border-left-color: #485652;
}

/* 动态内容样式 */
.dynamic-content {
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-top: 20px;
}

.dynamic-content h2 {
    color: #485652;
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

/* iframe样式 */
.content-iframe {
    width: 100%;
    height: calc(100vh - 180px);
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 加载指示器样式 */
.loading-content {
    text-align: center;
    padding: 40px 20px;
}

.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #485652;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* 不可用功能提示 */
.unavailable-notice {
    margin-top: 15px;
    padding: 10px;
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
    border-radius: 4px;
}

h2 {
    margin-bottom: 1rem;
}

h3 {
    margin: 1rem 0;
    font-size: 1.2rem;
}

/* 更多信息区域 */
.more {
    background-color: #485652;
    padding: 15px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.more p {
    display: flex;
    align-items: center;
    gap: 10px;
}

.more a {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 120px;
}

.more-content {
    color: #ccc;
    font-size: 0.9em;
}

.more a:hover {
    border-bottom: 1px white solid;
    padding-bottom: 5px;
}

/* 页脚 */
footer {
    background: #231c1a; /* 与 header 相同的背景色 */
    color: #ffffff; /* 文字颜色改为白色 */
    padding: 1rem 0; /* 内边距 */
    text-align: center; /* 文字居中 */
    font-size: 0.9rem; /* 字体大小 */
    border-top: 1px solid #e9ecef; /* 顶部边框 */
    position: fixed; /* 固定在底部 */
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000; /* 确保在其他内容之上 */
}

/* 为页面内容添加 padding-bottom，避免被 footer 遮挡 */
body {
    padding-bottom: 80px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    footer {
        padding: 0.8rem 0;
        font-size: 0.8rem;
    }
    body {
        padding-bottom: 70px;
    }
}    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff; /* 可根据实际设计调整背景色 */
    z-index: 1000; /* 确保 footer 在其他内容之上 */
    padding: 1rem 0; /* 可根据实际设计调整内边距 */
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1); /* 可选：添加阴影增强视觉效果 */
}

/* 为页面内容添加 padding-bottom，避免被 footer 遮挡 */
body {
    padding-bottom: 80px; /* 根据 footer 高度调整 */
}

/* 响应式设计：在小屏幕下调整 footer 样式 */
@media (max-width: 768px) {
    footer {
    background: #231c1a; /* 与 header 相同的背景色 */
    color: #ffffff; /* 文字颜色改为白色 */
    padding: 1rem 0; /* 内边距 */
    text-align: center; /* 文字居中 */
    font-size: 0.9rem; /* 字体大小 */
    border-top: 1px solid #e9ecef; /* 顶部边框 */
    position: fixed; /* 固定在底部 */
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000; /* 确保在其他内容之上 */
}

/* 为页面内容添加 padding-bottom，避免被 footer 遮挡 */
body {
    padding-bottom: 80px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    footer {
        padding: 0.8rem 0;
        font-size: 0.8rem;
    }
    body {
        padding-bottom: 70px;
    }
}        padding: 0.5rem 0;
    }
    body {
        padding-bottom: 60px;
    }
}    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #000;
    color: white;
    padding: 20px;
    text-align: center;
    font-size: 14px;

}

/* 历史记录页面 */
.history {
    padding: 20px;
}

.history h2 {
    margin: 1.5rem 0 1rem;
}

.history p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.current {
    border-bottom: 1px white dashed;
    padding-bottom: 5px;
}

/* 客户样式 */
.customer {
    font-weight: bold;
    padding: 8px;
    margin: 5px 0;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.customer:hover {
    background-color: antiquewhite !important;
    color: #000 !important;
}

/* 页脚样式 */
footer {
    background: #231c1a; /* 与 header 相同的背景色 */
    color: #ffffff; /* 文字颜色改为白色 */
    padding: 1rem 0; /* 内边距 */
    text-align: center; /* 文字居中 */
    font-size: 0.9rem; /* 字体大小 */
    border-top: 1px solid #e9ecef; /* 顶部边框 */
    position: fixed; /* 固定在底部 */
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000; /* 确保在其他内容之上 */
}

/* 为页面内容添加 padding-bottom，避免被 footer 遮挡 */
body {
    padding-bottom: 80px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    footer {
        padding: 0.8rem 0;
        font-size: 0.8rem;
    }
    body {
        padding-bottom: 70px;
    }
}    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff; /* 可根据实际设计调整背景色 */
    z-index: 1000; /* 确保 footer 在其他内容之上 */
    padding: 1rem 0; /* 可根据实际设计调整内边距 */
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1); /* 可选：添加阴影增强视觉效果 */
}

/* 为页面内容添加 padding-bottom，避免被 footer 遮挡 */
body {
    padding-bottom: 80px; /* 根据 footer 高度调整 */
}

/* 响应式设计：在小屏幕下调整 footer 样式 */
@media (max-width: 768px) {
    footer {
    background: #231c1a; /* 与 header 相同的背景色 */
    color: #ffffff; /* 文字颜色改为白色 */
    padding: 1rem 0; /* 内边距 */
    text-align: center; /* 文字居中 */
    font-size: 0.9rem; /* 字体大小 */
    border-top: 1px solid #e9ecef; /* 顶部边框 */
    position: fixed; /* 固定在底部 */
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000; /* 确保在其他内容之上 */
}

/* 为页面内容添加 padding-bottom，避免被 footer 遮挡 */
body {
    padding-bottom: 80px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    footer {
        padding: 0.8rem 0;
        font-size: 0.8rem;
    }
    body {
        padding-bottom: 70px;
    }
}        padding: 0.5rem 0;
    }
    body {
        padding-bottom: 60px;
    }
}    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #485652;
    color: white;
    text-align: center;
    padding: 10px 0;
    position: fixed;
    bottom: 0;
    width: 100%;
}

.visit-counter {
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .search > div,
    .submit > div,
    .admin > div {
        min-width: 300px;
    }
}

@media (max-width: 900px) {
    header h1 {
        font-size: 20px;
        background-size: 40px;
        padding-left: 50px;
    }

    .mobile-menu-button {
        display: block;
    }

    header ul {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background-color: #231c1a;
        flex-direction: column;
        padding: 20px;
        text-align: center;
    }

    header ul.active {
        display: flex;
    }

    header li {
        margin: 10px 0;
    }
    
    /* 响应式左右布局 */
    .main-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #ddd;
        max-height: 300px;
    }
    
    .sidebar.collapsed {
        transform: translateY(-300px);
        height: 0;
        padding: 0;
        overflow: hidden;
    }
    
    .sidebar-toggle {
        left: auto;
        right: 20px;
        top: 90px;
        border-radius: 4px;
    }
    
    .sidebar-toggle.collapsed {
        left: auto;
    }
    
    .content-area {
        padding: 15px;
    }
    
    .welcome-message {
        padding: 20px 10px;
    }
    
    .content-placeholder {
        margin-top: 20px;
        padding: 15px;
    }
}

@media (max-width: 600px) {
    header h1 {
        font-size: 16px;
        background-size: 30px;
        padding-left: 40px;
    }

    .firstpart,
    .secondpart,
    .thirdpart {
        padding: 15px;
    }

    main li {
        padding: 5px;
    }

    .more {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .more p {
        flex-direction: column;
        text-align: center;
    }
    
    .more a {
        margin-bottom: 5px;
    }
}

/* 打印样式 */
@media print {
    header {
        position: static;
    }

    main {
        padding-top: 0;
    }

    .mobile-menu-button {
        display: none;
    }
}