.main-content {
  width: 90%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  margin-top: 120px; /* 這裡加上 margin-top，讓主內容區不會被 header 擋住 */
}

.content {
  margin: 0 auto; /* Center horizontally */
  padding: 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  max-width: 600px;
}

.form-group {
  margin-bottom: 15px;
}

.form-control {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

h2 {
  font-size: 1.5em;
  margin-bottom: 20px;
}

.btn-main {
  background-color: var(--button-bg-color) !important;
  border-color: var(--button-bg-color);
  border-radius: 20px;
  padding: 5px 10px;
  text-decoration: none;
  color: #fff;
  display: inline-block;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s, border-color 0.3s;
}

.btn-primary {
  background-color: #f0a9a9;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  color: white;
  transition: background-color 0.3s ease;
}

.btn-primary:hover {
  background-color: #e09393;
}

@media screen and (max-width: 800px) {
  .slider {
    margin: 20px auto;
  }

  .slide img {
    border-radius: 20px;
  }

  .post {
    padding: 10px;
    margin: 10px 0;
    border-radius: 20px;
  }

  .post-actions button {
    padding: 5px 10px;
  }
}

/* 確保左側邊欄在大屏幕時顯示 */
.left-sidebar {
  width: 200px;
  background-color: #f0f0f0;
  padding: 20px;
  position: fixed;
  top: 70px; /* 修改這裡，將左側邊欄下移以免被 header 遮擋 */
  left: 0;
  height: calc(100% - 120px);
  overflow-y: auto;
  z-index: 10;
  transition: all 0.3s ease;
}

.left-sidebar .icon-search,
.left-sidebar .icon-link {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.left-sidebar .icon-search img,
.left-sidebar .icon-link img {
  margin-right: 10px;
  width: 30px;
  height: 30px;
  transition: all 0.3s ease;
}

.left-sidebar .icon-search input {
  flex: 1;
}

.left-sidebar .icon-link a {
  text-decoration: none;
  color: var(--primary-text-color);
  font-weight: 600;
  transition: all 0.3s ease;
}

/* 小屏幕樣式 */
@media (max-width: 1020px) {
  .left-sidebar {
    width: 100%;
    position: fixed;
    top: 60px; /* 修改這裡，將左側邊欄下移以免被 header 遮擋 */
    left: 0;
    height: 60px;
    display: flex;
    justify-content: space-around;
    padding: 15px;
    background-color: var(--header-footer-bg-color);
  }

  .main-content {
    margin-top: 90px;
  }

  .left-sidebar .icon-search {
    display: none; /* 隱藏搜索欄位 */
  }

  .left-sidebar .icon-link {
    flex-direction: column;
    align-items: center;
    margin-bottom: 0;
  }

  .left-sidebar .icon-link span {
    display: none; /* 隱藏文字 */
  }

  .left-sidebar .icon-link img {
    margin-right: 0;
    width: 40px;
    height: 40px;
  }
}

.left-sidebar .icon-search input {
  width: 100px; /* 設置搜索框的寬度 */
  height: 30px; /* 設置搜索框的高度 */
  padding: 5px; /* 調整內邊距 */
  font-size: 14px; /* 調整字體大小 */
  border-radius: 10px; /* 調整圓角 */
  border: 1px solid #ccc; /* 設置邊框 */
}

/* 在小屏幕時也可以相應調整搜索框大小 */
@media (max-width: 768px) {
  .left-sidebar .icon-search input {
    width: 100px; /* 調整小屏幕時的寬度 */
    height: 25px; /* 調整小屏幕時的高度 */
    font-size: 12px; /* 調整小屏幕時的字體大小 */
  }
}
