/* 全局样式 */
* {
  margin: 0;
  padding: 0;
}

/* 删除或注释掉所有@media查询 */
/* @media (max-width: 768px) { ... } */

/* 添加以下全局样式确保布局一致 */
html,
body {
  min-width: 1200px; /* 强制最小宽度 */
  overflow-x: auto; /* 允许横向滚动 */
}

.container {
  min-width: 1200px; /* 确保容器不会缩小 */
}

/* 防止导航栏换行 */
.main-nav ul {
  white-space: nowrap;
}

/* 确保表格和其他元素不换行 */
table,
.announcement-filters,
.form-actions {
  white-space: nowrap;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.btn:hover {
  opacity: 0.9;
}

.login-btn {
  background-color: #4caf50;
  color: white;
}

.add-btn {
  background-color: #2196f3;
  color: white;
  margin-left: 10px;
}

.cancel-btn {
  background-color: #f44336;
  color: white;
}

.submit-btn {
  background-color: #4caf50;
  color: white;
}

.main-nav ul {
  display: flex;
  list-style: none;
}

.main-nav li {
  margin-left: 20px;
}

.main-nav a {
  color: white;
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s;
}

.main-nav a:hover {
  color: #3498db;
}

.main-nav a.active {
  color: #3498db;
  font-weight: 600;
}

.admin-controls {
  position: absolute;
  right: 5vw;
  width: 1vw;
  display: flex;
  align-items: center;
}

/* 主要内容布局 */
.main-container {
  display: flex;
  margin-top: 20px;
  margin-bottom: 40px;
}

.sidebar {
  width: 250px;
  margin-right: 20px;
}

.content {
  flex: 1;
  background-color: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* 侧边栏样式 */
.server-info,
.quick-links,
.recent-events {
  background-color: white;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.server-info h3,
.quick-links h3,
.recent-events h3 {
  margin-bottom: 15px;
  color: #2c3e50;
  font-size: 18px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 14px;
}

.info-label {
  font-weight: 600;
  color: #555;
}

.info-value {
  color: #333;
}

.status {
  display: flex;
  align-items: center;
}

.status i {
  margin-right: 5px;
  font-size: 10px;
}

.status.online {
  color: #4caf50;
}

.quick-links ul {
  list-style: none;
}

.quick-links li {
  margin-bottom: 8px;
}

.quick-links a {
  color: #3498db;
  text-decoration: none;
  transition: color 0.3s;
}

.quick-links a:hover {
  color: #2980b9;
  text-decoration: underline;
}

.quick-links i {
  margin-right: 8px;
  width: 20px;
  text-align: center;
}

.List {
  height: 150px; /* 固定高度 */
  overflow-y: auto; /* 垂直滚动条 */
  border: 1px solid #ccc;
  padding: 10px;
}

.event {
  display: flex;
  margin-bottom: 10px;
  font-size: 14px;
}

.event-date {
  background-color: #3498db;
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  margin-right: 10px;
  font-weight: 600;
  min-width: 40px;
  text-align: center;
}

.event-content {
  flex: 1;
}

/* 公告区域样式 */
.announcements-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
}

.announcements-header h2 {
  color: #2c3e50;
  font-size: 24px;
}

.announcement-filters {
  display: flex;
}

.filter-btn {
  padding: 6px 12px;
  margin-left: 10px;
  background-color: #eee;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
}

.filter-btn:hover {
  background-color: #ddd;
}

.filter-btn.active {
  background-color: #3498db;
  color: white;
}

/* 公告卡片样式 */
.announcement-card {
  background-color: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  border-left: 4px solid #3498db;
  transition: transform 0.3s;
}

.announcement-card:hover {
  transform: translateY(-3px);
}

.announcement-card.important {
  border-left-color: #e74c3c;
}

.announcement-card.update {
  border-left-color: #2ecc71;
}

.announcement-card.event {
  border-left-color: #f39c12;
}

.announcement-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.announcement-title {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
}

.announcement-type {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.type-important {
  background-color: #e74c3c;
  color: white;
}

.type-update {
  background-color: #2ecc71;
  color: white;
}

.type-event {
  background-color: #f39c12;
  color: white;
}

.type-normal {
  background-color: #3498db;
  color: white;
}

.announcement-meta {
  display: flex;
  margin-bottom: 15px;
  font-size: 13px;
  color: #777;
}

.announcement-date {
  margin-right: 15px;
}

.announcement-author {
  font-weight: 600;
  color: #3498db;
}

.announcement-content {
  line-height: 1.7;
  margin-bottom: 15px;
}

.announcement-actions {
  display: flex;
  justify-content: flex-end;
}

.edit-btn,
.delete-btn {
  padding: 5px 10px;
  font-size: 13px;
  margin-left: 10px;
  border-radius: 4px;
}

.edit-btn {
  background-color: #f39c12;
  color: white;
}

.delete-btn {
  background-color: #e74c3c;
  color: white;
}

/* 模态框样式 */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  overflow: auto;
}

.modal-content {
  background-color: white;
  margin: 10% auto;
  padding: 25px;
  border-radius: 8px;
  width: 100%;
  max-width: 600px;
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 24px;
  color: #aaa;
  cursor: pointer;
}

.close-btn:hover {
  color: #333;
}

.modal h2 {
  margin-bottom: 20px;
  color: #2c3e50;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

.form-actions .btn {
  margin-left: 10px;
}

/* 页脚样式 */
.server-footer {
  background-color: #2c3e50;
  color: white;
  padding: 20px 0;
  text-align: center;
}

.footer-links {
  margin-bottom: 15px;
}

.footer-links a {
  color: white;
  margin: 0 15px;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: #3498db;
}

.copyright p {
  font-size: 13px;
  color: #bbb;
  margin-bottom: 5px;
}
