blob: e44eea193321195a372f1c600133b93ee7824beb [file] [log] [blame]
/* 设置整个兴趣小组页面的背景色和布局 */
.interest-group-container {
background: #333;
width: 100%;
height: 2000px;
}
/* 页面标题样式 */
h1 {
text-align: center;
color: #5F4437; /* 深棕色 */
font-size: 2rem;
margin-bottom: 30px;
}
/* 筛选、搜索和排序容器样式 */
.filter-search-sort-container {
display: flex;
justify-content: center;
gap: 20px;
margin-bottom: 20px;
}
/* 筛选部分样式 */
.filter, .sort {
margin-bottom: 0;
/* 文字在左边,下拉框在右边 */
display: flex;
justify-content: space-between;
align-items: center;
gap: 5px;
}
.search input {
padding: 10px;
width: 200px;
margin-left: 100px;
border-radius: 6px;
border: 1px solid #e0c4a1; /* 浅棕色 */
background-color: #fff5f5; /* 浅粉色 */
color: #5F4437;
font-size: 1rem;
}
.filter select,
.sort select {
padding: 10px;
width: 200px;
border-radius: 6px;
border: 1px solid #e0c4a1; /* 浅棕色 */
background-color: #fff5f5; /* 浅粉色 */
color: #5F4437;
font-size: 1rem;
}
/* 激活时的输入框样式 */
.filter select:focus,
.search input:focus,
.sort select:focus {
border-color: #b38867; /* 较深的棕色 */
outline: none;
}
.group-list {
margin-top: 5%;
display: flex;
flex-wrap: wrap;
gap: 20px; /* 控制 item 之间的间距 */
justify-content: flex-start; /* 让不足三项时左对齐 */
}
.group-item {
flex: 0 0 calc(33.333% - 20px); /* 每个占1/3减去间距 */
box-sizing: border-box;
border: 1px solid #e0c4a1;
border-radius: 8px;
overflow: hidden;
background-color: #fff;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
transition: transform 0.3s ease-in-out;
padding: 15px;
}
.group-item:hover {
transform: translateY(-5px); /* 鼠标悬停时小组项上升效果 */
}
.group-content {
display: flex;
gap: 15px;
}
.group-info-right {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: flex-start;
}
/* 小组描述样式 */
.group-description {
color: #333;
font-size: 1rem;
line-height: 1.4;
margin-top: 10px;
margin-bottom: 10px;
}
/* 小组标签样式 */
.group-tags {
display: flex;
gap: 10px;
}
.tag {
background-color: #f0f0f0;
color: #5F4437;
padding: 5px 10px;
border-radius: 4px;
font-size: 0.9rem;
}
/* 分页按钮 */
.pagination {
text-align: center;
margin-top: 30px;
}
button {
padding: 10px 20px;
margin: 0 10px;
background-color: #5F4437; /* 深棕色 */
color: white;
border: none;
border-radius: 6px;
cursor: pointer;
font-size: 1rem;
transition: background-color 0.3s ease;
}
button:disabled {
background-color: #d6d6d6;
cursor: not-allowed;
}
button:hover {
background-color: #b38867; /* 深棕色的 hover 效果 */
}
/* 错误信息的样式 */
.error {
color: #ff6f61; /* 红色 */
text-align: center;
margin-top: 20px;
}
/* 加载中的提示 */
.loading {
color: #5F4437;
text-align: center;
margin-top: 20px;
font-size: 1.2rem;
}
/* 响应式设计: 确保在小屏幕下布局能适应 */
@media (max-width: 768px) {
.group-item {
width: 48%;
}
.filter-search-sort-container {
flex-direction: column;
}
.filter select,
.search input,
.sort select {
width: 100%;
margin-bottom: 10px;
}
}
@media (max-width: 480px) {
.group-item {
width: 100%;
}
.filter select,
.search input,
.sort select {
width: 100%;
font-size: 0.9rem;
}
}
.interest-group-card {
background-color: #e9ded2;
border-radius: 16px;
max-width: 70%;
max-height: 100%;
/* 卡片居中 */
margin: 0 auto;
margin-top: 40px;
/* padding: 24px 32px; */
padding: 3% 3%
}
.create-group-btn {
background-color: #4e342e; /* 浅粉色 */
color: #fdfdfd; /* 深棕色 */
border: none;
padding: 10px 20px;
margin: 20px 0;
border-radius: 8px;
font-size: 16px;
cursor: pointer;
transition: background-color 0.3s ease;
}
.create-group-btn:hover {
background-color: #e4b5ae;
}
.modal-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(50, 30, 20, 0.5); /* 米棕半透明 */
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
}
.modal-content {
background-color: #fffaf5; /* 淡米色 */
padding: 30px;
border-radius: 12px;
width: 400px;
box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.modal-content h2 {
margin-bottom: 15px;
color: #4e342e;
}
.modal-content input,
.modal-content textarea {
width: 100%;
padding: 10px;
margin: 8px 0;
border: 1px solid #d3c0b0;
border-radius: 6px;
font-size: 14px;
}
.modal-buttons {
display: flex;
justify-content: flex-end;
gap: 10px;
margin-top: 15px;
}
.modal-buttons button {
padding: 8px 16px;
border: none;
border-radius: 6px;
font-weight: bold;
cursor: pointer;
font-size: 14px;
}
.modal-buttons button:first-child {
background-color: #d7a29e; /* 粉棕 */
color: white;
}
.modal-buttons button:last-child {
background-color: #c5b8af; /* 米色灰棕 */
color: white;
}