/* 文件名: style.css */

/* 全局基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #0f0f0f; /* 深色背景 */
    color: #ffffff;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    padding-top: 56px; /* 为固定页首预留空间 */
}

/* 导航栏主体 */
.navbar {
    height: 56px;
    background-color: #0f0f0f;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 16px;
}

/* 左侧 Logo 区 */
.nav-left {
    display: flex;
    align-items: center;
    min-width: 170px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    color: white;
}

.icon-btn:hover { background-color: #272727; }

.logo-wrapper {
    text-decoration: none;
    color: white;
    margin-left: 16px;
    display: flex;
    align-items: baseline;
}

.logo-text {
    font-size: 20px;
    font-weight: bold;
    letter-spacing: -0.5px;
}

.logo-region {
    font-size: 10px;
    color: #aaa;
    margin-left: 2px;
}

/* 隐藏 Checkbox 逻辑控制侧边栏 */
#menu-toggle { display: none; }

/* 侧边抽屉菜单样式 */
.side-drawer {
    position: fixed;
    top: 0;
    left: -240px; /* 初始隐藏在屏幕左侧 */
    width: 240px;
    height: 100vh;
    background-color: #0f0f0f;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
    overflow-y: auto;
    box-shadow: 5px 0 15px rgba(0,0,0,0.5);
}

/* 当勾选框被选中时，侧边栏滑入 */
#menu-toggle:checked ~ .side-drawer {
    left: 0;
}

.drawer-top {
    height: 56px;
    display: flex;
    align-items: center;
    padding-left: 16px;
    border-bottom: 1px solid #303030;
}

.menu-list {
    list-style: none;
    padding: 12px 0;
}

.menu-list li a {
    display: block;
    padding: 10px 24px;
    color: #f1f1f1;
    text-decoration: none;
    font-size: 14px;
}

.menu-list li a:hover { background-color: #272727; }

.menu-title {
    padding: 10px 24px;
    font-size: 12px;
    color: #aaa;
    text-transform: uppercase;
}

hr { border: 0; border-top: 1px solid #303030; margin: 12px 0; }

/* 遮罩背景 */
.overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1500;
}

#menu-toggle:checked ~ .overlay { display: block; }

/* 搜索框设计 */
.nav-center {
    flex: 0 1 720px;
    margin: 0 20px;
}

.search-form {
    display: flex;
    width: 100%;
}

.search-input-group {
    display: flex;
    width: 100%;
    border: 1px solid #303030;
    border-radius: 40px;
    overflow: hidden;
    background-color: #121212;
}

.search-input-group input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    padding: 0 16px;
    height: 40px;
    font-size: 16px;
    outline: none;
}

.search-input-group input:focus {
    border: 1px solid #1c62b9;
    border-radius: 40px 0 0 40px;
}

.search-btn {
    width: 64px;
    background-color: #222222;
    border: none;
    border-left: 1px solid #303030;
    color: white;
    cursor: pointer;
}

.search-btn:hover { background-color: #333333; }

/* 右侧操作区 */
.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 150px;
    justify-content: flex-end;
}

.btn-primary {
    background-color: #3ea6ff; /* 醒目的动作按钮颜色 */
    border: none;
    color: #0f0f0f;
    padding: 8px 16px;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.btn-primary:hover { background-color: #65b8ff; }

.user-icon {
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
}

/* 响应式：在窄屏下隐藏搜索框以保证 Logo 显示 */
@media (max-width: 768px) {
    .nav-center { display: none; }
    .nav-left { min-width: auto; }
}

/* 主页已移除右侧“发布展会 / 个人头像”后，保证搜索区域更自然铺开 */
.nav-container {
    gap: 16px;
}

.nav-center {
    flex: 1 1 auto;
    max-width: 980px;
}

@media (max-width: 768px) {
    .nav-container {
        gap: 10px;
    }
}