body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

.main{
	min-height:600px;
	
}

.page-title {
  text-align: center;
  margin-bottom: 20px;
  font-size: 2rem;
}

header {
  background: #333;
  color: #fff;
  padding: 1rem 0;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* 讓項目在小螢幕自動換行 */
}

header h1 {
  margin: 0;
  font-size: 1.5rem;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  height: 20px;
  cursor: pointer;
}

.hamburger div {
  width: 25px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s;
}

.mobile-menu {
  /* display: none; */
  /* flex-direction: column; */
  /* background: #444; */
  /* position: absolute; */
  top: 60px;
  right: 0;
  width: 100%;
  z-index: 1000;
}

.mobile-menu.active {
  display: flex;
}

.mobile-menu li {
  text-align: center;
  padding: 1rem 0;
}

.mobile-menu li a {
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row; /* 橫向排列 */
}

nav ul li {
  margin: 0 1rem;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

section {
  margin: 2rem 0;
}

#search {
  text-align: center; /* 搜索框置中 */
}

#search input {
  width: 70%;
  max-width: 500px; /* 最大寬度限制 */
  padding: 0.5rem;
  margin-bottom: 1rem; /* 增加垂直空間 */
}

#search button {
  padding: 0.5rem 1rem;
  background: #007BFF;
  color: #fff;
  border: none;
  cursor: pointer;
}

#search button:hover {
  background: #0056b3;
}

#popular-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 0;
  list-style: none;
}

#popular-list li {
  width: 45%; /* 讓項目佔一半寬度 */
  margin: 0.5rem 0;
  background: #f4f4f4;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-align: center;
}

footer {
  background: #333;
  color: #fff;
  text-align: center;
  padding: 1rem 0;
  margin-top: 2rem;
}


.footer_item{
	color: #fff; 
	text-decoration: none; 
	font-size: 16px;
}


.btn {
  display: inline-block;
  padding: 12px 30px;
  font-size: 16px;
  color: #fff;
  background-color: #3498db;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.btn-success {
  padding: 5px 10px;
  background-color: #218838;
  color: white;
  border: none;
  border-radius: 3px;
  text-decoration: none;
  font-size: 0.9rem;
}

.btn-success:hover {
  background-color: #28a745;
}




/* RWD 調整 */
@media (max-width: 1024px) {
  nav ul {
	display: none; /* 隱藏默認菜單 */
  }

  .hamburger {
	display: flex; /* 顯示漢堡菜單 */
  }

  .mobile-menu {
	display: none; /* 預設隱藏 */
	flex-direction: column;
	background: #444;
	position: absolute;
	top: 60px;
	right: 0;
	width: 100%;
	z-index: 1000;
  }

  .mobile-menu.active {
	display: flex; /* 點擊漢堡菜單時顯示 */
  }

  .mobile-menu li {
	text-align: center;
	padding: 1rem 0;
	border-bottom: 1px solid #555;
  }

  .mobile-menu li a {
	color: #fff;
	text-decoration: none;
	font-size: 1rem;
  }
}

@media (max-width: 480px) {
  header h1 {
	font-size: 1.2rem; /* 更小螢幕下縮小標題字體 */
  }

  #search button {
	width: 100%; /* 搜索按鈕寬度滿版 */
	padding: 0.8rem; /* 增加觸控區域 */
  }
}




/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: #fff;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 400px;
  text-align: center;
  border-radius: 10px;
  position: relative;
}



.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  background-size: contain;
  border: none;
  cursor: pointer;
}

.modal-close:hover {
  filter: brightness(0.8);
}

.modal-icon {
  width: 50px;
  height: 50px;
  margin: 0 auto 10px auto;
  background: url('http://whois.cfd888.info/error.svg') no-repeat center;
  background-size: contain;
}


.modal-icon-success {
  width: 50px;
  height: 50px;
  margin: 0 auto 10px auto;
  background: url('http://whois.cfd888.info/success.svg') no-repeat center;
  background-size: contain;
}

.modal-message {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 10px;
  color: #e74c3c;
}

.modal-details {
  font-size: 0.9rem;
  color: #666;
}


/* 頁次 */

.pagination {
  display: flex;
  justify-content: center;
  gap: 5px;
}

.pagination-button {
  padding: 8px 12px;
  background-color: white;
  color: black;
  border: solid 0.5px;
  border-radius: 3px;
  text-decoration: none;
}

.pagination-button:hover {
  background-color: #0056b3;
}

.pagination-button.active {
  background-color: #007BFF;
  font-weight: bold;
}

.pagination-button[disabled] {
    background-color: white;
    cursor: not-allowed;
    color: black;
    border: solid 0.5px;
}


/* 預設情況 (PC 顯示 x, 手機顯示 第x頁) */
.mobile-only {
  display: none; /* 手機專用，默認隱藏 */
}

.desktop-only {
  display: inline; /* 桌面專用，默認顯示 */
}

/* 當視窗寬度小於 786px 時切換 */
@media (max-width: 786px) {
  .mobile-only {
    display: inline; /* 手機專用，顯示 */
  }

  .desktop-only {
    display: none; /* 桌面專用，隱藏 */
  }
}



/* 追蹤按鈕樣式 */
.btn.follow-btn {
  background-color: #2ecc71; /* 綠色背景 */
}

.btn.follow-btn:hover {
  background-color: #27ae60; /* 深綠色背景 */
}

/* 取消追蹤按鈕樣式 */
.btn.unfollow-btn {
  background-color: #e74c3c; /* 紅色背景 */
}

.btn.unfollow-btn:hover {
  background-color: #c0392b; /* 深紅色背景 */
}