/* 全局样式重置和基础设置 */
:root {
  --primary-color: #4285f4;
  --primary-dark: #3367d6;
  --secondary-color: #f1f1f1;
  --text-color: #333;
  --text-light: #666;
  --border-color: #ddd;
  --error-color: #d32f2f;
  --success-color: #388e3c;
  --warning-color: #ffa000;
  --font-main: 'Microsoft YaHei', Arial, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  line-height: 1.6;
  color: var(--text-color);
  background-color: #f5f5f5;
  padding: 0;
}

a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* 头部样式 */
header {
  background-color: var(--primary-color);
  color: white;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.logo {
  font-size: 24px;
  font-weight: bold;
  color: white;
  width: auto;
}

.user-info {
    margin-left: 20px;
  display: flex;
 /* align-items: center;
  /*gap: 15px;*/
  width:auto;
}

.username {
  font-weight: bold;
}

.menu-item{
    display: block;
  padding: 10px 15px;
  text-decoration: none;
  color: #333;
  white-space: nowrap;
}
.profile-avatar {/***文字头像***/
            width: 30px;
            height: 30px;
            border-radius: 50%;
            background-color: #ddd;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 0px;
            font-size: 20px;
            color: #666;
        }
        
.header-menu{
    width:100%;
    max-width: 1000px;
    display: flex;
    justify-content: space-between;
    margin: auto;
    
  align-items: center;
}

nav{
    display: flex;
    justify-content: space-between;
    width: 600px;
    
}

  nav a {
            margin-left: 10px;
            text-decoration: none;
            color: var(--secondary-color);
   white-space: nowrap;
        }
        nav a:hover {
            text-decoration: none;
            
  white-space: nowrap;
        }

/*main主体*/
main{
    max-width: 980px;
    margin: 5px auto;
    min-height: 600px;
    
}

/*footer*/
footer{
        min-height: 200px;
        width: 100%;
        padding: 20px 0px;
        justify-content: space-around;  
        text-align: center;
        background-color: #fff;
        color: white;
        }

/******论坛主页******************************/
/*论坛列表*/
.bbs-list{
    border-bottom: 1px solid #ddd;
    background-color: white;
    padding: 5px 10px;
}

.bolck{
     border-radius: 10px; /* 所有角都是10px圆角 */
     box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.3);
     background-color: white;
     padding: 20px;
}
/*分页*/
        .pagination {
            display: flex;
            justify-content: center;
            margin-top: 20px;
        }
        .pagination a {
            padding: 5px 10px;
            margin: 0 5px;
            border: 1px solid #ddd;
            text-decoration: none;
            color: #333;
        }
        .pagination a:hover {
            background: #f5f5f5;
        }
        .pagination .current {
            background: #007bff;
            color: white;
            border-color: #007bff;
            padding: 5px;
        }
        
/**********************/

        .back-link {
            display: inline-block;
            margin-top: 20px;
            color: #007bff;
            text-decoration: none;
        }
        .back-link:hover {
            text-decoration: underline;
        }
.start-right{
    display: flex;
    justify-content: flex-end;
}
/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
}

.btn:hover {
  background-color: var(--primary-dark);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--primary-color);
  color: var(--secondary-color);
}

/* 表单元素 */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

.form-control {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: inherit;
  font-size: 16px;
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

/* 帖子卡片 */
.post-card {
  background-color: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.post-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  display: block;
}

.post-meta {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 15px;
}

.post-content {
  margin-bottom: 15px;
  line-height: 1.6;
}

/* 评论样式 */
.comment {
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
}

.comment:last-child {
  border-bottom: none;
}

.comment-meta {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
}

/* 标签页 */
.tab-container {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.tab {
  padding: 10px 20px;
  background-color: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
  position: relative;
}

.tab.active {
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
}

/* 通知徽章 */
.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: var(--error-color);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}



/* 辅助类 */
.text-center {
  text-align: center;
}

.text-error {
  color: var(--error-color);
}

.text-success {
  color: var(--success-color);
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

.hidden {
  display: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 10px;
    padding: 5px 10px;
  }
  nav{
    display: flex;
    justify-content: space-between;
    width: auto;
    
}
  
  .user-info {
    width: 100%;
    justify-content: space-between;
  }
 
  .container {
    padding: 0 10px;
  }
  .logo {
  font-size: 20px;
  font-weight: bold;
  color: white;
  width: auto;
}
}

