/* 引入自定义字体 */
@font-face {
    font-family: 'CustomFont';
    src: url('../fonts/a.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'CustomFont', sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* 抽屉导航样式（优化版） */
.drawer-nav {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background-color: #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.15);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
}

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

.logo {
    width: 140px;
    height: 48px;
    margin: 0 auto 40px;
    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: 8px;
}

.nav-link {
    text-decoration: none;
    color: #444;
    font-size: 16px;
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 10px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background-color: #1890ff;
    transform: scaleY(0);
    transition: transform 0.3s;
    border-radius: 2px;
}

.nav-link:hover {
    background-color: #f0f7ff;
    color: #1890ff;
    padding-left: 20px;
}

.nav-link:hover::before {
    transform: scaleY(1);
}

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

.user-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f5f5f5;
}

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

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

.login-btn:hover {
    background-color: #bae7ff;
    transform: translateY(-2px);
}

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

.register-btn:hover {
    background-color: #096dd9;
    transform: translateY(-2px);
}

/* 用户信息显示 */
.user-info {
    text-align: center;
    margin-bottom: 20px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    background-color: #1890ff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin: 0 auto 10px;
}

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

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

.logout-btn {
    background-color: #f5f5f5;
    color: #333;
}

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

/* 菜单按钮（优化版） */
.menu-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 44px;
    height: 44px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.menu-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.menu-icon {
    width: 24px;
    height: 2px;
    background-color: #333;
    position: relative;
    transition: all 0.3s;
}

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

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

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

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

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

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

/* 头部样式 */
.header {
    padding: 20px;
    text-align: center;
    background-color: #fff;
    margin-bottom: 30px;
    margin-top: 20px;
}

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

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

/* 工具导航 */
.tool-nav {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto 30px;
    background-color: #fff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    overflow-x: auto;
}

.tool-nav-list {
    display: flex;
    list-style: none;
    gap: 10px;
}

.tool-nav-item {
    white-space: nowrap;
}

.tool-nav-link {
    display: block;
    padding: 8px 15px;
    background-color: #f5f7fa;
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: all 0.3s;
}

.tool-nav-link.active, .tool-nav-link:hover {
    background-color: #1890ff;
    color: #fff;
}

/* 工具内容区域 */
.tool-content {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto 50px;
    background-color: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    min-height: 400px;
}

.tool-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.tool-header h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 5px;
}

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

/* 工具链接列表容器 */
.tool-link-container {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.tool-link-container.active {
    display: grid;
}

/* 工具卡片样式 */
.tool-card {
    background-color: #f5f7fa;
    border-radius: 10px;
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.tool-card h3 {
    font-size: 18px;
    color: #1890ff;
    margin-bottom: 10px;
}

.tool-card p {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.tool-card a {
    display: inline-block;
    padding: 8px 15px;
    background-color: #1890ff;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: background-color 0.3s;
}

.tool-card a:hover {
    background-color: #096dd9;
}

/* 底部样式 */
.footer {
    background-color: #fff;
    padding: 30px 20px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
}

.record-info {
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.record-info span {
    margin: 0 10px;
}

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

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

/* 公安备案图标样式 */
.police-icon {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    vertical-align: middle;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 24px;
    }
    
    .tool-content {
        padding: 20px;
    }
    
    .tool-header h2 {
        font-size: 20px;
    }
    
    .tool-link-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .drawer-nav {
        width: 250px;
    }
    
    .tool-nav-list {
        gap: 5px;
    }
    
    .tool-nav-link {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .record-info span {
        display: block;
        margin: 5px 0;
    }
}
