﻿* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: "Microsoft YaHei", sans-serif;
}

body {
	background-color: #f8f9fa;
	text-decoration: none;
}

/* 顶部导航栏整体 */
.navbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #2c3e50;
	padding: 15px 30px;
	color: white;
	box-shadow: 0 2px 5px rgba(0,0,0,0.1);
	/* 核心：固定在顶部 */
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 999; /* 确保在最上层 */
}

/* Logo */
.logo {
	font-size: 20px;
	font-weight: bold;
	margin-right: 40px;
}

/* 左侧：Logo + 导航菜单 */
.nav-left {
	display: flex;
	align-items: center;
}

/* 导航菜单 */
.nav-menu {
	display: flex;
	list-style: none;
	gap: 30px;
}

.nav-menu li a {
	color: white;
	text-decoration: none;
	font-size: 15px;
	transition: color 0.3s;
}

.nav-menu li a:hover {
	color: #3498db;
}

/* 右侧：搜索框 + 登录按钮 整体容器 */
.nav-right {
	display: flex;
	align-items: center;
	gap: 20px;
}

/* 纯搜索框 */
.nav-search {
	display: flex;
	width: 420px;
}

/* 搜索输入框 */
.nav-search input {
	flex: 1;
	padding: 9px 12px;
	border: none;
	outline: none;
	font-size: 14px;
	border-radius: 4px 0 0 4px;
}

/* 搜索按钮 */
.nav-search button {
	background: #3498db;
	color: white;
	border: none;
	padding: 9px 16px;
	cursor: pointer;
	border-radius: 0 4px 4px 0;
	transition: background 0.3s;
}

.nav-search button:hover {
	background: #2980b9;
}

/* 登录注册按钮组 */
.user-buttons {
	display: flex;
	gap: 12px;
}

/* 登录按钮 */
.btn-login {
	padding: 8px 16px;
	border: 1px solid #3498db;
	background: transparent;
	color: white;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.3s;
	font-size: 14px;
	text-decoration: none;
}

.btn-login:hover {
	background: #3498db;
	color: white;
}

/* 注册按钮 */
.btn-register {
	padding: 8px 16px;
	border: none;
	background: #3498db;
	color: white;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.3s;
	font-size: 14px;
	text-decoration: none;
}

.btn-register:hover {
	background: #2980b9;
}

/* 容器 */
.container {
	max-width: 1200px;
	margin: 0 auto;
	padding-top: 60px;
}

/* 标题区域 */
.section-title {
	font-size: 32px;
	color: #2c3e50;
	font-weight: 700;
	text-align: center;
	position: relative;
	padding-bottom: 20px;
	margin-bottom: 40px;
}
.section-title::after {
	content: '';
	position: absolute;
	width: 80px;
	height: 4px;
	background-color: #3498db;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
}
.section-desc {
	text-align: center;
	color: #6c757d;
	font-size: 18px;
	margin-bottom: 50px;
}

/* 核心：卡片宽度强制固定 */
.card {
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.08);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	margin: 0 auto 10px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	
	/* 固定宽度 800px，不会被图片撑大 */
	width: 1200px !important;
	max-width: 1200px !important;
	min-width: 1200px !important;
}

/* 文字区域 */
.card-body {
	padding: 15px;
}

/* ========== 调整布局：标题 + 互动按钮 同一行 ========== */
.card-header-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
}
.card-title {
	font-size: 22px;
	font-weight: 700;
	color: #2c3e50;
	margin: 0;
}
.card-actions {
	display: flex;
	gap: 15px;
}

/* 时间样式 */
.card-time {
	color: #999;
	font-size: 16px;
	margin-bottom: 15px;
	display: flex;
	align-items: center;
	gap: 6px;
}
.caozuo {
	display: flex;
	align-items: center;
	gap: 5px;
	cursor: pointer;
	transition: color 0.2s;
	font-size: 14px;
	color: #999;
}
.caozuo:hover {
	color: #e74c3c;
}

.card-text {
	font-size: 16px;
	color: #666;
	line-height: 1.8;
	margin-bottom: 0;
}

/* 多图横向展示：永远不撑破卡片 */
.card-img-horizontal {
	display: flex;
	gap: 4px;
	background: #f5f5f5;
	width: 100%;
	overflow: hidden;
}
.card-img-horizontal img {
	flex: 1;
	height: 180px;
	object-fit: cover;
	display: block;
	max-width: 100%;
}

/* 点赞分享评论 样式 */
.like-btn, .share-btn, .comment-btn {
	display: flex;
	align-items: center;
	gap: 5px;
	cursor: pointer;
	transition: color 0.2s;
	font-size: 14px;
	color: #999;
}
.like-btn:hover {
	color: #e74c3c;
}
.share-btn:hover {
	color: #3498db;
}
.comment-btn:hover {
	color: #2ecc71;
}
/* 发布页 */
.btn {
	padding: 8px 16px;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
}

.btn-publish {
	background-color: #1677ff;
	color: #fff;
	width: 120px;
	height: 40px;
	font-size: 15px;
}

.page-title {
	font-size: 18px;
	font-weight: bold;
}

.publish-container {
	max-width: 900px;
	margin: 0 auto;
	background: #fff;
	padding: 30px;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
	margin-top: 60px;
}

.form-item {
	margin-bottom: 25px;
}

.form-label {
	display: block;
	margin-bottom: 8px;
	font-weight: 500;
	color: #333;
}

input, textarea, select {
	width: 100%;
	padding: 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	outline: none;
	transition: border 0.3s;
}

input:focus, textarea:focus, select:focus {
	border-color: #1677ff;
}

textarea {
	min-height: 150px;
	resize: vertical;
}

.upload-preview-row {
	display: flex;
	align-items: center;
	gap: 15px;
	flex-wrap: wrap;
}

.upload-btn {
	width: 100px;
	height: 100px;
	border: 2px dashed #ddd;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 12px;
	color: #666;
	transition: border 0.3s;
	flex-shrink: 0;
}
.upload-btn:hover {
	border-color: #1677ff;
}

#file-input {
	display: none;
}

.preview-list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.preview-item {
	width: 100px;
	height: 100px;
	position: relative;
	border-radius: 4px;
	overflow: hidden;
	flex-shrink: 0;
}
.preview-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.delete-img {
	position: absolute;
	top: 5px;
	right: 5px;
	width: 20px;
	height: 20px;
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
	border-radius: 50%;
	text-align: center;
	line-height: 20px;
	cursor: pointer;
	font-size: 12px;
}

.upload-tip {
	font-size: 12px;
	color: #999;
	margin-top: 6px;
}

.submit-bottom {
	margin-top: 30px;
	text-align: center;
}

/* 用户登录*/
.yhdl{
	background:#f5f7fa;      /* 页面背景色 */
    display:flex;            /* 弹性布局 */
    justify-content:center;  /* 水平居中 */
    align-items:center;      /* 垂直居中 */
    height:100vh;            /* 高度占满屏幕 */
    padding:20px;            /* 内边距 */
    font-family:system-ui    /* 系统默认字体 */
}

/* 登录盒子样式 */
.box{
    width:100%;
    max-width:380px;         /* 最大宽度 */
    background:#fff;         /* 白色背景 */
    padding:30px;           /* 内边距 */
    border-radius:12px       /* 圆角 */
}
/* 标题 */
h2{
    text-align:center;       /* 居中 */
    margin-bottom:25px       /* 底部间距 */
}
/* 输入框样式 */
.box input{
    width:100%;
    height:44px;             /* 高度 */
    padding:0 14px;          /* 左右内边距 */
    border:1px solid #ddd;   /* 边框 */
    border-radius:8px;       /* 圆角 */
    margin-bottom:15px       /* 底部间距 */
}
/* 弹性布局（验证码+按钮同行） */
.flex{
    display:flex;
    gap:10px                 /* 间距 */
}
/* 按钮通用样式 */
.box button{
    height:44px;
    border:none;              /* 无边框 */
    border-radius:8px;        /* 圆角 */
    background:#007bff;       /* 主题蓝色 */
    color:white;              /* 文字白色 */
    cursor:pointer            /* 鼠标手型 */
}
/* 按钮禁用样式 */
button:disabled{
    background:#ccc           /* 灰色 */
}
/* 获取验证码按钮 */
#codeBtn{
    white-space:nowrap;       /* 文字不换行 */
    width:120px               /* 宽度 */
}
/* 登录按钮 */
#loginBtn{
    width:100%;
    margin-top:5px
}
/* 底部 */
.di {
	max-width: 1200px;
	margin: 0 auto;
	height:100px;
	padding: 15px 30px;
	font-size: 25px;
	color: #2c3e50;
	font-weight: 700;
	text-align: center;
}