:root {
    --primary-color: #aa2ab1;
    --secondary-color: #FF5722;
    --success-color: #5FB878;
    --bg-color: #f8f9fa;
    --text-color: #333;
    --header-bg: #fff;
    --sidebar-bg: #fff;
    --content-bg: #f8f9fa;
    --card-bg: #fff;
    --border-color: #e6e6e6;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --hover-shadow: rgba(0, 0, 0, 0.15);
}

.dark-theme {
    --primary-color: #aa2ab1;
    --secondary-color: #FF5722;
    --success-color: #5FB878;
    --bg-color: #1a1a1a;
    --text-color: #e6e6e6;
    --header-bg: #2d2d2d;
    --sidebar-bg: #2d2d2d;
    --content-bg: #1a1a1a;
    --card-bg: #2d2d2d;
    --border-color: #444;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --hover-shadow: rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: all 0.3s ease;
    font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

.layui-elem-quote {
    border-left: 5px solid var(--primary-color) !important;
}


/* 顶部导航栏样式 */
.header {
    background-color: var(--header-bg);
    box-shadow: 0 2px 10px var(--shadow-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 70px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.header-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo a{
    color: var(--primary-color) !important;
}

.logo-icon {
    color: var(--secondary-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 主题切换开关样式 */
.theme-switch {
    display: flex;
    align-items: center;
    background-color: #f5f5f5;
    border-radius: 25px;
    padding: 2px;
    cursor: pointer;
    position: relative;
    width: 64px;
    height: 30px;
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.theme-switch.active {
    background-color: #2d2d2d;
}

.theme-option {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50%;
    height: 100%;
    z-index: 1;
    transition: all 0.3s ease;
}

.theme-slider {
    position: absolute;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #fff, #f0f0f0);
    border-radius: 50%;
    left: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.theme-switch.active .theme-slider {
    left: calc(100% - 32px);
    /*background: linear-gradient(135deg, #1E9FFF, #0d8ddc);*/
}

.mobile-menu-btn {
    display: none;
    background-color: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* 主体内容区域 */
.main-container {
    display: flex;
    flex: 1;
    margin-top: 70px; /* 为固定header留出空间 */
    height: calc(100vh - 70px);
    overflow: hidden;
}

/* 左侧导航栏 */
.sidebar {
    background-color: var(--sidebar-bg);
    box-shadow: 2px 0 10px var(--shadow-color);
    width: 250px;
    flex-shrink: 0;
    overflow-y: auto;
    color: var(--text-color);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}




.leftNav .layui-nav-item>a{
    line-height: 20px!important;
    .layui-nav-more{
        padding: 10px 0!important;
    }
}


/* 隐藏滚动条 */
.sidebar::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

.sidebar {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sidebar-content {
    flex: 1;
    padding: 15px 0;
    position: relative;
}

/* 右侧内容区域 */
.content {
    background-color: var(--content-bg);
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.content-header {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.stats-info {
    display: flex;
    gap: 15px;
}

.stat-box {
    background-color: var(--card-bg);
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--shadow-color);
    text-align: center;
    min-width: 100px;
}

.stat-box .number {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-box .label {
    font-size: 12px;
    color: #888;
}

/* 改枪码卡片样式 - 优化属性展示 */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.gun-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 3px 10px var(--shadow-color);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: fit-content;
}

.gun-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px var(--hover-shadow);
}

.gun-image-container {
    position: relative;
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    padding: 10px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.gun-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
}

.gun-card:hover .gun-image {
    transform: scale(1.02);
}

/* 图片装饰元素 */
.image-decoration {
    position: absolute;
    z-index: 1;
}

.decoration-corner {
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, var(--primary-color), #0d8ddc);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.decoration-badge {
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, var(--secondary-color), #e64a19);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.decoration-stripe {
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
    height: 2px;
}

.decoration-glow {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30, 159, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gun-card:hover .decoration-glow {
    opacity: 1;
}

.gun-title {
    padding: 12px 15px;
    font-weight: bold;
    border-bottom: 1px solid var(--border-color);
    font-size: 16px;
    background-color: rgba(0, 0, 0, 0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gun-price {
    color: var(--secondary-color);
    font-size: 14px;
    font-weight: bold;
}

.gun-stats {
    padding: 12px 15px;
}

/* 新的属性展示布局 - 水平换行 */
.stats-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px ;
    padding: 8px 5px;
    border-radius: 6px;
    background-color: rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
    flex: 1;
}

.stat-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.stat-name {
    color: #666;
    font-size: 12px;
    margin-bottom: 5px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.stat-value {
    font-weight: bold;
    color: var(--text-color);
    font-size: 16px;
}

.stat-value.positive {
    color: var(--success-color);
}

.stat-value.negative {
    color: var(--secondary-color);
}

.gun-code {
    padding: 12px 15px;
    background: linear-gradient(135deg, var(--primary-color), #0d8ddc);
    color: white;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.gun-code:hover {
    background: linear-gradient(135deg, #0d8ddc, var(--primary-color));
}

/* 左侧导航样式调整 - 确保宽度250px且垂直居中 */
.layui-nav-tree {
    background-color: var(--sidebar-bg) !important;
    border: none !important;
    width: 250px !important;
}

.layui-nav-tree .layui-nav-item a {
    color: var(--text-color) !important;
    padding: 12px 20px !important;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    line-height: 1.4;
}

.layui-nav-tree .layui-nav-item a:hover {
    background-color: var(--sidebar-bg) !important;
    padding-left: 25px !important;
}

.layui-nav-tree .layui-nav-itemed > a {
    background-color: var(--sidebar-bg) !important;
    color: var(--primary-color) !important;
    font-weight: bold;
}
.layui-nav-tree .layui-nav-bar,
.layui-nav-tree .layui-nav-bar:after {
    background-color: var(--primary-color) !important;
}

.layui-nav-tree .layui-nav-child{
    background-color: var(--sidebar-bg) !important;
}

.layui-nav-tree .layui-nav-child dd a {
    color: var(--text-color) !important;
    padding: 10px 20px 10px 40px !important;
    display: flex;
    align-items: center;
    line-height: 1.4;
}
.layui-nav-tree .layui-nav-child dd.layui-this,
.layui-nav-tree .layui-nav-child dd.layui-this a,
.layui-nav-tree .layui-this,
.layui-nav-tree .layui-this>a,
.layui-nav-tree .layui-this>a:hover
{
    background-color: #aa2ab10a !important;
}

.layui-nav-tree .layui-nav-child dd a:hover{
    background-color: #aa2ab10a !important;
    padding-left: 45px !important;
}
.layui-nav-child dd i{
    margin-right: 5px;
}
.codeSerch{
    width: 50%;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .codeSerch{
        width: 100%;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .sidebar {
        position: fixed;
        left: -250px;
        top: 70px;
        width: 250px;
        height: calc(100vh - 70px);
        z-index: 999;
    }

    .sidebar.active {
        left: 0;
    }

    .content {
        padding: 15px;
    }
    .content-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .stats-info {
        width: 100%;
        justify-content: space-between;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    /* 移动端遮罩层 */
    .sidebar-overlay {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 998;
        display: none;
    }

    .sidebar-overlay.active {
        display: block;
    }
}

/* 桌面端隐藏移动端菜单按钮 */
@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none !important;
    }


}

/* 添加一些动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.gun-card {
    animation: fadeIn 0.5s ease forwards;
}

.gun-card:nth-child(2) { animation-delay: 0.1s; }
.gun-card:nth-child(3) { animation-delay: 0.2s; }
.gun-card:nth-child(4) { animation-delay: 0.3s; }

/* 添加一些装饰元素 */
.decoration {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    opacity: 0.03;
    z-index: -1;
}

.decoration-1 {
    top: 10%;
    right: 10%;
}

.decoration-2 {
    bottom: 10%;
    left: 10%;
}



/* 分页样式 - 不改变HTML结构 */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

/* 原始分页样式美化 */
.pagination {
    display: flex;
    list-style: none;
    border-radius: 50px;
    background-color: var(--card-bg);
    box-shadow: 0 4px 15px var(--shadow-color);
    overflow: hidden;
    border: 1px solid var(--border-color);
    padding: 0;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
}

.pagination li {
    margin: 0;
    border-right: 1px solid var(--border-color);
}

.pagination li:last-child {
    border-right: none;
}

.pagination li a,
.pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 50px;
    background-color: transparent;
    border: none;
}

.pagination li a:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
}

.dark-theme .pagination li a:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.pagination li.active span {
    background: linear-gradient(135deg, var(--primary-color), #8a1e90);
    color: white;
    font-weight: 600;
}

.pagination li.disabled span {
    color: var(--text-color);
    opacity: 0.5;
    background-color: rgba(0, 0, 0, 0.03);
    cursor: not-allowed;
}

.dark-theme .pagination li.disabled span {
    background-color: rgba(255, 255, 255, 0.03);
}

/* 移动端适配 */
@media (max-width: 600px) {
    .pagination li a,
    .pagination li span {
        padding: 10px 14px;
        min-width: 44px;
    }

    .pagination li:not(.active):not(.disabled):not(:first-child):not(:last-child) {
        display: none;
    }

    .pagination li.active,
    .pagination li:first-child,
    .pagination li:last-child {
        display: block;
    }

    .logo{
        max-width: 200px;
    }

}


.sidebar-content-footer{
    position: absolute;
    bottom: 0;
    width: 100%;
    color: #8e8e8e;
    padding: 10px;
    font-size: 12px;
}
.footer-banner{
    width: 100%;
    float: left;
    height: 60px;
    background: rgba(200, 198, 198, 0.7);
    border-radius: 10px;
    margin-bottom: 10px;
    text-align: center;
}
.footer-banner p{
    line-height: 60px;
    color: var(--text-color


    );

}
.footer-banner-div{
    width: 100%;
    float: left;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    font-size: 12px
}