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

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    padding-top: 60px; /* 确保内容不被页眉覆盖 */
}

/* 基础重置 */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

/* 头部固定方案 */
.header-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    z-index: 1000;
    background: #fff;
    margin-bottom: -1px; /* 消除可能的1px间隙 */
    border-bottom: 1px solid #e0e0e0;
    box-shadow: none;
}

.header {
    width: 100%;
    height: 100%;
    margin: 0 auto;
    padding: 0 8% 0 3%;
    box-shadow: none;
    border-bottom: 1px solid #e0e0e0;
}

/* 确保主内容区域不会被页眉遮挡 */
.main-container {
    margin-top: 60px; 
    height: calc(100vh - 60px);
    overflow-y: auto;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 侧边栏样式 */
.sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    bottom: 0;
    width: 240px;
    background-color: #fff;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    z-index: 999;
    overflow-y: auto;
    padding-right: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 登录按钮样式修复 */
.nav-login, .nav-login span {
    color: black !important;
    text-decoration: none !important;
}
.nav-login {
    border: 1px solid #e0e0e0 !important;
    background: #f0f0f0 !important;
}

/* 用户操作区域样式 */
.action-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.create-btn,
.login-btn {
    height: 32px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    background: #f0f0f0;
    color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    box-sizing: border-box;
}

.create-btn:hover,
.login-btn:hover {
    background: #e8e8e8;
    color: black;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* 容器布局 */
.container {
    display: flex;
    min-height: calc(100vh - 60px);
    background-color: #f5f5f5;
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    padding: 20px;
    background-color: #fff;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        margin-top: 60px;
    }
    
    .main-content {
        margin: 20px;
        width: calc(100% - 40px);
    }
}

/* 页脚样式 */
.footer {
    background-color: #fff;
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid #eee;
    margin-top: 20px;
}

/* 确保模态框有最高z-index */
#auth-modal {
    z-index: 10000 !important;
}