/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    padding-bottom: 20px;
}

/* 抽屉导航核心样式 */
.drawer-nav {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background-color: #fff;
    box-shadow: 0 0 30px rgba(24, 144, 255, 0.1);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.drawer-nav.active {
    left: 0;
}

/* 导航Logo */
.logo {
    width: 120px;
    height: 40px;
    margin: 0 auto 30px;
    background: url('../images/logo.png') no-repeat center;
    background-size: contain;
    cursor: pointer;
}

/* 导航列表 */
.nav-list {
    list-style: none;
    margin-bottom: auto;
}

.nav-item {
    margin-bottom: 5px;
    border-radius: 8px;
}

.nav-link {
    text-decoration: none;
    color: #444;
    font-size: 16px;
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-link i {
    margin-right: 12px;
    font-size: 18px;
    color: #666;
    width: 20px;
    text-align: center;
}

.nav-link:hover {
    background-color: #e6f7ff;
    color: #1890ff;
}

.nav-link:hover i {
    color: #1890ff;
}

/* 用户信息区域 */
.user-info {
    display: none;
    text-align: center;
    padding: 20px 0 10px;
    border-top: 1px solid #f0f0f0;
}

.user-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #1890ff, #69c0ff);
    color: #fff;
    border-radius: 50%;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.username {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.user-email {
    font-size: 12px;
    color: #999;
    margin-bottom: 15px;
}

.user-level {
    font-size: 12px;
    color: #1890ff;
    margin-bottom: 15px;
}

.logout-btn {
    width: 100%;
    padding: 8px;
    border: none;
    border-radius: 6px;
    background-color: #f5f5f5;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.logout-btn:hover {
    background-color: #ff4d4f;
    color: #fff;
}

/* 登录注册按钮区域 */
.user-actions {
    padding: 20px 0 10px;
    border-top: 1px solid #f0f0f0;
}

.user-btn {
    display: block;
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: none;
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.login-btn {
    background-color: #e6f7ff;
    color: #1890ff;
}

.login-btn:hover {
    background-color: #bae7ff;
}

.register-btn {
    background-color: #1890ff;
    color: #fff;
}

.register-btn:hover {
    background-color: #096dd9;
}

/* 菜单按钮 */
.menu-btn {
    position: fixed;
    top: 15px;
    left: 15px;
    width: 40px;
    height: 40px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.menu-icon {
    width: 22px;
    height: 2px;
    background-color: #333;
    position: relative;
}

.menu-icon::before, .menu-icon::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 2px;
    background-color: #333;
    left: 0;
}

.menu-icon::before {
    top: -8px;
}

.menu-icon::after {
    bottom: -8px;
}

.menu-btn.active .menu-icon {
    background-color: transparent;
}

.menu-btn.active .menu-icon::before {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-btn.active .menu-icon::after {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* 头部标题 */
.header {
    text-align: center;
    padding: 30px 20px 20px;
    margin-left: 0;
    background-color: #fff;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.header h1 {
    font-size: 24px;
    color: #1890ff;
    margin-bottom: 8px;
}

.header p {
    font-size: 14px;
    color: #666;
}

/* 系统通知 */
.notice-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto 20px;
    background-color: #fff;
    border-radius: 8px;
    padding: 10px 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    overflow: hidden;
    position: relative;
}

.notice-title {
    font-size: 16px;
    color: #1890ff;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.notice-title i {
    margin-right: 8px;
}

.notice-scroll {
    overflow: hidden;
    height: 30px;
}

.notice-list {
    list-style: none;
    display: flex;
    animation: noticeScroll 20s linear infinite;
    white-space: nowrap;
}

.notice-item {
    margin-right: 20px;
    font-size: 14px;
    color: #666;
}

@keyframes noticeScroll {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* 轮播图 */
.banner-container {
    width: 90%;
    max-width: 1200px;
    height: 180px;
    margin: 0 auto 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.banner-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 工具列表 */
.tools-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.tool-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: transform 0.2s;
}

.tool-card:hover {
    transform: translateY(-5px);
}

.tool-icon {
    font-size: 30px;
    color: #1890ff;
    margin-bottom: 10px;
}

.tool-name {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.tool-desc {
    font-size: 12px;
    color: #999;
}

/* 底部信息 */
.footer {
    width: 90%;
    max-width: 1200px;
    margin: 30px auto 0;
    text-align: center;
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.record-info {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.record-info a {
    color: #999;
    text-decoration: none;
}

.record-info img {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 5px;
}

.version-info {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.visit-count {
    font-size: 12px;
    color: #666;
}

.visit-count span {
    color: #1890ff;
    font-size: 14px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .banner-container {
        height: 120px;
    }

    .tools-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .drawer-nav {
        width: 250px;
    }

    .header h1 {
        font-size: 20px;
    }

    .tool-card {
        padding: 10px;
    }

    .tool-icon {
        font-size: 24px;
    }
}
